@@ -147,38 +147,38 @@ discard block |
||
147 | 147 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
148 | 148 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
149 | 149 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
150 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
150 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
151 | 151 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
152 | 152 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
153 | 153 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
154 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
154 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
155 | 155 | |
156 | 156 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
157 | 157 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
158 | 158 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
159 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
159 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
160 | 160 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
161 | 161 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
162 | 162 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
163 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
163 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
164 | 164 | |
165 | 165 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
166 | 166 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
167 | 167 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
168 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
168 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
169 | 169 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
170 | 170 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
171 | 171 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
172 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
172 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
173 | 173 | |
174 | 174 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
175 | 175 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
176 | 176 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
177 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
177 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
178 | 178 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
179 | 179 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
180 | 180 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
181 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
181 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
182 | 182 | |
183 | 183 | $search_category_array = array(); |
184 | 184 | |
@@ -264,14 +264,14 @@ discard block |
||
264 | 264 | |
265 | 265 | $object->fields = dol_sort_array($object->fields, 'position'); |
266 | 266 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
267 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
267 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
268 | 268 | |
269 | 269 | // Add a groupby field. Set $groupby and $groupbyvalues. |
270 | 270 | // TODO Move this into a inc file |
271 | 271 | $groupbyvalues = array(); |
272 | 272 | if ($mode == 'kanban') { |
273 | 273 | $groupbyold = null; |
274 | - $groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
274 | + $groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
275 | 275 | $groupbyfield = preg_replace('/[a-z]\./', '', $groupby); |
276 | 276 | if (!empty($object->fields[$groupbyfield]['alias'])) { |
277 | 277 | $groupbyfield = $object->fields[$groupbyfield]['alias']; |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | } |
1193 | 1193 | |
1194 | 1194 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1195 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1195 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1196 | 1196 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1197 | 1197 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1198 | 1198 | |
@@ -1653,7 +1653,7 @@ discard block |
||
1653 | 1653 | |
1654 | 1654 | if (!empty($groupby)) { |
1655 | 1655 | if (is_null($groupbyold)) { |
1656 | - print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1656 | + print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1657 | 1657 | } |
1658 | 1658 | // Start kanban column |
1659 | 1659 | if (is_null($obj->$groupbyfield)) { |
@@ -1669,7 +1669,7 @@ discard block |
||
1669 | 1669 | // |
1670 | 1670 | //var_dump($groupbyvalues); |
1671 | 1671 | //var_dump($obj->$groupbyfield); |
1672 | - print '<div class="box-flex-container-column kanban column" data-html="column_' . preg_replace('/[^a-z0-9]/', '', $groupbyvalue) . '">'; // Start new column |
|
1672 | + print '<div class="box-flex-container-column kanban column" data-html="column_' . preg_replace('/[^a-z0-9]/', '', $groupbyvalue) . '">'; // Start new column |
|
1673 | 1673 | } |
1674 | 1674 | $groupbyold = $groupbyvalue; |
1675 | 1675 | } elseif ($i == 0) { |
@@ -352,10 +352,10 @@ discard block |
||
352 | 352 | } |
353 | 353 | |
354 | 354 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
355 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
355 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
356 | 356 | |
357 | 357 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
358 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
358 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
359 | 359 | |
360 | 360 | if ($result < 0) { |
361 | 361 | $langs->load("errors"); |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | $arrayoftasks = array(); |
481 | 481 | foreach ($toselect as $key => $value) { |
482 | 482 | // Get userid, timepent |
483 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
483 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
484 | 484 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
485 | 485 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
486 | 486 | } |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $arrayoftasks = array(); |
673 | 673 | foreach ($toselect as $key => $value) { |
674 | 674 | // Get userid, timepent |
675 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
675 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
676 | 676 | // $object->id is now the task id |
677 | 677 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
678 | 678 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | } |
1134 | 1134 | |
1135 | 1135 | $param = ($withproject ? '&withproject=1' : ''); |
1136 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
1136 | + $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
1137 | 1137 | $linkback = $withproject ? '<a href="' . constant('BASE_URL') . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
1138 | 1138 | |
1139 | 1139 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
@@ -1268,10 +1268,10 @@ discard block |
||
1268 | 1268 | // Definition of fields for list |
1269 | 1269 | $arrayfields = array(); |
1270 | 1270 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1); |
1271 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1); |
|
1271 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1); |
|
1272 | 1272 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
1273 | 1273 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
1274 | - if (! empty($allprojectforuser)) { |
|
1274 | + if (!empty($allprojectforuser)) { |
|
1275 | 1275 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
1276 | 1276 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
1277 | 1277 | } |
@@ -1290,7 +1290,7 @@ discard block |
||
1290 | 1290 | include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
1291 | 1291 | |
1292 | 1292 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
1293 | - '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
1293 | + '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
1294 | 1294 | |
1295 | 1295 | $param = ''; |
1296 | 1296 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('projet', 'creer')) { |
146 | 146 | $task_origin_id = GETPOSTINT('task_origin'); |
147 | - $task_origin = new Task($db); // The Task that we will delete |
|
147 | + $task_origin = new Task($db); // The Task that we will delete |
|
148 | 148 | |
149 | 149 | if ($task_origin_id <= 0) { |
150 | 150 | $langs->load('errors'); |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $title = $object->ref; |
262 | 262 | if (!empty($withproject)) { |
263 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '') ; |
|
263 | + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
264 | 264 | } |
265 | 265 | $help_url = ''; |
266 | 266 |
@@ -149,7 +149,7 @@ |
||
149 | 149 | |
150 | 150 | $title = $object->ref . ' - ' . $langs->trans("Contacts"); |
151 | 151 | if (!empty($withproject)) { |
152 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '') ; |
|
152 | + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
153 | 153 | } |
154 | 154 | $help_url = ''; |
155 | 155 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $search_date_endday = GETPOSTINT('search_date_endday'); |
97 | 97 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
98 | 98 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
99 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
99 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
100 | 100 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
101 | 101 | $search_datelimit_startday = GETPOSTINT('search_datelimit_startday'); |
102 | 102 | $search_datelimit_startmonth = GETPOSTINT('search_datelimit_startmonth'); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | $object->fields = dol_sort_array($object->fields, 'position'); |
188 | 188 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
189 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
189 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
190 | 190 | |
191 | 191 | $permissiontoread = $user->hasRight('projet', 'lire'); |
192 | 192 | $permissiontocreate = $user->hasRight('projet', 'creer'); |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | // Direct jump if only one record found |
590 | 590 | if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) { |
591 | 591 | $obj = $db->fetch_object($resql); |
592 | - $id = $obj->id; // in select, task id has been aliases into 'id' |
|
592 | + $id = $obj->id; // in select, task id has been aliases into 'id' |
|
593 | 593 | header("Location: " . constant('BASE_URL') . '/projet/tasks/task.php?id=' . $id . '&withproject=1'); |
594 | 594 | exit; |
595 | 595 | } |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | // Output page |
599 | 599 | // -------------------------------------------------------------------- |
600 | 600 | |
601 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
601 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
602 | 602 | |
603 | 603 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
604 | 604 | |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | } |
838 | 838 | |
839 | 839 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
840 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
840 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
841 | 841 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
842 | 842 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
843 | 843 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | |
126 | 126 | $title = $object->ref . ' - ' . $langs->trans("Documents"); |
127 | 127 | if (!empty($withproject)) { |
128 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '') ; |
|
128 | + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
129 | 129 | } |
130 | 130 | $help_url = ''; |
131 | 131 |
@@ -119,7 +119,7 @@ |
||
119 | 119 | |
120 | 120 | $title = $object->ref . ' - ' . $langs->trans("Notes"); |
121 | 121 | if (!empty($withproject)) { |
122 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '') ; |
|
122 | + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
123 | 123 | } |
124 | 124 | $help_url = ''; |
125 | 125 |
@@ -155,7 +155,7 @@ |
||
155 | 155 | while ($i < $num) { |
156 | 156 | $objp = $db->fetch_object($resql); |
157 | 157 | $listofoppstatus[$objp->rowid] = $objp->percent; |
158 | - $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found. |
|
158 | + $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found. |
|
159 | 159 | $listofoppcode[$objp->rowid] = $objp->code; |
160 | 160 | switch ($objp->code) { |
161 | 161 | case 'PROSP': |
@@ -151,8 +151,8 @@ |
||
151 | 151 | $id = GETPOSTINT('id'); |
152 | 152 | $ref = GETPOST('ref', 'alpha'); |
153 | 153 | $action = GETPOST('action', 'aZ09'); |
154 | -$datesrfc = GETPOST('datesrfc'); // deprecated |
|
155 | -$dateerfc = GETPOST('dateerfc'); // deprecated |
|
154 | +$datesrfc = GETPOST('datesrfc'); // deprecated |
|
155 | +$dateerfc = GETPOST('dateerfc'); // deprecated |
|
156 | 156 | $dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear')); |
157 | 157 | $datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear')); |
158 | 158 | if (empty($dates) && !empty($datesrfc)) { // deprecated |