diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index b6ae53f..6f68774 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -1258,6 +1258,18 @@ class DeclarationTVA $debit->fk_doc = $declaration->rowid; $debit->fk_user_author = $user->id; + // Debug: Log all field values before create + error_log("DEBUG: Debit entry fields before create:"); + error_log("DEBUG: - doc_date: " . $debit->doc_date); + error_log("DEBUG: - doc_ref: " . $debit->doc_ref); + error_log("DEBUG: - code_journal: " . $debit->code_journal); + error_log("DEBUG: - numero_compte: " . $debit->numero_compte); + error_log("DEBUG: - label_compte: " . $debit->label_compte); + error_log("DEBUG: - montant: " . $debit->montant); + error_log("DEBUG: - sens: " . $debit->sens); + error_log("DEBUG: - fk_doc: " . $debit->fk_doc); + error_log("DEBUG: - fk_user_author: " . $debit->fk_user_author); + $result = $debit->create($user); error_log("DEBUG: Debit entry create result: " . $result . " (type: " . gettype($result) . ")"); error_log("DEBUG: Debit entry error message: '" . $debit->error . "'"); @@ -1292,6 +1304,18 @@ class DeclarationTVA $credit->fk_doc = $declaration->rowid; $credit->fk_user_author = $user->id; + // Debug: Log all field values before create + error_log("DEBUG: Credit entry fields before create:"); + error_log("DEBUG: - doc_date: " . $credit->doc_date); + error_log("DEBUG: - doc_ref: " . $credit->doc_ref); + error_log("DEBUG: - code_journal: " . $credit->code_journal); + error_log("DEBUG: - numero_compte: " . $credit->numero_compte); + error_log("DEBUG: - label_compte: " . $credit->label_compte); + error_log("DEBUG: - montant: " . $credit->montant); + error_log("DEBUG: - sens: " . $credit->sens); + error_log("DEBUG: - fk_doc: " . $credit->fk_doc); + error_log("DEBUG: - fk_user_author: " . $credit->fk_user_author); + $result = $credit->create($user); error_log("DEBUG: Credit entry create result: " . $result . " (type: " . gettype($result) . ")"); error_log("DEBUG: Credit entry error message: '" . $credit->error . "'");