diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index aded1c6aa1f..566a2ff53cc 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -77,7 +77,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) else { $db->rollback(); - $mesg='
'.$localtax->error.'
'; + setEventMessages($localtax->error, $localtax->errors, 'errors'); $_GET["action"]="create"; } } @@ -112,18 +112,19 @@ if ($_GET["action"] == 'delete') { $localtax->error=$accountline->error; $db->rollback(); - $mesg='
'.$localtax->error.'
'; + setEventMessages($localtax->error, $localtax->errors, 'errors'); } } else { $db->rollback(); - $mesg='
'.$localtax->error.'
'; + setEventMessages($localtax->error, $localtax->errors, 'errors'); } } else { - $mesg='
Error try do delete a line linked to a conciliated bank transaction
'; + $mesg='Error try do delete a line linked to a conciliated bank transaction'; + setEventMessages($mesg, null, 'errors'); } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 7fd5cb10483..33d02bff05b 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -65,11 +65,13 @@ if ($action == 'create') $result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET); if ($result < 0) { - $mesg='
'.$bprev->error.'
'; + setEventMessages($bprev->error , $bprev->errors, 'errors'); } if ($result == 0) { - $mesg='
'.$langs->trans("NoInvoiceCouldBeWithdrawed").'
'; + $mesg=''; + $mesg=$langs->trans("NoInvoiceCouldBeWithdrawed"); + setEventMessages($mesg, null, 'errors'); foreach($bprev->invoice_in_error as $key => $val) { $mesg.=$val."
\n";