Revision 9a527d73
Von Jan Büren vor fast 8 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
667 | 667 |
} elsif (( $invoice->is_sales && $invoice->invoice_type eq 'credit_note' ) || |
668 | 668 |
(!$invoice->is_sales && $invoice->invoice_type eq 'ap_transaction' )) { |
669 | 669 |
# no check for overpayment/multiple payments |
670 |
|
|
671 |
# 1. $invoice->open_amount is arap.amount - ararp.paid (always positive!) |
|
672 |
# 2. $bank_transaction->amount is negative for outgoing transactions and positive for |
|
673 |
# incoming transactions. |
|
674 |
# 1. and 2. => we have to turn the sign for invoice_amount in bank_transactions |
|
675 |
# for verifying expected data, check t/bank/bank_transactions.t |
|
676 |
$bank_transaction->invoice_amount($invoice->open_amount * -1); |
|
677 |
|
|
670 | 678 |
$invoice->pay_invoice(chart_id => $bank_transaction->local_bank_account->chart_id, |
671 | 679 |
trans_id => $invoice->id, |
672 | 680 |
amount => $invoice->open_amount, |
Auch abrufbar als: Unified diff
Verbuchte Zahlungen auch in neuen Fällen von Bankbewegegungen berücksichtigen
Ergänzend zu af131a46:
Banktransaction: Kontoauszug verbuchen: Sonderfall für "credit_notes"