From: Jan Büren Date: Thu, 14 Jan 2021 13:07:24 +0000 (+0100) Subject: Kommentar zum Payment-Helper X-Git-Tag: kivitendo-mebil_0.1-0~9^2~526 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/524bc23eb0c179bfa2acbf6c6f00dce3788fccc7?hp=ea13b69d6d3a70c5432ae6b6d29a0a0531e51da9 Kommentar zum Payment-Helper Außer in den Testfällen wird der Helper nicht mit einem negativen Amount aufgerufen. Im Helper befindet sich etwas zuviel automagie. Eigentlich braucht man den Param amount nicht, wird aber überall in kivi übergeben. Eigentlich darf der negativ sein, verfälscht aber das multiplizieren im Helper. --- diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index a778e927f..6dee0918f 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -778,7 +778,10 @@ to be lower than the payment or open invoice amount. Transdate can either be a date object or a date string. Chart_id is the id of the payment booking chart. -Amount is either a postive or negative number, but never 0. +Amount is either a positive or negative number, but never 0. + +CAVEAT! The helper tries to get the sign right and all calls from BankTransaction are +positive (abs($value)) values. Example: