Files
dolibarr/htdocs/compta
Guido Schratzer 26f33edefc FIX Backport/23 fix amount main currency (#37530)
* 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.

(cherry picked from commit cdc36551d9)

* 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

(cherry picked from commit b8f222c3d9)

* declare dateo

(cherry picked from commit 1401f74969)

* declare of variables before action script

(cherry picked from commit 2b07209935)
2026-03-17 11:26:18 +01:00
..
2026-01-05 17:12:38 +01:00
2025-11-22 16:23:07 +01:00
2026-03-14 18:41:00 +01:00
2025-11-24 16:29:21 +01:00
2026-02-16 01:22:21 +01:00
2025-05-07 13:57:40 +02:00
2026-02-07 10:26:57 +01:00
2026-03-12 00:03:05 +01:00
2025-11-04 18:41:36 +01:00
CSS
2026-02-15 22:52:38 +01:00
2025-10-17 02:31:07 +02:00
2025-12-04 14:00:34 +01:00
2025-11-24 16:29:21 +01:00
2025-11-24 16:29:21 +01:00
2025-09-21 23:22:33 +02:00