From 41444f6c907c92deaa939240760e027d638bacf2 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 9 Oct 2025 00:09:05 +0200 Subject: [PATCH] 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 --- core/class/declarationtva.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index e20f5a5..fb389f4 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -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);