if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{"invnumber_$i"};
$form->{addition} = "POSTED";
- $form->save_history($form->dbconnect($myconfig));
+ $form->save_history;
}
# /saving the history
}
sub save_history {
$main::lxdebug->enter_sub();
- my $self = shift();
- my $dbh = shift();
+ my $self = shift;
+ my $dbh = shift || $self->get_standard_dbh;
if(!exists $self->{employee_id}) {
&get_employee($self, $dbh);
$self->{addition}, $self->{what_done}, "$self->{snumbers}");
do_query($self, $dbh, $query, @values);
+ $dbh->commit;
+
$main::lxdebug->leave_sub();
}
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
remove_draft() if $form->{remove_draft};
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED AS NEW";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&post;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Transaction deleted!'));
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = "ordnumber_$form->{ordnumber}";
$form->{addition} = "STORNO";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition} && ($form->{id} ne "")) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "ADDED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = "invnumber_$form->{invnumber}";
$form->{addition} = "POSTED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
remove_draft() if $form->{remove_draft};
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED AS NEW";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&post;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Transaction deleted!'));
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = "ordnumber_$form->{ordnumber}";
$form->{addition} = "STORNO";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
# # saving the history
# if(!exists $form->{addition}) {
# $form->{addition} = "ADD TRANSACTION";
-# $form->save_history($form->dbconnect(\%myconfig));
+# $form->save_history;
# }
# # /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&add_transaction;
if(!exists $form->{addition}) {
$form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text($msg));
if(!exists $form->{addition}) {
$form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
&edit;
if(!exists $form->{addition}) {
$form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text($msg));
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
$form->{addition} = "SAVED FOR DUNNING";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Dunning Process Config saved!'));
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
$form->{addition} = "DUNNING STARTED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|donumber_| . $form->{donumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|donumber_| . $form->{donumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
for my $i (1 .. $form->{rowcount}) {
# für bug 1284
- if ($form->{discount}){ # Falls wir einen Kundenrabatt haben
+ if ($form->{discount}){ # Falls wir einen Kundenrabatt haben
# und keinen anderen discount wert an $i ...
$form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir den kundenrabatt
}
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Transaction deleted!'))
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id};
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = "ordnumber_$form->{ordnumber}";
$form->{addition} = "STORNO";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$parts_id = $form->{id};
if(!exists $form->{addition}) {
$form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED AS NEW";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->{id} = 0;
if(!exists $form->{addition}) {
$form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
my $rc = IC->delete(\%myconfig, \%$form);
my %column_data = ();
# undo formatting
- map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) }
- qw(qty discount sellprice lastcost price_new price_old)
+ map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) }
+ qw(qty discount sellprice lastcost price_new price_old)
unless ($form->{simple_save});
# unit begin
map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_absolut marge_percent);
push @ROW2, { value => sprintf qq|
- <font %s><b>%s</b> %s %s%% </font>
- <b>%s</b> %s
+ <font %s><b>%s</b> %s %s%% </font>
+ <b>%s</b> %s
<b>%s</b> <input size="5" name="lastcost_$i" value="%s">|,
$marge_color, $locale->text('Ertrag'),$form->{"marge_absolut_$i"}, $form->{"marge_percent_$i"},
$locale->text('LP'), $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2),
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "PRINTED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
::end_of_request();
elsif($form->{media} =~ /screen/) {
$form->{addition} = "SCREENED";
}
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "CANCELED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "PAYMENT POSTED";
$form->{what_done} = $form->{currency} . qq| | . $form->{paid} . qq| | . $locale->text("POSTED");
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
# /saving the history
}
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
remove_draft() if $form->{remove_draft};
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Invoice deleted!'));
$form->{addition} = $form->{print_and_post} ? "PRINTED AND POSTED" :
$form->{storno} ? "STORNO" :
"POSTED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
if (!$form->{no_redirect_after_post}) {
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->redirect($locale->text('Invoice deleted!'));
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->info($msg);
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$main::lxdebug->leave_sub();
$form->{id} = $project->{id};
$form->{snumbers} = qq|projectnumber_| . $project->{projectnumber};
$form->{addition} = "SAVED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|projectnumber_| . $project->{projectnumber};
$form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "PRINTED";
$form->{what_done} = $form->{type};
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->save_history;
}
# /saving the history
$main::lxdebug->leave_sub();