diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bffc520abb0..4c9a5d4cedd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9185,7 +9185,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, } elseif (property_exists($object, 'delivery_date')) { $date_delivery = $object->delivery_date; } - $substitutionarray['__DATE_DELIVERY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, 'day', 0, $outputlangs) : ''); + $substitutionarray['__DATE_DELIVERY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, 'day', false, $outputlangs) : ''); $substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%d") : ''); $substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%A") : ''); $substitutionarray['__DATE_DELIVERY_MON__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%m") : ''); diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index c3bdc971328..86bf821cd36 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -99,9 +99,6 @@ class InterfaceNotification extends DolibarrTriggers $notify = new Notify($this->db); $resultSend = $notify->send($action, $object); if ($resultSend < 0) { - if (!isset($this->errors)) { - $this->errors = []; - } $this->errors = array_merge($this->errors, $notify->errors); return $resultSend; } diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index f0025e642a6..aefbc83ca92 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -205,7 +205,7 @@ if (empty($reshook)) { $object->capital = $capital; $object->nbterm = GETPOSTINT("nbterm"); - $object->rate = price2num(GETPOST("rate", 'alpha')); + $object->rate = GETPOSTFLOAT("rate"); $object->insurance_amount = GETPOSTFLOAT('insurance_amount'); $accountancy_account_capital = GETPOST('accountancy_account_capital'); diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 0a9a378fb35..edd8ff48472 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -125,7 +125,7 @@ if ($user->hasRight('salaries', 'readall')) { if ($user->hasRight('hrm', 'read')) { $ok = true; } -if ($user->hasRight('expensereport', 'readall') || ($user->hasRight('expensereport', 'readall') && in_array($object->id, $childids))) { +if ($user->hasRight('expensereport', 'readall') || ($user->hasRight('expensereport', 'read') && in_array($object->id, $childids))) { $ok = true; } if ($user->hasRight('holiday', 'readall') || ($user->hasRight('holiday', 'read') && in_array($object->id, $childids))) { @@ -778,7 +778,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac // Latest expense report if (isModEnabled('expensereport') && - ($user->hasRight('expensereport', 'readall') || ($user->hasRight('expensereport', 'lire') && $object->id == $user->id)) + ($user->hasRight('expensereport', 'readall') || ($user->hasRight('expensereport', 'read') && $object->id == $user->id)) ) { $exp = new ExpenseReport($db);