@@ -31,14 +31,14 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Load Dolibarr environment |
| 33 | 33 | require '../../main.inc.php'; |
| 34 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 35 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
| 36 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
| 38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 39 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 40 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 41 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
| 42 | 42 | |
| 43 | 43 | // Load translation files required by the page |
| 44 | 44 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 168 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 169 | 169 | |
| 170 | 170 | // Purge search criteria |
| 171 | 171 | 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 |
@@ -351,10 +351,10 @@ discard block |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 354 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 354 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 355 | 355 | |
| 356 | 356 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 357 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 357 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 358 | 358 | |
| 359 | 359 | if ($result < 0) { |
| 360 | 360 | $langs->load("errors"); |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | if (count($tasksarray) > 0) { |
| 375 | 375 | $id = $tasksarray[0]->id; |
| 376 | 376 | } else { |
| 377 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 377 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 378 | 378 | exit; |
| 379 | 379 | } |
| 380 | 380 | } |
@@ -411,9 +411,9 @@ discard block |
||
| 411 | 411 | if (!($projectstatic->thirdparty->id > 0)) { |
| 412 | 412 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 413 | 413 | } else { |
| 414 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 415 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 416 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 414 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 415 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 416 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 417 | 417 | |
| 418 | 418 | $tmpinvoice = new Facture($db); |
| 419 | 419 | $tmptimespent = new Task($db); |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | $arrayoftasks = array(); |
| 479 | 479 | foreach ($toselect as $key => $value) { |
| 480 | 480 | // Get userid, timepent |
| 481 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 481 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 482 | 482 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 483 | 483 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 484 | 484 | } |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | // Add lines |
| 553 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
| 553 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
| 554 | 554 | if ($lineid < 0) { |
| 555 | 555 | $error++; |
| 556 | 556 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -583,16 +583,16 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 585 | 585 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 586 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 586 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 587 | 587 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 588 | 588 | |
| 589 | 589 | if (!empty($withdetail)) { |
| 590 | 590 | if (!empty($object->timespent_withhour)) { |
| 591 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 591 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 592 | 592 | } else { |
| 593 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 593 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 594 | 594 | } |
| 595 | - $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)); |
|
| 595 | + $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)); |
|
| 596 | 596 | } |
| 597 | 597 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 598 | 598 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | $arrayoftasks = array(); |
| 671 | 671 | foreach ($toselect as $key => $value) { |
| 672 | 672 | // Get userid, timepent |
| 673 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 673 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 674 | 674 | // $object->id is now the task id |
| 675 | 675 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 676 | 676 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | // Add lines |
| 747 | 747 | $date_start = ''; |
| 748 | 748 | $date_end = ''; |
| 749 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 749 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 750 | 750 | $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); |
| 751 | 751 | if ($lineid < 0) { |
| 752 | 752 | $error++; |
@@ -756,8 +756,8 @@ discard block |
||
| 756 | 756 | |
| 757 | 757 | if (!$error) { |
| 758 | 758 | // Update lineid into line of timespent |
| 759 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 760 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 759 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 760 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 761 | 761 | $result = $db->query($sql); |
| 762 | 762 | if (!$result) { |
| 763 | 763 | $error++; |
@@ -795,12 +795,12 @@ discard block |
||
| 795 | 795 | if (!($projectstatic->thirdparty->id > 0)) { |
| 796 | 796 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 797 | 797 | } else { |
| 798 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 799 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 800 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 798 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 799 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 800 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 801 | 801 | |
| 802 | 802 | |
| 803 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 803 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 804 | 804 | $tmpinter = new Fichinter($db); |
| 805 | 805 | $tmptimespent = new Task($db); |
| 806 | 806 | $fuser = new User($db); |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 813 | 813 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 814 | 814 | $tmpinter->fk_project = $projectstatic->id; |
| 815 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 815 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 816 | 816 | |
| 817 | 817 | if ($interToUse) { |
| 818 | 818 | $tmpinter->fetch($interToUse); |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 846 | 846 | |
| 847 | 847 | // Add lines |
| 848 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
| 848 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
| 849 | 849 | } |
| 850 | 850 | } |
| 851 | 851 | |
@@ -876,9 +876,9 @@ discard block |
||
| 876 | 876 | //$result = $projectstatic->fetch($object->fk_project); |
| 877 | 877 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 878 | 878 | |
| 879 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 879 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 880 | 880 | if (!empty($withproject)) { |
| 881 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 881 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 882 | 882 | } |
| 883 | 883 | $help_url = ''; |
| 884 | 884 | |
@@ -927,13 +927,13 @@ discard block |
||
| 927 | 927 | |
| 928 | 928 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 929 | 929 | if ($search_user) { |
| 930 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 930 | + $param .= '&search_user='.((int) $search_user); |
|
| 931 | 931 | } |
| 932 | 932 | if ($search_month) { |
| 933 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 933 | + $param .= '&search_month='.((int) $search_month); |
|
| 934 | 934 | } |
| 935 | 935 | if ($search_year) { |
| 936 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 936 | + $param .= '&search_year='.((int) $search_year); |
|
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 | // Project card |
@@ -945,14 +945,14 @@ discard block |
||
| 945 | 945 | $morehtmlref .= $projectstatic->title; |
| 946 | 946 | // Thirdparty |
| 947 | 947 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 948 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 948 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 949 | 949 | } |
| 950 | 950 | $morehtmlref .= '</div>'; |
| 951 | 951 | |
| 952 | 952 | // Define a complementary filter for search of next/prev ref. |
| 953 | 953 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 954 | 954 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 955 | - $projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")"; |
|
| 955 | + $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; |
|
| 956 | 956 | } |
| 957 | 957 | |
| 958 | 958 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -970,25 +970,25 @@ discard block |
||
| 970 | 970 | print '</td>'; |
| 971 | 971 | print '<td>'; |
| 972 | 972 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 973 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 973 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 974 | 974 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 975 | 975 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 976 | 976 | print '<br>'; |
| 977 | 977 | } |
| 978 | 978 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 979 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 979 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 980 | 980 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 981 | 981 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 982 | 982 | print '<br>'; |
| 983 | 983 | } |
| 984 | 984 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 985 | - 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"' : '')) . '"> '; |
|
| 985 | + 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 | 986 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 987 | 987 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 988 | 988 | print '<br>'; |
| 989 | 989 | } |
| 990 | 990 | if (isModEnabled('eventorganization')) { |
| 991 | - 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"' : '')) . '"> '; |
|
| 991 | + 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 | 992 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 993 | 993 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 994 | 994 | } |
@@ -996,7 +996,7 @@ discard block |
||
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | // Visibility |
| 999 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 999 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1000 | 1000 | if ($projectstatic->public) { |
| 1001 | 1001 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1002 | 1002 | print $langs->trans('SharedProject'); |
@@ -1007,14 +1007,14 @@ discard block |
||
| 1007 | 1007 | print '</td></tr>'; |
| 1008 | 1008 | |
| 1009 | 1009 | // Budget |
| 1010 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
| 1010 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
| 1011 | 1011 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
| 1012 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
| 1012 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
| 1013 | 1013 | } |
| 1014 | 1014 | print '</td></tr>'; |
| 1015 | 1015 | |
| 1016 | 1016 | // Date start - end project |
| 1017 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
| 1017 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
| 1018 | 1018 | $start = dol_print_date($projectstatic->date_start, 'day'); |
| 1019 | 1019 | print($start ? $start : '?'); |
| 1020 | 1020 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1029,7 +1029,7 @@ discard block |
||
| 1029 | 1029 | $cols = 2; |
| 1030 | 1030 | $savobject = $object; |
| 1031 | 1031 | $object = $projectstatic; |
| 1032 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1032 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1033 | 1033 | $object = $savobject; |
| 1034 | 1034 | |
| 1035 | 1035 | print '</table>'; |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | |
| 1048 | 1048 | // Categories |
| 1049 | 1049 | if (isModEnabled('category')) { |
| 1050 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1050 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1051 | 1051 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1052 | 1052 | print "</td></tr>"; |
| 1053 | 1053 | } |
@@ -1076,12 +1076,12 @@ discard block |
||
| 1076 | 1076 | |
| 1077 | 1077 | if (!empty($projectidforalltimes)) { |
| 1078 | 1078 | // We are on tab 'Time Spent' of project |
| 1079 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1080 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1079 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1080 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1081 | 1081 | } else { |
| 1082 | 1082 | // We are on tab 'Time Spent' of task |
| 1083 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1084 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1083 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1084 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1085 | 1085 | } |
| 1086 | 1086 | } else { |
| 1087 | 1087 | $linktocreatetimeBtnStatus = -2; |
@@ -1126,19 +1126,19 @@ discard block |
||
| 1126 | 1126 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
| 1127 | 1127 | |
| 1128 | 1128 | if ($action == 'deleteline') { |
| 1129 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1129 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1130 | 1130 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1131 | 1131 | } |
| 1132 | 1132 | |
| 1133 | 1133 | $param = ($withproject ? '&withproject=1' : ''); |
| 1134 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
| 1135 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
| 1134 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
| 1135 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
| 1136 | 1136 | |
| 1137 | 1137 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1138 | 1138 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1139 | - $object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")"; |
|
| 1139 | + $object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")"; |
|
| 1140 | 1140 | } else { |
| 1141 | - $object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id); |
|
| 1141 | + $object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id); |
|
| 1142 | 1142 | } |
| 1143 | 1143 | |
| 1144 | 1144 | $morehtmlref = ''; |
@@ -1146,12 +1146,12 @@ discard block |
||
| 1146 | 1146 | // Project |
| 1147 | 1147 | if (empty($withproject)) { |
| 1148 | 1148 | $morehtmlref .= '<div class="refidno">'; |
| 1149 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1149 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1150 | 1150 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1151 | 1151 | $morehtmlref .= '<br>'; |
| 1152 | 1152 | |
| 1153 | 1153 | // Third party |
| 1154 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1154 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1155 | 1155 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1156 | 1156 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1157 | 1157 | } |
@@ -1167,7 +1167,7 @@ discard block |
||
| 1167 | 1167 | print '<table class="border centpercent tableforfield">'; |
| 1168 | 1168 | |
| 1169 | 1169 | // Task parent |
| 1170 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
| 1170 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
| 1171 | 1171 | if ($object->fk_task_parent > 0) { |
| 1172 | 1172 | $tasktmp = new Task($db); |
| 1173 | 1173 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | print '</td></tr>'; |
| 1177 | 1177 | |
| 1178 | 1178 | // Date start - Date end task |
| 1179 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1179 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1180 | 1180 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1181 | 1181 | print($start ? $start : '?'); |
| 1182 | 1182 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | print '</td></tr>'; |
| 1189 | 1189 | |
| 1190 | 1190 | // Planned workload |
| 1191 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1191 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1192 | 1192 | if ($object->planned_workload) { |
| 1193 | 1193 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1194 | 1194 | } |
@@ -1203,21 +1203,21 @@ discard block |
||
| 1203 | 1203 | print '<table class="border tableforfield centpercent">'; |
| 1204 | 1204 | |
| 1205 | 1205 | // Progress declared |
| 1206 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1207 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1206 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1207 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1208 | 1208 | print '</td></tr>'; |
| 1209 | 1209 | |
| 1210 | 1210 | // Progress calculated |
| 1211 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1211 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1212 | 1212 | if ($object->planned_workload) { |
| 1213 | 1213 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1214 | 1214 | if ($tmparray['total_duration'] > 0) { |
| 1215 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1215 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1216 | 1216 | } else { |
| 1217 | 1217 | print '0 %'; |
| 1218 | 1218 | } |
| 1219 | 1219 | } else { |
| 1220 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1220 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1221 | 1221 | } |
| 1222 | 1222 | print '</td>'; |
| 1223 | 1223 | |
@@ -1233,7 +1233,7 @@ discard block |
||
| 1233 | 1233 | print dol_get_fiche_end(); |
| 1234 | 1234 | } else { |
| 1235 | 1235 | if ($action == 'deleteline') { |
| 1236 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1236 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1237 | 1237 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1238 | 1238 | } |
| 1239 | 1239 | } |
@@ -1247,7 +1247,7 @@ discard block |
||
| 1247 | 1247 | |
| 1248 | 1248 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
| 1249 | 1249 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
| 1250 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT('lineid') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage); |
|
| 1250 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT('lineid').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage); |
|
| 1251 | 1251 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1252 | 1252 | } |
| 1253 | 1253 | |
@@ -1266,10 +1266,10 @@ discard block |
||
| 1266 | 1266 | // Definition of fields for list |
| 1267 | 1267 | $arrayfields = array(); |
| 1268 | 1268 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1); |
| 1269 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1); |
|
| 1269 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1); |
|
| 1270 | 1270 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1271 | 1271 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1272 | - if (! empty($allprojectforuser)) { |
|
| 1272 | + if (!empty($allprojectforuser)) { |
|
| 1273 | 1273 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
| 1274 | 1274 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
| 1275 | 1275 | } |
@@ -1285,83 +1285,83 @@ discard block |
||
| 1285 | 1285 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => 1, 'enabled' => isModEnabled("salaries")); |
| 1286 | 1286 | $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)); |
| 1287 | 1287 | // Extra fields |
| 1288 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1288 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1289 | 1289 | |
| 1290 | 1290 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1291 | - '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 1291 | + '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 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((string) ($search_month)); |
|
| 1301 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1302 | 1302 | } |
| 1303 | 1303 | if ($search_year > 0) { |
| 1304 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1304 | + $param .= '&search_year='.urlencode((string) ($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((string) ($search_duration)); |
|
| 1331 | + $param .= '&search_field2='.urlencode((string) ($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((string) ($search_date_startday)); |
|
| 1337 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1338 | 1338 | } |
| 1339 | 1339 | if ($search_date_startmonth) { |
| 1340 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1340 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1341 | 1341 | } |
| 1342 | 1342 | if ($search_date_startyear) { |
| 1343 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1343 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1344 | 1344 | } |
| 1345 | 1345 | if ($search_date_endday) { |
| 1346 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1346 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1347 | 1347 | } |
| 1348 | 1348 | if ($search_date_endmonth) { |
| 1349 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1349 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1350 | 1350 | } |
| 1351 | 1351 | if ($search_date_endyear) { |
| 1352 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1352 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1353 | 1353 | } |
| 1354 | 1354 | if ($search_timespent_starthour) { |
| 1355 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1355 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1356 | 1356 | } |
| 1357 | 1357 | if ($search_timespent_startmin) { |
| 1358 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1358 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1359 | 1359 | } |
| 1360 | 1360 | if ($search_timespent_endhour) { |
| 1361 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1361 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1362 | 1362 | } |
| 1363 | 1363 | if ($search_timespent_endmin) { |
| 1364 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1364 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($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((string) ($id)); |
|
| 1372 | + $param .= '&id='.urlencode((string) ($id)); |
|
| 1373 | 1373 | } |
| 1374 | 1374 | if ($projectid) { |
| 1375 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1375 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1376 | 1376 | } |
| 1377 | 1377 | if ($withproject) { |
| 1378 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1378 | + $param .= '&withproject='.urlencode((string) ($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 | } |
@@ -1586,14 +1586,14 @@ discard block |
||
| 1586 | 1586 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1587 | 1587 | } elseif (!empty($projectidforalltimes)) { |
| 1588 | 1588 | // Limit on one project |
| 1589 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")"; |
|
| 1589 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; |
|
| 1590 | 1590 | } elseif (!empty($allprojectforuser)) { |
| 1591 | 1591 | // Limit on on user |
| 1592 | 1592 | if (empty($search_user)) { |
| 1593 | 1593 | $search_user = $user->id; |
| 1594 | 1594 | } |
| 1595 | 1595 | if ($search_user > 0) { |
| 1596 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1596 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1597 | 1597 | } |
| 1598 | 1598 | } |
| 1599 | 1599 | |
@@ -1646,13 +1646,13 @@ discard block |
||
| 1646 | 1646 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1647 | 1647 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1648 | 1648 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1649 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1649 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1650 | 1650 | } |
| 1651 | 1651 | |
| 1652 | 1652 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1653 | 1653 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1654 | 1654 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1655 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1655 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1656 | 1656 | } |
| 1657 | 1657 | } |
| 1658 | 1658 | |
@@ -1700,13 +1700,13 @@ discard block |
||
| 1700 | 1700 | |
| 1701 | 1701 | if ($num >= 0) { |
| 1702 | 1702 | if (!empty($projectidforalltimes)) { |
| 1703 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1703 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1704 | 1704 | |
| 1705 | 1705 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1706 | 1706 | |
| 1707 | 1707 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1708 | 1708 | } else { |
| 1709 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1709 | + print '<!-- List of time spent -->'."\n"; |
|
| 1710 | 1710 | |
| 1711 | 1711 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1712 | 1712 | |
@@ -1728,26 +1728,26 @@ discard block |
||
| 1728 | 1728 | * Form to add a new line of time spent |
| 1729 | 1729 | */ |
| 1730 | 1730 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1731 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1731 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1732 | 1732 | if (!empty($id)) { |
| 1733 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1733 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1734 | 1734 | } |
| 1735 | 1735 | |
| 1736 | 1736 | print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
| 1737 | 1737 | print '<table class="noborder nohover centpercent">'; |
| 1738 | 1738 | |
| 1739 | 1739 | print '<tr class="liste_titre">'; |
| 1740 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1740 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1741 | 1741 | if (!empty($allprojectforuser)) { |
| 1742 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1742 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1743 | 1743 | } |
| 1744 | 1744 | if (empty($id)) { |
| 1745 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1745 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1746 | 1746 | } |
| 1747 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1748 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1749 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1750 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1747 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1748 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1749 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1750 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1751 | 1751 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1752 | 1752 | print '<td></td>'; |
| 1753 | 1753 | |
@@ -1801,14 +1801,14 @@ discard block |
||
| 1801 | 1801 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1802 | 1802 | } else { |
| 1803 | 1803 | if ($nboftasks) { |
| 1804 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1804 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1805 | 1805 | } |
| 1806 | 1806 | } |
| 1807 | 1807 | print '</td>'; |
| 1808 | 1808 | |
| 1809 | 1809 | // Note |
| 1810 | 1810 | print '<td>'; |
| 1811 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1811 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1812 | 1812 | print '</td>'; |
| 1813 | 1813 | |
| 1814 | 1814 | // Duration - Time spent |
@@ -1876,7 +1876,7 @@ discard block |
||
| 1876 | 1876 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1877 | 1877 | |
| 1878 | 1878 | print '<div class="div-table-responsive">'; |
| 1879 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1879 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1880 | 1880 | |
| 1881 | 1881 | // Fields title search |
| 1882 | 1882 | // -------------------------------------------------------------------- |
@@ -1901,20 +1901,20 @@ discard block |
||
| 1901 | 1901 | } |
| 1902 | 1902 | // Thirdparty |
| 1903 | 1903 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1904 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1904 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1905 | 1905 | } |
| 1906 | 1906 | |
| 1907 | 1907 | // Thirdparty alias |
| 1908 | 1908 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1909 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1909 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1910 | 1910 | } |
| 1911 | 1911 | |
| 1912 | 1912 | if (!empty($allprojectforuser)) { |
| 1913 | 1913 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1914 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1914 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1915 | 1915 | } |
| 1916 | 1916 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1917 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1917 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1918 | 1918 | } |
| 1919 | 1919 | } |
| 1920 | 1920 | // Task |
@@ -1932,7 +1932,7 @@ discard block |
||
| 1932 | 1932 | } |
| 1933 | 1933 | // Note |
| 1934 | 1934 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1935 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1935 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1936 | 1936 | } |
| 1937 | 1937 | // Duration |
| 1938 | 1938 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1943,7 +1943,7 @@ discard block |
||
| 1943 | 1943 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1944 | 1944 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1945 | 1945 | } |
| 1946 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1946 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1947 | 1947 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 1948 | 1948 | print '</div>'; |
| 1949 | 1949 | |
@@ -1951,7 +1951,7 @@ discard block |
||
| 1951 | 1951 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1952 | 1952 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 1953 | 1953 | } |
| 1954 | - print '<div class="nowraponall">' . $langs->trans('at') . ' '; |
|
| 1954 | + print '<div class="nowraponall">'.$langs->trans('at').' '; |
|
| 1955 | 1955 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 1956 | 1956 | print '</div>'; |
| 1957 | 1957 | |
@@ -1967,7 +1967,7 @@ discard block |
||
| 1967 | 1967 | } |
| 1968 | 1968 | // Value billed |
| 1969 | 1969 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 1970 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 1970 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 1971 | 1971 | } |
| 1972 | 1972 | |
| 1973 | 1973 | /* |
@@ -1985,7 +1985,7 @@ discard block |
||
| 1985 | 1985 | print $searchpicto; |
| 1986 | 1986 | print '</td>'; |
| 1987 | 1987 | } |
| 1988 | - print '</tr>' . "\n"; |
|
| 1988 | + print '</tr>'."\n"; |
|
| 1989 | 1989 | |
| 1990 | 1990 | |
| 1991 | 1991 | $totalarray = array(); |
@@ -2096,7 +2096,7 @@ discard block |
||
| 2096 | 2096 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2097 | 2097 | print '<td class="center nowraponall">'; |
| 2098 | 2098 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2099 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2099 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2100 | 2100 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2101 | 2101 | print '<br>'; |
| 2102 | 2102 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2104,7 +2104,7 @@ discard block |
||
| 2104 | 2104 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 2105 | 2105 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
| 2106 | 2106 | print ' '; |
| 2107 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2107 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2108 | 2108 | print img_split('', 'class="pictofixedwidth"'); |
| 2109 | 2109 | print '</a>'; |
| 2110 | 2110 | } |
@@ -2123,7 +2123,7 @@ discard block |
||
| 2123 | 2123 | $selected = 1; |
| 2124 | 2124 | } |
| 2125 | 2125 | print ' '; |
| 2126 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2126 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2127 | 2127 | } |
| 2128 | 2128 | } |
| 2129 | 2129 | } |
@@ -2241,7 +2241,7 @@ discard block |
||
| 2241 | 2241 | } |
| 2242 | 2242 | } |
| 2243 | 2243 | } elseif ($action !== 'createtime') { |
| 2244 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2244 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2245 | 2245 | } |
| 2246 | 2246 | |
| 2247 | 2247 | // Task label |
@@ -2271,7 +2271,7 @@ discard block |
||
| 2271 | 2271 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2272 | 2272 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200'); |
| 2273 | 2273 | } else { |
| 2274 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2274 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2275 | 2275 | } |
| 2276 | 2276 | } else { |
| 2277 | 2277 | $userstatic->id = $task_time->fk_user; |
@@ -2291,7 +2291,7 @@ discard block |
||
| 2291 | 2291 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2292 | 2292 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2293 | 2293 | print '<td class="small">'; |
| 2294 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2294 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2295 | 2295 | print '</td>'; |
| 2296 | 2296 | } else { |
| 2297 | 2297 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2302,7 +2302,7 @@ discard block |
||
| 2302 | 2302 | $totalarray['nbfield']++; |
| 2303 | 2303 | } |
| 2304 | 2304 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2305 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2305 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2306 | 2306 | } |
| 2307 | 2307 | |
| 2308 | 2308 | // Time spent |
@@ -2363,7 +2363,7 @@ discard block |
||
| 2363 | 2363 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2364 | 2364 | |
| 2365 | 2365 | print '<td class="nowraponall right">'; |
| 2366 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2366 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2367 | 2367 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2368 | 2368 | print '</span>'; |
| 2369 | 2369 | print '</td>'; |
@@ -2414,7 +2414,7 @@ discard block |
||
| 2414 | 2414 | print $langs->trans("No"); |
| 2415 | 2415 | } |
| 2416 | 2416 | } else { |
| 2417 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2417 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2418 | 2418 | } |
| 2419 | 2419 | } |
| 2420 | 2420 | print '</td>'; |
@@ -2445,7 +2445,7 @@ discard block |
||
| 2445 | 2445 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 2446 | 2446 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
| 2447 | 2447 | print ' '; |
| 2448 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2448 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2449 | 2449 | print img_split('', 'class="pictofixedwidth"'); |
| 2450 | 2450 | print '</a>'; |
| 2451 | 2451 | } |
@@ -2464,7 +2464,7 @@ discard block |
||
| 2464 | 2464 | $selected = 1; |
| 2465 | 2465 | } |
| 2466 | 2466 | print ' '; |
| 2467 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2467 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2468 | 2468 | } |
| 2469 | 2469 | } |
| 2470 | 2470 | } |
@@ -2554,7 +2554,7 @@ discard block |
||
| 2554 | 2554 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2555 | 2555 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); |
| 2556 | 2556 | } else { |
| 2557 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2557 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2558 | 2558 | } |
| 2559 | 2559 | } else { |
| 2560 | 2560 | $userstatic->id = $task_time->fk_user; |
@@ -2571,13 +2571,13 @@ discard block |
||
| 2571 | 2571 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2572 | 2572 | print '<td class="tdoverflowmax300">'; |
| 2573 | 2573 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2574 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2574 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2575 | 2575 | } else { |
| 2576 | 2576 | print dol_nl2br($task_time->note); |
| 2577 | 2577 | } |
| 2578 | 2578 | print '</td>'; |
| 2579 | 2579 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2580 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2580 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2581 | 2581 | } |
| 2582 | 2582 | |
| 2583 | 2583 | // Time spent |
@@ -2710,7 +2710,7 @@ discard block |
||
| 2710 | 2710 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2711 | 2711 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask); |
| 2712 | 2712 | } else { |
| 2713 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2713 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2714 | 2714 | } |
| 2715 | 2715 | } else { |
| 2716 | 2716 | $userstatic->id = $task_time->fk_user; |
@@ -2727,13 +2727,13 @@ discard block |
||
| 2727 | 2727 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2728 | 2728 | print '<td class="small tdoverflowmax300"">'; |
| 2729 | 2729 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2730 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2730 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2731 | 2731 | } else { |
| 2732 | 2732 | print dol_nl2br($task_time->note); |
| 2733 | 2733 | } |
| 2734 | 2734 | print '</td>'; |
| 2735 | 2735 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2736 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2736 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2737 | 2737 | } |
| 2738 | 2738 | |
| 2739 | 2739 | // Time spent |
@@ -2805,14 +2805,14 @@ discard block |
||
| 2805 | 2805 | $i++; |
| 2806 | 2806 | if ($i == 1) { |
| 2807 | 2807 | if ($num < $limit && empty($offset)) { |
| 2808 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2808 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2809 | 2809 | } else { |
| 2810 | 2810 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2811 | 2811 | } |
| 2812 | 2812 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2813 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2813 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2814 | 2814 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2815 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2815 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2816 | 2816 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2817 | 2817 | } else { |
| 2818 | 2818 | print '<td></td>'; |
@@ -2828,8 +2828,8 @@ discard block |
||
| 2828 | 2828 | $totalnboffields++; |
| 2829 | 2829 | } |
| 2830 | 2830 | } |
| 2831 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2832 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2831 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2832 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2833 | 2833 | print '</td></tr>'; |
| 2834 | 2834 | } |
| 2835 | 2835 | |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | // Get Parameters |
| 67 | 67 | $socid = GETPOSTINT('socid'); |
| 68 | 68 | |
| 69 | -$action = GETPOST('action', 'aZ09'); |
|
| 69 | +$action = GETPOST('action', 'aZ09'); |
|
| 70 | 70 | $massaction = GETPOST('massaction', 'alpha'); |
| 71 | 71 | $show_files = GETPOSTINT('show_files'); |
| 72 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 72 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 73 | 73 | $cancel = GETPOST('cancel', 'alpha'); |
| 74 | -$toselect = GETPOST('toselect', 'array'); |
|
| 74 | +$toselect = GETPOST('toselect', 'array'); |
|
| 75 | 75 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'proposallist'; |
| 76 | 76 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 77 | -$mode = GETPOST('mode', 'alpha'); |
|
| 77 | +$mode = GETPOST('mode', 'alpha'); |
|
| 78 | 78 | |
| 79 | 79 | // Search Fields |
| 80 | 80 | $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $search_user = 0; |
| 84 | 84 | } |
| 85 | 85 | $search_sale = GETPOSTINT('search_sale'); |
| 86 | -$search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
|
| 86 | +$search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
|
| 87 | 87 | $search_refcustomer = GETPOST('search_refcustomer', 'alpha'); |
| 88 | 88 | $search_refproject = GETPOST('search_refproject', 'alpha'); |
| 89 | 89 | $search_project = GETPOST('search_project', 'alpha'); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 112 | 112 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 113 | 113 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 114 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 114 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 115 | 115 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 116 | 116 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 117 | 117 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 120 | 120 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 121 | 121 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 122 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 122 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 123 | 123 | $search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); |
| 124 | 124 | $search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday'); |
| 125 | 125 | $search_date_delivery_startmonth = GETPOSTINT('search_date_delivery_startmonth'); |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | if ($searchCategoryCustomerOperator == 0) { |
| 747 | 747 | $searchCategoryCustomerSqlList[] = " EXISTS (SELECT cs.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as cs WHERE s.rowid = cs.fk_soc AND cs.fk_categorie = ".((int) $searchCategoryCustomer).")"; |
| 748 | 748 | } else { |
| 749 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
| 749 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
| 750 | 750 | } |
| 751 | 751 | } |
| 752 | 752 | } |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | if ($searchCategoryProductOperator == 0) { |
| 777 | 777 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."propaldet as pd WHERE pd.fk_propal = p.rowid AND pd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 778 | 778 | } else { |
| 779 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 779 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 780 | 780 | } |
| 781 | 781 | } |
| 782 | 782 | } |
@@ -71,8 +71,8 @@ |
||
| 71 | 71 | |
| 72 | 72 | // Author |
| 73 | 73 | $this->editor_name = 'Editor name'; |
| 74 | - $this->editor_url = 'https://www.example.com'; // Must be an external online web site |
|
| 75 | - $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@mymodule' |
|
| 74 | + $this->editor_url = 'https://www.example.com'; // Must be an external online web site |
|
| 75 | + $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@mymodule' |
|
| 76 | 76 | |
| 77 | 77 | // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' |
| 78 | 78 | $this->version = '1.0'; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $search_date_order_endday = GETPOSTINT('search_date_order_endday'); |
| 67 | 67 | $search_date_order_endmonth = GETPOSTINT('search_date_order_endmonth'); |
| 68 | 68 | $search_date_order_endyear = GETPOSTINT('search_date_order_endyear'); |
| 69 | -$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
| 69 | +$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
| 70 | 70 | $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear); |
| 71 | 71 | |
| 72 | 72 | $search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday'); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday'); |
| 76 | 76 | $search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth'); |
| 77 | 77 | $search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear'); |
| 78 | -$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
| 78 | +$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
| 79 | 79 | $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); |
| 80 | 80 | |
| 81 | 81 | $search_date_valid_startday = GETPOSTINT('search_date_valid_startday'); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $search_date_valid_endday = GETPOSTINT('search_date_valid_endday'); |
| 85 | 85 | $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth'); |
| 86 | 86 | $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear'); |
| 87 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 87 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 88 | 88 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
| 89 | 89 | |
| 90 | 90 | $search_date_approve_startday = GETPOSTINT('search_date_approve_startday'); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $search_date_approve_endday = GETPOSTINT('search_date_approve_endday'); |
| 94 | 94 | $search_date_approve_endmonth = GETPOSTINT('search_date_approve_endmonth'); |
| 95 | 95 | $search_date_approve_endyear = GETPOSTINT('search_date_approve_endyear'); |
| 96 | -$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
| 96 | +$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
| 97 | 97 | $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear); |
| 98 | 98 | |
| 99 | 99 | $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 214 | 214 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 215 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 215 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 216 | 216 | |
| 217 | 217 | $error = 0; |
| 218 | 218 | |
@@ -730,8 +730,8 @@ discard block |
||
| 730 | 730 | } else { |
| 731 | 731 | $db->rollback(); |
| 732 | 732 | $action = 'create'; |
| 733 | - $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
| 734 | - $_GET["originid"] = $_POST["originid"]; // Keep this ? |
|
| 733 | + $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
| 734 | + $_GET["originid"] = $_POST["originid"]; // Keep this ? |
|
| 735 | 735 | setEventMessages("Error", null, 'errors'); |
| 736 | 736 | $error++; |
| 737 | 737 | } |
@@ -903,9 +903,9 @@ discard block |
||
| 903 | 903 | if ($search_user > 0) { |
| 904 | 904 | $sql .= " AND EXISTS ("; |
| 905 | 905 | $sql .= " SELECT ec.rowid "; |
| 906 | - $sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec"; |
|
| 907 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
| 908 | - $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = " . ((int) $search_user); |
|
| 906 | + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; |
|
| 907 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
| 908 | + $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = ".((int) $search_user); |
|
| 909 | 909 | $sql .= " AND tc.element = 'order_supplier' AND tc.source = 'internal'"; |
| 910 | 910 | $sql .= ")"; |
| 911 | 911 | } |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | if ($searchCategoryProductOperator == 0) { |
| 958 | 958 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commande_fournisseurdet as cd WHERE cd.fk_commande = cf.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 959 | 959 | } else { |
| 960 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 960 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 961 | 961 | } |
| 962 | 962 | } |
| 963 | 963 | } |
@@ -1237,7 +1237,7 @@ discard block |
||
| 1237 | 1237 | |
| 1238 | 1238 | $topicmail = "SendOrderRef"; |
| 1239 | 1239 | $modelmail = "order_supplier_send"; |
| 1240 | - $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
| 1240 | + $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
| 1241 | 1241 | $trackid = 'sord'.$object->id; |
| 1242 | 1242 | include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
| 1243 | 1243 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | if (getDolGlobalString('RECEPTION_ADDON_NUMBER')) { |
| 166 | 166 | $mybool = false; |
| 167 | 167 | |
| 168 | - $file = getDolGlobalString('RECEPTION_ADDON_NUMBER') . ".php"; |
|
| 168 | + $file = getDolGlobalString('RECEPTION_ADDON_NUMBER').".php"; |
|
| 169 | 169 | $classname = getDolGlobalString('RECEPTION_ADDON_NUMBER'); |
| 170 | 170 | |
| 171 | 171 | // Include file with class |
@@ -728,9 +728,9 @@ discard block |
||
| 728 | 728 | if ($this->origin_object instanceof CommonObject && empty($this->origin_object->lines)) { |
| 729 | 729 | $res = $this->origin_object->fetch_lines(); |
| 730 | 730 | if ($this->origin_object instanceof CommandeFournisseur) { |
| 731 | - $this->commandeFournisseur = $this->origin_object; // deprecated |
|
| 731 | + $this->commandeFournisseur = $this->origin_object; // deprecated |
|
| 732 | 732 | } else { |
| 733 | - $this->commandeFournisseur = null; // deprecated |
|
| 733 | + $this->commandeFournisseur = null; // deprecated |
|
| 734 | 734 | } |
| 735 | 735 | if ($res < 0) { |
| 736 | 736 | return $res; |
@@ -867,10 +867,10 @@ discard block |
||
| 867 | 867 | // check sell-by / eat-by date is mandatory |
| 868 | 868 | $errorMsgArr = Productlot::checkSellOrEatByMandatoryFromProductAndDates($product, $sellby, $eatby); |
| 869 | 869 | if (!empty($errorMsgArr)) { |
| 870 | - $errorMessage = '<b>' . $product->ref . '</b> : '; |
|
| 870 | + $errorMessage = '<b>'.$product->ref.'</b> : '; |
|
| 871 | 871 | $errorMessage .= '<ul>'; |
| 872 | 872 | foreach ($errorMsgArr as $errorMsg) { |
| 873 | - $errorMessage .= '<li>' . $errorMsg . '</li>'; |
|
| 873 | + $errorMessage .= '<li>'.$errorMsg.'</li>'; |
|
| 874 | 874 | } |
| 875 | 875 | $errorMessage .= '</ul>'; |
| 876 | 876 | $this->error = $errorMessage; |
@@ -1303,7 +1303,7 @@ discard block |
||
| 1303 | 1303 | $result .= $linkend; |
| 1304 | 1304 | |
| 1305 | 1305 | global $action; |
| 1306 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 1306 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 1307 | 1307 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
| 1308 | 1308 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 1309 | 1309 | if ($reshook > 0) { |
@@ -1349,7 +1349,7 @@ discard block |
||
| 1349 | 1349 | if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) { |
| 1350 | 1350 | $this->labelStatus[1] = 'StatusReceptionValidatedToReceive'; |
| 1351 | 1351 | } |
| 1352 | - $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
| 1352 | + $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
| 1353 | 1353 | |
| 1354 | 1354 | // List of short language codes for status |
| 1355 | 1355 | $this->labelStatusShort[-1] = 'StatusReceptionCanceledShort'; |
@@ -1454,7 +1454,7 @@ discard block |
||
| 1454 | 1454 | while ($xnbp < $nbp) { |
| 1455 | 1455 | $line = new CommandeFournisseurDispatch($this->db); |
| 1456 | 1456 | $line->desc = $langs->trans("Description")." ".$xnbp; |
| 1457 | - $line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated |
|
| 1457 | + $line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated |
|
| 1458 | 1458 | $line->label = $langs->trans("Description")." ".$xnbp; |
| 1459 | 1459 | $line->qty = 10; |
| 1460 | 1460 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | return $this->$newProperty; |
| 57 | 57 | } |
| 58 | 58 | if ($this->isDynamicPropertiesEnabled()) { |
| 59 | - return null; // If the property is set, then __get is not called. |
|
| 59 | + return null; // If the property is set, then __get is not called. |
|
| 60 | 60 | } |
| 61 | 61 | $msg = "DolDeprecationHandler: Undefined property '".$name."'".self::getCallerInfoString(); |
| 62 | 62 | dol_syslog($msg); |
| 63 | 63 | trigger_error($msg, E_USER_NOTICE); |
| 64 | - return $this->$name; // Returning value anyway (graceful degradation) |
|
| 64 | + return $this->$name; // Returning value anyway (graceful degradation) |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | if (!$this->isDynamicPropertiesEnabled()) { |
| 92 | 92 | $msg = "DolDeprecationHandler: Undefined property '".$name."'".self::getCallerInfoString(); |
| 93 | 93 | trigger_error($msg, E_USER_NOTICE); |
| 94 | - $this->$name = $value; // Setting anyway for graceful degradation |
|
| 94 | + $this->$name = $value; // Setting anyway for graceful degradation |
|
| 95 | 95 | } else { |
| 96 | 96 | $this->$name = $value; |
| 97 | 97 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | public $liste_limit; |
| 154 | 154 | |
| 155 | - public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
| 155 | + public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
| 156 | 156 | |
| 157 | 157 | |
| 158 | 158 | // TODO Remove this part. |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | $value = $_ENV['DOLIBARR_'.$key]; |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | - $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
| 540 | + $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
| 541 | 541 | |
| 542 | 542 | if ($value && strpos($key, 'MAIN_MODULE_') === 0) { |
| 543 | 543 | $reg = array(); |
@@ -587,9 +587,9 @@ discard block |
||
| 587 | 587 | // deprecated in php 8.2 |
| 588 | 588 | //if (version_compare(phpversion(), '8.2') < 0) { |
| 589 | 589 | if (!isset($this->$modulename) || !is_object($this->$modulename)) { |
| 590 | - $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 590 | + $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 591 | 591 | } |
| 592 | - $this->$modulename->enabled = true; // TODO Remove this |
|
| 592 | + $this->$modulename->enabled = true; // TODO Remove this |
|
| 593 | 593 | |
| 594 | 594 | // Duplicate entry with the new name |
| 595 | 595 | $mapping = $this->deprecatedProperties(); |
@@ -598,9 +598,9 @@ discard block |
||
| 598 | 598 | $this->modules[$newmodulename] = $newmodulename; |
| 599 | 599 | |
| 600 | 600 | if (!isset($this->$newmodulename) || !is_object($this->$newmodulename)) { |
| 601 | - $this->$newmodulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 601 | + $this->$newmodulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 602 | 602 | } |
| 603 | - $this->$newmodulename->enabled = true; // TODO Remove this |
|
| 603 | + $this->$newmodulename->enabled = true; // TODO Remove this |
|
| 604 | 604 | } |
| 605 | 605 | } |
| 606 | 606 | } |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | } |
| 931 | 931 | |
| 932 | 932 | if (!isset($this->global->MAIN_ENABLE_AJAX_TOOLTIP)) { |
| 933 | - $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
| 933 | + $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
| 934 | 934 | } |
| 935 | 935 | |
| 936 | 936 | // By default, suppliers objects can be linked to all projects |
@@ -1209,7 +1209,7 @@ discard block |
||
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | if (!isset($this->global->MAIL_SMTP_USE_FROM_FOR_HELO)) { |
| 1212 | - $this->global->MAIL_SMTP_USE_FROM_FOR_HELO = 2; // Use the domain in $dolibarr_main_url_root (mydomain.com) |
|
| 1212 | + $this->global->MAIL_SMTP_USE_FROM_FOR_HELO = 2; // Use the domain in $dolibarr_main_url_root (mydomain.com) |
|
| 1213 | 1213 | } |
| 1214 | 1214 | |
| 1215 | 1215 | if (!defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) { |
@@ -1239,7 +1239,7 @@ discard block |
||
| 1239 | 1239 | } |
| 1240 | 1240 | |
| 1241 | 1241 | if (!empty($this->global->MAIN_TZUSERINPUTKEY)) { |
| 1242 | - $this->tzuserinputkey = $this->global->MAIN_TZUSERINPUTKEY; // 'tzserver' or 'tzuserrel' |
|
| 1242 | + $this->tzuserinputkey = $this->global->MAIN_TZUSERINPUTKEY; // 'tzserver' or 'tzuserrel' |
|
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | 1245 | if (!empty($this->global->PRODUIT_AUTOFILL_DESC)) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 78 | 78 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 79 | 79 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 80 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 80 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 81 | 81 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 82 | 82 | $search_date_valid_startday = GETPOSTINT('search_date_valid_startday'); |
| 83 | 83 | $search_date_valid_startmonth = GETPOSTINT('search_date_valid_startmonth'); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $search_date_valid_endday = GETPOSTINT('search_date_valid_endday'); |
| 86 | 86 | $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth'); |
| 87 | 87 | $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear'); |
| 88 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 88 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 89 | 89 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
| 90 | 90 | $search_type_thirdparty = GETPOST("search_type_thirdparty", 'intcomma'); |
| 91 | 91 | $search_montant_ht = GETPOST('search_montant_ht', 'alpha'); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 197 | 197 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 198 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 198 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 199 | 199 | |
| 200 | 200 | if (!$user->hasRight('societe', 'client', 'voir')) { |
| 201 | 201 | $search_sale = $user->id; |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | if ($searchCategoryProductOperator == 0) { |
| 448 | 448 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 449 | 449 | } else { |
| 450 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 450 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 451 | 451 | } |
| 452 | 452 | } |
| 453 | 453 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 60 | 60 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 61 | 61 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 62 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 62 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 63 | 63 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 64 | 64 | $search_country = GETPOST('search_country', 'aZ09'); |
| 65 | 65 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -225,13 +225,13 @@ discard block |
||
| 225 | 225 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; |
| 226 | 226 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
| 227 | 227 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 228 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
| 228 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
| 229 | 229 | } |
| 230 | 230 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; |
| 231 | 231 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; |
| 232 | 232 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
| 233 | 233 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 234 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); |
|
| 234 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity); |
|
| 235 | 235 | } |
| 236 | 236 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; |
| 237 | 237 | $sql .= " WHERE fd.fk_code_ventilation > 0"; |