Fix getAccountLabel to fetch real account names from Dolibarr chart of accounts
- Removed hardcoded fallback labels that were made up - Now properly queries accounting_account table for real account labels - Uses entity filtering and active account filtering - Falls back to generic 'Compte XXXX' only if account not found - Journal table now shows actual account names from your chart of accounts
This commit is contained in:
parent
4f82e24e29
commit
8336fff139
@ -2129,18 +2129,9 @@ class DeclarationTVA_PDF
|
||||
return $obj->label;
|
||||
}
|
||||
|
||||
// Fallback to default labels
|
||||
switch ($account_code) {
|
||||
case '4456700':
|
||||
return 'TVA à payer';
|
||||
case '658000':
|
||||
return 'Charges exceptionnelles';
|
||||
case '758000':
|
||||
return 'Produits exceptionnels';
|
||||
default:
|
||||
// If account not found in chart of accounts, return generic label
|
||||
return 'Compte ' . $account_code;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get balancing rounding entry for the difference between real and rounded amounts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user