Revision 20392548
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
524 | 524 |
payment_type => $payment_type, |
525 | 525 |
transdate => $bank_transaction->transdate->to_kivitendo); |
526 | 526 |
} else { # use the whole amount of the bank transaction for the invoice, overpay the invoice if necessary |
527 |
my $overpaid_amount = $amount_of_transaction - $invoice->open_amount; |
|
527 | 528 |
$invoice->pay_invoice(chart_id => $bank_transaction->local_bank_account->chart_id, |
528 | 529 |
trans_id => $invoice->id, |
529 | 530 |
amount => $amount_of_transaction, |
... | ... | |
531 | 532 |
transdate => $bank_transaction->transdate->to_kivitendo); |
532 | 533 |
$bank_transaction->invoice_amount($bank_transaction->amount); |
533 | 534 |
$amount_of_transaction = 0; |
535 |
|
|
536 |
push @warnings, { |
|
537 |
%data, |
|
538 |
result => 'warning', |
|
539 |
message => $::locale->text('Invoice #1 was overpaid by #2.', $invoice->invnumber, $::form->format_amount(\%::myconfig, $overpaid_amount, 2)), |
|
540 |
}; |
|
534 | 541 |
} |
535 | 542 |
|
536 | 543 |
# Record a record link from the bank transaction to the invoice |
Auch abrufbar als: Unified diff
Bankeinzug: bei Überzahlung eine Warnung ausgeben
Eine Überzahlung ist oftmals OK oder unvermeidbar, sollte aber von der
BenutzerIn begutachtet werden.