@@ -101,7 +101,7 @@ |
||
101 | 101 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
102 | 102 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
103 | 103 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
104 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
104 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
105 | 105 | } else { |
106 | 106 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
107 | 107 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
130 | 130 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
131 | 131 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
132 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
132 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
133 | 133 | } else { |
134 | 134 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
135 | 135 | } |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
37 | 37 | |
38 | 38 | // Load translation files required by the page |
39 | -$langsLoad=array('projects', 'companies'); |
|
39 | +$langsLoad = array('projects', 'companies'); |
|
40 | 40 | if (isModEnabled('eventorganization')) { |
41 | - $langsLoad[]='eventorganization'; |
|
41 | + $langsLoad[] = 'eventorganization'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $langs->loadLangs($langsLoad); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $permissiontoadd = $user->hasRight('projet', 'creer'); |
108 | 108 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
109 | -$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
109 | +$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
110 | 110 | |
111 | 111 | |
112 | 112 | /* |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $action = ''; |
158 | 158 | } |
159 | 159 | |
160 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
160 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
161 | 161 | |
162 | 162 | // Action setdraft object |
163 | 163 | if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $object->date_end_event = (!GETPOST('date_end_event')) ? '' : $date_end_event; |
316 | 316 | $object->location = $location; |
317 | 317 | if (GETPOSTISSET('opp_amount')) { |
318 | - $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
318 | + $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
319 | 319 | } |
320 | 320 | if (GETPOSTISSET('budget_amount')) { |
321 | 321 | $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
468 | 468 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
469 | 469 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
470 | - $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1'; |
|
470 | + $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1'; |
|
471 | 471 | } else { |
472 | 472 | $urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1'; |
473 | 473 | } |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | print '<br>'; |
680 | 680 | } |
681 | 681 | if (isModEnabled('eventorganization')) { |
682 | - print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') ? ' checked="checked"' : '') :'').'"> '; |
|
682 | + print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') ? ' checked="checked"' : '') : '').'"> '; |
|
683 | 683 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
684 | 684 | print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>'; |
685 | 685 | print '<script>'; |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | print '<br>'; |
1004 | 1004 | } |
1005 | 1005 | if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
1006 | - print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '> '; |
|
1006 | + print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'> '; |
|
1007 | 1007 | $htmltext = $langs->trans("ProjectFollowTasks"); |
1008 | 1008 | print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>'; |
1009 | 1009 | print '<script>'; |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | print '<br>'; |
1030 | 1030 | } |
1031 | 1031 | if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { |
1032 | - print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '> '; |
|
1032 | + print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'> '; |
|
1033 | 1033 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
1034 | 1034 | print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; |
1035 | 1035 | print '<script>'; |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | print '<br>'; |
1056 | 1056 | } |
1057 | 1057 | if (isModEnabled('eventorganization')) { |
1058 | - print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '> '; |
|
1058 | + print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'> '; |
|
1059 | 1059 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
1060 | 1060 | print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>'; |
1061 | 1061 | print '<script>'; |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
1234 | 1234 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
1235 | 1235 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
1236 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
1236 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
1237 | 1237 | } else { |
1238 | 1238 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
1239 | 1239 | } |
@@ -1527,7 +1527,7 @@ discard block |
||
1527 | 1527 | if ($userWrite > 0) { |
1528 | 1528 | print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_setdraft&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
1529 | 1529 | } else { |
1530 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1530 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1531 | 1531 | } |
1532 | 1532 | } |
1533 | 1533 | } |
@@ -1537,7 +1537,7 @@ discard block |
||
1537 | 1537 | if ($userWrite > 0) { |
1538 | 1538 | print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); |
1539 | 1539 | } else { |
1540 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1540 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1541 | 1541 | } |
1542 | 1542 | } |
1543 | 1543 | |
@@ -1546,7 +1546,7 @@ discard block |
||
1546 | 1546 | if ($userWrite > 0) { |
1547 | 1547 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, ''); |
1548 | 1548 | } else { |
1549 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1549 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1550 | 1550 | } |
1551 | 1551 | } |
1552 | 1552 | |
@@ -1555,7 +1555,7 @@ discard block |
||
1555 | 1555 | if ($userWrite > 0) { |
1556 | 1556 | print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.$object->id, ''); |
1557 | 1557 | } else { |
1558 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1558 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1559 | 1559 | } |
1560 | 1560 | } |
1561 | 1561 | |
@@ -1564,7 +1564,7 @@ discard block |
||
1564 | 1564 | if ($userWrite > 0) { |
1565 | 1565 | print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
1566 | 1566 | } else { |
1567 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1567 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1568 | 1568 | } |
1569 | 1569 | } |
1570 | 1570 | |
@@ -1593,7 +1593,7 @@ discard block |
||
1593 | 1593 | if ($userWrite > 0) { |
1594 | 1594 | print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.$object->id, ''); |
1595 | 1595 | } else { |
1596 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1596 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1597 | 1597 | } |
1598 | 1598 | } |
1599 | 1599 | |
@@ -1602,7 +1602,7 @@ discard block |
||
1602 | 1602 | if ($userDelete > 0 || ($object->statut == Project::STATUS_DRAFT && $user->hasRight('projet', 'creer'))) { |
1603 | 1603 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
1604 | 1604 | } else { |
1605 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1605 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1606 | 1606 | } |
1607 | 1607 | } |
1608 | 1608 | } |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // Load translation files required by the page |
39 | -$langsLoad=array('projects', 'users', 'companies'); |
|
39 | +$langsLoad = array('projects', 'users', 'companies'); |
|
40 | 40 | if (isModEnabled('eventorganization')) { |
41 | - $langsLoad[]='eventorganization'; |
|
41 | + $langsLoad[] = 'eventorganization'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $langs->loadLangs($langsLoad); |
@@ -87,23 +87,23 @@ discard block |
||
87 | 87 | $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int'); |
88 | 88 | $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int'); |
89 | 89 | $search_date_start_startday = GETPOST('search_date_start_startday', 'int'); |
90 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
90 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
91 | 91 | $search_date_start_endmonth = GETPOST('search_date_start_endmonth', 'int'); |
92 | 92 | $search_date_start_endyear = GETPOST('search_date_start_endyear', 'int'); |
93 | 93 | $search_date_start_endday = GETPOST('search_date_start_endday', 'int'); |
94 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
94 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
95 | 95 | |
96 | 96 | $search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); |
97 | 97 | $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); |
98 | 98 | $search_date_end_startday = GETPOST('search_date_end_startday', 'int'); |
99 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
99 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
100 | 100 | $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); |
101 | 101 | $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); |
102 | 102 | $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); |
103 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
103 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
104 | 104 | |
105 | 105 | $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'projecttasklist'; |
106 | -$optioncss = GETPOST('optioncss', 'aZ'); |
|
106 | +$optioncss = GETPOST('optioncss', 'aZ'); |
|
107 | 107 | //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects |
108 | 108 | |
109 | 109 | $object = new Project($db); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | //natural_search('round(100 * $line->duration_effective / $line->planned_workload,2)', $filterprogresscalc, 1, 1).' {return 1;} else {return 0;}'; |
297 | 297 | } |
298 | 298 | if ($search_task_budget_amount) { |
299 | - $morewherefilterarray[]= natural_search('t.budget_amount', $search_task_budget_amount, 1, 1); |
|
299 | + $morewherefilterarray[] = natural_search('t.budget_amount', $search_task_budget_amount, 1, 1); |
|
300 | 300 | } |
301 | 301 | //var_dump($morewherefilterarray); |
302 | 302 | |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | $param .= '&search_date_end_endday='.urlencode($search_date_end_endday); |
530 | 530 | } |
531 | 531 | if ($search_date_end_end) { |
532 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
532 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
533 | 533 | } |
534 | 534 | if ($search_planedworkload) { |
535 | 535 | $param .= '&search_planedworkload='.urlencode($search_planedworkload); |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
570 | 570 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
571 | 571 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
572 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
572 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
573 | 573 | } else { |
574 | 574 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
575 | 575 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
131 | 131 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
132 | 132 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
133 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
133 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
134 | 134 | } else { |
135 | 135 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
136 | 136 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | // Load translation files required by the page |
37 | -$langsLoad=array('projects', 'companies'); |
|
37 | +$langsLoad = array('projects', 'companies'); |
|
38 | 38 | if (isModEnabled('eventorganization')) { |
39 | - $langsLoad[]='eventorganization'; |
|
39 | + $langsLoad[] = 'eventorganization'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $langs->loadLangs($langsLoad); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($action == 'addcontact') { |
82 | 82 | $form = new Form($db); |
83 | 83 | |
84 | - $source=GETPOST("source", 'aZ09'); |
|
84 | + $source = GETPOST("source", 'aZ09'); |
|
85 | 85 | |
86 | 86 | $taskstatic = new Task($db); |
87 | 87 | $task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $type_to = (GETPOST('typecontact') ? 'typecontact='.GETPOST('typecontact') : 'type='.GETPOST('type')); |
92 | 92 | $personToAffect = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); |
93 | 93 | $affect_to = (GETPOST('userid') ? 'userid='.$personToAffect : 'contactid='.$personToAffect); |
94 | - $url_redirect='?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source; |
|
94 | + $url_redirect = '?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source; |
|
95 | 95 | |
96 | 96 | if ($personToAffect > 0 && (empty($conf->global->PROJECT_HIDE_TASKS) || $nbTasks > 0)) { |
97 | 97 | $text = $langs->trans('AddPersonToTask'); |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | |
101 | 101 | $task_to_affect = array(); |
102 | 102 | foreach ($task_array as $task) { |
103 | - $task_already_affected=false; |
|
103 | + $task_already_affected = false; |
|
104 | 104 | $personsLinked = $task->liste_contact(-1, $source); |
105 | 105 | if (!is_array($personsLinked) && count($personsLinked) < 0) { |
106 | 106 | setEventMessage($object->error, 'errors'); |
107 | 107 | } else { |
108 | 108 | foreach ($personsLinked as $person) { |
109 | - if ($person['id']==$personToAffect) { |
|
109 | + if ($person['id'] == $personToAffect) { |
|
110 | 110 | $task_already_affected = true; |
111 | 111 | break; |
112 | 112 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $formcompany = new FormCompany($db); |
124 | 124 | foreach ($task_array as $task) { |
125 | 125 | $key = $task->id; |
126 | - $val = $task->ref . ' '.dol_trunc($task->label); |
|
126 | + $val = $task->ref.' '.dol_trunc($task->label); |
|
127 | 127 | $formquestion[] = array( |
128 | 128 | 'type' => 'other', |
129 | 129 | 'name' => 'person_'.$key.',person_role_'.$key, |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | $formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">'); |
135 | 135 | } |
136 | 136 | |
137 | - $formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590); |
|
138 | - $formconfirmtoaddtasks .=' |
|
137 | + $formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'].$url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590); |
|
138 | + $formconfirmtoaddtasks .= ' |
|
139 | 139 | <script> |
140 | 140 | $(document).ready(function() { |
141 | 141 | var saveprop = false; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); |
162 | 162 | $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); |
163 | 163 | |
164 | - if (! ($contactid > 0)) { |
|
164 | + if (!($contactid > 0)) { |
|
165 | 165 | $error++; |
166 | 166 | $langs->load("errors"); |
167 | 167 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors'); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | } |
187 | 187 | |
188 | - $affecttotask=GETPOST('tasksavailable', 'intcomma'); |
|
188 | + $affecttotask = GETPOST('tasksavailable', 'intcomma'); |
|
189 | 189 | if (!empty($affecttotask)) { |
190 | 190 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
191 | 191 | $task_to_affect = explode(',', $affecttotask); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | foreach ($task_to_affect as $task_id) { |
194 | 194 | if (GETPOSTISSET('person_'.$task_id) && GETPOST('person_'.$task_id, 'san_alpha')) { |
195 | 195 | $tasksToAffect = new Task($db); |
196 | - $result=$tasksToAffect->fetch($task_id); |
|
196 | + $result = $tasksToAffect->fetch($task_id); |
|
197 | 197 | if ($result < 0) { |
198 | 198 | setEventMessages($tasksToAffect->error, null, 'errors'); |
199 | 199 | } else { |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
298 | 298 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
299 | 299 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
300 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
300 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
301 | 301 | } else { |
302 | 302 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
303 | 303 | } |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
41 | 41 | |
42 | 42 | // Load translation files required by the page |
43 | -$langsLoad=array('projects', 'bills', 'orders', 'companies'); |
|
43 | +$langsLoad = array('projects', 'bills', 'orders', 'companies'); |
|
44 | 44 | if (isModEnabled('eventorganization')) { |
45 | - $langsLoad[]='eventorganization'; |
|
45 | + $langsLoad[] = 'eventorganization'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | $langs->loadLangs($langsLoad); |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
55 | 55 | $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search |
56 | 56 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
57 | -$optioncss = GETPOST('optioncss', 'alpha'); |
|
57 | +$optioncss = GETPOST('optioncss', 'alpha'); |
|
58 | 58 | $mode = GETPOST('mode', 'alpha'); |
59 | 59 | |
60 | 60 | $id = GETPOST('id', 'int'); |
61 | -$projectid = GETPOST('projectid', 'int'); |
|
61 | +$projectid = GETPOST('projectid', 'int'); |
|
62 | 62 | $ref = GETPOST('ref', 'alpha'); |
63 | 63 | $withproject = GETPOST('withproject', 'int'); |
64 | 64 | $project_ref = GETPOST('project_ref', 'alpha'); |
@@ -354,10 +354,10 @@ discard block |
||
354 | 354 | } |
355 | 355 | |
356 | 356 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
357 | - $object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx |
|
357 | + $object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx |
|
358 | 358 | |
359 | 359 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
360 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
360 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
361 | 361 | |
362 | 362 | if ($result < 0) { |
363 | 363 | $langs->load("errors"); |
@@ -432,13 +432,13 @@ discard block |
||
432 | 432 | $product_data_cache = array(); |
433 | 433 | if ($idprod > 0) { |
434 | 434 | $tmpproduct->fetch($idprod); |
435 | - if ($result<0) { |
|
435 | + if ($result < 0) { |
|
436 | 436 | $error++; |
437 | 437 | setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors'); |
438 | 438 | } |
439 | 439 | |
440 | - $prodDurationHoursBase=$tmpproduct->getProductDurationHours(); |
|
441 | - if ($prodDurationHoursBase<0) { |
|
440 | + $prodDurationHoursBase = $tmpproduct->getProductDurationHours(); |
|
441 | + if ($prodDurationHoursBase < 0) { |
|
442 | 442 | $error++; |
443 | 443 | $langs->load("errors"); |
444 | 444 | setEventMessages(null, $tmpproduct->errors, 'errors'); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | $arrayoftasks = array(); |
482 | 482 | foreach ($toselect as $key => $value) { |
483 | 483 | // Get userid, timepent |
484 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
484 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
485 | 485 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
486 | 486 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
487 | 487 | } |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | |
514 | 514 | // Add lines |
515 | 515 | $prodDurationHours = $prodDurationHoursBase; |
516 | - $idprodline=$idprod; |
|
516 | + $idprodline = $idprod; |
|
517 | 517 | $pu_htline = $pu_ht; |
518 | 518 | $txtvaline = $txtva; |
519 | 519 | $localtax1line = $localtax1; |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $localtax1line = $dataforprice['localtax1']; |
542 | 542 | $localtax2line = $dataforprice['localtax2']; |
543 | 543 | |
544 | - $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); |
|
544 | + $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice); |
|
545 | 545 | } else { |
546 | 546 | $prodDurationHours = $product_data_cache[$fk_product]['duration']; |
547 | 547 | $pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht']; |
@@ -549,12 +549,12 @@ discard block |
||
549 | 549 | $localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1']; |
550 | 550 | $localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2']; |
551 | 551 | } |
552 | - $idprodline=$fk_product; |
|
552 | + $idprodline = $fk_product; |
|
553 | 553 | } |
554 | 554 | |
555 | 555 | // Add lines |
556 | 556 | $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
557 | - if ($lineid<0) { |
|
557 | + if ($lineid < 0) { |
|
558 | 558 | $error++; |
559 | 559 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
560 | 560 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | } elseif ($generateinvoicemode == 'onelineperperiod') { // One line for each time spent line |
574 | 574 | $arrayoftasks = array(); |
575 | 575 | |
576 | - $withdetail=GETPOST('detail_time_duration', 'alpha'); |
|
576 | + $withdetail = GETPOST('detail_time_duration', 'alpha'); |
|
577 | 577 | foreach ($toselect as $key => $value) { |
578 | 578 | // Get userid, timepent |
579 | 579 | $object->fetchTimeSpent($value); |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | |
587 | 587 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
588 | 588 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
589 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note |
|
589 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note |
|
590 | 590 | if (!empty($withdetail)) { |
591 | 591 | if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { |
592 | 592 | $arrayoftasks[$object->timespent_id]['note'] .= "<br/>"; |
@@ -595,9 +595,9 @@ discard block |
||
595 | 595 | } |
596 | 596 | |
597 | 597 | if (!empty($object->timespent_withhour)) { |
598 | - $arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour); |
|
598 | + $arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date").': '.dol_print_date($object->timespent_datehour); |
|
599 | 599 | } else { |
600 | - $arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date); |
|
600 | + $arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date").': '.dol_print_date($object->timespent_date); |
|
601 | 601 | } |
602 | 602 | $arrayoftasks[$object->timespent_id]['note'] .= ' - '.$langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
603 | 603 | } |
@@ -619,13 +619,13 @@ discard block |
||
619 | 619 | |
620 | 620 | // Add lines |
621 | 621 | $prodDurationHours = $prodDurationHoursBase; |
622 | - $idprodline=$idprod; |
|
622 | + $idprodline = $idprod; |
|
623 | 623 | $pu_htline = $pu_ht; |
624 | 624 | $txtvaline = $txtva; |
625 | 625 | $localtax1line = $localtax1; |
626 | 626 | $localtax2line = $localtax2; |
627 | 627 | |
628 | - if (!empty($value['fk_product']) && $value['fk_product']!==$idprod) { |
|
628 | + if (!empty($value['fk_product']) && $value['fk_product'] !== $idprod) { |
|
629 | 629 | if (!array_key_exists($value['fk_product'], $product_data_cache)) { |
630 | 630 | $result = $tmpproduct->fetch($value['fk_product']); |
631 | 631 | if ($result < 0) { |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $localtax1line = $dataforprice['localtax1']; |
647 | 647 | $localtax2line = $dataforprice['localtax2']; |
648 | 648 | |
649 | - $product_data_cache[$value['fk_product']] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); |
|
649 | + $product_data_cache[$value['fk_product']] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice); |
|
650 | 650 | } else { |
651 | 651 | $prodDurationHours = $product_data_cache[$value['fk_product']]['duration']; |
652 | 652 | $pu_htline = empty($product_data_cache[$value['fk_product']]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$value['fk_product']]['dataforprice']['pu_ht']; |
@@ -654,10 +654,10 @@ discard block |
||
654 | 654 | $localtax1line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax1']; |
655 | 655 | $localtax2line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax2']; |
656 | 656 | } |
657 | - $idprodline=$value['fk_product']; |
|
657 | + $idprodline = $value['fk_product']; |
|
658 | 658 | } |
659 | 659 | $lineid = $tmpinvoice->addline($value['note'], $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
660 | - if ($lineid<0) { |
|
660 | + if ($lineid < 0) { |
|
661 | 661 | $error++; |
662 | 662 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
663 | 663 | } |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $arrayoftasks = array(); |
678 | 678 | foreach ($toselect as $key => $value) { |
679 | 679 | // Get userid, timepent |
680 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
680 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
681 | 681 | // $object->id is now the task id |
682 | 682 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
683 | 683 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -693,13 +693,13 @@ discard block |
||
693 | 693 | |
694 | 694 | // Add lines |
695 | 695 | $prodDurationHours = $prodDurationHoursBase; |
696 | - $idprodline=$idprod; |
|
696 | + $idprodline = $idprod; |
|
697 | 697 | $pu_htline = $pu_ht; |
698 | 698 | $txtvaline = $txtva; |
699 | 699 | $localtax1line = $localtax1; |
700 | 700 | $localtax2line = $localtax2; |
701 | 701 | |
702 | - if (!empty($fk_product) && $fk_product!==$idprod) { |
|
702 | + if (!empty($fk_product) && $fk_product !== $idprod) { |
|
703 | 703 | if (!array_key_exists($fk_product, $product_data_cache)) { |
704 | 704 | $result = $tmpproduct->fetch($fk_product); |
705 | 705 | if ($result < 0) { |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | $localtax1line = $dataforprice['localtax1']; |
721 | 721 | $localtax2line = $dataforprice['localtax2']; |
722 | 722 | |
723 | - $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); |
|
723 | + $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice); |
|
724 | 724 | } else { |
725 | 725 | $prodDurationHours = $product_data_cache[$fk_product]['duration']; |
726 | 726 | $pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht']; |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | $localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1']; |
729 | 729 | $localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2']; |
730 | 730 | } |
731 | - $idprodline=$fk_product; |
|
731 | + $idprodline = $fk_product; |
|
732 | 732 | } |
733 | 733 | |
734 | 734 | |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | // Add lines |
754 | 754 | $date_start = ''; |
755 | 755 | $date_end = ''; |
756 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
756 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
757 | 757 | $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); |
758 | 758 | if ($lineid < 0) { |
759 | 759 | $error++; |
@@ -763,8 +763,8 @@ discard block |
||
763 | 763 | |
764 | 764 | if (!$error) { |
765 | 765 | // Update lineid into line of timespent |
766 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
767 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')'; |
|
766 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
767 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')'; |
|
768 | 768 | $result = $db->query($sql); |
769 | 769 | if (!$result) { |
770 | 770 | $error++; |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | $tmpinter->socid = $projectstatic->thirdparty->id; |
818 | 818 | $tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); |
819 | 819 | $tmpinter->fk_project = $projectstatic->id; |
820 | - $tmpinter->description = $projectstatic->title . ( !empty($projectstatic->description) ? '-' . $projectstatic->label : '' ); |
|
820 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
821 | 821 | |
822 | 822 | if ($interToUse) { |
823 | 823 | $tmpinter->fetch($interToUse); |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
851 | 851 | |
852 | 852 | // Add lines |
853 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . ( !empty($value['note']) ? ' - ' . $value['note'] : '' ), $value['date'], $value['timespent']); |
|
853 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
854 | 854 | } |
855 | 855 | } |
856 | 856 | |
@@ -881,9 +881,9 @@ discard block |
||
881 | 881 | //$result = $projectstatic->fetch($object->fk_project); |
882 | 882 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
883 | 883 | |
884 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
884 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
885 | 885 | if (!empty($withproject)) { |
886 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; |
|
886 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
887 | 887 | } |
888 | 888 | $help_url = ''; |
889 | 889 | |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
947 | 947 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
948 | 948 | $tmpurl = preg_replace('/__SOCID__/', $projectstatic->socid, $tmpurl); |
949 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
949 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
950 | 950 | } else { |
951 | 951 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
952 | 952 | } |
@@ -1040,7 +1040,7 @@ discard block |
||
1040 | 1040 | $cols = 2; |
1041 | 1041 | $savobject = $object; |
1042 | 1042 | $object = $projectstatic; |
1043 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
1043 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
1044 | 1044 | $object = $savobject; |
1045 | 1045 | |
1046 | 1046 | print '</table>'; |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | //'builddoc'=>$langs->trans("PDFMerge"), |
1119 | 1119 | ); |
1120 | 1120 | } |
1121 | - if ( isModEnabled('ficheinter') && $user->hasRight('ficheinter', 'creer')) { |
|
1121 | + if (isModEnabled('ficheinter') && $user->hasRight('ficheinter', 'creer')) { |
|
1122 | 1122 | $langs->load("interventions"); |
1123 | 1123 | $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); |
1124 | 1124 | } |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | } |
1143 | 1143 | |
1144 | 1144 | $param = ($withproject ? '&withproject=1' : ''); |
1145 | - $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
1145 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
1146 | 1146 | $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
1147 | 1147 | |
1148 | 1148 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
@@ -1272,10 +1272,10 @@ discard block |
||
1272 | 1272 | // Definition of fields for list |
1273 | 1273 | $arrayfields = array(); |
1274 | 1274 | $arrayfields['t.element_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1); |
1275 | - $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1); |
|
1275 | + $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1', 'checked'=>1); |
|
1276 | 1276 | $arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1'); |
1277 | 1277 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
1278 | - if (! empty($allprojectforuser)) { |
|
1278 | + if (!empty($allprojectforuser)) { |
|
1279 | 1279 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
1280 | 1280 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
1281 | 1281 | } |
@@ -1648,13 +1648,13 @@ discard block |
||
1648 | 1648 | if ($search_timespent_starthour || $search_timespent_startmin) { |
1649 | 1649 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
1650 | 1650 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
1651 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
1651 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
1652 | 1652 | } |
1653 | 1653 | |
1654 | 1654 | if ($search_timespent_endhour || $search_timespent_endmin) { |
1655 | 1655 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
1656 | 1656 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
1657 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
1657 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
1658 | 1658 | } |
1659 | 1659 | } |
1660 | 1660 | |
@@ -2203,7 +2203,7 @@ discard block |
||
2203 | 2203 | } |
2204 | 2204 | print $tmpproject->getNomUrl(1); |
2205 | 2205 | print '</td>'; |
2206 | - if (! $i) { |
|
2206 | + if (!$i) { |
|
2207 | 2207 | $totalarray['nbfield']++; |
2208 | 2208 | } |
2209 | 2209 | } |
@@ -2218,7 +2218,7 @@ discard block |
||
2218 | 2218 | } |
2219 | 2219 | print $tmpproject->title; |
2220 | 2220 | print '</td>'; |
2221 | - if (! $i) { |
|
2221 | + if (!$i) { |
|
2222 | 2222 | $totalarray['nbfield']++; |
2223 | 2223 | } |
2224 | 2224 | } |
@@ -2394,7 +2394,7 @@ discard block |
||
2394 | 2394 | if ($task_time->invoice_id) { |
2395 | 2395 | $result = $tmpinvoice->fetch($task_time->invoice_id); |
2396 | 2396 | if ($result > 0) { |
2397 | - if ($action=='editline' && $_GET['lineid'] == $task_time->rowid) { |
|
2397 | + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { |
|
2398 | 2398 | print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid'=>$projectstatic->id)); |
2399 | 2399 | } else { |
2400 | 2400 | print $tmpinvoice->getNomUrl(1); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // Get parameters |
57 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
57 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
58 | 58 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
59 | 59 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
60 | 60 | $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
135 | 135 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
136 | 136 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
137 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
137 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
138 | 138 | } else { |
139 | 139 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
140 | 140 | } |
@@ -113,7 +113,7 @@ |
||
113 | 113 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
114 | 114 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
115 | 115 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
116 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
116 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
117 | 117 | } else { |
118 | 118 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
119 | 119 | } |