@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | |
31 | 31 | // Load Dolibarr environment |
32 | 32 | require '../../main.inc.php'; |
33 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
34 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
35 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
38 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
39 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
40 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
38 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
39 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
40 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
41 | 41 | |
42 | 42 | // Load translation files required by the page |
43 | 43 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
165 | 165 | } |
166 | 166 | |
167 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
167 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
168 | 168 | |
169 | 169 | // Purge search criteria |
170 | 170 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -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"); |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | if (count($tasksarray) > 0) { |
378 | 378 | $id = $tasksarray[0]->id; |
379 | 379 | } else { |
380 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
380 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
381 | 381 | exit; |
382 | 382 | } |
383 | 383 | } |
@@ -414,9 +414,9 @@ discard block |
||
414 | 414 | if (!($projectstatic->thirdparty->id > 0)) { |
415 | 415 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
416 | 416 | } else { |
417 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
418 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
419 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
417 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
418 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
419 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
420 | 420 | |
421 | 421 | $tmpinvoice = new Facture($db); |
422 | 422 | $tmptimespent = new Task($db); |
@@ -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 | } |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | // Add lines |
556 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
556 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
557 | 557 | if ($lineid < 0) { |
558 | 558 | $error++; |
559 | 559 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -586,16 +586,16 @@ 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; |
|
589 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
590 | 590 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
591 | 591 | |
592 | 592 | if (!empty($withdetail)) { |
593 | 593 | if (!empty($object->timespent_withhour)) { |
594 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
594 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
595 | 595 | } else { |
596 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
596 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
597 | 597 | } |
598 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
598 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
599 | 599 | } |
600 | 600 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
601 | 601 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | $arrayoftasks = array(); |
674 | 674 | foreach ($toselect as $key => $value) { |
675 | 675 | // Get userid, timepent |
676 | - $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 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
677 | 677 | // $object->id is now the task id |
678 | 678 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
679 | 679 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | // Add lines |
750 | 750 | $date_start = ''; |
751 | 751 | $date_end = ''; |
752 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
752 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
753 | 753 | $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); |
754 | 754 | if ($lineid < 0) { |
755 | 755 | $error++; |
@@ -759,8 +759,8 @@ discard block |
||
759 | 759 | |
760 | 760 | if (!$error) { |
761 | 761 | // Update lineid into line of timespent |
762 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
763 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')'; |
|
762 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
763 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')'; |
|
764 | 764 | $result = $db->query($sql); |
765 | 765 | if (!$result) { |
766 | 766 | $error++; |
@@ -796,12 +796,12 @@ discard block |
||
796 | 796 | if (!($projectstatic->thirdparty->id > 0)) { |
797 | 797 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
798 | 798 | } else { |
799 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
800 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
801 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
799 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
800 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
801 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
802 | 802 | |
803 | 803 | |
804 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
804 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
805 | 805 | $tmpinter = new Fichinter($db); |
806 | 806 | $tmptimespent = new Task($db); |
807 | 807 | $fuser = new User($db); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $tmpinter->socid = $projectstatic->thirdparty->id; |
814 | 814 | $tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); |
815 | 815 | $tmpinter->fk_project = $projectstatic->id; |
816 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
816 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
817 | 817 | |
818 | 818 | if ($interToUse) { |
819 | 819 | $tmpinter->fetch($interToUse); |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
847 | 847 | |
848 | 848 | // Add lines |
849 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
849 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
850 | 850 | } |
851 | 851 | } |
852 | 852 | |
@@ -877,9 +877,9 @@ discard block |
||
877 | 877 | //$result = $projectstatic->fetch($object->fk_project); |
878 | 878 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
879 | 879 | |
880 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
880 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
881 | 881 | if (!empty($withproject)) { |
882 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
882 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
883 | 883 | } |
884 | 884 | $help_url = ''; |
885 | 885 | |
@@ -928,13 +928,13 @@ discard block |
||
928 | 928 | |
929 | 929 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
930 | 930 | if ($search_user) { |
931 | - $param .= '&search_user=' . ((int) $search_user); |
|
931 | + $param .= '&search_user='.((int) $search_user); |
|
932 | 932 | } |
933 | 933 | if ($search_month) { |
934 | - $param .= '&search_month=' . ((int) $search_month); |
|
934 | + $param .= '&search_month='.((int) $search_month); |
|
935 | 935 | } |
936 | 936 | if ($search_year) { |
937 | - $param .= '&search_year=' . ((int) $search_year); |
|
937 | + $param .= '&search_year='.((int) $search_year); |
|
938 | 938 | } |
939 | 939 | |
940 | 940 | // Project card |
@@ -946,14 +946,14 @@ discard block |
||
946 | 946 | $morehtmlref .= $projectstatic->title; |
947 | 947 | // Thirdparty |
948 | 948 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
949 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
949 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
950 | 950 | } |
951 | 951 | $morehtmlref .= '</div>'; |
952 | 952 | |
953 | 953 | // Define a complementary filter for search of next/prev ref. |
954 | 954 | if (empty($user->rights->projet->all->lire)) { |
955 | 955 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
956 | - $projectstatic->next_prev_filter = " rowid IN (" . $db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0') . ")"; |
|
956 | + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; |
|
957 | 957 | } |
958 | 958 | |
959 | 959 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -971,25 +971,25 @@ discard block |
||
971 | 971 | print '</td>'; |
972 | 972 | print '<td>'; |
973 | 973 | if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { |
974 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
974 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
975 | 975 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
976 | 976 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
977 | 977 | print '<br>'; |
978 | 978 | } |
979 | 979 | if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
980 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
980 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
981 | 981 | $htmltext = $langs->trans("ProjectFollowTasks"); |
982 | 982 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
983 | 983 | print '<br>'; |
984 | 984 | } |
985 | 985 | if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { |
986 | - print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> '; |
|
986 | + print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; |
|
987 | 987 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
988 | 988 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
989 | 989 | print '<br>'; |
990 | 990 | } |
991 | 991 | if (isModEnabled('eventorganization')) { |
992 | - print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> '; |
|
992 | + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> '; |
|
993 | 993 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
994 | 994 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
995 | 995 | } |
@@ -997,7 +997,7 @@ discard block |
||
997 | 997 | } |
998 | 998 | |
999 | 999 | // Visibility |
1000 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
1000 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
1001 | 1001 | if ($projectstatic->public) { |
1002 | 1002 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
1003 | 1003 | print $langs->trans('SharedProject'); |
@@ -1008,14 +1008,14 @@ discard block |
||
1008 | 1008 | print '</td></tr>'; |
1009 | 1009 | |
1010 | 1010 | // Budget |
1011 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
1011 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
1012 | 1012 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
1013 | - print '<span class="amount">' . price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
1013 | + print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
1014 | 1014 | } |
1015 | 1015 | print '</td></tr>'; |
1016 | 1016 | |
1017 | 1017 | // Date start - end project |
1018 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
1018 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
1019 | 1019 | $start = dol_print_date($projectstatic->date_start, 'day'); |
1020 | 1020 | print ($start ? $start : '?'); |
1021 | 1021 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | $cols = 2; |
1031 | 1031 | $savobject = $object; |
1032 | 1032 | $object = $projectstatic; |
1033 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
1033 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
1034 | 1034 | $object = $savobject; |
1035 | 1035 | |
1036 | 1036 | print '</table>'; |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | |
1049 | 1049 | // Categories |
1050 | 1050 | if (isModEnabled('categorie')) { |
1051 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
1051 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
1052 | 1052 | print $form->showCategories($projectstatic->id, 'project', 1); |
1053 | 1053 | print "</td></tr>"; |
1054 | 1054 | } |
@@ -1077,12 +1077,12 @@ discard block |
||
1077 | 1077 | |
1078 | 1078 | if (!empty($projectidforalltimes)) { |
1079 | 1079 | // We are on tab 'Time Spent' of project |
1080 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
1081 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
1080 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
1081 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
1082 | 1082 | } else { |
1083 | 1083 | // We are on tab 'Time Spent' of task |
1084 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
1085 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
1084 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
1085 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
1086 | 1086 | } |
1087 | 1087 | } else { |
1088 | 1088 | $linktocreatetimeBtnStatus = -2; |
@@ -1127,19 +1127,19 @@ discard block |
||
1127 | 1127 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
1128 | 1128 | |
1129 | 1129 | if ($action == 'deleteline') { |
1130 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : ''); |
|
1130 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : ''); |
|
1131 | 1131 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1132 | 1132 | } |
1133 | 1133 | |
1134 | 1134 | $param = ($withproject ? '&withproject=1' : ''); |
1135 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
1136 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
1135 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
1136 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
1137 | 1137 | |
1138 | 1138 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
1139 | 1139 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
1140 | - $object->next_prev_filter = " fk_projet IN (" . $db->sanitize($projectsListId) . ")"; |
|
1140 | + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; |
|
1141 | 1141 | } else { |
1142 | - $object->next_prev_filter = " fk_projet = " . ((int) $projectstatic->id); |
|
1142 | + $object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id); |
|
1143 | 1143 | } |
1144 | 1144 | |
1145 | 1145 | $morehtmlref = ''; |
@@ -1147,12 +1147,12 @@ discard block |
||
1147 | 1147 | // Project |
1148 | 1148 | if (empty($withproject)) { |
1149 | 1149 | $morehtmlref .= '<div class="refidno">'; |
1150 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
1150 | + $morehtmlref .= $langs->trans("Project").': '; |
|
1151 | 1151 | $morehtmlref .= $projectstatic->getNomUrl(1); |
1152 | 1152 | $morehtmlref .= '<br>'; |
1153 | 1153 | |
1154 | 1154 | // Third party |
1155 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
1155 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
1156 | 1156 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
1157 | 1157 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
1158 | 1158 | } |
@@ -1168,7 +1168,7 @@ discard block |
||
1168 | 1168 | print '<table class="border centpercent tableforfield">'; |
1169 | 1169 | |
1170 | 1170 | // Task parent |
1171 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
1171 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
1172 | 1172 | if ($object->fk_task_parent > 0) { |
1173 | 1173 | $tasktmp = new Task($db); |
1174 | 1174 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1177,7 +1177,7 @@ discard block |
||
1177 | 1177 | print '</td></tr>'; |
1178 | 1178 | |
1179 | 1179 | // Date start - Date end task |
1180 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
1180 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
1181 | 1181 | $start = dol_print_date($object->date_start, 'dayhour'); |
1182 | 1182 | print ($start ? $start : '?'); |
1183 | 1183 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | print '</td></tr>'; |
1190 | 1190 | |
1191 | 1191 | // Planned workload |
1192 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
1192 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
1193 | 1193 | if ($object->planned_workload) { |
1194 | 1194 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
1195 | 1195 | } |
@@ -1204,21 +1204,21 @@ discard block |
||
1204 | 1204 | print '<table class="border tableforfield centpercent">'; |
1205 | 1205 | |
1206 | 1206 | // Progress declared |
1207 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
1208 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
1207 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
1208 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
1209 | 1209 | print '</td></tr>'; |
1210 | 1210 | |
1211 | 1211 | // Progress calculated |
1212 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
1212 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
1213 | 1213 | if ($object->planned_workload) { |
1214 | 1214 | $tmparray = $object->getSummaryOfTimeSpent(); |
1215 | 1215 | if ($tmparray['total_duration'] > 0) { |
1216 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
1216 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
1217 | 1217 | } else { |
1218 | 1218 | print '0 %'; |
1219 | 1219 | } |
1220 | 1220 | } else { |
1221 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
1221 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
1222 | 1222 | } |
1223 | 1223 | print '</td>'; |
1224 | 1224 | |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | print dol_get_fiche_end(); |
1235 | 1235 | } else { |
1236 | 1236 | if ($action == 'deleteline') { |
1237 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : ''); |
|
1237 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : ''); |
|
1238 | 1238 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1239 | 1239 | } |
1240 | 1240 | } |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | |
1249 | 1249 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
1250 | 1250 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
1251 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOST('lineid', 'int') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage); |
|
1251 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOST('lineid', 'int').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage); |
|
1252 | 1252 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1253 | 1253 | } |
1254 | 1254 | |
@@ -1267,10 +1267,10 @@ discard block |
||
1267 | 1267 | // Definition of fields for list |
1268 | 1268 | $arrayfields = array(); |
1269 | 1269 | $arrayfields['t.element_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1); |
1270 | - $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1); |
|
1270 | + $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1', 'checked'=>1); |
|
1271 | 1271 | $arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1'); |
1272 | 1272 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
1273 | - if (! empty($allprojectforuser)) { |
|
1273 | + if (!empty($allprojectforuser)) { |
|
1274 | 1274 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
1275 | 1275 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
1276 | 1276 | } |
@@ -1286,82 +1286,82 @@ discard block |
||
1286 | 1286 | $arrayfields['value'] = array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>isModEnabled("salaries")); |
1287 | 1287 | $arrayfields['valuebilled'] = array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time)); |
1288 | 1288 | // Extra fields |
1289 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1289 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1290 | 1290 | |
1291 | 1291 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
1292 | 1292 | |
1293 | 1293 | $param = ''; |
1294 | 1294 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
1295 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
1295 | + $param .= '&contextpage='.urlencode($contextpage); |
|
1296 | 1296 | } |
1297 | 1297 | if ($limit > 0 && $limit != $conf->liste_limit) { |
1298 | 1298 | $param .= '&limit='.((int) $limit); |
1299 | 1299 | } |
1300 | 1300 | if ($search_month > 0) { |
1301 | - $param .= '&search_month=' . urlencode($search_month); |
|
1301 | + $param .= '&search_month='.urlencode($search_month); |
|
1302 | 1302 | } |
1303 | 1303 | if ($search_year > 0) { |
1304 | - $param .= '&search_year=' . urlencode($search_year); |
|
1304 | + $param .= '&search_year='.urlencode($search_year); |
|
1305 | 1305 | } |
1306 | 1306 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
1307 | 1307 | $param .= '&search_user='.urlencode($search_user); |
1308 | 1308 | } |
1309 | 1309 | if ($search_task_ref != '') { |
1310 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
1310 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
1311 | 1311 | } |
1312 | 1312 | if ($search_company != '') { |
1313 | - $param .= '&$search_company=' . urlencode($search_company); |
|
1313 | + $param .= '&$search_company='.urlencode($search_company); |
|
1314 | 1314 | } |
1315 | 1315 | if ($search_company_alias != '') { |
1316 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
1316 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
1317 | 1317 | } |
1318 | 1318 | if ($search_project_ref != '') { |
1319 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
1319 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
1320 | 1320 | } |
1321 | 1321 | if ($search_project_label != '') { |
1322 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
1322 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
1323 | 1323 | } |
1324 | 1324 | if ($search_task_label != '') { |
1325 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
1325 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
1326 | 1326 | } |
1327 | 1327 | if ($search_note != '') { |
1328 | - $param .= '&search_note=' . urlencode($search_note); |
|
1328 | + $param .= '&search_note='.urlencode($search_note); |
|
1329 | 1329 | } |
1330 | 1330 | if ($search_duration != '') { |
1331 | - $param .= '&search_field2=' . urlencode($search_duration); |
|
1331 | + $param .= '&search_field2='.urlencode($search_duration); |
|
1332 | 1332 | } |
1333 | 1333 | if ($optioncss != '') { |
1334 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
1334 | + $param .= '&optioncss='.urlencode($optioncss); |
|
1335 | 1335 | } |
1336 | 1336 | if ($search_date_startday) { |
1337 | - $param .= '&search_date_startday=' . urlencode($search_date_startday); |
|
1337 | + $param .= '&search_date_startday='.urlencode($search_date_startday); |
|
1338 | 1338 | } |
1339 | 1339 | if ($search_date_startmonth) { |
1340 | - $param .= '&search_date_startmonth=' . urlencode($search_date_startmonth); |
|
1340 | + $param .= '&search_date_startmonth='.urlencode($search_date_startmonth); |
|
1341 | 1341 | } |
1342 | 1342 | if ($search_date_startyear) { |
1343 | - $param .= '&search_date_startyear=' . urlencode($search_date_startyear); |
|
1343 | + $param .= '&search_date_startyear='.urlencode($search_date_startyear); |
|
1344 | 1344 | } |
1345 | 1345 | if ($search_date_endday) { |
1346 | - $param .= '&search_date_endday=' . urlencode($search_date_endday); |
|
1346 | + $param .= '&search_date_endday='.urlencode($search_date_endday); |
|
1347 | 1347 | } |
1348 | 1348 | if ($search_date_endmonth) { |
1349 | - $param .= '&search_date_endmonth=' . urlencode($search_date_endmonth); |
|
1349 | + $param .= '&search_date_endmonth='.urlencode($search_date_endmonth); |
|
1350 | 1350 | } |
1351 | 1351 | if ($search_date_endyear) { |
1352 | - $param .= '&search_date_endyear=' . urlencode($search_date_endyear); |
|
1352 | + $param .= '&search_date_endyear='.urlencode($search_date_endyear); |
|
1353 | 1353 | } |
1354 | 1354 | if ($search_timespent_starthour) { |
1355 | - $param .= '&search_timespent_duration_starthour=' . urlencode($search_timespent_starthour); |
|
1355 | + $param .= '&search_timespent_duration_starthour='.urlencode($search_timespent_starthour); |
|
1356 | 1356 | } |
1357 | 1357 | if ($search_timespent_startmin) { |
1358 | - $param .= '&search_timespent_duration_startmin=' . urlencode($search_timespent_startmin); |
|
1358 | + $param .= '&search_timespent_duration_startmin='.urlencode($search_timespent_startmin); |
|
1359 | 1359 | } |
1360 | 1360 | if ($search_timespent_endhour) { |
1361 | - $param .= '&search_timespent_duration_endhour=' . urlencode($search_timespent_endhour); |
|
1361 | + $param .= '&search_timespent_duration_endhour='.urlencode($search_timespent_endhour); |
|
1362 | 1362 | } |
1363 | 1363 | if ($search_timespent_endmin) { |
1364 | - $param .= '&search_timespent_duration_endmin=' . urlencode($search_timespent_endmin); |
|
1364 | + $param .= '&search_timespent_duration_endmin='.urlencode($search_timespent_endmin); |
|
1365 | 1365 | } |
1366 | 1366 | |
1367 | 1367 | /* |
@@ -1369,24 +1369,24 @@ discard block |
||
1369 | 1369 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
1370 | 1370 | */ |
1371 | 1371 | if ($id) { |
1372 | - $param .= '&id=' . urlencode($id); |
|
1372 | + $param .= '&id='.urlencode($id); |
|
1373 | 1373 | } |
1374 | 1374 | if ($projectid) { |
1375 | - $param .= '&projectid=' . urlencode($projectid); |
|
1375 | + $param .= '&projectid='.urlencode($projectid); |
|
1376 | 1376 | } |
1377 | 1377 | if ($withproject) { |
1378 | - $param .= '&withproject=' . urlencode($withproject); |
|
1378 | + $param .= '&withproject='.urlencode($withproject); |
|
1379 | 1379 | } |
1380 | 1380 | // Add $param from hooks |
1381 | 1381 | $parameters = array(); |
1382 | 1382 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
1383 | 1383 | $param .= $hookmanager->resPrint; |
1384 | 1384 | |
1385 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
1385 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
1386 | 1386 | if ($optioncss != '') { |
1387 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
1387 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
1388 | 1388 | } |
1389 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1389 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1390 | 1390 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
1391 | 1391 | if ($action == 'editline') { |
1392 | 1392 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1401,13 +1401,13 @@ discard block |
||
1401 | 1401 | } else { |
1402 | 1402 | print '<input type="hidden" name="action" value="list">'; |
1403 | 1403 | } |
1404 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
1405 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
1404 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
1405 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
1406 | 1406 | |
1407 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
1408 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
1409 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
1410 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
1407 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
1408 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
1409 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
1410 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
1411 | 1411 | print '<input type="hidden" name="page_y" value="">'; |
1412 | 1412 | |
1413 | 1413 | // Form to convert time spent into invoice |
@@ -1434,7 +1434,7 @@ discard block |
||
1434 | 1434 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
1435 | 1435 | ); |
1436 | 1436 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
1437 | - print "\n" . '<script type="text/javascript">'; |
|
1437 | + print "\n".'<script type="text/javascript">'; |
|
1438 | 1438 | print ' |
1439 | 1439 | $(document).ready(function () { |
1440 | 1440 | setDetailVisibility(); |
@@ -1451,8 +1451,8 @@ discard block |
||
1451 | 1451 | } |
1452 | 1452 | }); |
1453 | 1453 | '; |
1454 | - print '</script>' . "\n"; |
|
1455 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
1454 | + print '</script>'."\n"; |
|
1455 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
1456 | 1456 | print '</td>'; |
1457 | 1457 | print '</tr>'; |
1458 | 1458 | |
@@ -1487,14 +1487,14 @@ discard block |
||
1487 | 1487 | |
1488 | 1488 | print '<br>'; |
1489 | 1489 | print '<div class="center">'; |
1490 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
1491 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1490 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
1491 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1492 | 1492 | print '</div>'; |
1493 | 1493 | print '<br>'; |
1494 | 1494 | } else { |
1495 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
1495 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
1496 | 1496 | print '<div class="center">'; |
1497 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1497 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1498 | 1498 | print '</div>'; |
1499 | 1499 | $massaction = ''; |
1500 | 1500 | } |
@@ -1507,7 +1507,7 @@ discard block |
||
1507 | 1507 | print '<table class="noborder centpercent">'; |
1508 | 1508 | print '<tr>'; |
1509 | 1509 | print '<td class="titlefield">'; |
1510 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
1510 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
1511 | 1511 | print '</td>'; |
1512 | 1512 | print '<td>'; |
1513 | 1513 | $forminter = new FormIntervention($db); |
@@ -1517,14 +1517,14 @@ discard block |
||
1517 | 1517 | print '</table>'; |
1518 | 1518 | |
1519 | 1519 | print '<div class="center">'; |
1520 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
1521 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
1520 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
1521 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
1522 | 1522 | print '</div>'; |
1523 | 1523 | print '<br>'; |
1524 | 1524 | } else { |
1525 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
1525 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
1526 | 1526 | print '<div class="center">'; |
1527 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
1527 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
1528 | 1528 | print '</div>'; |
1529 | 1529 | $massaction = ''; |
1530 | 1530 | } |
@@ -1585,13 +1585,13 @@ discard block |
||
1585 | 1585 | $sql .= " AND t.fk_element =".((int) $object->id); |
1586 | 1586 | } elseif (!empty($projectidforalltimes)) { |
1587 | 1587 | // Limit on one project |
1588 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")"; |
|
1588 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; |
|
1589 | 1589 | } elseif (!empty($allprojectforuser)) { |
1590 | 1590 | // Limit on on user |
1591 | 1591 | if (empty($search_user)) { |
1592 | 1592 | $search_user = $user->id; |
1593 | 1593 | } |
1594 | - if ($search_user > 0) $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
1594 | + if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user); |
|
1595 | 1595 | } |
1596 | 1596 | |
1597 | 1597 | if ($search_note) { |
@@ -1643,13 +1643,13 @@ discard block |
||
1643 | 1643 | if ($search_timespent_starthour || $search_timespent_startmin) { |
1644 | 1644 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
1645 | 1645 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
1646 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
1646 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
1647 | 1647 | } |
1648 | 1648 | |
1649 | 1649 | if ($search_timespent_endhour || $search_timespent_endmin) { |
1650 | 1650 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
1651 | 1651 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
1652 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
1652 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
1653 | 1653 | } |
1654 | 1654 | } |
1655 | 1655 | |
@@ -1697,13 +1697,13 @@ discard block |
||
1697 | 1697 | |
1698 | 1698 | if ($num >= 0) { |
1699 | 1699 | if (!empty($projectidforalltimes)) { |
1700 | - print '<!-- List of time spent for project -->' . "\n"; |
|
1700 | + print '<!-- List of time spent for project -->'."\n"; |
|
1701 | 1701 | |
1702 | 1702 | $title = $langs->trans("ListTaskTimeUserProject"); |
1703 | 1703 | |
1704 | 1704 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
1705 | 1705 | } else { |
1706 | - print '<!-- List of time spent -->' . "\n"; |
|
1706 | + print '<!-- List of time spent -->'."\n"; |
|
1707 | 1707 | |
1708 | 1708 | $title = $langs->trans("ListTaskTimeForTask"); |
1709 | 1709 | |
@@ -1725,26 +1725,26 @@ discard block |
||
1725 | 1725 | * Form to add a new line of time spent |
1726 | 1726 | */ |
1727 | 1727 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
1728 | - print '<!-- table to add time spent -->' . "\n"; |
|
1728 | + print '<!-- table to add time spent -->'."\n"; |
|
1729 | 1729 | if (!empty($id)) { |
1730 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
1730 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
1731 | 1731 | } |
1732 | 1732 | |
1733 | 1733 | print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table |
1734 | 1734 | print '<table class="noborder nohover centpercent">'; |
1735 | 1735 | |
1736 | 1736 | print '<tr class="liste_titre">'; |
1737 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
1737 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
1738 | 1738 | if (!empty($allprojectforuser)) { |
1739 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
1739 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
1740 | 1740 | } |
1741 | 1741 | if (empty($id)) { |
1742 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
1742 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
1743 | 1743 | } |
1744 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
1745 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
1746 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
1747 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
1744 | + print '<td>'.$langs->trans("By").'</td>'; |
|
1745 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
1746 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
1747 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
1748 | 1748 | if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { |
1749 | 1749 | print '<td></td>'; |
1750 | 1750 | |
@@ -1798,14 +1798,14 @@ discard block |
||
1798 | 1798 | print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
1799 | 1799 | } else { |
1800 | 1800 | if ($nboftasks) { |
1801 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
1801 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
1802 | 1802 | } |
1803 | 1803 | } |
1804 | 1804 | print '</td>'; |
1805 | 1805 | |
1806 | 1806 | // Note |
1807 | 1807 | print '<td>'; |
1808 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
1808 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
1809 | 1809 | print '</td>'; |
1810 | 1810 | |
1811 | 1811 | // Duration - Time spent |
@@ -1873,7 +1873,7 @@ discard block |
||
1873 | 1873 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1874 | 1874 | |
1875 | 1875 | print '<div class="div-table-responsive">'; |
1876 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
1876 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
1877 | 1877 | |
1878 | 1878 | // Fields title search |
1879 | 1879 | // -------------------------------------------------------------------- |
@@ -1898,20 +1898,20 @@ discard block |
||
1898 | 1898 | } |
1899 | 1899 | // Thirdparty |
1900 | 1900 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
1901 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
1901 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
1902 | 1902 | } |
1903 | 1903 | |
1904 | 1904 | // Thirdparty alias |
1905 | 1905 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
1906 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
1906 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
1907 | 1907 | } |
1908 | 1908 | |
1909 | 1909 | if (!empty($allprojectforuser)) { |
1910 | 1910 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
1911 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
1911 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
1912 | 1912 | } |
1913 | 1913 | if (!empty($arrayfields['p.project_label']['checked'])) { |
1914 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
1914 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
1915 | 1915 | } |
1916 | 1916 | } |
1917 | 1917 | // Task |
@@ -1929,7 +1929,7 @@ discard block |
||
1929 | 1929 | } |
1930 | 1930 | // Note |
1931 | 1931 | if (!empty($arrayfields['t.note']['checked'])) { |
1932 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
1932 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
1933 | 1933 | } |
1934 | 1934 | // Duration |
1935 | 1935 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1940,7 +1940,7 @@ discard block |
||
1940 | 1940 | if ($search_timespent_starthour || $search_timespent_startmin) { |
1941 | 1941 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
1942 | 1942 | } |
1943 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
1943 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
1944 | 1944 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
1945 | 1945 | print '</div>'; |
1946 | 1946 | |
@@ -1948,7 +1948,7 @@ discard block |
||
1948 | 1948 | if ($search_timespent_endhour || $search_timespent_endmin) { |
1949 | 1949 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
1950 | 1950 | } |
1951 | - print '<div class="nowraponall">' . $langs->trans('at') . ' '; |
|
1951 | + print '<div class="nowraponall">'.$langs->trans('at').' '; |
|
1952 | 1952 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
1953 | 1953 | print '</div>'; |
1954 | 1954 | |
@@ -1964,7 +1964,7 @@ discard block |
||
1964 | 1964 | } |
1965 | 1965 | // Value billed |
1966 | 1966 | if (!empty($arrayfields['valuebilled']['checked'])) { |
1967 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
1967 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
1968 | 1968 | } |
1969 | 1969 | |
1970 | 1970 | /* |
@@ -1982,7 +1982,7 @@ discard block |
||
1982 | 1982 | print $searchpicto; |
1983 | 1983 | print '</td>'; |
1984 | 1984 | } |
1985 | - print '</tr>' . "\n"; |
|
1985 | + print '</tr>'."\n"; |
|
1986 | 1986 | |
1987 | 1987 | $totalarray = array(); |
1988 | 1988 | $totalarray['nbfield'] = 0; |
@@ -2092,7 +2092,7 @@ discard block |
||
2092 | 2092 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
2093 | 2093 | print '<td class="center nowraponall">'; |
2094 | 2094 | if (($action == 'editline' || $action == 'splitline') && GETPOST('lineid', 'int') == $task_time->rowid) { |
2095 | - print '<input type="hidden" name="lineid" value="' . GETPOST('lineid', 'int') . '">'; |
|
2095 | + print '<input type="hidden" name="lineid" value="'.GETPOST('lineid', 'int').'">'; |
|
2096 | 2096 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
2097 | 2097 | print ' '; |
2098 | 2098 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2100,7 +2100,7 @@ discard block |
||
2100 | 2100 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
2101 | 2101 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
2102 | 2102 | print ' '; |
2103 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
2103 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
2104 | 2104 | print img_split('', 'class="pictofixedwidth"'); |
2105 | 2105 | print '</a>'; |
2106 | 2106 | } |
@@ -2119,7 +2119,7 @@ discard block |
||
2119 | 2119 | $selected = 1; |
2120 | 2120 | } |
2121 | 2121 | print ' '; |
2122 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
2122 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
2123 | 2123 | } |
2124 | 2124 | } |
2125 | 2125 | } |
@@ -2237,7 +2237,7 @@ discard block |
||
2237 | 2237 | } |
2238 | 2238 | } |
2239 | 2239 | } elseif ($action !== 'createtime') { |
2240 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
2240 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
2241 | 2241 | } |
2242 | 2242 | |
2243 | 2243 | // Task label |
@@ -2267,7 +2267,7 @@ discard block |
||
2267 | 2267 | print img_object('', 'user', 'class="hideonsmartphone"'); |
2268 | 2268 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200'); |
2269 | 2269 | } else { |
2270 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2270 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2271 | 2271 | } |
2272 | 2272 | } else { |
2273 | 2273 | $userstatic->id = $task_time->fk_user; |
@@ -2287,7 +2287,7 @@ discard block |
||
2287 | 2287 | if (!empty($arrayfields['t.note']['checked'])) { |
2288 | 2288 | print '<td class="small">'; |
2289 | 2289 | if ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2290 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2290 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2291 | 2291 | } else { |
2292 | 2292 | print dol_nl2br($task_time->note); |
2293 | 2293 | } |
@@ -2296,7 +2296,7 @@ discard block |
||
2296 | 2296 | $totalarray['nbfield']++; |
2297 | 2297 | } |
2298 | 2298 | } elseif ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2299 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2299 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2300 | 2300 | } |
2301 | 2301 | |
2302 | 2302 | // Time spent |
@@ -2356,7 +2356,7 @@ discard block |
||
2356 | 2356 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
2357 | 2357 | |
2358 | 2358 | print '<td class="nowraponall right">'; |
2359 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
2359 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
2360 | 2360 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
2361 | 2361 | print '</span>'; |
2362 | 2362 | print '</td>'; |
@@ -2389,7 +2389,7 @@ discard block |
||
2389 | 2389 | if ($task_time->invoice_id) { |
2390 | 2390 | $result = $tmpinvoice->fetch($task_time->invoice_id); |
2391 | 2391 | if ($result > 0) { |
2392 | - if ($action=='editline' && $_GET['lineid'] == $task_time->rowid) { |
|
2392 | + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { |
|
2393 | 2393 | print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid'=>$projectstatic->id)); |
2394 | 2394 | } else { |
2395 | 2395 | print $tmpinvoice->getNomUrl(1); |
@@ -2407,7 +2407,7 @@ discard block |
||
2407 | 2407 | print $langs->trans("No"); |
2408 | 2408 | } |
2409 | 2409 | } else { |
2410 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
2410 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
2411 | 2411 | } |
2412 | 2412 | } |
2413 | 2413 | print '</td>'; |
@@ -2438,7 +2438,7 @@ discard block |
||
2438 | 2438 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
2439 | 2439 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
2440 | 2440 | print ' '; |
2441 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
2441 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
2442 | 2442 | print img_split('', 'class="pictofixedwidth"'); |
2443 | 2443 | print '</a>'; |
2444 | 2444 | } |
@@ -2457,7 +2457,7 @@ discard block |
||
2457 | 2457 | $selected = 1; |
2458 | 2458 | } |
2459 | 2459 | print ' '; |
2460 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
2460 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
2461 | 2461 | } |
2462 | 2462 | } |
2463 | 2463 | } |
@@ -2547,7 +2547,7 @@ discard block |
||
2547 | 2547 | print img_object('', 'user', 'class="hideonsmartphone"'); |
2548 | 2548 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); |
2549 | 2549 | } else { |
2550 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2550 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2551 | 2551 | } |
2552 | 2552 | } else { |
2553 | 2553 | $userstatic->id = $task_time->fk_user; |
@@ -2564,13 +2564,13 @@ discard block |
||
2564 | 2564 | if (!empty($arrayfields['t.note']['checked'])) { |
2565 | 2565 | print '<td class="tdoverflowmax300">'; |
2566 | 2566 | if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2567 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2567 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2568 | 2568 | } else { |
2569 | 2569 | print dol_nl2br($task_time->note); |
2570 | 2570 | } |
2571 | 2571 | print '</td>'; |
2572 | 2572 | } elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2573 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2573 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2574 | 2574 | } |
2575 | 2575 | |
2576 | 2576 | // Time spent |
@@ -2703,7 +2703,7 @@ discard block |
||
2703 | 2703 | print img_object('', 'user', 'class="hideonsmartphone"'); |
2704 | 2704 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask); |
2705 | 2705 | } else { |
2706 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2706 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2707 | 2707 | } |
2708 | 2708 | } else { |
2709 | 2709 | $userstatic->id = $task_time->fk_user; |
@@ -2720,13 +2720,13 @@ discard block |
||
2720 | 2720 | if (!empty($arrayfields['t.note']['checked'])) { |
2721 | 2721 | print '<td class="small tdoverflowmax300"">'; |
2722 | 2722 | if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2723 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2723 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2724 | 2724 | } else { |
2725 | 2725 | print dol_nl2br($task_time->note); |
2726 | 2726 | } |
2727 | 2727 | print '</td>'; |
2728 | 2728 | } elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { |
2729 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2729 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2730 | 2730 | } |
2731 | 2731 | |
2732 | 2732 | // Time spent |
@@ -2798,14 +2798,14 @@ discard block |
||
2798 | 2798 | $i++; |
2799 | 2799 | if ($i == 1) { |
2800 | 2800 | if ($num < $limit && empty($offset)) { |
2801 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
2801 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
2802 | 2802 | } else { |
2803 | 2803 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
2804 | 2804 | } |
2805 | 2805 | } elseif ($totalarray['totaldurationfield'] == $i) { |
2806 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
2806 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
2807 | 2807 | } elseif ($totalarray['totalvaluefield'] == $i) { |
2808 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
2808 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
2809 | 2809 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
2810 | 2810 | } else { |
2811 | 2811 | print '<td></td>'; |
@@ -2821,8 +2821,8 @@ discard block |
||
2821 | 2821 | $totalnboffields++; |
2822 | 2822 | } |
2823 | 2823 | } |
2824 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
2825 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
2824 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
2825 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
2826 | 2826 | print '</td></tr>'; |
2827 | 2827 | } |
2828 | 2828 |