From: Jan Büren Date: Wed, 28 Apr 2021 10:38:15 +0000 (+0200) Subject: Bankimport im Dialog verbuchen, Fließkommazahlen/Rundungsfehler erlauben X-Git-Tag: kivitendo-mebil_0.1-0~9^2~357 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9c8e598ed5e1c716d18b0c536ec75e0c86519a34;p=kivitendo-erp.git Bankimport im Dialog verbuchen, Fließkommazahlen/Rundungsfehler erlauben --- 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));