From 9c8e598ed5e1c716d18b0c536ec75e0c86519a34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 28 Apr 2021 12:38:15 +0200 Subject: [PATCH] =?utf8?q?Bankimport=20im=20Dialog=20verbuchen,=20Flie?= =?utf8?q?=C3=9Fkommazahlen/Rundungsfehler=20erlauben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/gl.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 79e50859e..16aaf775a 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -1365,8 +1365,9 @@ sub post_transaction { die "guru meditation error: Can only assign amount to one bank account booking" if scalar @{ $payment } > 1; # credit/debit * -1 matches the sign for bt.amount and bt.invoice_amount - die "Can only assign the full (partial) bank amount to a single general ledger booking" - unless $bt->not_assigned_amount == $payment->[0]->amount * -1; + + die "Can only assign the full (partial) bank amount to a single general ledger booking" . $bt->not_assigned_amount . " " . ($payment->[0]->amount * -1) + unless (abs($bt->not_assigned_amount - ($payment->[0]->amount * -1)) < 0.001); $bt->update_attributes(invoice_amount => $bt->invoice_amount + ($payment->[0]->amount * -1)); -- 2.20.1