diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index bf72b5790..ad72cfcb3 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -714,7 +714,7 @@ class Acc_Ledger extends jrn_def_sql // CA if ($g_parameter->MY_ANALYTIC!='nu') // use of AA { - if (preg_match("/^[6,7]+/", $strPoste)==1) + if ($g_parameter->match_analytic( $strPoste)==TRUE) { // show form $op=new Anc_Operation($this->db); @@ -1293,7 +1293,7 @@ class Acc_Ledger extends jrn_def_sql $tot_cred+=($acc_op->type=='c')?$acc_op->amount:0; if ($g_parameter->MY_ANALYTIC!="nu") { - if (preg_match("/^[6,7]+/", $poste)==1) + if ($g_parameter->match_analytic( $poste)==TRUE) { // for each item, insert into operation_analytique */ @@ -2357,12 +2357,12 @@ class Acc_Ledger extends jrn_def_sql { throw new Exception(_('Choix du type de journal est obligatoire')); } - if (isset( $negative_warning) && $negative_amount == 1 && trim($negative_warning)=="") { + + if (isset( $negative_warning) && $negative_amount == 1 && trim($negative_warning)=="") { throw new Exception(_("Avertissement ne peut ĂȘtre vide")); } - if ( isset( $negative_amount) && $negative_amount <> 0 && $negative_amount <> 1 ){ - + if ( isset( $negative_amount) && $negative_amount <> 0 && $negative_amount <> 1 ){ throw new Exception(_("Valeur invalide")); } }