X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0954a924a6d72c1b8e9d59986b3cca4865b2cab7..4bed72f:/bin/mozilla/oe.pl diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index f7f337561..cfdb11aa0 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -47,6 +47,8 @@ use List::MoreUtils qw(any none); use List::Util qw(min max reduce sum); use Data::Dumper; +use SL::DB::Customer; + require "bin/mozilla/io.pl"; require "bin/mozilla/arap.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -481,12 +483,9 @@ sub form_footer { $TMPL_VAR{notes} = qq||; $TMPL_VAR{intnotes} = qq||; - my $paymet_id = $::form->{payment_id}; - IS->get_customer(\%myconfig, $::form) if $form->{type} =~ /sales_(order|quotation)/; - $::form->{payment_id} = $paymet_id; - - if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) { - $form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked}; + if ($form->{customer_id}) { + my $customer = SL::DB::Customer->new(id => $form->{customer_id})->load(); + $form->{taxincluded} = defined($customer->taxincluded_checked) ? $customer->taxincluded_checked : $myconfig{taxincluded_checked}; } if (!$form->{taxincluded}) {