diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index a56701dada2..d1c4ef409b4 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -76,7 +76,7 @@ if ($action == 'disable') { $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } else if ($action == 'enable') { if ($accounting->fetch($id)) { @@ -84,7 +84,7 @@ if ($action == 'disable') { } $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 925bf818137..99eb49949e7 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -125,7 +125,7 @@ else if ($action == 'delete') } if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 9bde2d23c14..c0a987ddf82 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -100,9 +100,9 @@ if ($action == 'update') { } if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 657d5b100e6..45e69c991de 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -66,7 +66,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -110,7 +110,7 @@ else if ($action == 'add') { $db->rollback(); - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='create'; } } @@ -147,7 +147,7 @@ else if ($action == 'update') } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index 61e86b7df19..7c38617d66c 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -76,14 +76,14 @@ if ($_POST["action"] == 'import') { $result = $accounting->create($user); if ($result > 0) { - setEventMessage($langs->trans("AccountingAccountAdd"), 'mesgs'); + setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs'); } else { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } $cpt ++; } } else { - setEventMessage($langs->trans('AccountPlanNotFoundCheckSetting'), 'errors'); + setEventMessages($langs->trans('AccountPlanNotFoundCheckSetting'), null, 'errors'); } } else { print '
' . $sql . '