Revision 8dfafa71
Von Jan Büren vor fast 7 Jahren hinzugefügt
SL/DB/Helper/Payment.pm | ||
---|---|---|
# my $transactions = $self->transactions;
|
||
foreach my $transaction (@{ $self->transactions }) {
|
||
# find all transactions with an AR_amount or AP_amount link
|
||
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->taxkey]);
|
||
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->taxkey, id => $transaction->tax_id ]);
|
||
croak "no tax for taxkey " . $transaction->{taxkey} unless ref $tax;
|
||
|
||
$transaction->{chartlinks} = { map { $_ => 1 } split(m/:/, $transaction->chart_link) };
|
||
... | ... | |
# $reference_ARAP_amount += $transaction->{amount} * $mult;
|
||
|
||
# quick hack that works around problem of non-unique tax keys in SKR04
|
||
my $tax = SL::DB::Manager::Tax->get_first( where => [taxkey => $transaction->{taxkey}]);
|
||
# ? use tax_id in acc_trans
|
||
my $tax = SL::DB::Manager::Tax->get_first( where => [id => $transaction->{tax_id}]);
|
||
croak "no tax for taxkey " . $transaction->{taxkey} unless ref $tax;
|
||
|
||
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)