Revision 3c416dd9
Von Thomas Heck vor mehr als 11 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
37 | 37 |
use SL::OE; |
38 | 38 |
use SL::DB::Default; |
39 | 39 |
use Data::Dumper; |
40 |
use SL::DBUtils; |
|
40 | 41 |
use List::Util qw(max sum); |
41 | 42 |
|
42 | 43 |
require "bin/mozilla/io.pl"; |
... | ... | |
407 | 408 |
|
408 | 409 |
# tax, total and subtotal calculations |
409 | 410 |
my ($tax, $subtotal); |
410 |
$form->{taxaccounts_array} = [ split / /, $form->{taxaccounts} ]; |
|
411 |
|
|
412 |
my $paymet_id = $::form->{payment_id}; |
|
413 |
IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/; |
|
414 |
$::form->{payment_id} = $paymet_id; |
|
415 |
|
|
416 |
if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) { |
|
417 |
$form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked}; |
|
411 |
$form->{taxaccounts_array} = [ split(/ /, $form->{taxaccounts}) ]; |
|
412 |
|
|
413 |
if ( $form->{type} =~ /sales_(order|quotation)/ && $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) { |
|
414 |
my $query = ' |
|
415 |
SELECT |
|
416 |
taxincluded_checked |
|
417 |
FROM |
|
418 |
customer |
|
419 |
WHERE |
|
420 |
id = ?'; |
|
421 |
my $res = selectfirst_hashref_query($::form, $::form->get_standard_dbh(), $query, conv_i($::form->{customer_id})); |
|
422 |
|
|
423 |
$form->{taxincluded} = ($res && defined($res->{taxincluded_checked})) ? $res->{taxincluded_checked} : $myconfig{taxincluded_checked}; |
|
418 | 424 |
} |
419 | 425 |
|
420 | 426 |
foreach my $item (@{ $form->{taxaccounts_array} }) { |
bin/mozilla/oe.pl | ||
---|---|---|
45 | 45 |
use SL::ReportGenerator; |
46 | 46 |
use List::MoreUtils qw(any none); |
47 | 47 |
use List::Util qw(min max reduce sum); |
48 |
use SL::DBUtils; |
|
48 | 49 |
use Data::Dumper; |
49 | 50 |
|
50 | 51 |
require "bin/mozilla/io.pl"; |
... | ... | |
481 | 482 |
$TMPL_VAR{notes} = qq|<textarea name=notes rows="$rows" cols="25">| . H($form->{notes}) . qq|</textarea>|; |
482 | 483 |
$TMPL_VAR{intnotes} = qq|<textarea name=intnotes rows="$introws" cols="35">| . H($form->{intnotes}) . qq|</textarea>|; |
483 | 484 |
|
484 |
my $paymet_id = $::form->{payment_id}; |
|
485 |
IS->get_customer(\%myconfig, $::form) if $form->{type} =~ /sales_(order|quotation)/; |
|
486 |
$::form->{payment_id} = $paymet_id; |
|
487 |
|
|
488 |
if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) { |
|
489 |
$form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked}; |
|
485 |
if ( $form->{type} =~ /sales_(order|quotation)/ && $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) { |
|
486 |
my $query = ' |
|
487 |
SELECT |
|
488 |
taxincluded_checked |
|
489 |
FROM |
|
490 |
customer |
|
491 |
WHERE |
|
492 |
id = ?'; |
|
493 |
my $res = selectfirst_hashref_query($::form, $::form->get_standard_dbh(), $query, conv_i($::form->{customer_id})); |
|
494 |
|
|
495 |
$form->{taxincluded} = ($res && defined($res->{taxincluded_checked})) ? $res->{taxincluded_checked} : $myconfig{taxincluded_checked}; |
|
490 | 496 |
} |
491 | 497 |
|
492 | 498 |
if (!$form->{taxincluded}) { |
Auch abrufbar als: Unified diff
IS::get_customer nicht mehr zum Lader der Einstellung für taxincluded verwenden
fixt #2015