FIX - AccountingAccount cache — silent reference mutation in accounting journals (#37981)

* FIX/AccountingAccountCache

* clean code
This commit is contained in:
atm-lucas 2026-04-24 15:30:00 +02:00 committed by GitHub
parent d096b47b9b
commit afa2e4aed1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -367,7 +367,7 @@ if ($action == 'writebookkeeping' && !$error && $user->hasRight('accounting', 'b
$account_label = $accountingaccount->label;
// get compte id and label
if ($accountingaccount->fetch(0, $k, true)) {
if ($accountingaccount->id > 0) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];