From 72d45992d1313328164f1d60b5be214f57a0e03c Mon Sep 17 00:00:00 2001 From: "Martin Helmling mh@waldpark.octosoft.eu" Date: Fri, 15 Apr 2016 16:23:49 +0200 Subject: [PATCH] =?utf8?q?Sepa-=C3=9Cberw:=20Fehlermeldung=20beim=20=C3=9C?= =?utf8?q?berweisen=20mit=20Skonto?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hier fehlte eine Abfrage. Fehlermeldung auf die Zahlungsart beziehen --- SL/DB/Helper/Payment.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index 719d935cc..654eb41fa 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -162,7 +162,9 @@ sub pay_invoice { $paid_amount += -1 * $amount; $skonto_amount_check -= $skonto_booking->{'skonto_amount'}; }; - die "difference_as_skonto calculated incorrectly, sum of calculated payments doesn't add up to open amount $total_open_amount, reference_amount = $reference_amount\n" unless _round($reference_amount) == 0; + if ( $params{payment_type} eq 'difference_as_skonto' ) { + die "difference_as_skonto calculated incorrectly, sum of calculated payments doesn't add up to open amount $total_open_amount, reference_amount = $reference_amount\n" unless _round($reference_amount) == 0; + } }; -- 2.20.1