mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-20 07:43:18 +01:00
NEW Accountancy - Transaction - Add verification on centralized account (#35824)
* NEW Accountancy - Transaction - Add verification on centralized account * Fix phan * Fix phan --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
committed by
GitHub
parent
894e73e9cf
commit
ffa489ee59
@@ -198,6 +198,11 @@ if (empty($reshook)) {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
$subledger_account_str = is_array($subledger_account) ? reset($subledger_account) : (string) $subledger_account;
|
||||
if (!checkGeneralAccountAllowsAuxiliary($db, $accountingaccount_number, $subledger_account_str)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorAccountNotCentralized"). ". " . $langs->trans("RemoveSubsidiaryAccountOrAdjustTheGeneralAccount"), null, 'errors');
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (GETPOSTINT('doc_datemonth') && GETPOSTINT('doc_dateday') && GETPOSTINT('doc_dateyear')) {
|
||||
|
||||
Reference in New Issue
Block a user