Revision 8dfafa71
Von Jan Büren vor mehr als 6 Jahren hinzugefügt
SL/DB/Helper/Payment.pm | ||
---|---|---|
461 | 461 |
# my $transactions = $self->transactions; |
462 | 462 |
foreach my $transaction (@{ $self->transactions }) { |
463 | 463 |
# find all transactions with an AR_amount or AP_amount link |
464 |
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->taxkey]); |
|
464 |
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->taxkey, id => $transaction->tax_id ]);
|
|
465 | 465 |
croak "no tax for taxkey " . $transaction->{taxkey} unless ref $tax; |
466 | 466 |
|
467 | 467 |
$transaction->{chartlinks} = { map { $_ => 1 } split(m/:/, $transaction->chart_link) }; |
... | ... | |
542 | 542 |
# $reference_ARAP_amount += $transaction->{amount} * $mult; |
543 | 543 |
|
544 | 544 |
# quick hack that works around problem of non-unique tax keys in SKR04 |
545 |
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->{taxkey}]); |
|
545 |
# ? use tax_id in acc_trans |
|
546 |
my $tax = SL::DB::Manager::Tax->get_first( where => [id => $transaction->{tax_id}]); |
|
546 | 547 |
croak "no tax for taxkey " . $transaction->{taxkey} unless ref $tax; |
547 | 548 |
|
548 | 549 |
if ( $is_sales ) { |
Auch abrufbar als: Unified diff
Payment::pay_invoice with skonto -> Steuersatz ist eindeutig
tax_id in acc_trans definiert sicherer den Steuersatz als der
taxkey (Steuerschlüssel von DATEV), s.a. FK-Constraint:
"acc_trans_tax_id_fkey" FOREIGN KEY (tax_id) REFERENCES tax(id)