@@ -89,8 +89,8 @@ |
||
89 | 89 | |
90 | 90 | // Define value to know what current user can do on users |
91 | 91 | $selfpermission = ($user->id == $id && $user->hasRight('user', 'self', 'creer')); |
92 | -$canadduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write') ); |
|
93 | -$canreaduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read') ); |
|
92 | +$canadduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write')); |
|
93 | +$canreaduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read')); |
|
94 | 94 | $permissiontoaddbankaccount = ($user->hasRight('salaries', 'write') || $user->hasRight('hrm', 'employee', 'write') || $user->hasRight('user', 'user', 'creer') || $selfpermission); |
95 | 95 | $permissiontoreadhr = $user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write'); |
96 | 96 | $permissiontowritehr = $user->hasRight('hrm', 'write_personal_information', 'write'); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | || (($user->id != $id) && $user->hasRight("user", "user", "password"))); |
67 | 67 | } |
68 | 68 | |
69 | -$permissiontoadd = $caneditfield; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
69 | +$permissiontoadd = $caneditfield; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
70 | 70 | $permtoedit = $caneditfield; |
71 | 71 | |
72 | 72 | // Security check |
@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | |
120 | 120 | if (!$error) { |
121 | 121 | setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); |
122 | - $action = ''; // To avoid to execute next actions |
|
122 | + $action = ''; // To avoid to execute next actions |
|
123 | 123 | } else { |
124 | 124 | setEventMessages($langs->trans("Error"), null, 'errors'); |
125 | - $action = ''; // To avoid to execute next actions |
|
125 | + $action = ''; // To avoid to execute next actions |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | |
138 | 138 | if (!$error) { |
139 | 139 | setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); |
140 | - $action = ''; // To avoid to execute next actions |
|
140 | + $action = ''; // To avoid to execute next actions |
|
141 | 141 | } else { |
142 | 142 | setEventMessages($langs->trans("Error"), null, 'errors'); |
143 | - $action = ''; // To avoid to execute next actions |
|
143 | + $action = ''; // To avoid to execute next actions |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 |
@@ -218,7 +218,7 @@ |
||
218 | 218 | if (!$disable_delete) { |
219 | 219 | print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', 1); |
220 | 220 | } else { |
221 | - print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#', '', 1, [ 'attr' => ['classOverride' => 'butActionRefused']]); |
|
221 | + print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#', '', 1, ['attr' => ['classOverride' => 'butActionRefused']]); |
|
222 | 222 | } |
223 | 223 | } |
224 | 224 | } |
@@ -96,7 +96,7 @@ |
||
96 | 96 | // Create a line of payments |
97 | 97 | $payment = new PaymentDonation($db); |
98 | 98 | $payment->chid = $chid; |
99 | - $payment->datep = $datepaid; |
|
99 | + $payment->datep = $datepaid; |
|
100 | 100 | $payment->amounts = $amounts; // Tableau de montant |
101 | 101 | $payment->paymenttype = GETPOSTINT("paymenttype"); |
102 | 102 | $payment->num_payment = GETPOST("num_payment", 'alphanohtml'); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $mesg = $px2->isGraphKo(); |
121 | 121 | if (!$mesg) { |
122 | 122 | $px2->SetData($data); |
123 | - $i = $startyear;$legend = array(); |
|
123 | + $i = $startyear; $legend = array(); |
|
124 | 124 | while ($i <= $endyear) { |
125 | 125 | $legend[] = $i; |
126 | 126 | $i++; |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | print '<td class="right">' . $val['nb'] . '</td>'; |
297 | 297 | print '<td class="right opacitylow" style="' . ($greennb ? 'color: green;' : 'color: red;') . '">' . (!empty($val['nb_diff']) && $val['nb_diff'] < 0 ? '' : '+') . round(!empty($val['nb_diff']) ? $val['nb_diff'] : 0) . '%</td>'; |
298 | 298 | print '<td class="right"><span class="amount">' . price(price2num($val['total'], 'MT'), 1) . '</span></td>'; |
299 | - print '<td class="right opacitylow" style="' . ($greentotal ? 'color: green;' : 'color: red;') . '">' . ( !empty($val['total_diff']) && $val['total_diff'] < 0 ? '' : '+') . round(!empty($val['total_diff']) ? $val['total_diff'] : 0) . '%</td>'; |
|
299 | + print '<td class="right opacitylow" style="' . ($greentotal ? 'color: green;' : 'color: red;') . '">' . (!empty($val['total_diff']) && $val['total_diff'] < 0 ? '' : '+') . round(!empty($val['total_diff']) ? $val['total_diff'] : 0) . '%</td>'; |
|
300 | 300 | print '<td class="right"><span class="amount">' . price(price2num($val['avg'], 'MT'), 1) . '</span></td>'; |
301 | 301 | print '<td class="right opacitylow" style="' . ($greenavg ? 'color: green;' : 'color: red;') . '">' . (!empty($val['avg_diff']) && $val['avg_diff'] < 0 ? '' : '+') . round(!empty($val['avg_diff']) ? $val['avg_diff'] : 0) . '%</td>'; |
302 | 302 | print '</tr>'; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sclist'; |
44 | 44 | $mode = GETPOST('mode', 'alpha'); |
45 | 45 | |
46 | -$paiementid = GETPOSTINT('paiementid'); |
|
46 | +$paiementid = GETPOSTINT('paiementid'); |
|
47 | 47 | |
48 | 48 | $search_ref = GETPOST("search_ref", "alpha"); |
49 | 49 | $search_date_startday = GETPOSTINT('search_date_startday'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | 'pd.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 80), |
100 | 100 | ); |
101 | 101 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
102 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
102 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
103 | 103 | |
104 | 104 | $optioncss = GETPOST('optioncss', 'alpha'); |
105 | 105 | $moreforfilter = GETPOST('moreforfilter', 'alpha'); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | // Output page |
259 | 259 | // -------------------------------------------------------------------- |
260 | 260 | |
261 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
261 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
262 | 262 | |
263 | 263 | $param = ''; |
264 | 264 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $object = new Don($db); |
75 | 75 | $extrafields = new ExtraFields($db); |
76 | 76 | $diroutputmassaction = $conf->don->dir_output . '/temp/massgeneration/' . $user->id; |
77 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
77 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
78 | 78 | |
79 | 79 | // Fetch optionals attributes and labels |
80 | 80 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | // Output page |
255 | 255 | // -------------------------------------------------------------------- |
256 | 256 | |
257 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-donation page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
257 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-donation page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
258 | 258 | |
259 | 259 | // Example : Adding jquery code |
260 | 260 | // print '<script type="text/javascript"> |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | } |
356 | 356 | |
357 | 357 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
358 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
358 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
359 | 359 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
360 | 360 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
361 | 361 |
@@ -323,7 +323,7 @@ |
||
323 | 323 | } |
324 | 324 | |
325 | 325 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
326 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
326 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
327 | 327 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
328 | 328 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
329 | 329 |