Revision d25334c6
Von Hans Peter Schlaepfer vor mehr als 6 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
390 | 390 |
|
391 | 391 |
setup_ir_action_bar(); |
392 | 392 |
|
393 |
$form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); # moved to here from sub form_footer |
|
394 |
|
|
393 | 395 |
$form->header(); |
394 | 396 |
|
395 | 397 |
print $form->parse_html_template("ir/form_header", \%TMPL_VAR); |
... | ... | |
441 | 443 |
foreach my $item (@{ $form->{taxaccounts_array} }) { |
442 | 444 |
if ($form->{"${item}_base"}) { |
443 | 445 |
if ($form->{taxincluded}) { |
444 |
$form->{"${item}_total"} = $form->round_amount( ($form->{"${item}_base"} * $form->{"${item}_rate"} |
|
445 |
/ (1 + $form->{"${item}_rate"})), 2); |
|
446 |
$form->{"${item}_total"} = $form->round_amount( ($form->{"${item}_base"} * $form->{"${item}_rate"} / (1 + $form->{"${item}_rate"})), 2); |
|
446 | 447 |
$form->{"${item}_netto"} = $form->round_amount( ($form->{"${item}_base"} - $form->{"${item}_total"}), 2); |
447 |
} else { |
|
448 |
} |
|
449 |
else { |
|
448 | 450 |
$form->{"${item}_total"} = $form->round_amount( $form->{"${item}_base"} * $form->{"${item}_rate"}, 2); |
449 | 451 |
$form->{invtotal} += $form->{"${item}_total"}; |
450 | 452 |
} |
... | ... | |
496 | 498 |
$totalpaid += $form->{"paid_$i"}; |
497 | 499 |
} |
498 | 500 |
|
499 |
$form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
|
|
501 |
# $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); # moved to sub form_header
|
|
500 | 502 |
|
501 | 503 |
print $form->parse_html_template('ir/form_footer', { |
502 | 504 |
is_type_credit_note => ($form->{type} eq "credit_note"), |
Auch abrufbar als: Unified diff
Aenderungen hpschlaepfer