Add missing label_operation field to Bookkeeping entries

- Add label_operation = declaration_name for both debit and credit entries
- This field is critical for proper accounting entry creation
- Based on comparison with working OD journal entries
- Should fix the issue with debit/credit amounts being 0
This commit is contained in:
Frank Cools 2025-10-09 00:09:05 +02:00
parent 360f1d9b93
commit 41444f6c90

View File

@ -1262,6 +1262,7 @@ class DeclarationTVA
$debit->tms = dol_now();
$debit->fk_user_creation = $user->id;
$debit->fk_user_modification = $user->id;
$debit->label_operation = $declaration->declaration_name;
// Final check of montant before create
error_log("DEBUG: Final montant check before create: " . $debit->montant);
@ -1304,6 +1305,7 @@ class DeclarationTVA
$credit->tms = dol_now();
$credit->fk_user_creation = $user->id;
$credit->fk_user_modification = $user->id;
$credit->label_operation = $declaration->declaration_name;
// Final check of montant before create
error_log("DEBUG: Final montant check before create: " . $credit->montant);