X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fis.pl;h=450d0b6131f0eb94b75108dfd8b0f7e4fe5cca21;hb=ee1d7e16868223bdeb2be45555b4d15545b53c7c;hp=a506512dd2b95898575292529353eac318d1c160;hpb=662ded382ad646d46d1e2613df42ed35ee2f6265;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index a506512dd..450d0b613 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -144,6 +144,8 @@ sub invoice_links { } } + my $editing = $form->{id}; + $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes id shipto_id)); IS->get_customer(\%myconfig, \%$form); @@ -166,7 +168,7 @@ sub invoice_links { IS->retrieve_invoice(\%myconfig, \%$form); $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id shipto_id)); $form->restore_vars(qw(taxincluded)) if $form->{id}; - $form->restore_vars(qw(salesman_id)) if $main::editing; + $form->restore_vars(qw(salesman_id)) if $editing; # build vendor/customer drop down comatibility... don't ask @@ -331,7 +333,7 @@ sub form_header { my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; $TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; - $TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, + $TMPL_VAR{currencies} = NTI($::cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, '-values' => \@values, '-labels' => \%labels)) if scalar @values; push @custom_hiddens, "forex"; push @custom_hiddens, "exchangerate" if $form->{forex}; @@ -719,10 +721,9 @@ sub post { $form->{addition} = $form->{print_and_post} ? "PRINTED AND POSTED" : $form->{storno} ? "STORNO" : "POSTED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } - # macnetix: after invoice->Post, redirect to edit. if (!$form->{no_redirect_after_post}) { $form->{action} = 'edit'; $form->{script} = 'is.pl'; @@ -941,7 +942,7 @@ sub yes { 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!'));