This commit is contained in:
Laurent Destailleur (aka Eldy)
2025-01-16 14:47:03 +01:00
parent 2ae7549563
commit d85c39e77b
4 changed files with 4 additions and 7 deletions

View File

@@ -9185,7 +9185,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
} elseif (property_exists($object, 'delivery_date')) { } elseif (property_exists($object, 'delivery_date')) {
$date_delivery = $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__'] = (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_DAY_TEXT__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%A") : '');
$substitutionarray['__DATE_DELIVERY_MON__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%m") : ''); $substitutionarray['__DATE_DELIVERY_MON__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%m") : '');

View File

@@ -99,9 +99,6 @@ class InterfaceNotification extends DolibarrTriggers
$notify = new Notify($this->db); $notify = new Notify($this->db);
$resultSend = $notify->send($action, $object); $resultSend = $notify->send($action, $object);
if ($resultSend < 0) { if ($resultSend < 0) {
if (!isset($this->errors)) {
$this->errors = [];
}
$this->errors = array_merge($this->errors, $notify->errors); $this->errors = array_merge($this->errors, $notify->errors);
return $resultSend; return $resultSend;
} }

View File

@@ -205,7 +205,7 @@ if (empty($reshook)) {
$object->capital = $capital; $object->capital = $capital;
$object->nbterm = GETPOSTINT("nbterm"); $object->nbterm = GETPOSTINT("nbterm");
$object->rate = price2num(GETPOST("rate", 'alpha')); $object->rate = GETPOSTFLOAT("rate");
$object->insurance_amount = GETPOSTFLOAT('insurance_amount'); $object->insurance_amount = GETPOSTFLOAT('insurance_amount');
$accountancy_account_capital = GETPOST('accountancy_account_capital'); $accountancy_account_capital = GETPOST('accountancy_account_capital');

View File

@@ -125,7 +125,7 @@ if ($user->hasRight('salaries', 'readall')) {
if ($user->hasRight('hrm', 'read')) { if ($user->hasRight('hrm', 'read')) {
$ok = true; $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; $ok = true;
} }
if ($user->hasRight('holiday', 'readall') || ($user->hasRight('holiday', 'read') && in_array($object->id, $childids))) { 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 // Latest expense report
if (isModEnabled('expensereport') && 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); $exp = new ExpenseReport($db);