diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 437b436b733..afe272ba7d9 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2025 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2018-2024 Frédéric France @@ -1276,12 +1276,10 @@ if (empty($action) || $action == 'view') { // Subledger account print ""; print ''; - print ""; $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); print "" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate) . ""; - print ""; print ''.($mt >= 0 ? price($mt) : '').""; print ''.($mt < 0 ? price(-$mt) : '').""; print ""; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d38ea55a4ec..72692091097 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9186,7 +9186,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 709465adb0f..4e072122887 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);