X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=ac3451db1901f8b6830eb454109bd525ea435281;hb=69f328366fdff5d6eb8408499691a479792c3540;hp=6b8d30bb08c0ecee84f3333c397fa2b4a3582408;hpb=c97d8162555a82a2ada2b0323fce9b19ae8c3a23;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6b8d30bb0..ac3451db1 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -298,7 +298,7 @@ sub form_header { my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; check_oe_access(); @@ -361,7 +361,9 @@ sub form_header { $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"}, - '-values' => \@values, '-labels' => \%labels)) if scalar @values; + '-values' => \@values, '-labels' => \%labels, + '-onchange' => "document.getElementById('update_button').click();" + )) if scalar @values; push @custom_hiddens, "forex"; push @custom_hiddens, "exchangerate" if $form->{forex}; @@ -461,8 +463,8 @@ sub form_footer { my $introws = max 2, $form->numtextrows($form->{intnotes}, 35, 8); $rows = max $rows, $introws; - $TMPL_VAR{notes} = qq||; - $TMPL_VAR{intnotes} = qq||; + $TMPL_VAR{notes} = qq||; + $TMPL_VAR{intnotes} = qq||; if (!$form->{taxincluded}) { @@ -744,7 +746,7 @@ sub orders { my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; check_oe_access(); @@ -1301,7 +1303,10 @@ sub invoice { $form->{quodate} = $form->{transdate}; } - my $payment_id = $form->{payment_id} if $form->{payment_id}; + my $payment_id; + if ($form->{payment_id}) { + $payment_id = $form->{payment_id}; + } # if the name changed get new values if (&check_name($form->{vc})) { @@ -1763,9 +1768,11 @@ sub poso { map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued customer vendor creditlimit creditremaining discount tradediscount oldinvtotal delivered ordnumber); # if purchase_order was generated from sales_order, use lastcost_$i as sellprice_$i + # also reset discounts if ( $form->{sales_order_to_purchase_order} ) { for my $i (1 .. $form->{rowcount}) { $form->{"sellprice_${i}"} = $form->format_amount(\%myconfig,$form->{"lastcost_${i}"}); + $form->{"discount_${i}"} = 0; }; };