From: Jan Büren Date: Mon, 13 Jun 2016 13:40:29 +0000 (+0200) Subject: Feature Kontoauszug verbuchen - nur maximal offene Beträge X-Git-Tag: release-3.4.1~60 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aa949f278f7a5503a94739662cd1a43408b5511d;p=kivitendo-erp.git Feature Kontoauszug verbuchen - nur maximal offene Beträge amount_open -> open_amount - richtige Helper-Funktion aufrufen --- 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,