mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-03-13 05:46:56 +01:00
* FIX: Issue #37425 filling of field amount_main_currency for foreign money accounts The parameter amount_main_currency (argument #13 of addline()) was previously filled even when the bank account was already using the company main currency. This caused the field amount_main_currency to be populated incorrectly for transactions that were not foreign currency operations. The logic has been updated so that amount_main_currency is only filled when the transaction involves a foreign currency account. For accounts already using the company main currency, the value is now left NULL as expected. This aligns the behavior with the intended usage of addline() and prevents incorrect data in bank transaction records. * FIX: Issue #37425 filling of field amount_main_currency for foreign money accounts transfer.php: PhanTypeMismatchArgument: Argument 4 ($amount) is price2num((-1 * (float)($amount[$n]))) of type string but \Account::addline() takes float defined at htdocs/compta/bank/class/account.class.php:611 CI-PULL-REQUEST / phan / Run phan Check warning on line R189 Check warning: transfer.php: PhanTypeMismatchArgument: Argument 13 ($amount_main_currency) is $amount_main_currency_from of type ?string but \Account::addline() takes ?float defined at htdocs/compta/bank/class/account.class.php:611 CI-PULL-REQUEST / phan / Run phan * declare dateo * declare of variables before action script --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>