Revert sens quotes and add missing Bookkeeping fields
- Remove single quotes from sens field (revert to 'D' and 'C') - Add missing required fields: entity, date_creation, tms, fk_user_creation, fk_user_modification - Ensure all Bookkeeping object properties are properly set - Address potential missing field issues causing create() failures
This commit is contained in:
parent
6bfa41b059
commit
d48b093ddd
@ -1254,9 +1254,14 @@ class DeclarationTVA
|
||||
$debit->numero_compte = $entry['account_code'];
|
||||
$debit->label_compte = $entry['account_label'];
|
||||
$debit->montant = price2num($debit_amount, 'MT');
|
||||
$debit->sens = "'D'";
|
||||
$debit->sens = 'D';
|
||||
$debit->fk_doc = $declaration->rowid;
|
||||
$debit->fk_user_author = $user->id;
|
||||
$debit->entity = $this->entity;
|
||||
$debit->date_creation = dol_now();
|
||||
$debit->tms = dol_now();
|
||||
$debit->fk_user_creation = $user->id;
|
||||
$debit->fk_user_modification = $user->id;
|
||||
|
||||
// Debug: Log all field values before create
|
||||
error_log("DEBUG: Debit entry fields before create:");
|
||||
@ -1317,9 +1322,14 @@ class DeclarationTVA
|
||||
$credit->numero_compte = $entry['account_code'];
|
||||
$credit->label_compte = $entry['account_label'];
|
||||
$credit->montant = price2num($credit_amount, 'MT');
|
||||
$credit->sens = "'C'";
|
||||
$credit->sens = 'C';
|
||||
$credit->fk_doc = $declaration->rowid;
|
||||
$credit->fk_user_author = $user->id;
|
||||
$credit->entity = $this->entity;
|
||||
$credit->date_creation = dol_now();
|
||||
$credit->tms = dol_now();
|
||||
$credit->fk_user_creation = $user->id;
|
||||
$credit->fk_user_modification = $user->id;
|
||||
|
||||
// Debug: Log all field values before create
|
||||
error_log("DEBUG: Credit entry fields before create:");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user