X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FPayment.pm;h=9555f001a001adaa75480f115f3c8b85d18d2e21;hb=a66cafd980c44371fd29b0383f665125d85b1cc7;hp=97aff8f1ed8ec40d8ef64fa4b886330f7d43a56b;hpb=bbb58258bd516c262fb9e20b94ec801538a5ba99;p=kivitendo-erp.git diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index 97aff8f1e..9555f001a 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -461,7 +461,7 @@ sub check_skonto_configuration { # 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) }; @@ -542,7 +542,8 @@ sub skonto_charts { # $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 ) { @@ -791,7 +792,7 @@ or in a certain currency: transdate => DateTime->now->to_kivitendo, memo => 'foobar', source => 'barfoo', - payment_type => 'with_skonto', + payment_type => 'with_skonto_pt', ); Allowed payment types are: