Files
Guido Schratzer 95579849dc FIX: filling of field amount_main_currency for foreign m… (#37439)
* 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>
2026-03-12 14:58:58 +01:00
..
2026-02-09 07:11:20 +01:00
CI
2026-02-08 23:25:11 +01:00
2025-12-30 16:21:15 +01:00
2026-02-25 19:18:10 +01:00
2025-10-17 02:31:07 +02:00
2026-01-31 20:29:59 +01:00
2026-03-11 20:40:45 +01:00
2026-03-11 20:47:00 +01:00
Doc
2026-01-30 00:56:32 +01:00