Improve Exception for accountancy ACH, VEN, ODS, FIN

This commit is contained in:
sparkyx 2024-12-28 11:16:31 +01:00
parent 4ff5243aef
commit 7731305ab8
11 changed files with 92 additions and 44 deletions

View file

@ -122,7 +122,18 @@ if ( isset($_POST['record']) )
echo '<div class="content">';
$Ledger=new Acc_Ledger_Sale($cn,$_POST['p_jrn']);
$internal=$Ledger->insert($_POST);
try {
$internal=$Ledger->insert($_POST);
}
catch (\Exception $e) {
if ( $e->getCode()==EXC_BALANCE)
echo_warning(_("enregistrement annulé: balance , voyer le fichier log"));
else
echo_warning($e->getMessage());
return;
}
/* Save the predefined operation */
if ( isset($_POST['opd_name']) && trim($_POST['opd_name']) != "" )