From aa949f278f7a5503a94739662cd1a43408b5511d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 13 Jun 2016 15:40:29 +0200 Subject: [PATCH] =?utf8?q?Feature=20Kontoauszug=20verbuchen=20-=20nur=20ma?= =?utf8?q?ximal=20offene=20Betr=C3=A4ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit amount_open -> open_amount - richtige Helper-Funktion aufrufen --- SL/Controller/BankTransaction.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 18e96ced0..8b9ee207c 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -397,18 +397,18 @@ sub action_save_invoices { last; } # pay invoice or go to the next bank transaction if the amount is not sufficiently high - if ($invoice->amount_open <= $amount_of_transaction) { + if ($invoice->open_amount <= $amount_of_transaction) { $invoice->pay_invoice(chart_id => $bank_transaction->local_bank_account->chart_id, trans_id => $invoice->id, - amount => $invoice->amount_open, + amount => $invoice->open_amount, payment_type => $payment_type, transdate => $bank_transaction->transdate->to_kivitendo); if ($invoice->is_sales) { - $amount_of_transaction -= $sign * $invoice->amount_open; - $bank_transaction->invoice_amount($bank_transaction->invoice_amount + $invoice->amount_open); + $amount_of_transaction -= $sign * $invoice->open_amount; + $bank_transaction->invoice_amount($bank_transaction->invoice_amount + $invoice->open_amount); } else { - $amount_of_transaction += $sign * $invoice->amount_open if (!$invoice->is_sales); - $bank_transaction->invoice_amount($bank_transaction->invoice_amount - $invoice->amount_open); + $amount_of_transaction += $sign * $invoice->open_amount if (!$invoice->is_sales); + $bank_transaction->invoice_amount($bank_transaction->invoice_amount - $invoice->open_amount); } } else { $invoice->pay_invoice(chart_id => $bank_transaction->local_bank_account->chart_id, -- 2.20.1