@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 59 | 59 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 60 | 60 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 61 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 61 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 62 | 62 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 63 | 63 | $search_company = GETPOST("search_company", 'alpha'); |
| 64 | 64 | $search_paymenttype = GETPOST("search_paymenttype"); |
@@ -239,10 +239,10 @@ discard block |
||
| 239 | 239 | $sql .= natural_search('p.ref', $search_ref); |
| 240 | 240 | } |
| 241 | 241 | if ($search_date_start) { |
| 242 | - $sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'"; |
|
| 242 | + $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'"; |
|
| 243 | 243 | } |
| 244 | 244 | if ($search_date_end) { |
| 245 | - $sql .= " AND p.datep <= '" . $db->idate($search_date_end) . "'"; |
|
| 245 | + $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'"; |
|
| 246 | 246 | } |
| 247 | 247 | if ($search_account > 0) { |
| 248 | 248 | $sql .= " AND b.fk_account=".((int) $search_account); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $type = $object->type; |
| 103 | 103 | if (is_numeric($type)) { |
| 104 | - $type = array_search($type, $object->MAP_ID); // For backward compatibility |
|
| 104 | + $type = array_search($type, $object->MAP_ID); // For backward compatibility |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $extrafields = new ExtraFields($db); |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | ); |
| 527 | 527 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
| 528 | 528 | |
| 529 | -$typeid = $type; // warning, typeid can be a string |
|
| 529 | +$typeid = $type; // warning, typeid can be a string |
|
| 530 | 530 | |
| 531 | 531 | |
| 532 | 532 | // List of products or services (type is type of category) |
@@ -1140,7 +1140,7 @@ discard block |
||
| 1140 | 1140 | if ($showclassifyform) { |
| 1141 | 1141 | print '<table class="noborder centpercent">'; |
| 1142 | 1142 | print '<tr class="liste_titre"><td>'; |
| 1143 | - $force_entity = getEntity($object->element); // So we will get same filter than the getObjectsInCateg() |
|
| 1143 | + $force_entity = getEntity($object->element); // So we will get same filter than the getObjectsInCateg() |
|
| 1144 | 1144 | print img_picto('', $type, 'class="pictofixedwidth"'); |
| 1145 | 1145 | print $form->select_dolusers('', 'elemid', 1, null, 0, '', '', $force_entity); |
| 1146 | 1146 | print '<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans("ClassifyInCategory").'"></td>'; |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $value = GETPOST('value', 'alpha'); |
| 60 | 60 | $label = GETPOST('label', 'alpha'); |
| 61 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 61 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 62 | 62 | |
| 63 | 63 | $scandir = GETPOST('scan_dir', 'alpha'); |
| 64 | 64 | $type = 'evaluation'; |
| 65 | 65 | |
| 66 | 66 | $arrayofparameters = array( |
| 67 | - 'HRM_MAXRANK' => array('type' => 'integer','enabled' => 1, 'css' => ''), |
|
| 68 | - 'HRM_DEFAULT_SKILL_DESCRIPTION' => array('type' => 'varchar','enabled' => 1, 'css' => ''), |
|
| 67 | + 'HRM_MAXRANK' => array('type' => 'integer', 'enabled' => 1, 'css' => ''), |
|
| 68 | + 'HRM_DEFAULT_SKILL_DESCRIPTION' => array('type' => 'varchar', 'enabled' => 1, 'css' => ''), |
|
| 69 | 69 | ); |
| 70 | 70 | |
| 71 | 71 | $error = 0; |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | print(empty($module->name) ? $name : $module->name); |
| 428 | 428 | print "</td><td>\n"; |
| 429 | 429 | if (method_exists($module, 'info')) { |
| 430 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 430 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 431 | 431 | } else { |
| 432 | 432 | print $module->description; |
| 433 | 433 | } |
@@ -516,24 +516,24 @@ discard block |
||
| 516 | 516 | if ($val['enabled'] == 1) { |
| 517 | 517 | $setupnotempty++; |
| 518 | 518 | print '<tr class="oddeven"><td>'; |
| 519 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
| 519 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
| 520 | 520 | print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; |
| 521 | 521 | print '</td><td>'; |
| 522 | 522 | |
| 523 | 523 | if ($val['type'] == 'textarea') { |
| 524 | - print '<textarea class="flat" name="' . $constname . '" id="' . $constname . '" cols="50" rows="5" wrap="soft">' . "\n"; |
|
| 524 | + print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">'."\n"; |
|
| 525 | 525 | print getDolGlobalString($constname); |
| 526 | 526 | print "</textarea>\n"; |
| 527 | 527 | } elseif ($val['type'] == 'integer') { |
| 528 | - print '<input class="flat" name="' . $constname . '" id="' . $constname . '" value="' . getDolGlobalString($constname) . '" type="number" step="1" min="0" max="50" >' . "\n"; |
|
| 528 | + print '<input class="flat" name="'.$constname.'" id="'.$constname.'" value="'.getDolGlobalString($constname).'" type="number" step="1" min="0" max="50" >'."\n"; |
|
| 529 | 529 | } elseif ($val['type'] == 'html') { |
| 530 | - require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 530 | + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 531 | 531 | $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); |
| 532 | 532 | $doleditor->Create(); |
| 533 | 533 | } elseif ($val['type'] == 'yesno') { |
| 534 | 534 | print $form->selectyesno($constname, getDolGlobalString($constname), 1); |
| 535 | 535 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
| 536 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
| 536 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
| 537 | 537 | $formmail = new FormMail($db); |
| 538 | 538 | |
| 539 | 539 | $tmp = explode(':', $val['type']); |
@@ -545,10 +545,10 @@ discard block |
||
| 545 | 545 | //var_dump($modelmail); |
| 546 | 546 | $moreonlabel = ''; |
| 547 | 547 | if (!empty($arrayofmessagename[$modelmail->label])) { |
| 548 | - $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>'; |
|
| 548 | + $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>'; |
|
| 549 | 549 | } |
| 550 | 550 | // The 'label' is the key that is unique if we exclude the language |
| 551 | - $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; |
|
| 551 | + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; |
|
| 552 | 552 | } |
| 553 | 553 | } |
| 554 | 554 | print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1); |
@@ -561,25 +561,25 @@ discard block |
||
| 561 | 561 | print img_picto('', 'category', 'class="pictofixedwidth"'); |
| 562 | 562 | print $formother->select_categories($tmp[1], getDolGlobalInt($constname), $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); |
| 563 | 563 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
| 564 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
| 564 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
| 565 | 565 | $formcompany = new FormCompany($db); |
| 566 | 566 | print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname); |
| 567 | 567 | } elseif ($val['type'] == 'securekey') { |
| 568 | - print '<input required="required" type="text" class="flat" id="' . $constname . '" name="' . $constname . '" value="' . (GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)) . '" size="40">'; |
|
| 568 | + print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)).'" size="40">'; |
|
| 569 | 569 | if (!empty($conf->use_javascript_ajax)) { |
| 570 | - print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"'); |
|
| 570 | + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); |
|
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | // Add button to autosuggest a key |
| 574 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; |
|
| 575 | - print dolJSToSetRandomPassword($constname, 'generate_token' . $constname); |
|
| 574 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; |
|
| 575 | + print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); |
|
| 576 | 576 | } elseif ($val['type'] == 'product') { |
| 577 | 577 | if (isModEnabled('product') || isModEnabled('service')) { |
| 578 | 578 | $selected = getDolGlobalInt($constname); |
| 579 | 579 | $form->select_produits($selected, $constname, '', 0); |
| 580 | 580 | } |
| 581 | 581 | } else { |
| 582 | - print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($constname) . '">'; |
|
| 582 | + print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.getDolGlobalString($constname).'">'; |
|
| 583 | 583 | } |
| 584 | 584 | print '</td></tr>'; |
| 585 | 585 | } |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | if ($val['enabled'] == 1) { |
| 602 | 602 | $setupnotempty++; |
| 603 | 603 | print '<tr class="oddeven"><td>'; |
| 604 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
| 604 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
| 605 | 605 | print $form->textwithpicto($langs->trans($constname), $tooltiphelp); |
| 606 | 606 | print '</td><td>'; |
| 607 | 607 | |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | } elseif ($val['type'] == 'yesno') { |
| 613 | 613 | print ajax_constantonoff($constname); |
| 614 | 614 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
| 615 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
| 615 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
| 616 | 616 | $formmail = new FormMail($db); |
| 617 | 617 | |
| 618 | 618 | $tmp = explode(':', $val['type']); |
@@ -631,9 +631,9 @@ discard block |
||
| 631 | 631 | $ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text |
| 632 | 632 | $toprint = array(); |
| 633 | 633 | foreach ($ways as $way) { |
| 634 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>'; |
|
| 634 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.$way.'</li>'; |
|
| 635 | 635 | } |
| 636 | - print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
| 636 | + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
| 637 | 637 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
| 638 | 638 | if (getDolGlobalString($constname) == 2) { |
| 639 | 639 | print $langs->trans("Prospect"); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | if (GETPOST('target') == 'remote') { |
| 190 | - $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php. |
|
| 190 | + $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php. |
|
| 191 | 191 | |
| 192 | 192 | // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) |
| 193 | 193 | if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i); |
| 397 | 397 | } |
| 398 | 398 | $out .= '</td>'."\n"; |
| 399 | - $out .= '<td class="center">'.dol_escape_htmltag((string) $file['expectedmd5']).'</td>'."\n"; // @phan-suppress-current-line PhanTypeInvalidDimOffset |
|
| 399 | + $out .= '<td class="center">'.dol_escape_htmltag((string) $file['expectedmd5']).'</td>'."\n"; // @phan-suppress-current-line PhanTypeInvalidDimOffset |
|
| 400 | 400 | $out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n"; |
| 401 | 401 | $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); |
| 402 | 402 | $totalsize += $size; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $newtimeyear = (int) dol_print_date($newtime, '%Y'); |
| 188 | 188 | $newtimemonth = (int) dol_print_date($newtime, '%m'); |
| 189 | - $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
| 189 | + $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
| 190 | 190 | |
| 191 | 191 | if ($monthsexpected < $newtimetotalmonths) { |
| 192 | 192 | $newtimehours = (int) dol_print_date($newtime, '%H'); |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | $sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active"; |
| 802 | 802 | $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
| 803 | 803 | $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
| 804 | - $sql .= " AND entity IN (0," .getEntity('holiday') .")"; |
|
| 804 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
| 805 | 805 | |
| 806 | 806 | $resql = $db->query($sql); |
| 807 | 807 | if ($resql) { |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | $jour = (int) gmdate("d", $timestampStart); |
| 833 | 833 | $mois = (int) gmdate("m", $timestampStart); |
| 834 | 834 | $annee = (int) gmdate("Y", $timestampStart); |
| 835 | - $jour_semaine = (int) gmdate("w", $timestampStart); // sunday = 0, monday = 1, ... |
|
| 835 | + $jour_semaine = (int) gmdate("w", $timestampStart); // sunday = 0, monday = 1, ... |
|
| 836 | 836 | |
| 837 | 837 | //print "jour=".$jour." month=".$mois." year=".$annee." includesaturday=".$includesaturday." includesunday=".$includesunday."\n"; |
| 838 | 838 | foreach ($arrayOfPublicHolidays as $entrypublicholiday) { |
@@ -1053,13 +1053,13 @@ discard block |
||
| 1053 | 1053 | |
| 1054 | 1054 | $country_id = dol_getIdFromCode($db, $country_code, 'c_country', 'code', 'rowid'); |
| 1055 | 1055 | |
| 1056 | - if (empty($conf->cache['arrayOfActivePublicHolidays_' . $country_id])) { |
|
| 1056 | + if (empty($conf->cache['arrayOfActivePublicHolidays_'.$country_id])) { |
|
| 1057 | 1057 | // Loop on public holiday defined into hrm_public_holiday for the day, month and year analyzed |
| 1058 | 1058 | $tmpArrayOfPublicHolidays = array(); |
| 1059 | 1059 | $sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active"; |
| 1060 | - $sql .= " FROM " . MAIN_DB_PREFIX . "c_hrm_public_holiday"; |
|
| 1061 | - $sql .= " WHERE active = 1 and fk_country IN (0" . ($country_id > 0 ? ", " . $country_id : 0) . ")"; |
|
| 1062 | - $sql .= " AND entity IN (0," . getEntity('holiday') . ")"; |
|
| 1060 | + $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
|
| 1061 | + $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
|
| 1062 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
| 1063 | 1063 | |
| 1064 | 1064 | $resql = $db->query($sql); |
| 1065 | 1065 | if ($resql) { |
@@ -1072,14 +1072,14 @@ discard block |
||
| 1072 | 1072 | } |
| 1073 | 1073 | } else { |
| 1074 | 1074 | dol_syslog($db->lasterror(), LOG_ERR); |
| 1075 | - return 'Error sql ' . $db->lasterror(); |
|
| 1075 | + return 'Error sql '.$db->lasterror(); |
|
| 1076 | 1076 | } |
| 1077 | 1077 | |
| 1078 | 1078 | //var_dump($tmpArrayOfPublicHolidays); |
| 1079 | - $conf->cache['arrayOfActivePublicHolidays_' . $country_id] = $tmpArrayOfPublicHolidays; |
|
| 1079 | + $conf->cache['arrayOfActivePublicHolidays_'.$country_id] = $tmpArrayOfPublicHolidays; |
|
| 1080 | 1080 | } |
| 1081 | 1081 | |
| 1082 | - $arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_' . $country_id]; |
|
| 1082 | + $arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_'.$country_id]; |
|
| 1083 | 1083 | $listFeries = []; |
| 1084 | 1084 | $i = 0; |
| 1085 | 1085 | while ((($lastday == 0 && $timestampStart < $timestampEnd) || ($lastday && $timestampStart <= $timestampEnd)) |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | // Load Dolibarr environment |
| 36 | 36 | require '../../main.inc.php'; |
| 37 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 38 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
| 39 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 40 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
| 41 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 42 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 43 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 44 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 42 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 43 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 44 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @var Conf $conf |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 183 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 184 | 184 | |
| 185 | 185 | // Purge search criteria |
| 186 | 186 | 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 |
@@ -361,10 +361,10 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 364 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 364 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 365 | 365 | |
| 366 | 366 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 367 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 367 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 368 | 368 | |
| 369 | 369 | if ($result < 0) { |
| 370 | 370 | $langs->load("errors"); |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | if (count($tasksarray) > 0) { |
| 385 | 385 | $id = $tasksarray[0]->id; |
| 386 | 386 | } else { |
| 387 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 387 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 388 | 388 | exit; |
| 389 | 389 | } |
| 390 | 390 | } |
@@ -422,9 +422,9 @@ discard block |
||
| 422 | 422 | if (!($projectstatic->thirdparty->id > 0)) { |
| 423 | 423 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 424 | 424 | } else { |
| 425 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 426 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 427 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 425 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 426 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 427 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 428 | 428 | |
| 429 | 429 | $tmpinvoice = new Facture($db); |
| 430 | 430 | $tmptimespent = new Task($db); |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | $arrayoftasks = array(); |
| 491 | 491 | foreach ($toselect as $key => $value) { |
| 492 | 492 | // Get userid, timepent |
| 493 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 493 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 494 | 494 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 495 | 495 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 496 | 496 | } |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | // Add lines |
| 566 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 566 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 567 | 567 | if ($lineid < 0) { |
| 568 | 568 | $error++; |
| 569 | 569 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -596,16 +596,16 @@ discard block |
||
| 596 | 596 | |
| 597 | 597 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 598 | 598 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 599 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 599 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 600 | 600 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 601 | 601 | |
| 602 | 602 | if (!empty($withdetail)) { |
| 603 | 603 | if (!empty($object->timespent_withhour)) { |
| 604 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 604 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 605 | 605 | } else { |
| 606 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 606 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 607 | 607 | } |
| 608 | - $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)); |
|
| 608 | + $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)); |
|
| 609 | 609 | } |
| 610 | 610 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 611 | 611 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | $arrayoftasks = array(); |
| 684 | 684 | foreach ($toselect as $key => $value) { |
| 685 | 685 | // Get userid, timepent |
| 686 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object) |
|
| 686 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object) |
|
| 687 | 687 | // $object->id is now the task id |
| 688 | 688 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 689 | 689 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | // Add lines |
| 760 | 760 | $date_start = ''; |
| 761 | 761 | $date_end = ''; |
| 762 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 762 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 763 | 763 | $lineid = $tmpinvoice->addline($lineName, (float) $pu_ht_for_task, (float) price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, $date_start, $date_end, 0, 0, 0, 'HT', 0, 1, -1, 0, '', 0, 0, 0, $pa_ht); |
| 764 | 764 | if ($lineid < 0) { |
| 765 | 765 | $error++; |
@@ -769,8 +769,8 @@ discard block |
||
| 769 | 769 | |
| 770 | 770 | if (!$error) { |
| 771 | 771 | // Update lineid into line of timespent |
| 772 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 773 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 772 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 773 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 774 | 774 | $result = $db->query($sql); |
| 775 | 775 | if (!$result) { |
| 776 | 776 | $error++; |
@@ -806,12 +806,12 @@ discard block |
||
| 806 | 806 | if (!($projectstatic->thirdparty->id > 0)) { |
| 807 | 807 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 808 | 808 | } else { |
| 809 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 810 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 811 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 809 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 810 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 811 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 812 | 812 | |
| 813 | 813 | |
| 814 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 814 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 815 | 815 | $tmpinter = new Fichinter($db); |
| 816 | 816 | $tmptimespent = new Task($db); |
| 817 | 817 | $fuser = new User($db); |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 824 | 824 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 825 | 825 | $tmpinter->fk_project = $projectstatic->id; |
| 826 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 826 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 827 | 827 | |
| 828 | 828 | if ($interToUse) { |
| 829 | 829 | $tmpinter->fetch($interToUse); |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 857 | 857 | |
| 858 | 858 | // Add lines |
| 859 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), (int) $value['date'], $value['timespent']); |
|
| 859 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), (int) $value['date'], $value['timespent']); |
|
| 860 | 860 | } |
| 861 | 861 | } |
| 862 | 862 | |
@@ -887,9 +887,9 @@ discard block |
||
| 887 | 887 | //$result = $projectstatic->fetch($object->fk_project); |
| 888 | 888 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 889 | 889 | |
| 890 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 890 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 891 | 891 | if (!empty($withproject)) { |
| 892 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 892 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 893 | 893 | } |
| 894 | 894 | $help_url = ''; |
| 895 | 895 | |
@@ -938,13 +938,13 @@ discard block |
||
| 938 | 938 | |
| 939 | 939 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 940 | 940 | if ($search_user) { |
| 941 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 941 | + $param .= '&search_user='.((int) $search_user); |
|
| 942 | 942 | } |
| 943 | 943 | if ($search_month) { |
| 944 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 944 | + $param .= '&search_month='.((int) $search_month); |
|
| 945 | 945 | } |
| 946 | 946 | if ($search_year) { |
| 947 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 947 | + $param .= '&search_year='.((int) $search_year); |
|
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | // Project card |
@@ -956,14 +956,14 @@ discard block |
||
| 956 | 956 | $morehtmlref .= $projectstatic->title; |
| 957 | 957 | // Thirdparty |
| 958 | 958 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 959 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 959 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 960 | 960 | } |
| 961 | 961 | $morehtmlref .= '</div>'; |
| 962 | 962 | |
| 963 | 963 | // Define a complementary filter for search of next/prev ref. |
| 964 | 964 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 965 | 965 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 966 | - $projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 966 | + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 967 | 967 | } |
| 968 | 968 | |
| 969 | 969 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -981,25 +981,25 @@ discard block |
||
| 981 | 981 | print '</td>'; |
| 982 | 982 | print '<td>'; |
| 983 | 983 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 984 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 984 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 985 | 985 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 986 | 986 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 987 | 987 | print '<br>'; |
| 988 | 988 | } |
| 989 | 989 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 990 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 990 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 991 | 991 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 992 | 992 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 993 | 993 | print '<br>'; |
| 994 | 994 | } |
| 995 | 995 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 996 | - 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"' : '')) . '"> '; |
|
| 996 | + 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"' : '')).'"> '; |
|
| 997 | 997 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 998 | 998 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 999 | 999 | print '<br>'; |
| 1000 | 1000 | } |
| 1001 | 1001 | if (isModEnabled('eventorganization')) { |
| 1002 | - 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"' : '')) . '"> '; |
|
| 1002 | + 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"' : '')).'"> '; |
|
| 1003 | 1003 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 1004 | 1004 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 1005 | 1005 | } |
@@ -1007,14 +1007,14 @@ discard block |
||
| 1007 | 1007 | } |
| 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'); |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | print '</td></tr>'; |
| 1027 | 1027 | |
| 1028 | 1028 | // Visibility |
| 1029 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 1029 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1030 | 1030 | if ($projectstatic->public) { |
| 1031 | 1031 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1032 | 1032 | print $langs->trans('SharedProject'); |
@@ -1040,7 +1040,7 @@ discard block |
||
| 1040 | 1040 | $cols = 2; |
| 1041 | 1041 | $savobject = $object; |
| 1042 | 1042 | $object = $projectstatic; |
| 1043 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1043 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1044 | 1044 | $object = $savobject; |
| 1045 | 1045 | |
| 1046 | 1046 | print '</table>'; |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | |
| 1054 | 1054 | // Categories |
| 1055 | 1055 | if (isModEnabled('category')) { |
| 1056 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1056 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1057 | 1057 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1058 | 1058 | print "</td></tr>"; |
| 1059 | 1059 | } |
@@ -1092,12 +1092,12 @@ discard block |
||
| 1092 | 1092 | |
| 1093 | 1093 | if (!empty($projectidforalltimes)) { |
| 1094 | 1094 | // We are on tab 'Time Spent' of project |
| 1095 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1096 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1095 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1096 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1097 | 1097 | } else { |
| 1098 | 1098 | // We are on tab 'Time Spent' of task |
| 1099 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1100 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1099 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1100 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1101 | 1101 | } |
| 1102 | 1102 | } else { |
| 1103 | 1103 | $linktocreatetimeBtnStatus = -2; |
@@ -1142,19 +1142,19 @@ discard block |
||
| 1142 | 1142 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
| 1143 | 1143 | |
| 1144 | 1144 | if ($action == 'deleteline') { |
| 1145 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1145 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1146 | 1146 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1147 | 1147 | } |
| 1148 | 1148 | |
| 1149 | 1149 | $param = ($withproject ? '&withproject=1' : ''); |
| 1150 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
| 1151 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
| 1150 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
| 1151 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
| 1152 | 1152 | |
| 1153 | 1153 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1154 | 1154 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1155 | - $object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId); |
|
| 1155 | + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); |
|
| 1156 | 1156 | } else { |
| 1157 | - $object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id); |
|
| 1157 | + $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); |
|
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | 1160 | $morehtmlref = ''; |
@@ -1162,12 +1162,12 @@ discard block |
||
| 1162 | 1162 | // Project |
| 1163 | 1163 | if (empty($withproject)) { |
| 1164 | 1164 | $morehtmlref .= '<div class="refidno">'; |
| 1165 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1165 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1166 | 1166 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1167 | 1167 | $morehtmlref .= '<br>'; |
| 1168 | 1168 | |
| 1169 | 1169 | // Third party |
| 1170 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1170 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1171 | 1171 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1172 | 1172 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1173 | 1173 | } |
@@ -1183,7 +1183,7 @@ discard block |
||
| 1183 | 1183 | print '<table class="border centpercent tableforfield">'; |
| 1184 | 1184 | |
| 1185 | 1185 | // Task parent |
| 1186 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
| 1186 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
| 1187 | 1187 | if ($object->fk_task_parent > 0) { |
| 1188 | 1188 | $tasktmp = new Task($db); |
| 1189 | 1189 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | print '</td></tr>'; |
| 1193 | 1193 | |
| 1194 | 1194 | // Date start - Date end task |
| 1195 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1195 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1196 | 1196 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1197 | 1197 | print($start ? $start : '?'); |
| 1198 | 1198 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1204,7 +1204,7 @@ discard block |
||
| 1204 | 1204 | print '</td></tr>'; |
| 1205 | 1205 | |
| 1206 | 1206 | // Planned workload |
| 1207 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1207 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1208 | 1208 | if ($object->planned_workload) { |
| 1209 | 1209 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1210 | 1210 | } |
@@ -1219,21 +1219,21 @@ discard block |
||
| 1219 | 1219 | print '<table class="border tableforfield centpercent">'; |
| 1220 | 1220 | |
| 1221 | 1221 | // Progress declared |
| 1222 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1223 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1222 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1223 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1224 | 1224 | print '</td></tr>'; |
| 1225 | 1225 | |
| 1226 | 1226 | // Progress calculated |
| 1227 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1227 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1228 | 1228 | if ($object->planned_workload) { |
| 1229 | 1229 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1230 | 1230 | if ($tmparray['total_duration'] > 0) { |
| 1231 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1231 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1232 | 1232 | } else { |
| 1233 | 1233 | print '0 %'; |
| 1234 | 1234 | } |
| 1235 | 1235 | } else { |
| 1236 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1236 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1237 | 1237 | } |
| 1238 | 1238 | print '</td>'; |
| 1239 | 1239 | |
@@ -1249,7 +1249,7 @@ discard block |
||
| 1249 | 1249 | print dol_get_fiche_end(); |
| 1250 | 1250 | } else { |
| 1251 | 1251 | if ($action == 'deleteline') { |
| 1252 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1252 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1253 | 1253 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1254 | 1254 | } |
| 1255 | 1255 | } |
@@ -1263,7 +1263,7 @@ discard block |
||
| 1263 | 1263 | |
| 1264 | 1264 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
| 1265 | 1265 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
| 1266 | - $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); |
|
| 1266 | + $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); |
|
| 1267 | 1267 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1268 | 1268 | } |
| 1269 | 1269 | |
@@ -1282,10 +1282,10 @@ discard block |
||
| 1282 | 1282 | // Definition of fields for list |
| 1283 | 1283 | $arrayfields = array(); |
| 1284 | 1284 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => '1'); |
| 1285 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => '1'); |
|
| 1285 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => '1'); |
|
| 1286 | 1286 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1287 | 1287 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1288 | - if (! empty($allprojectforuser)) { |
|
| 1288 | + if (!empty($allprojectforuser)) { |
|
| 1289 | 1289 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => '1']; |
| 1290 | 1290 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => '1']; |
| 1291 | 1291 | } |
@@ -1301,82 +1301,82 @@ discard block |
||
| 1301 | 1301 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => '1', 'enabled' => (string) (int) isModEnabled("salaries")); |
| 1302 | 1302 | $arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => '1', 'enabled' => (string) (int) (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time)); |
| 1303 | 1303 | // Extra fields |
| 1304 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1304 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1305 | 1305 | |
| 1306 | 1306 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1307 | 1307 | |
| 1308 | 1308 | $param = ''; |
| 1309 | 1309 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 1310 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 1310 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 1311 | 1311 | } |
| 1312 | 1312 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 1313 | 1313 | $param .= '&limit='.((int) $limit); |
| 1314 | 1314 | } |
| 1315 | 1315 | if ($search_month > 0) { |
| 1316 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
| 1316 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1317 | 1317 | } |
| 1318 | 1318 | if ($search_year > 0) { |
| 1319 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1319 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
| 1320 | 1320 | } |
| 1321 | 1321 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
| 1322 | 1322 | $param .= '&search_user='.urlencode($search_user); |
| 1323 | 1323 | } |
| 1324 | 1324 | if ($search_task_ref != '') { |
| 1325 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
| 1325 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
| 1326 | 1326 | } |
| 1327 | 1327 | if ($search_company != '') { |
| 1328 | - $param .= '&$search_company=' . urlencode($search_company); |
|
| 1328 | + $param .= '&$search_company='.urlencode($search_company); |
|
| 1329 | 1329 | } |
| 1330 | 1330 | if ($search_company_alias != '') { |
| 1331 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
| 1331 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
| 1332 | 1332 | } |
| 1333 | 1333 | if ($search_project_ref != '') { |
| 1334 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
| 1334 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
| 1335 | 1335 | } |
| 1336 | 1336 | if ($search_project_label != '') { |
| 1337 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
| 1337 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
| 1338 | 1338 | } |
| 1339 | 1339 | if ($search_task_label != '') { |
| 1340 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
| 1340 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
| 1341 | 1341 | } |
| 1342 | 1342 | if ($search_note != '') { |
| 1343 | - $param .= '&search_note=' . urlencode($search_note); |
|
| 1343 | + $param .= '&search_note='.urlencode($search_note); |
|
| 1344 | 1344 | } |
| 1345 | 1345 | if ($search_duration != '') { |
| 1346 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
| 1346 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
| 1347 | 1347 | } |
| 1348 | 1348 | if ($optioncss != '') { |
| 1349 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 1349 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 1350 | 1350 | } |
| 1351 | 1351 | if ($search_date_startday) { |
| 1352 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
| 1352 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1353 | 1353 | } |
| 1354 | 1354 | if ($search_date_startmonth) { |
| 1355 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1355 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1356 | 1356 | } |
| 1357 | 1357 | if ($search_date_startyear) { |
| 1358 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1358 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1359 | 1359 | } |
| 1360 | 1360 | if ($search_date_endday) { |
| 1361 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1361 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1362 | 1362 | } |
| 1363 | 1363 | if ($search_date_endmonth) { |
| 1364 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1364 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1365 | 1365 | } |
| 1366 | 1366 | if ($search_date_endyear) { |
| 1367 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1367 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1368 | 1368 | } |
| 1369 | 1369 | if ($search_timespent_starthour) { |
| 1370 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1370 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1371 | 1371 | } |
| 1372 | 1372 | if ($search_timespent_startmin) { |
| 1373 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1373 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1374 | 1374 | } |
| 1375 | 1375 | if ($search_timespent_endhour) { |
| 1376 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1376 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1377 | 1377 | } |
| 1378 | 1378 | if ($search_timespent_endmin) { |
| 1379 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1379 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
| 1380 | 1380 | } |
| 1381 | 1381 | |
| 1382 | 1382 | /* |
@@ -1384,24 +1384,24 @@ discard block |
||
| 1384 | 1384 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
| 1385 | 1385 | */ |
| 1386 | 1386 | if ($id) { |
| 1387 | - $param .= '&id=' . urlencode((string) ($id)); |
|
| 1387 | + $param .= '&id='.urlencode((string) ($id)); |
|
| 1388 | 1388 | } |
| 1389 | 1389 | if ($projectid) { |
| 1390 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1390 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1391 | 1391 | } |
| 1392 | 1392 | if ($withproject) { |
| 1393 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1393 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
| 1394 | 1394 | } |
| 1395 | 1395 | // Add $param from hooks |
| 1396 | 1396 | $parameters = array('param' => &$param); |
| 1397 | 1397 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 1398 | 1398 | $param .= $hookmanager->resPrint; |
| 1399 | 1399 | |
| 1400 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 1400 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 1401 | 1401 | if ($optioncss != '') { |
| 1402 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 1402 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 1403 | 1403 | } |
| 1404 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1404 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1405 | 1405 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 1406 | 1406 | if ($action == 'editline') { |
| 1407 | 1407 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1416,13 +1416,13 @@ discard block |
||
| 1416 | 1416 | } else { |
| 1417 | 1417 | print '<input type="hidden" name="action" value="list">'; |
| 1418 | 1418 | } |
| 1419 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 1420 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 1419 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 1420 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 1421 | 1421 | |
| 1422 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
| 1423 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
| 1424 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
| 1425 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
| 1422 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
| 1423 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
| 1424 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
| 1425 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
| 1426 | 1426 | print '<input type="hidden" name="page_y" value="">'; |
| 1427 | 1427 | |
| 1428 | 1428 | // Form to convert time spent into invoice |
@@ -1449,7 +1449,7 @@ discard block |
||
| 1449 | 1449 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
| 1450 | 1450 | ); |
| 1451 | 1451 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
| 1452 | - print "\n" . '<script type="text/javascript">'; |
|
| 1452 | + print "\n".'<script type="text/javascript">'; |
|
| 1453 | 1453 | print ' |
| 1454 | 1454 | $(document).ready(function () { |
| 1455 | 1455 | setDetailVisibility(); |
@@ -1466,8 +1466,8 @@ discard block |
||
| 1466 | 1466 | } |
| 1467 | 1467 | }); |
| 1468 | 1468 | '; |
| 1469 | - print '</script>' . "\n"; |
|
| 1470 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
| 1469 | + print '</script>'."\n"; |
|
| 1470 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
| 1471 | 1471 | print '</td>'; |
| 1472 | 1472 | print '</tr>'; |
| 1473 | 1473 | |
@@ -1517,14 +1517,14 @@ discard block |
||
| 1517 | 1517 | |
| 1518 | 1518 | print '<br>'; |
| 1519 | 1519 | print '<div class="center">'; |
| 1520 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
| 1521 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1520 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
| 1521 | + print '<input type="submit" class="button button-cancel" 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("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
| 1525 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
| 1526 | 1526 | print '<div class="center">'; |
| 1527 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1527 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1528 | 1528 | print '</div>'; |
| 1529 | 1529 | $massaction = ''; |
| 1530 | 1530 | } |
@@ -1537,7 +1537,7 @@ discard block |
||
| 1537 | 1537 | print '<table class="noborder centpercent">'; |
| 1538 | 1538 | print '<tr>'; |
| 1539 | 1539 | print '<td class="titlefield">'; |
| 1540 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
| 1540 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
| 1541 | 1541 | print '</td>'; |
| 1542 | 1542 | print '<td>'; |
| 1543 | 1543 | $forminter = new FormIntervention($db); |
@@ -1547,14 +1547,14 @@ discard block |
||
| 1547 | 1547 | print '</table>'; |
| 1548 | 1548 | |
| 1549 | 1549 | print '<div class="center">'; |
| 1550 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
| 1551 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1550 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
| 1551 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1552 | 1552 | print '</div>'; |
| 1553 | 1553 | print '<br>'; |
| 1554 | 1554 | } else { |
| 1555 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
| 1555 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
| 1556 | 1556 | print '<div class="center">'; |
| 1557 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1557 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1558 | 1558 | print '</div>'; |
| 1559 | 1559 | $massaction = ''; |
| 1560 | 1560 | } |
@@ -1624,14 +1624,14 @@ discard block |
||
| 1624 | 1624 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1625 | 1625 | } elseif (!empty($projectidforalltimes)) { |
| 1626 | 1626 | // Limit on one project |
| 1627 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")"; |
|
| 1627 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize((string) $projectidforalltimes).")"; |
|
| 1628 | 1628 | } elseif (!empty($allprojectforuser)) { |
| 1629 | 1629 | // Limit on on user |
| 1630 | 1630 | if (empty($search_user)) { |
| 1631 | 1631 | $search_user = $user->id; |
| 1632 | 1632 | } |
| 1633 | 1633 | if ($search_user > 0) { |
| 1634 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1634 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1635 | 1635 | } |
| 1636 | 1636 | } |
| 1637 | 1637 | |
@@ -1684,13 +1684,13 @@ discard block |
||
| 1684 | 1684 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1685 | 1685 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1686 | 1686 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1687 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1687 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1688 | 1688 | } |
| 1689 | 1689 | |
| 1690 | 1690 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1691 | 1691 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1692 | 1692 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1693 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1693 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1694 | 1694 | } |
| 1695 | 1695 | } |
| 1696 | 1696 | |
@@ -1738,13 +1738,13 @@ discard block |
||
| 1738 | 1738 | |
| 1739 | 1739 | if ($num >= 0) { |
| 1740 | 1740 | if (!empty($projectidforalltimes)) { |
| 1741 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1741 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1742 | 1742 | |
| 1743 | 1743 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1744 | 1744 | |
| 1745 | 1745 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1746 | 1746 | } else { |
| 1747 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1747 | + print '<!-- List of time spent -->'."\n"; |
|
| 1748 | 1748 | |
| 1749 | 1749 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1750 | 1750 | |
@@ -1766,26 +1766,26 @@ discard block |
||
| 1766 | 1766 | * Form to add a new line of time spent |
| 1767 | 1767 | */ |
| 1768 | 1768 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1769 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1769 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1770 | 1770 | if (!empty($id)) { |
| 1771 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1771 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1772 | 1772 | } |
| 1773 | 1773 | |
| 1774 | 1774 | 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 |
| 1775 | 1775 | print '<table class="noborder nohover centpercent">'; |
| 1776 | 1776 | |
| 1777 | 1777 | print '<tr class="liste_titre">'; |
| 1778 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1778 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1779 | 1779 | if (!empty($allprojectforuser)) { |
| 1780 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1780 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1781 | 1781 | } |
| 1782 | 1782 | if (empty($id)) { |
| 1783 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1783 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1784 | 1784 | } |
| 1785 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1786 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1787 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1788 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1785 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1786 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1787 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1788 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1789 | 1789 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1790 | 1790 | print '<td></td>'; |
| 1791 | 1791 | |
@@ -1839,14 +1839,14 @@ discard block |
||
| 1839 | 1839 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, null, 0, '', $contactsofproject, '0', 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1840 | 1840 | } else { |
| 1841 | 1841 | if ($nboftasks) { |
| 1842 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1842 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1843 | 1843 | } |
| 1844 | 1844 | } |
| 1845 | 1845 | print '</td>'; |
| 1846 | 1846 | |
| 1847 | 1847 | // Note |
| 1848 | 1848 | print '<td>'; |
| 1849 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1849 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1850 | 1850 | print '</td>'; |
| 1851 | 1851 | |
| 1852 | 1852 | // Duration - Time spent |
@@ -1914,7 +1914,7 @@ discard block |
||
| 1914 | 1914 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1915 | 1915 | |
| 1916 | 1916 | print '<div class="div-table-responsive">'; |
| 1917 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1917 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1918 | 1918 | |
| 1919 | 1919 | // Fields title search |
| 1920 | 1920 | // -------------------------------------------------------------------- |
@@ -1939,20 +1939,20 @@ discard block |
||
| 1939 | 1939 | } |
| 1940 | 1940 | // Thirdparty |
| 1941 | 1941 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1942 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1942 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1943 | 1943 | } |
| 1944 | 1944 | |
| 1945 | 1945 | // Thirdparty alias |
| 1946 | 1946 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1947 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1947 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1948 | 1948 | } |
| 1949 | 1949 | |
| 1950 | 1950 | if (!empty($allprojectforuser)) { |
| 1951 | 1951 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1952 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1952 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1953 | 1953 | } |
| 1954 | 1954 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1955 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1955 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1956 | 1956 | } |
| 1957 | 1957 | } |
| 1958 | 1958 | // Task |
@@ -1970,7 +1970,7 @@ discard block |
||
| 1970 | 1970 | } |
| 1971 | 1971 | // Note |
| 1972 | 1972 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1973 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1973 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1974 | 1974 | } |
| 1975 | 1975 | // Duration |
| 1976 | 1976 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1981,7 +1981,7 @@ discard block |
||
| 1981 | 1981 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1982 | 1982 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1983 | 1983 | } |
| 1984 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1984 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1985 | 1985 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 1986 | 1986 | print '</div>'; |
| 1987 | 1987 | |
@@ -1989,7 +1989,7 @@ discard block |
||
| 1989 | 1989 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1990 | 1990 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 1991 | 1991 | } |
| 1992 | - print '<div class="nowraponall">' . $langs->trans('to') . ' '; |
|
| 1992 | + print '<div class="nowraponall">'.$langs->trans('to').' '; |
|
| 1993 | 1993 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 1994 | 1994 | print '</div>'; |
| 1995 | 1995 | |
@@ -2005,7 +2005,7 @@ discard block |
||
| 2005 | 2005 | } |
| 2006 | 2006 | // Value billed |
| 2007 | 2007 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 2008 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 2008 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 2009 | 2009 | } |
| 2010 | 2010 | |
| 2011 | 2011 | /* |
@@ -2023,7 +2023,7 @@ discard block |
||
| 2023 | 2023 | print $searchpicto; |
| 2024 | 2024 | print '</td>'; |
| 2025 | 2025 | } |
| 2026 | - print '</tr>' . "\n"; |
|
| 2026 | + print '</tr>'."\n"; |
|
| 2027 | 2027 | |
| 2028 | 2028 | |
| 2029 | 2029 | $totalarray = array(); |
@@ -2141,7 +2141,7 @@ discard block |
||
| 2141 | 2141 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2142 | 2142 | print '<td class="center nowraponall">'; |
| 2143 | 2143 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2144 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2144 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2145 | 2145 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2146 | 2146 | print '<br>'; |
| 2147 | 2147 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2152,7 +2152,7 @@ discard block |
||
| 2152 | 2152 | print '</a>'; |
| 2153 | 2153 | |
| 2154 | 2154 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2155 | - print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2155 | + print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2156 | 2156 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2157 | 2157 | print '</a>'; |
| 2158 | 2158 | } |
@@ -2170,12 +2170,12 @@ discard block |
||
| 2170 | 2170 | |
| 2171 | 2171 | // Disable select if task not billable or already invoiced |
| 2172 | 2172 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2173 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2173 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2174 | 2174 | if ($disabled) { |
| 2175 | 2175 | // If disabled, a dbl-click very close outside the control |
| 2176 | 2176 | // will re-enable it, so that user is not blocked if needed. |
| 2177 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2178 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2177 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2178 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2179 | 2179 | } else { |
| 2180 | 2180 | print $ctrl; |
| 2181 | 2181 | } |
@@ -2298,7 +2298,7 @@ discard block |
||
| 2298 | 2298 | } |
| 2299 | 2299 | } |
| 2300 | 2300 | } elseif ($action !== 'createtime') { |
| 2301 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2301 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2302 | 2302 | } |
| 2303 | 2303 | |
| 2304 | 2304 | // Task label |
@@ -2327,9 +2327,9 @@ discard block |
||
| 2327 | 2327 | } |
| 2328 | 2328 | if (count($contactsoftask) > 0) { |
| 2329 | 2329 | print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"'); |
| 2330 | - print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td |
|
| 2330 | + print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td |
|
| 2331 | 2331 | } else { |
| 2332 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2332 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2333 | 2333 | } |
| 2334 | 2334 | } else { |
| 2335 | 2335 | $userstatic->id = $task_time->fk_user; |
@@ -2351,7 +2351,7 @@ discard block |
||
| 2351 | 2351 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2352 | 2352 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2353 | 2353 | print '<td class="small">'; |
| 2354 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2354 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2355 | 2355 | print '</td>'; |
| 2356 | 2356 | } else { |
| 2357 | 2357 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2362,7 +2362,7 @@ discard block |
||
| 2362 | 2362 | $totalarray['nbfield']++; |
| 2363 | 2363 | } |
| 2364 | 2364 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2365 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2365 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2366 | 2366 | } |
| 2367 | 2367 | |
| 2368 | 2368 | // Time spent |
@@ -2423,7 +2423,7 @@ discard block |
||
| 2423 | 2423 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2424 | 2424 | |
| 2425 | 2425 | print '<td class="nowraponall right">'; |
| 2426 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2426 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2427 | 2427 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2428 | 2428 | print '</span>'; |
| 2429 | 2429 | print '</td>'; |
@@ -2479,7 +2479,7 @@ discard block |
||
| 2479 | 2479 | } |
| 2480 | 2480 | } |
| 2481 | 2481 | } else { |
| 2482 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2482 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2483 | 2483 | } |
| 2484 | 2484 | } |
| 2485 | 2485 | print '</td>'; |
@@ -2513,7 +2513,7 @@ discard block |
||
| 2513 | 2513 | print '</a>'; |
| 2514 | 2514 | |
| 2515 | 2515 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2516 | - print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2516 | + print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2517 | 2517 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2518 | 2518 | print '</a>'; |
| 2519 | 2519 | } |
@@ -2531,12 +2531,12 @@ discard block |
||
| 2531 | 2531 | |
| 2532 | 2532 | // Disable select if task not billable or already invoiced |
| 2533 | 2533 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2534 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2534 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2535 | 2535 | if ($disabled) { |
| 2536 | 2536 | // If disabled, a dbl-click very close outside the control |
| 2537 | 2537 | // will re-enable it, so that user is not blocked if needed. |
| 2538 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2539 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2538 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2539 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2540 | 2540 | } else { |
| 2541 | 2541 | print $ctrl; |
| 2542 | 2542 | } |
@@ -2635,7 +2635,7 @@ discard block |
||
| 2635 | 2635 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2636 | 2636 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask); |
| 2637 | 2637 | } else { |
| 2638 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2638 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2639 | 2639 | } |
| 2640 | 2640 | } else { |
| 2641 | 2641 | $userstatic->id = $task_time->fk_user; |
@@ -2652,13 +2652,13 @@ discard block |
||
| 2652 | 2652 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2653 | 2653 | print '<td class="tdoverflowmax300">'; |
| 2654 | 2654 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2655 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2655 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2656 | 2656 | } else { |
| 2657 | 2657 | print dol_nl2br($task_time->note); |
| 2658 | 2658 | } |
| 2659 | 2659 | print '</td>'; |
| 2660 | 2660 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2661 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_2 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2661 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_2.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2662 | 2662 | } |
| 2663 | 2663 | |
| 2664 | 2664 | // Time spent |
@@ -2800,7 +2800,7 @@ discard block |
||
| 2800 | 2800 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2801 | 2801 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, null, 0, '', $contactsoftask); |
| 2802 | 2802 | } else { |
| 2803 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2803 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2804 | 2804 | } |
| 2805 | 2805 | } else { |
| 2806 | 2806 | $userstatic->id = $task_time->fk_user; |
@@ -2817,13 +2817,13 @@ discard block |
||
| 2817 | 2817 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2818 | 2818 | print '<td class="small tdoverflowmax300"">'; |
| 2819 | 2819 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2820 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2820 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2821 | 2821 | } else { |
| 2822 | 2822 | print dol_nl2br($task_time->note); |
| 2823 | 2823 | } |
| 2824 | 2824 | print '</td>'; |
| 2825 | 2825 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2826 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2826 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2827 | 2827 | } |
| 2828 | 2828 | |
| 2829 | 2829 | // Time spent |
@@ -2897,14 +2897,14 @@ discard block |
||
| 2897 | 2897 | $i++; |
| 2898 | 2898 | if ($i == 1) { |
| 2899 | 2899 | if ($num < $limit && empty($offset)) { |
| 2900 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2900 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2901 | 2901 | } else { |
| 2902 | 2902 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2903 | 2903 | } |
| 2904 | 2904 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2905 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2905 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2906 | 2906 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2907 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2907 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2908 | 2908 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2909 | 2909 | } else { |
| 2910 | 2910 | print '<td></td>'; |
@@ -2920,8 +2920,8 @@ discard block |
||
| 2920 | 2920 | $totalnboffields++; |
| 2921 | 2921 | } |
| 2922 | 2922 | } |
| 2923 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2924 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2923 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2924 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2925 | 2925 | print '</td></tr>'; |
| 2926 | 2926 | } |
| 2927 | 2927 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | $objecttmp->date = $datefacture; |
| 297 | - $objecttmp->origin_type = 'shipping'; |
|
| 297 | + $objecttmp->origin_type = 'shipping'; |
|
| 298 | 298 | $objecttmp->origin_id = $id_sending; |
| 299 | 299 | |
| 300 | 300 | $objecttmp->array_options = $expd->array_options; // Copy extrafields |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $desc = ($lines[$i]->desc ? $lines[$i]->desc : ''); |
| 362 | 362 | // If we build one invoice for several sendings, we must put the ref of sending on the invoice line |
| 363 | 363 | if (!empty($createbills_onebythird)) { |
| 364 | - $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref. ' - '. $langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day') : '')); |
|
| 364 | + $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref.' - '.$langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day') : '')); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | if ($lines[$i]->subprice < 0 && empty($conf->global->INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN)) { |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | if ($searchCategoryCustomerOperator == 0) { |
| 824 | 824 | $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).")"; |
| 825 | 825 | } else { |
| 826 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
| 826 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
| 827 | 827 | } |
| 828 | 828 | } |
| 829 | 829 | } |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | if ($searchCategoryProductOperator == 0) { |
| 854 | 854 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_elementdet = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 855 | 855 | } else { |
| 856 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 856 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 857 | 857 | } |
| 858 | 858 | } |
| 859 | 859 | } |
@@ -1189,7 +1189,7 @@ discard block |
||
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 1192 | -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // @phan-suppress-current-line PhanTypeMismatchArgument |
|
| 1192 | +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // @phan-suppress-current-line PhanTypeMismatchArgument |
|
| 1193 | 1193 | if ($massactionbutton) { |
| 1194 | 1194 | $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields |
| 1195 | 1195 | } |
@@ -569,9 +569,9 @@ discard block |
||
| 569 | 569 | print '<td class="center">'; |
| 570 | 570 | print '</td>'; |
| 571 | 571 | } |
| 572 | - print '<td><input class="minwidth200" name="dateinput" value="'. date('Y-m-d', dol_stringtotime($obj->date_sync)) .'" type="date"></td>'; |
|
| 573 | - print '<td>' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . '</td>'; |
|
| 574 | - print '<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="' . dol_escape_htmltag($obj->rate) . '">'; |
|
| 572 | + print '<td><input class="minwidth200" name="dateinput" value="'.date('Y-m-d', dol_stringtotime($obj->date_sync)).'" type="date"></td>'; |
|
| 573 | + print '<td>'.$form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true).'</td>'; |
|
| 574 | + print '<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="'.dol_escape_htmltag($obj->rate).'">'; |
|
| 575 | 575 | print '<input type="hidden" name="page" value="'.dol_escape_htmltag((string) $page).'">'; |
| 576 | 576 | print '<input type="hidden" name="id_rate" value="'.dol_escape_htmltag($obj->rowid).'">'; |
| 577 | 577 | print '<button type="submit" class="button small reposition" name="action" value="update">'.$langs->trans("Modify").'</button>'; |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | print ' - <span class="opacitymedium">'.$obj->name.'</span>'; |
| 618 | 618 | print "</td>\n"; |
| 619 | 619 | |
| 620 | - if (! $i) { |
|
| 620 | + if (!$i) { |
|
| 621 | 621 | $totalarray['nbfield']++; |
| 622 | 622 | } |
| 623 | 623 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | print '<td class="tdoverflowmax200">'; |
| 628 | 628 | print $obj->rate; |
| 629 | 629 | print "</td>\n"; |
| 630 | - if (! $i) { |
|
| 630 | + if (!$i) { |
|
| 631 | 631 | $totalarray['nbfield']++; |
| 632 | 632 | } |
| 633 | 633 | } |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | print '<td class="tdoverflowmax200">'; |
| 638 | 638 | print $obj->rate_indirect; |
| 639 | 639 | print "</td>\n"; |
| 640 | - if (! $i) { |
|
| 640 | + if (!$i) { |
|
| 641 | 641 | $totalarray['nbfield']++; |
| 642 | 642 | } |
| 643 | 643 | } |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | |
| 646 | 646 | // Fields from hook |
| 647 | 647 | $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj); |
| 648 | - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook |
|
| 648 | + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook |
|
| 649 | 649 | print $hookmanager->resPrint; |
| 650 | 650 | |
| 651 | 651 | // Action |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | 'typent.code' => array('label' => "ThirdPartyType", 'checked' => (string) $checkedtypetiers, 'position' => 55), |
| 209 | 209 | 'c.date_commande' => array('label' => "OrderDateShort", 'checked' => '1', 'position' => 60), |
| 210 | 210 | 'c.delivery_date' => array('label' => "DateDeliveryPlanned", 'checked' => '1', 'enabled' => (string) (int) !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65), |
| 211 | - 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => '-1', 'position' => 66 , 'enabled' => (string) (int) isModEnabled('shipping')), |
|
| 211 | + 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => '-1', 'position' => 66, 'enabled' => (string) (int) isModEnabled('shipping')), |
|
| 212 | 212 | 'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => '-1', 'position' => 67), |
| 213 | 213 | 'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => '-1', 'position' => 68), |
| 214 | 214 | 'c.fk_input_reason' => array('label' => "Channel", 'checked' => '-1', 'position' => 69), |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | 'c.date_cloture' => array('label' => "DateClosing", 'checked' => '0', 'position' => 130), |
| 233 | 233 | 'c.note_public' => array('label' => 'NotePublic', 'checked' => '0', 'enabled' => (string) (int) (!getDolGlobalString('MAIN_LIST_ALLOW_PUBLIC_NOTES')), 'position' => 135), |
| 234 | 234 | 'c.note_private' => array('label' => 'NotePrivate', 'checked' => '0', 'enabled' => (string) (int) (!getDolGlobalString('MAIN_LIST_ALLOW_PRIVATE_NOTES')), 'position' => 140), |
| 235 | - 'shippable' => array('label' => "Shippable", 'checked' => '1','enabled' => (string) (int) (isModEnabled('shipping')), 'position' => 990), |
|
| 235 | + 'shippable' => array('label' => "Shippable", 'checked' => '1', 'enabled' => (string) (int) (isModEnabled('shipping')), 'position' => 990), |
|
| 236 | 236 | 'c.facture' => array('label' => "Billed", 'checked' => '1', 'enabled' => (string) (int) (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995), |
| 237 | 237 | 'c.import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'visible' => -2, 'position' => 999), |
| 238 | 238 | 'c.fk_statut' => array('label' => "Status", 'checked' => '1', 'position' => 1000) |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $sql .= natural_search('pr.ref', $search_refProduct); |
| 469 | 469 | } |
| 470 | 470 | if ($search_descProduct) { |
| 471 | - $sql .= natural_search(array('pr.label','cdet.description'), $search_descProduct); |
|
| 471 | + $sql .= natural_search(array('pr.label', 'cdet.description'), $search_descProduct); |
|
| 472 | 472 | } |
| 473 | 473 | if ($search_ref) { |
| 474 | 474 | $sql .= natural_search('c.ref', $search_ref); |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | if ($searchCategoryProductOperator == 0) { |
| 621 | 621 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT cp.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as cp WHERE cdet.fk_product = cp.fk_product AND cp.fk_categorie = ".((int) $searchCategoryProject).")"; |
| 622 | 622 | } else { |
| 623 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
| 623 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
| 624 | 624 | } |
| 625 | 625 | } |
| 626 | 626 | } |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | if (!empty($socid)) { |
| 891 | 891 | $url .= '&socid='.$socid; |
| 892 | 892 | } |
| 893 | - $newcardbutton = '';//dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd); |
|
| 893 | + $newcardbutton = ''; //dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd); |
|
| 894 | 894 | |
| 895 | 895 | // Lines of title fields |
| 896 | 896 | print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; |
@@ -2105,10 +2105,10 @@ discard block |
||
| 2105 | 2105 | if (!empty($show_shippable_command) && isModEnabled('stock')) { |
| 2106 | 2106 | $text_icon = ''; |
| 2107 | 2107 | if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) { |
| 2108 | - $generic_commande->loadExpeditions(); // Load array ->expeditions |
|
| 2108 | + $generic_commande->loadExpeditions(); // Load array ->expeditions |
|
| 2109 | 2109 | |
| 2110 | 2110 | if (isset($generic_commande->expeditions[$obj->rowid])) { |
| 2111 | - $reliquat = $obj->qty - $generic_commande->expeditions[$obj->rowid]; |
|
| 2111 | + $reliquat = $obj->qty - $generic_commande->expeditions[$obj->rowid]; |
|
| 2112 | 2112 | } else { |
| 2113 | 2113 | $reliquat = $obj->qty; |
| 2114 | 2114 | } |