@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) { |
| 233 | 233 | print '<div class="backimagepublicregistration">'; |
| 234 | - print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION').'">'; |
|
| 234 | + print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION').'">'; |
|
| 235 | 235 | print '</div>'; |
| 236 | 236 | } |
| 237 | 237 | |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | $head = ''; |
| 294 | 294 | if (getDolGlobalString('MAIN_SIGN_CSS_URL')) { |
| 295 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
| 295 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | $conf->dol_hide_topmenu = 1; |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | } |
| 372 | 372 | if ($source == 'proposal' && getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN')) { |
| 373 | 373 | print '<div class="backimagepublicproposalsign">'; |
| 374 | - print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">'; |
|
| 374 | + print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">'; |
|
| 375 | 375 | print '</div>'; |
| 376 | 376 | } |
| 377 | 377 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) { |
| 383 | 383 | $text .= $langs->trans($reg[1])."<br>\n"; |
| 384 | 384 | } else { |
| 385 | - $text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT') . "<br>\n"; |
|
| 385 | + $text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT')."<br>\n"; |
|
| 386 | 386 | } |
| 387 | 387 | $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; |
| 388 | 388 | } |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 478 | 478 | // It seems document has never been generated, or was generated and then deleted. |
| 479 | 479 | // So we try to regenerate it with its default template. |
| 480 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 480 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 481 | 481 | $object->generateDocument($defaulttemplate, $langs); |
| 482 | 482 | } |
| 483 | 483 | |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 549 | 549 | // It seems document has never been generated, or was generated and then deleted. |
| 550 | 550 | // So we try to regenerate it with its default template. |
| 551 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 551 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 552 | 552 | $object->generateDocument($defaulttemplate, $langs); |
| 553 | 553 | } |
| 554 | 554 | |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 600 | 600 | // It seems document has never been generated, or was generated and then deleted. |
| 601 | 601 | // So we try to regenerate it with its default template. |
| 602 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 602 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 603 | 603 | $object->generateDocument($defaulttemplate, $langs); |
| 604 | 604 | } |
| 605 | 605 | |
@@ -623,24 +623,24 @@ discard block |
||
| 623 | 623 | $result = $object->fetch_thirdparty(); |
| 624 | 624 | |
| 625 | 625 | // Proposer |
| 626 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Proposer"); |
|
| 626 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Proposer"); |
|
| 627 | 627 | print '</td><td class="CTableRow2">'; |
| 628 | 628 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 629 | - print '<b>' . $creditor . '</b>'; |
|
| 630 | - print '<input type="hidden" name="creditor" value="' . $creditor . '">'; |
|
| 631 | - print '</td></tr>' . "\n"; |
|
| 629 | + print '<b>'.$creditor.'</b>'; |
|
| 630 | + print '<input type="hidden" name="creditor" value="'.$creditor.'">'; |
|
| 631 | + print '</td></tr>'."\n"; |
|
| 632 | 632 | |
| 633 | 633 | // Target |
| 634 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("ThirdParty"); |
|
| 634 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty"); |
|
| 635 | 635 | print '</td><td class="CTableRow2">'; |
| 636 | 636 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 637 | - print '<b>' . $object->thirdparty->name . '</b>'; |
|
| 638 | - print '</td></tr>' . "\n"; |
|
| 637 | + print '<b>'.$object->thirdparty->name.'</b>'; |
|
| 638 | + print '</td></tr>'."\n"; |
|
| 639 | 639 | |
| 640 | 640 | // Object |
| 641 | - $text = '<b>' . $langs->trans("Signature" . dol_ucfirst($source) . "Ref", $object->ref) . '</b>'; |
|
| 642 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Designation"); |
|
| 643 | - print '</td><td class="CTableRow2">' . $text; |
|
| 641 | + $text = '<b>'.$langs->trans("Signature".dol_ucfirst($source)."Ref", $object->ref).'</b>'; |
|
| 642 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation"); |
|
| 643 | + print '</td><td class="CTableRow2">'.$text; |
|
| 644 | 644 | |
| 645 | 645 | $last_main_doc_file = $object->last_main_doc; |
| 646 | 646 | $diroutput = $conf->societe->multidir_output[$object->thirdparty->entity].'/' |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 704 | 704 | // It seems document has never been generated, or was generated and then deleted. |
| 705 | 705 | // So we try to regenerate it with its default template. |
| 706 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 706 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 707 | 707 | $object->generateDocument($defaulttemplate, $langs); |
| 708 | 708 | } |
| 709 | 709 | $directdownloadlink = $object->getLastMainDocLink('', 0, 0); |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 753 | 753 | // It seems document has never been generated, or was generated and then deleted. |
| 754 | 754 | // So we try to regenerate it with its default template. |
| 755 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 755 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 756 | 756 | $object->generateDocument($defaulttemplate, $langs); |
| 757 | 757 | } |
| 758 | 758 | |
@@ -140,11 +140,11 @@ discard block |
||
| 140 | 140 | if (!$error) { |
| 141 | 141 | $db->begin(); |
| 142 | 142 | |
| 143 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "overwrite_trans set transkey = '" . $db->escape( |
|
| 143 | + $sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transkey = '".$db->escape( |
|
| 144 | 144 | $transkey |
| 145 | - ) . "', transvalue = '" . $db->escape($transvalue) . "', entity = '" . $db->escape( |
|
| 145 | + )."', transvalue = '".$db->escape($transvalue)."', entity = '".$db->escape( |
|
| 146 | 146 | $entity |
| 147 | - ) . "' WHERE rowid = " . ((int) GETPOST('rowid', 'int')); |
|
| 147 | + )."' WHERE rowid = ".((int) GETPOST('rowid', 'int')); |
|
| 148 | 148 | |
| 149 | 149 | $result = $db->query($sql); |
| 150 | 150 | if ($result) { |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | // Multi company |
| 413 | 413 | if (isModEnabled('multicompany') && !$user->entity) { |
| 414 | 414 | print '<td>'; |
| 415 | - print '<input type="text" class="quatrevingtpercent"' . $disablededit . ' name="entity" id="entity" value="' . (!empty($entity) ? $entity : "") . '">'; |
|
| 415 | + print '<input type="text" class="quatrevingtpercent"'.$disablededit.' name="entity" id="entity" value="'.(!empty($entity) ? $entity : "").'">'; |
|
| 416 | 416 | print '</td>'; |
| 417 | 417 | } |
| 418 | 418 | |
@@ -479,13 +479,13 @@ discard block |
||
| 479 | 479 | if (isModEnabled('multicompany') && empty($user->entity)) { |
| 480 | 480 | print '<td>'; |
| 481 | 481 | if ($action == 'edit' && $obj->rowid == GETPOSTINT('rowid')) { |
| 482 | - print '<input type="text" class="flat" size="1" name="entity" value="' . ((int) $obj->entity) . '">'; |
|
| 482 | + print '<input type="text" class="flat" size="1" name="entity" value="'.((int) $obj->entity).'">'; |
|
| 483 | 483 | } else { |
| 484 | 484 | print dol_escape_htmltag($obj->entity); |
| 485 | 485 | } |
| 486 | 486 | print '</td>'; |
| 487 | 487 | } else { |
| 488 | - print '<input type="hidden" name="const[' . $i . '][entity]" value="' . ((int) $obj->entity) . '">'; |
|
| 488 | + print '<input type="hidden" name="const['.$i.'][entity]" value="'.((int) $obj->entity).'">'; |
|
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | print '<td class="center">'; |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | $action = GETPOST('action', 'aZ09'); |
| 48 | 48 | $value = GETPOST('value', 'alpha'); |
| 49 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 49 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 50 | 50 | |
| 51 | 51 | $label = GETPOST('label', 'alpha'); |
| 52 | 52 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | if ($sql) { |
| 332 | 332 | // Test if the SQL is allowed SQL |
| 333 | 333 | if ($onlysqltoimportwebsite) { |
| 334 | - $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
| 334 | + $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
| 335 | 335 | |
| 336 | 336 | // Remove all strings contents including the ' so we can analyse SQL instruction only later |
| 337 | 337 | $l = strlen($newsql); |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | $extractphpold = ''; |
| 380 | 380 | |
| 381 | 381 | // Security analysis |
| 382 | - $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
| 382 | + $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
| 383 | 383 | if ($errorphpcheck) { |
| 384 | 384 | $error++; |
| 385 | 385 | //print 'Request '.($i + 1)." contains non allowed instructions.<br>\n"; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | dol_print_error(null, 'Error call dolibar_del_const with parameter name empty'); |
| 587 | 587 | return -1; |
| 588 | 588 | } |
| 589 | - if (! is_object($hookmanager)) { |
|
| 589 | + if (!is_object($hookmanager)) { |
|
| 590 | 590 | require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
| 591 | 591 | $hookmanager = new HookManager($db); |
| 592 | 592 | } |
@@ -681,12 +681,12 @@ discard block |
||
| 681 | 681 | dol_print_error($db, "Error: Call to function dolibarr_set_const with wrong parameters"); |
| 682 | 682 | exit; |
| 683 | 683 | } |
| 684 | - if (! is_object($hookmanager)) { |
|
| 684 | + if (!is_object($hookmanager)) { |
|
| 685 | 685 | require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
| 686 | 686 | $hookmanager = new HookManager($db); |
| 687 | 687 | } |
| 688 | 688 | |
| 689 | - $value = (string) $value; // We force type string (may be int) |
|
| 689 | + $value = (string) $value; // We force type string (may be int) |
|
| 690 | 690 | |
| 691 | 691 | $parameters = array( |
| 692 | 692 | 'name' => $name, |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | |
| 1129 | 1129 | if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session |
| 1130 | 1130 | (preg_match('/dol_entity\|i:('.$conf->entity.')/', $sessValues) || preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues)) && // limit to current entity |
| 1131 | - preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
| 1131 | + preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
| 1132 | 1132 | $tmp = explode('_', $file); |
| 1133 | 1133 | $idsess = $tmp[1]; |
| 1134 | 1134 | // We remove session if it's not ourself |
@@ -1944,7 +1944,7 @@ discard block |
||
| 1944 | 1944 | global $langs; |
| 1945 | 1945 | |
| 1946 | 1946 | $text = $langs->transnoentitiesnoconv("OnlyFollowingModulesAreOpenedToExternalUsers"); |
| 1947 | - $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
| 1947 | + $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
| 1948 | 1948 | |
| 1949 | 1949 | $i = 0; |
| 1950 | 1950 | if (!empty($modules)) { |
@@ -104,14 +104,14 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $maxfilesizearray = getMaxFileSizeArray(); |
| 106 | 106 | $maxmin = $maxfilesizearray['maxmin']; |
| 107 | - $fileformainimagesmall = getImageFileNameForSize($fileformainimage, '_small'); // This include the "thumbs/..." in path |
|
| 108 | - $fileformainimagemini = getImageFileNameForSize($fileformainimage, '_mini'); // This include the "thumbs/..." in path |
|
| 107 | + $fileformainimagesmall = getImageFileNameForSize($fileformainimage, '_small'); // This include the "thumbs/..." in path |
|
| 108 | + $fileformainimagemini = getImageFileNameForSize($fileformainimage, '_mini'); // This include the "thumbs/..." in path |
|
| 109 | 109 | |
| 110 | 110 | $out = ''; |
| 111 | 111 | |
| 112 | 112 | $out .= '<div class="centpercent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">'; |
| 113 | 113 | if ($maxmin > 0) { |
| 114 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 114 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 115 | 115 | } |
| 116 | 116 | $out .= '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="'.$htmlname.'" id="'.$htmlname.'" accept="image/*">'; |
| 117 | 117 | $out .= '</div>'; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $maxphptoshow = $maxfilesizearray['maxphptoshow']; |
| 242 | 242 | $maxphptoshowparam = $maxfilesizearray['maxphptoshowparam']; |
| 243 | 243 | if ($maxmin > 0) { |
| 244 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 244 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 245 | 245 | } |
| 246 | 246 | $out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"'; |
| 247 | 247 | $out .= ((getDolGlobalString('MAIN_DISABLE_MULTIPLE_FILEUPLOAD') || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple'); |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | |
| 929 | 929 | // Loop on each file found |
| 930 | 930 | if (is_array($file_list)) { |
| 931 | - '@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string}> $file_list'; // phan limitations loose typing information with empty() tests, etc. Force again. |
|
| 931 | + '@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string}> $file_list'; // phan limitations loose typing information with empty() tests, etc. Force again. |
|
| 932 | 932 | // Defined relative dir to DOL_DATA_ROOT |
| 933 | 933 | $relativedir = ''; |
| 934 | 934 | if ($filedir) { |
@@ -949,7 +949,7 @@ discard block |
||
| 949 | 949 | |
| 950 | 950 | '@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string,position_name:string,cover:string,keywords:string,acl:string,rowid:int,label:string,share:string}> $file_list'; |
| 951 | 951 | |
| 952 | - require_once DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php'; |
|
| 952 | + require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; |
|
| 953 | 953 | |
| 954 | 954 | $i = 0; |
| 955 | 955 | foreach ($file_list as $file) { |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | |
| 1216 | 1216 | $this->infofiles['nboffiles']++; |
| 1217 | 1217 | $this->infofiles['files'][] = $file['fullname']; |
| 1218 | - $ext = (string) pathinfo($file['name'], PATHINFO_EXTENSION); // pathinfo returns a string here (cast for static analysis) |
|
| 1218 | + $ext = (string) pathinfo($file['name'], PATHINFO_EXTENSION); // pathinfo returns a string here (cast for static analysis) |
|
| 1219 | 1219 | if (!array_key_exists($ext, $this->infofiles['extensions'])) { |
| 1220 | 1220 | $this->infofiles['extensions'][$ext] = 1; |
| 1221 | 1221 | } else { |
@@ -1501,7 +1501,7 @@ discard block |
||
| 1501 | 1501 | $modulepart = basename(dirname($file['path'])); |
| 1502 | 1502 | } |
| 1503 | 1503 | if (empty($relativepath)) { |
| 1504 | - $relativepath = preg_replace('/\/(.+)/', '', $filepath) . '/'; |
|
| 1504 | + $relativepath = preg_replace('/\/(.+)/', '', $filepath).'/'; |
|
| 1505 | 1505 | } |
| 1506 | 1506 | |
| 1507 | 1507 | $editline = 0; |
@@ -1780,7 +1780,7 @@ discard block |
||
| 1780 | 1780 | |
| 1781 | 1781 | if ($nboflines > 1 && is_object($object)) { |
| 1782 | 1782 | if (!empty($conf->use_javascript_ajax) && $permtoeditline) { |
| 1783 | - $table_element_line = 'ecm_files'; // used by ajaxrow.tpl.php |
|
| 1783 | + $table_element_line = 'ecm_files'; // used by ajaxrow.tpl.php |
|
| 1784 | 1784 | include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
| 1785 | 1785 | } |
| 1786 | 1786 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 104 | 104 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 105 | 105 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 106 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 106 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 107 | 107 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 108 | 108 | $search_datelimit_startday = GETPOSTINT('search_datelimit_startday'); |
| 109 | 109 | $search_datelimit_startmonth = GETPOSTINT('search_datelimit_startmonth'); |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | if ($searchCategoryProjectOperator == 0) { |
| 484 | 484 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
| 485 | 485 | } else { |
| 486 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
| 486 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
| 487 | 487 | } |
| 488 | 488 | } |
| 489 | 489 | } |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | // Direct jump if only one record found |
| 603 | 603 | if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) { |
| 604 | 604 | $obj = $db->fetch_object($resql); |
| 605 | - $id = $obj->id; // in select, task id has been aliases into 'id' |
|
| 605 | + $id = $obj->id; // in select, task id has been aliases into 'id' |
|
| 606 | 606 | header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withproject=1'); |
| 607 | 607 | exit; |
| 608 | 608 | } |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | // Output page |
| 612 | 612 | // -------------------------------------------------------------------- |
| 613 | 613 | |
| 614 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-project project-tasks page-list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 614 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-project project-tasks page-list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 615 | 615 | |
| 616 | 616 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 617 | 617 | |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | } |
| 854 | 854 | |
| 855 | 855 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 856 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 856 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 857 | 857 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 858 | 858 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 859 | 859 | |
@@ -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 |
@@ -362,10 +362,10 @@ discard block |
||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 365 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 365 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 366 | 366 | |
| 367 | 367 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 368 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 368 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 369 | 369 | |
| 370 | 370 | if ($result < 0) { |
| 371 | 371 | $langs->load("errors"); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | if (count($tasksarray) > 0) { |
| 386 | 386 | $id = $tasksarray[0]->id; |
| 387 | 387 | } else { |
| 388 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 388 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 389 | 389 | exit; |
| 390 | 390 | } |
| 391 | 391 | } |
@@ -423,9 +423,9 @@ discard block |
||
| 423 | 423 | if (!($projectstatic->thirdparty->id > 0)) { |
| 424 | 424 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 425 | 425 | } else { |
| 426 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 427 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 428 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 426 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 427 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 428 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 429 | 429 | |
| 430 | 430 | $tmpinvoice = new Facture($db); |
| 431 | 431 | $tmptimespent = new Task($db); |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $arrayoftasks = array(); |
| 492 | 492 | foreach ($toselect as $key => $value) { |
| 493 | 493 | // Get userid, timepent |
| 494 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 494 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 495 | 495 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 496 | 496 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 497 | 497 | } |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | } |
| 565 | 565 | |
| 566 | 566 | // Add lines |
| 567 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 567 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 568 | 568 | if ($lineid < 0) { |
| 569 | 569 | $error++; |
| 570 | 570 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -597,16 +597,16 @@ discard block |
||
| 597 | 597 | |
| 598 | 598 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 599 | 599 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 600 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 600 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 601 | 601 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 602 | 602 | |
| 603 | 603 | if (!empty($withdetail)) { |
| 604 | 604 | if (!empty($object->timespent_withhour)) { |
| 605 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 605 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 606 | 606 | } else { |
| 607 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 607 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 608 | 608 | } |
| 609 | - $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 | + $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)); |
|
| 610 | 610 | } |
| 611 | 611 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 612 | 612 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | $arrayoftasks = array(); |
| 685 | 685 | foreach ($toselect as $key => $value) { |
| 686 | 686 | // Get userid, timepent |
| 687 | - $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 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object) |
|
| 688 | 688 | // $object->id is now the task id |
| 689 | 689 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 690 | 690 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | // Add lines |
| 761 | 761 | $date_start = ''; |
| 762 | 762 | $date_end = ''; |
| 763 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 763 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 764 | 764 | $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); |
| 765 | 765 | if ($lineid < 0) { |
| 766 | 766 | $error++; |
@@ -770,8 +770,8 @@ discard block |
||
| 770 | 770 | |
| 771 | 771 | if (!$error) { |
| 772 | 772 | // Update lineid into line of timespent |
| 773 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 774 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 773 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 774 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 775 | 775 | $result = $db->query($sql); |
| 776 | 776 | if (!$result) { |
| 777 | 777 | $error++; |
@@ -807,12 +807,12 @@ discard block |
||
| 807 | 807 | if (!($projectstatic->thirdparty->id > 0)) { |
| 808 | 808 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 809 | 809 | } else { |
| 810 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 811 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 812 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 810 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 811 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 812 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 813 | 813 | |
| 814 | 814 | |
| 815 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 815 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 816 | 816 | $tmpinter = new Fichinter($db); |
| 817 | 817 | $tmptimespent = new Task($db); |
| 818 | 818 | $fuser = new User($db); |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 825 | 825 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 826 | 826 | $tmpinter->fk_project = $projectstatic->id; |
| 827 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 827 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 828 | 828 | |
| 829 | 829 | if ($interToUse) { |
| 830 | 830 | $tmpinter->fetch($interToUse); |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 858 | 858 | |
| 859 | 859 | // Add lines |
| 860 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
| 860 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
| 861 | 861 | } |
| 862 | 862 | } |
| 863 | 863 | |
@@ -888,9 +888,9 @@ discard block |
||
| 888 | 888 | //$result = $projectstatic->fetch($object->fk_project); |
| 889 | 889 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 890 | 890 | |
| 891 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 891 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 892 | 892 | if (!empty($withproject)) { |
| 893 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 893 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 894 | 894 | } |
| 895 | 895 | $help_url = ''; |
| 896 | 896 | |
@@ -939,13 +939,13 @@ discard block |
||
| 939 | 939 | |
| 940 | 940 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 941 | 941 | if ($search_user) { |
| 942 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 942 | + $param .= '&search_user='.((int) $search_user); |
|
| 943 | 943 | } |
| 944 | 944 | if ($search_month) { |
| 945 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 945 | + $param .= '&search_month='.((int) $search_month); |
|
| 946 | 946 | } |
| 947 | 947 | if ($search_year) { |
| 948 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 948 | + $param .= '&search_year='.((int) $search_year); |
|
| 949 | 949 | } |
| 950 | 950 | |
| 951 | 951 | // Project card |
@@ -957,14 +957,14 @@ discard block |
||
| 957 | 957 | $morehtmlref .= $projectstatic->title; |
| 958 | 958 | // Thirdparty |
| 959 | 959 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 960 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 960 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 961 | 961 | } |
| 962 | 962 | $morehtmlref .= '</div>'; |
| 963 | 963 | |
| 964 | 964 | // Define a complementary filter for search of next/prev ref. |
| 965 | 965 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 966 | 966 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 967 | - $projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 967 | + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 968 | 968 | } |
| 969 | 969 | |
| 970 | 970 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -982,25 +982,25 @@ discard block |
||
| 982 | 982 | print '</td>'; |
| 983 | 983 | print '<td>'; |
| 984 | 984 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 985 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 985 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 986 | 986 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 987 | 987 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 988 | 988 | print '<br>'; |
| 989 | 989 | } |
| 990 | 990 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 991 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 991 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 992 | 992 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 993 | 993 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 994 | 994 | print '<br>'; |
| 995 | 995 | } |
| 996 | 996 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 997 | - 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 | + 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"' : '')).'"> '; |
|
| 998 | 998 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 999 | 999 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 1000 | 1000 | print '<br>'; |
| 1001 | 1001 | } |
| 1002 | 1002 | if (isModEnabled('eventorganization')) { |
| 1003 | - 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 | + 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"' : '')).'"> '; |
|
| 1004 | 1004 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 1005 | 1005 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 1006 | 1006 | } |
@@ -1008,14 +1008,14 @@ discard block |
||
| 1008 | 1008 | } |
| 1009 | 1009 | |
| 1010 | 1010 | // Budget |
| 1011 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
| 1011 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
| 1012 | 1012 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
| 1013 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
| 1013 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
| 1014 | 1014 | } |
| 1015 | 1015 | print '</td></tr>'; |
| 1016 | 1016 | |
| 1017 | 1017 | // Date start - end project |
| 1018 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
| 1018 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
| 1019 | 1019 | $start = dol_print_date($projectstatic->date_start, 'day'); |
| 1020 | 1020 | print($start ? $start : '?'); |
| 1021 | 1021 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | print '</td></tr>'; |
| 1028 | 1028 | |
| 1029 | 1029 | // Visibility |
| 1030 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 1030 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1031 | 1031 | if ($projectstatic->public) { |
| 1032 | 1032 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1033 | 1033 | print $langs->trans('SharedProject'); |
@@ -1041,7 +1041,7 @@ discard block |
||
| 1041 | 1041 | $cols = 2; |
| 1042 | 1042 | $savobject = $object; |
| 1043 | 1043 | $object = $projectstatic; |
| 1044 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1044 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1045 | 1045 | $object = $savobject; |
| 1046 | 1046 | |
| 1047 | 1047 | print '</table>'; |
@@ -1054,7 +1054,7 @@ discard block |
||
| 1054 | 1054 | |
| 1055 | 1055 | // Categories |
| 1056 | 1056 | if (isModEnabled('category')) { |
| 1057 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1057 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1058 | 1058 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1059 | 1059 | print "</td></tr>"; |
| 1060 | 1060 | } |
@@ -1093,12 +1093,12 @@ discard block |
||
| 1093 | 1093 | |
| 1094 | 1094 | if (!empty($projectidforalltimes)) { |
| 1095 | 1095 | // We are on tab 'Time Spent' of project |
| 1096 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1097 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1096 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1097 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1098 | 1098 | } else { |
| 1099 | 1099 | // We are on tab 'Time Spent' of task |
| 1100 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1101 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1100 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1101 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1102 | 1102 | } |
| 1103 | 1103 | } else { |
| 1104 | 1104 | $linktocreatetimeBtnStatus = -2; |
@@ -1143,19 +1143,19 @@ discard block |
||
| 1143 | 1143 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
| 1144 | 1144 | |
| 1145 | 1145 | if ($action == 'deleteline') { |
| 1146 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1146 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1147 | 1147 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1148 | 1148 | } |
| 1149 | 1149 | |
| 1150 | 1150 | $param = ($withproject ? '&withproject=1' : ''); |
| 1151 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
| 1152 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
| 1151 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
| 1152 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
| 1153 | 1153 | |
| 1154 | 1154 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1155 | 1155 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1156 | - $object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId); |
|
| 1156 | + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); |
|
| 1157 | 1157 | } else { |
| 1158 | - $object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id); |
|
| 1158 | + $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); |
|
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | 1161 | $morehtmlref = ''; |
@@ -1163,12 +1163,12 @@ discard block |
||
| 1163 | 1163 | // Project |
| 1164 | 1164 | if (empty($withproject)) { |
| 1165 | 1165 | $morehtmlref .= '<div class="refidno">'; |
| 1166 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1166 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1167 | 1167 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1168 | 1168 | $morehtmlref .= '<br>'; |
| 1169 | 1169 | |
| 1170 | 1170 | // Third party |
| 1171 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1171 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1172 | 1172 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1173 | 1173 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1174 | 1174 | } |
@@ -1184,7 +1184,7 @@ discard block |
||
| 1184 | 1184 | print '<table class="border centpercent tableforfield">'; |
| 1185 | 1185 | |
| 1186 | 1186 | // Task parent |
| 1187 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
| 1187 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
| 1188 | 1188 | if ($object->fk_task_parent > 0) { |
| 1189 | 1189 | $tasktmp = new Task($db); |
| 1190 | 1190 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1193,7 +1193,7 @@ discard block |
||
| 1193 | 1193 | print '</td></tr>'; |
| 1194 | 1194 | |
| 1195 | 1195 | // Date start - Date end task |
| 1196 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1196 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1197 | 1197 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1198 | 1198 | print($start ? $start : '?'); |
| 1199 | 1199 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1205,7 +1205,7 @@ discard block |
||
| 1205 | 1205 | print '</td></tr>'; |
| 1206 | 1206 | |
| 1207 | 1207 | // Planned workload |
| 1208 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1208 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1209 | 1209 | if ($object->planned_workload) { |
| 1210 | 1210 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1211 | 1211 | } |
@@ -1220,21 +1220,21 @@ discard block |
||
| 1220 | 1220 | print '<table class="border tableforfield centpercent">'; |
| 1221 | 1221 | |
| 1222 | 1222 | // Progress declared |
| 1223 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1224 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1223 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1224 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1225 | 1225 | print '</td></tr>'; |
| 1226 | 1226 | |
| 1227 | 1227 | // Progress calculated |
| 1228 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1228 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1229 | 1229 | if ($object->planned_workload) { |
| 1230 | 1230 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1231 | 1231 | if ($tmparray['total_duration'] > 0) { |
| 1232 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1232 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1233 | 1233 | } else { |
| 1234 | 1234 | print '0 %'; |
| 1235 | 1235 | } |
| 1236 | 1236 | } else { |
| 1237 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1237 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1238 | 1238 | } |
| 1239 | 1239 | print '</td>'; |
| 1240 | 1240 | |
@@ -1250,7 +1250,7 @@ discard block |
||
| 1250 | 1250 | print dol_get_fiche_end(); |
| 1251 | 1251 | } else { |
| 1252 | 1252 | if ($action == 'deleteline') { |
| 1253 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1253 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1254 | 1254 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1255 | 1255 | } |
| 1256 | 1256 | } |
@@ -1264,7 +1264,7 @@ discard block |
||
| 1264 | 1264 | |
| 1265 | 1265 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
| 1266 | 1266 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
| 1267 | - $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 | + $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); |
|
| 1268 | 1268 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1269 | 1269 | } |
| 1270 | 1270 | |
@@ -1283,10 +1283,10 @@ discard block |
||
| 1283 | 1283 | // Definition of fields for list |
| 1284 | 1284 | $arrayfields = array(); |
| 1285 | 1285 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => '1'); |
| 1286 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => '1'); |
|
| 1286 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => '1'); |
|
| 1287 | 1287 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1288 | 1288 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1289 | - if (! empty($allprojectforuser)) { |
|
| 1289 | + if (!empty($allprojectforuser)) { |
|
| 1290 | 1290 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => '1']; |
| 1291 | 1291 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => '1']; |
| 1292 | 1292 | } |
@@ -1302,83 +1302,83 @@ discard block |
||
| 1302 | 1302 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => '1', 'enabled' => (string) (int) isModEnabled("salaries")); |
| 1303 | 1303 | $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)); |
| 1304 | 1304 | // Extra fields |
| 1305 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1305 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1306 | 1306 | |
| 1307 | 1307 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1308 | 1308 | // '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
| 1309 | 1309 | |
| 1310 | 1310 | $param = ''; |
| 1311 | 1311 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 1312 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 1312 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 1313 | 1313 | } |
| 1314 | 1314 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 1315 | 1315 | $param .= '&limit='.((int) $limit); |
| 1316 | 1316 | } |
| 1317 | 1317 | if ($search_month > 0) { |
| 1318 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
| 1318 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1319 | 1319 | } |
| 1320 | 1320 | if ($search_year > 0) { |
| 1321 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1321 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
| 1322 | 1322 | } |
| 1323 | 1323 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
| 1324 | 1324 | $param .= '&search_user='.urlencode($search_user); |
| 1325 | 1325 | } |
| 1326 | 1326 | if ($search_task_ref != '') { |
| 1327 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
| 1327 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
| 1328 | 1328 | } |
| 1329 | 1329 | if ($search_company != '') { |
| 1330 | - $param .= '&$search_company=' . urlencode($search_company); |
|
| 1330 | + $param .= '&$search_company='.urlencode($search_company); |
|
| 1331 | 1331 | } |
| 1332 | 1332 | if ($search_company_alias != '') { |
| 1333 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
| 1333 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
| 1334 | 1334 | } |
| 1335 | 1335 | if ($search_project_ref != '') { |
| 1336 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
| 1336 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
| 1337 | 1337 | } |
| 1338 | 1338 | if ($search_project_label != '') { |
| 1339 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
| 1339 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
| 1340 | 1340 | } |
| 1341 | 1341 | if ($search_task_label != '') { |
| 1342 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
| 1342 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
| 1343 | 1343 | } |
| 1344 | 1344 | if ($search_note != '') { |
| 1345 | - $param .= '&search_note=' . urlencode($search_note); |
|
| 1345 | + $param .= '&search_note='.urlencode($search_note); |
|
| 1346 | 1346 | } |
| 1347 | 1347 | if ($search_duration != '') { |
| 1348 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
| 1348 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
| 1349 | 1349 | } |
| 1350 | 1350 | if ($optioncss != '') { |
| 1351 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 1351 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 1352 | 1352 | } |
| 1353 | 1353 | if ($search_date_startday) { |
| 1354 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
| 1354 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1355 | 1355 | } |
| 1356 | 1356 | if ($search_date_startmonth) { |
| 1357 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1357 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1358 | 1358 | } |
| 1359 | 1359 | if ($search_date_startyear) { |
| 1360 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1360 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1361 | 1361 | } |
| 1362 | 1362 | if ($search_date_endday) { |
| 1363 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1363 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1364 | 1364 | } |
| 1365 | 1365 | if ($search_date_endmonth) { |
| 1366 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1366 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1367 | 1367 | } |
| 1368 | 1368 | if ($search_date_endyear) { |
| 1369 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1369 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1370 | 1370 | } |
| 1371 | 1371 | if ($search_timespent_starthour) { |
| 1372 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1372 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1373 | 1373 | } |
| 1374 | 1374 | if ($search_timespent_startmin) { |
| 1375 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1375 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1376 | 1376 | } |
| 1377 | 1377 | if ($search_timespent_endhour) { |
| 1378 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1378 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1379 | 1379 | } |
| 1380 | 1380 | if ($search_timespent_endmin) { |
| 1381 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1381 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
| 1382 | 1382 | } |
| 1383 | 1383 | |
| 1384 | 1384 | /* |
@@ -1386,24 +1386,24 @@ discard block |
||
| 1386 | 1386 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
| 1387 | 1387 | */ |
| 1388 | 1388 | if ($id) { |
| 1389 | - $param .= '&id=' . urlencode((string) ($id)); |
|
| 1389 | + $param .= '&id='.urlencode((string) ($id)); |
|
| 1390 | 1390 | } |
| 1391 | 1391 | if ($projectid) { |
| 1392 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1392 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1393 | 1393 | } |
| 1394 | 1394 | if ($withproject) { |
| 1395 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1395 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
| 1396 | 1396 | } |
| 1397 | 1397 | // Add $param from hooks |
| 1398 | 1398 | $parameters = array('param' => &$param); |
| 1399 | 1399 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 1400 | 1400 | $param .= $hookmanager->resPrint; |
| 1401 | 1401 | |
| 1402 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 1402 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 1403 | 1403 | if ($optioncss != '') { |
| 1404 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 1404 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 1405 | 1405 | } |
| 1406 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1406 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1407 | 1407 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 1408 | 1408 | if ($action == 'editline') { |
| 1409 | 1409 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1418,13 +1418,13 @@ discard block |
||
| 1418 | 1418 | } else { |
| 1419 | 1419 | print '<input type="hidden" name="action" value="list">'; |
| 1420 | 1420 | } |
| 1421 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 1422 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 1421 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 1422 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 1423 | 1423 | |
| 1424 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
| 1425 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
| 1426 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
| 1427 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
| 1424 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
| 1425 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
| 1426 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
| 1427 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
| 1428 | 1428 | print '<input type="hidden" name="page_y" value="">'; |
| 1429 | 1429 | |
| 1430 | 1430 | // Form to convert time spent into invoice |
@@ -1451,7 +1451,7 @@ discard block |
||
| 1451 | 1451 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
| 1452 | 1452 | ); |
| 1453 | 1453 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
| 1454 | - print "\n" . '<script type="text/javascript">'; |
|
| 1454 | + print "\n".'<script type="text/javascript">'; |
|
| 1455 | 1455 | print ' |
| 1456 | 1456 | $(document).ready(function () { |
| 1457 | 1457 | setDetailVisibility(); |
@@ -1468,8 +1468,8 @@ discard block |
||
| 1468 | 1468 | } |
| 1469 | 1469 | }); |
| 1470 | 1470 | '; |
| 1471 | - print '</script>' . "\n"; |
|
| 1472 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
| 1471 | + print '</script>'."\n"; |
|
| 1472 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
| 1473 | 1473 | print '</td>'; |
| 1474 | 1474 | print '</tr>'; |
| 1475 | 1475 | |
@@ -1519,14 +1519,14 @@ discard block |
||
| 1519 | 1519 | |
| 1520 | 1520 | print '<br>'; |
| 1521 | 1521 | print '<div class="center">'; |
| 1522 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
| 1523 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1522 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
| 1523 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1524 | 1524 | print '</div>'; |
| 1525 | 1525 | print '<br>'; |
| 1526 | 1526 | } else { |
| 1527 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
| 1527 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
| 1528 | 1528 | print '<div class="center">'; |
| 1529 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1529 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1530 | 1530 | print '</div>'; |
| 1531 | 1531 | $massaction = ''; |
| 1532 | 1532 | } |
@@ -1539,7 +1539,7 @@ discard block |
||
| 1539 | 1539 | print '<table class="noborder centpercent">'; |
| 1540 | 1540 | print '<tr>'; |
| 1541 | 1541 | print '<td class="titlefield">'; |
| 1542 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
| 1542 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
| 1543 | 1543 | print '</td>'; |
| 1544 | 1544 | print '<td>'; |
| 1545 | 1545 | $forminter = new FormIntervention($db); |
@@ -1549,14 +1549,14 @@ discard block |
||
| 1549 | 1549 | print '</table>'; |
| 1550 | 1550 | |
| 1551 | 1551 | print '<div class="center">'; |
| 1552 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
| 1553 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1552 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
| 1553 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1554 | 1554 | print '</div>'; |
| 1555 | 1555 | print '<br>'; |
| 1556 | 1556 | } else { |
| 1557 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
| 1557 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
| 1558 | 1558 | print '<div class="center">'; |
| 1559 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1559 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1560 | 1560 | print '</div>'; |
| 1561 | 1561 | $massaction = ''; |
| 1562 | 1562 | } |
@@ -1626,14 +1626,14 @@ discard block |
||
| 1626 | 1626 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1627 | 1627 | } elseif (!empty($projectidforalltimes)) { |
| 1628 | 1628 | // Limit on one project |
| 1629 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")"; |
|
| 1629 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize((string) $projectidforalltimes).")"; |
|
| 1630 | 1630 | } elseif (!empty($allprojectforuser)) { |
| 1631 | 1631 | // Limit on on user |
| 1632 | 1632 | if (empty($search_user)) { |
| 1633 | 1633 | $search_user = $user->id; |
| 1634 | 1634 | } |
| 1635 | 1635 | if ($search_user > 0) { |
| 1636 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1636 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1637 | 1637 | } |
| 1638 | 1638 | } |
| 1639 | 1639 | |
@@ -1686,13 +1686,13 @@ discard block |
||
| 1686 | 1686 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1687 | 1687 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1688 | 1688 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1689 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1689 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1690 | 1690 | } |
| 1691 | 1691 | |
| 1692 | 1692 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1693 | 1693 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1694 | 1694 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1695 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1695 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1696 | 1696 | } |
| 1697 | 1697 | } |
| 1698 | 1698 | |
@@ -1740,13 +1740,13 @@ discard block |
||
| 1740 | 1740 | |
| 1741 | 1741 | if ($num >= 0) { |
| 1742 | 1742 | if (!empty($projectidforalltimes)) { |
| 1743 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1743 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1744 | 1744 | |
| 1745 | 1745 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1746 | 1746 | |
| 1747 | 1747 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1748 | 1748 | } else { |
| 1749 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1749 | + print '<!-- List of time spent -->'."\n"; |
|
| 1750 | 1750 | |
| 1751 | 1751 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1752 | 1752 | |
@@ -1768,26 +1768,26 @@ discard block |
||
| 1768 | 1768 | * Form to add a new line of time spent |
| 1769 | 1769 | */ |
| 1770 | 1770 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1771 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1771 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1772 | 1772 | if (!empty($id)) { |
| 1773 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1773 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1774 | 1774 | } |
| 1775 | 1775 | |
| 1776 | 1776 | 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 |
| 1777 | 1777 | print '<table class="noborder nohover centpercent">'; |
| 1778 | 1778 | |
| 1779 | 1779 | print '<tr class="liste_titre">'; |
| 1780 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1780 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1781 | 1781 | if (!empty($allprojectforuser)) { |
| 1782 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1782 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1783 | 1783 | } |
| 1784 | 1784 | if (empty($id)) { |
| 1785 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1785 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1786 | 1786 | } |
| 1787 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1788 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1789 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1790 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1787 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1788 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1789 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1790 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1791 | 1791 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1792 | 1792 | print '<td></td>'; |
| 1793 | 1793 | |
@@ -1841,14 +1841,14 @@ discard block |
||
| 1841 | 1841 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, null, 0, '', $contactsofproject, '0', 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1842 | 1842 | } else { |
| 1843 | 1843 | if ($nboftasks) { |
| 1844 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1844 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1845 | 1845 | } |
| 1846 | 1846 | } |
| 1847 | 1847 | print '</td>'; |
| 1848 | 1848 | |
| 1849 | 1849 | // Note |
| 1850 | 1850 | print '<td>'; |
| 1851 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1851 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1852 | 1852 | print '</td>'; |
| 1853 | 1853 | |
| 1854 | 1854 | // Duration - Time spent |
@@ -1916,7 +1916,7 @@ discard block |
||
| 1916 | 1916 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1917 | 1917 | |
| 1918 | 1918 | print '<div class="div-table-responsive">'; |
| 1919 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1919 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1920 | 1920 | |
| 1921 | 1921 | // Fields title search |
| 1922 | 1922 | // -------------------------------------------------------------------- |
@@ -1941,20 +1941,20 @@ discard block |
||
| 1941 | 1941 | } |
| 1942 | 1942 | // Thirdparty |
| 1943 | 1943 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1944 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1944 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1945 | 1945 | } |
| 1946 | 1946 | |
| 1947 | 1947 | // Thirdparty alias |
| 1948 | 1948 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1949 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1949 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1950 | 1950 | } |
| 1951 | 1951 | |
| 1952 | 1952 | if (!empty($allprojectforuser)) { |
| 1953 | 1953 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1954 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1954 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1955 | 1955 | } |
| 1956 | 1956 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1957 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1957 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1958 | 1958 | } |
| 1959 | 1959 | } |
| 1960 | 1960 | // Task |
@@ -1972,7 +1972,7 @@ discard block |
||
| 1972 | 1972 | } |
| 1973 | 1973 | // Note |
| 1974 | 1974 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1975 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1975 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1976 | 1976 | } |
| 1977 | 1977 | // Duration |
| 1978 | 1978 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1983,7 +1983,7 @@ discard block |
||
| 1983 | 1983 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1984 | 1984 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1985 | 1985 | } |
| 1986 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1986 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1987 | 1987 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 1988 | 1988 | print '</div>'; |
| 1989 | 1989 | |
@@ -1991,7 +1991,7 @@ discard block |
||
| 1991 | 1991 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1992 | 1992 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 1993 | 1993 | } |
| 1994 | - print '<div class="nowraponall">' . $langs->trans('to') . ' '; |
|
| 1994 | + print '<div class="nowraponall">'.$langs->trans('to').' '; |
|
| 1995 | 1995 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 1996 | 1996 | print '</div>'; |
| 1997 | 1997 | |
@@ -2007,7 +2007,7 @@ discard block |
||
| 2007 | 2007 | } |
| 2008 | 2008 | // Value billed |
| 2009 | 2009 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 2010 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 2010 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 2011 | 2011 | } |
| 2012 | 2012 | |
| 2013 | 2013 | /* |
@@ -2025,7 +2025,7 @@ discard block |
||
| 2025 | 2025 | print $searchpicto; |
| 2026 | 2026 | print '</td>'; |
| 2027 | 2027 | } |
| 2028 | - print '</tr>' . "\n"; |
|
| 2028 | + print '</tr>'."\n"; |
|
| 2029 | 2029 | |
| 2030 | 2030 | |
| 2031 | 2031 | $totalarray = array(); |
@@ -2143,7 +2143,7 @@ discard block |
||
| 2143 | 2143 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2144 | 2144 | print '<td class="center nowraponall">'; |
| 2145 | 2145 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2146 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2146 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2147 | 2147 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2148 | 2148 | print '<br>'; |
| 2149 | 2149 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2154,7 +2154,7 @@ discard block |
||
| 2154 | 2154 | print '</a>'; |
| 2155 | 2155 | |
| 2156 | 2156 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2157 | - 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' : '') . '">'; |
|
| 2157 | + 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' : '').'">'; |
|
| 2158 | 2158 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2159 | 2159 | print '</a>'; |
| 2160 | 2160 | } |
@@ -2172,12 +2172,12 @@ discard block |
||
| 2172 | 2172 | |
| 2173 | 2173 | // Disable select if task not billable or already invoiced |
| 2174 | 2174 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2175 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2175 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2176 | 2176 | if ($disabled) { |
| 2177 | 2177 | // If disabled, a dbl-click very close outside the control |
| 2178 | 2178 | // will re-enable it, so that user is not blocked if needed. |
| 2179 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2180 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2179 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2180 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2181 | 2181 | } else { |
| 2182 | 2182 | print $ctrl; |
| 2183 | 2183 | } |
@@ -2300,7 +2300,7 @@ discard block |
||
| 2300 | 2300 | } |
| 2301 | 2301 | } |
| 2302 | 2302 | } elseif ($action !== 'createtime') { |
| 2303 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2303 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2304 | 2304 | } |
| 2305 | 2305 | |
| 2306 | 2306 | // Task label |
@@ -2329,9 +2329,9 @@ discard block |
||
| 2329 | 2329 | } |
| 2330 | 2330 | if (count($contactsoftask) > 0) { |
| 2331 | 2331 | print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"'); |
| 2332 | - 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 |
|
| 2332 | + 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 |
|
| 2333 | 2333 | } else { |
| 2334 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2334 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2335 | 2335 | } |
| 2336 | 2336 | } else { |
| 2337 | 2337 | $userstatic->id = $task_time->fk_user; |
@@ -2353,7 +2353,7 @@ discard block |
||
| 2353 | 2353 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2354 | 2354 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2355 | 2355 | print '<td class="small">'; |
| 2356 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2356 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2357 | 2357 | print '</td>'; |
| 2358 | 2358 | } else { |
| 2359 | 2359 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2364,7 +2364,7 @@ discard block |
||
| 2364 | 2364 | $totalarray['nbfield']++; |
| 2365 | 2365 | } |
| 2366 | 2366 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2367 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2367 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2368 | 2368 | } |
| 2369 | 2369 | |
| 2370 | 2370 | // Time spent |
@@ -2425,7 +2425,7 @@ discard block |
||
| 2425 | 2425 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2426 | 2426 | |
| 2427 | 2427 | print '<td class="nowraponall right">'; |
| 2428 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2428 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2429 | 2429 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2430 | 2430 | print '</span>'; |
| 2431 | 2431 | print '</td>'; |
@@ -2481,7 +2481,7 @@ discard block |
||
| 2481 | 2481 | } |
| 2482 | 2482 | } |
| 2483 | 2483 | } else { |
| 2484 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2484 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2485 | 2485 | } |
| 2486 | 2486 | } |
| 2487 | 2487 | print '</td>'; |
@@ -2515,7 +2515,7 @@ discard block |
||
| 2515 | 2515 | print '</a>'; |
| 2516 | 2516 | |
| 2517 | 2517 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2518 | - 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' : '') . '">'; |
|
| 2518 | + 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' : '').'">'; |
|
| 2519 | 2519 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2520 | 2520 | print '</a>'; |
| 2521 | 2521 | } |
@@ -2533,12 +2533,12 @@ discard block |
||
| 2533 | 2533 | |
| 2534 | 2534 | // Disable select if task not billable or already invoiced |
| 2535 | 2535 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2536 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2536 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2537 | 2537 | if ($disabled) { |
| 2538 | 2538 | // If disabled, a dbl-click very close outside the control |
| 2539 | 2539 | // will re-enable it, so that user is not blocked if needed. |
| 2540 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2541 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2540 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2541 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2542 | 2542 | } else { |
| 2543 | 2543 | print $ctrl; |
| 2544 | 2544 | } |
@@ -2637,7 +2637,7 @@ discard block |
||
| 2637 | 2637 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2638 | 2638 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask); |
| 2639 | 2639 | } else { |
| 2640 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2640 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2641 | 2641 | } |
| 2642 | 2642 | } else { |
| 2643 | 2643 | $userstatic->id = $task_time->fk_user; |
@@ -2654,13 +2654,13 @@ discard block |
||
| 2654 | 2654 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2655 | 2655 | print '<td class="tdoverflowmax300">'; |
| 2656 | 2656 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2657 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2657 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2658 | 2658 | } else { |
| 2659 | 2659 | print dol_nl2br($task_time->note); |
| 2660 | 2660 | } |
| 2661 | 2661 | print '</td>'; |
| 2662 | 2662 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2663 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_2 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2663 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_2.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2664 | 2664 | } |
| 2665 | 2665 | |
| 2666 | 2666 | // Time spent |
@@ -2802,7 +2802,7 @@ discard block |
||
| 2802 | 2802 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2803 | 2803 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, null, 0, '', $contactsoftask); |
| 2804 | 2804 | } else { |
| 2805 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2805 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2806 | 2806 | } |
| 2807 | 2807 | } else { |
| 2808 | 2808 | $userstatic->id = $task_time->fk_user; |
@@ -2819,13 +2819,13 @@ discard block |
||
| 2819 | 2819 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2820 | 2820 | print '<td class="small tdoverflowmax300"">'; |
| 2821 | 2821 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2822 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2822 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2823 | 2823 | } else { |
| 2824 | 2824 | print dol_nl2br($task_time->note); |
| 2825 | 2825 | } |
| 2826 | 2826 | print '</td>'; |
| 2827 | 2827 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2828 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2828 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2829 | 2829 | } |
| 2830 | 2830 | |
| 2831 | 2831 | // Time spent |
@@ -2899,14 +2899,14 @@ discard block |
||
| 2899 | 2899 | $i++; |
| 2900 | 2900 | if ($i == 1) { |
| 2901 | 2901 | if ($num < $limit && empty($offset)) { |
| 2902 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2902 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2903 | 2903 | } else { |
| 2904 | 2904 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2905 | 2905 | } |
| 2906 | 2906 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2907 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2907 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2908 | 2908 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2909 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2909 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2910 | 2910 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2911 | 2911 | } else { |
| 2912 | 2912 | print '<td></td>'; |
@@ -2922,8 +2922,8 @@ discard block |
||
| 2922 | 2922 | $totalnboffields++; |
| 2923 | 2923 | } |
| 2924 | 2924 | } |
| 2925 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2926 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2925 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2926 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2927 | 2927 | print '</td></tr>'; |
| 2928 | 2928 | } |
| 2929 | 2929 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $confirm = GETPOST('confirm', 'alpha'); |
| 60 | 60 | $cancel = GETPOST('cancel', 'aZ09'); |
| 61 | 61 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projecttasklist'; |
| 62 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 62 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 63 | 63 | //$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
| 64 | 64 | //$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 65 | 65 | $optioncss = GETPOST('optioncss', 'aZ'); |
@@ -103,20 +103,20 @@ discard block |
||
| 103 | 103 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
| 104 | 104 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
| 105 | 105 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
| 106 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 106 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 107 | 107 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
| 108 | 108 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
| 109 | 109 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
| 110 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 110 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 111 | 111 | |
| 112 | 112 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
| 113 | 113 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
| 114 | 114 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 115 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 115 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 116 | 116 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 117 | 117 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 118 | 118 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 119 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 119 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 120 | 120 | |
| 121 | 121 | //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects |
| 122 | 122 | |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
| 566 | 566 | } |
| 567 | 567 | if ($search_date_end_end) { |
| 568 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
| 568 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
| 569 | 569 | } |
| 570 | 570 | if ($search_planedworkload) { |
| 571 | 571 | $param .= '&search_planedworkload='.urlencode($search_planedworkload); |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 612 | 612 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 613 | 613 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 614 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 614 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 615 | 615 | } else { |
| 616 | 616 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
| 617 | 617 | } |
@@ -781,8 +781,8 @@ discard block |
||
| 781 | 781 | |
| 782 | 782 | $defaultref = ''; |
| 783 | 783 | $classnamemodtask = getDolGlobalString('PROJECT_TASK_ADDON', 'mod_task_simple'); |
| 784 | - if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 785 | - require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 784 | + if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 785 | + require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 786 | 786 | $modTask = new $classnamemodtask(); |
| 787 | 787 | '@phan-var-force ModeleNumRefTask $modTask'; |
| 788 | 788 | $defaultref = $modTask->getNextValue($object->thirdparty, $object); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $search_deliverymonth = ''; |
| 150 | 150 | $search_deliveryyear = ''; |
| 151 | 151 | |
| 152 | -$search_import_key = trim(GETPOST("search_import_key", "alpha")); |
|
| 152 | +$search_import_key = trim(GETPOST("search_import_key", "alpha")); |
|
| 153 | 153 | |
| 154 | 154 | $diroutputmassaction = $conf->order->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id; |
| 155 | 155 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | 'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55), |
| 217 | 217 | 'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60, 'csslist' => 'nowraponall'), |
| 218 | 218 | 'c.delivery_date' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65, 'csslist' => 'nowraponall'), |
| 219 | - 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled("shipping")), |
|
| 219 | + 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66, 'enabled' => isModEnabled("shipping")), |
|
| 220 | 220 | 'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67), |
| 221 | 221 | 'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68), |
| 222 | 222 | 'c.fk_input_reason' => array('label' => "Origin", 'checked' => -1, 'position' => 69), |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | 'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130), |
| 240 | 240 | 'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position' => 135, 'searchall' => 1), |
| 241 | 241 | 'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position' => 140), |
| 242 | - 'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled("shipping")), 'position' => 990), |
|
| 242 | + 'shippable' => array('label' => "Shippable", 'checked' => 1, 'enabled' => (isModEnabled("shipping")), 'position' => 990), |
|
| 243 | 243 | 'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995), |
| 244 | 244 | 'c.import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 999), |
| 245 | 245 | 'c.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000) |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 260 | 260 | //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); |
| 261 | 261 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 262 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 262 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 263 | 263 | |
| 264 | 264 | |
| 265 | 265 | // Security check |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | if (empty($objecttmp->note_public)) { |
| 433 | - $objecttmp->note_public = $langs->transnoentities("Orders"); |
|
| 433 | + $objecttmp->note_public = $langs->transnoentities("Orders"); |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | $datefacture = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | $db->rollback(); |
| 756 | 756 | |
| 757 | 757 | $action = 'create'; |
| 758 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
| 758 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
| 759 | 759 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
| 760 | 760 | if (!empty($errors)) { |
| 761 | 761 | setEventMessages(null, $errors, 'errors'); |
@@ -1130,7 +1130,7 @@ discard block |
||
| 1130 | 1130 | if ($searchCategoryCustomerOperator == 0) { |
| 1131 | 1131 | $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).")"; |
| 1132 | 1132 | } else { |
| 1133 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
| 1133 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
| 1134 | 1134 | } |
| 1135 | 1135 | } |
| 1136 | 1136 | } |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | if ($searchCategoryProductOperator == 0) { |
| 1161 | 1161 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 1162 | 1162 | } else { |
| 1163 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 1163 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 1164 | 1164 | } |
| 1165 | 1165 | } |
| 1166 | 1166 | } |
@@ -1621,7 +1621,7 @@ discard block |
||
| 1621 | 1621 | } |
| 1622 | 1622 | |
| 1623 | 1623 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 1624 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1624 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1625 | 1625 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 1626 | 1626 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1627 | 1627 | |
@@ -2793,15 +2793,15 @@ discard block |
||
| 2793 | 2793 | if (!empty($show_shippable_command) && isModEnabled('stock')) { |
| 2794 | 2794 | $text_icon = ''; |
| 2795 | 2795 | if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) { |
| 2796 | - $generic_commande->getLinesArray(); // Load array ->lines |
|
| 2797 | - $generic_commande->loadExpeditions(); // Load array ->expeditions |
|
| 2796 | + $generic_commande->getLinesArray(); // Load array ->lines |
|
| 2797 | + $generic_commande->loadExpeditions(); // Load array ->expeditions |
|
| 2798 | 2798 | |
| 2799 | 2799 | $numlines = count($generic_commande->lines); // Loop on each line of order |
| 2800 | 2800 | for ($lig = 0; $lig < $numlines; $lig++) { |
| 2801 | 2801 | $orderLine = $generic_commande->lines[$lig]; |
| 2802 | 2802 | '@phan-var-force OrderLine $orderLine'; |
| 2803 | 2803 | if (isset($generic_commande->expeditions[$orderLine->id])) { |
| 2804 | - $reliquat = $orderLine->qty - $generic_commande->expeditions[$orderLine->id]; |
|
| 2804 | + $reliquat = $orderLine->qty - $generic_commande->expeditions[$orderLine->id]; |
|
| 2805 | 2805 | } else { |
| 2806 | 2806 | $reliquat = $orderLine->qty; |
| 2807 | 2807 | } |