Revision 5c95eda7
Von Jan Büren vor mehr als 4 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
412 | 412 |
my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; |
413 | 413 |
|
414 | 414 |
$::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.File.js", "kivi.RecordTemplate.js", "kivi.AR.js", "kivi.CustomerVendor.js", "kivi.Validator.js"); |
415 |
|
|
416 |
my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; |
|
415 |
# get the correct date for tax |
|
416 |
my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; |
|
417 |
my $deliverydate = $::form->{deliverydate} ? DateTime->from_kivitendo($::form->{deliverydate}) : undef; |
|
418 |
my $taxdate = $deliverydate ? $deliverydate : $transdate; |
|
419 |
# helpers for loop |
|
417 | 420 |
my $first_taxchart; |
418 |
|
|
419 | 421 |
my @transactions; |
422 |
|
|
420 | 423 |
for my $i (1 .. $form->{rowcount}) { |
421 | 424 |
my $transaction = { |
422 | 425 |
amount => $form->{"amount_$i"}, |
... | ... | |
431 | 434 |
if ( $form->{"taxchart_$i"} ) { |
432 | 435 |
($used_tax_id) = split(/--/, $form->{"taxchart_$i"}); |
433 | 436 |
} |
434 |
foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $transdate, $used_tax_id) ) {
|
|
437 |
foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $taxdate, $used_tax_id) ) {
|
|
435 | 438 |
my $key = $item->id . "--" . $item->rate; |
436 | 439 |
$first_taxchart //= $item; |
437 | 440 |
$default_taxchart = $item if $item->{is_default}; |
Auch abrufbar als: Unified diff
Kreditoren- Debitorenbuchung: Lieferdatum für die Steuer berücksichtigen