From 8b14060fa510268875cec5d0e4bfe924a9f6897b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 17 Aug 2016 10:47:34 +0200 Subject: [PATCH] =?utf8?q?Bankauszug:=20nur=20Warnung=20wegen=20=C3=9Cberz?= =?utf8?q?ahlung=20bei=20tats=C3=A4chlicher=20=C3=9Cberzahlung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/BankTransaction.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 8f4bffd5c..68047f314 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -533,11 +533,13 @@ sub save_single_bank_transaction { $bank_transaction->invoice_amount($bank_transaction->amount); $amount_of_transaction = 0; - push @warnings, { - %data, - result => 'warning', - message => $::locale->text('Invoice #1 was overpaid by #2.', $invoice->invnumber, $::form->format_amount(\%::myconfig, $overpaid_amount, 2)), - }; + if ($overpaid_amount >= 0.01) { + push @warnings, { + %data, + result => 'warning', + message => $::locale->text('Invoice #1 was overpaid by #2.', $invoice->invnumber, $::form->format_amount(\%::myconfig, $overpaid_amount, 2)), + }; + } } # Record a record link from the bank transaction to the invoice -- 2.20.1