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:
parent
894e73e9cf
commit
ffa489ee59
1 changed files with 5 additions and 0 deletions
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue