X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0710af696dd6818306c9ec9880ede7a92eed35d3..87eebe6:/bin/mozilla/oe.pl
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 26d607076..3dbb113d1 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";
@@ -479,12 +481,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} && !$form->{taxincluded_changed_by_user} ) {
+ 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}) {