@@ -27,12 +27,12 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $sapi_type = php_sapi_name(); |
| 29 | 29 | $script_file = basename(__FILE__); |
| 30 | -$path = dirname(__FILE__) . '/'; |
|
| 30 | +$path = dirname(__FILE__).'/'; |
|
| 31 | 31 | |
| 32 | 32 | // Test si mode batch |
| 33 | 33 | $sapi_type = php_sapi_name(); |
| 34 | 34 | if (substr($sapi_type, 0, 3) == 'cgi') { |
| 35 | - echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n"; |
|
| 35 | + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; |
|
| 36 | 36 | exit(); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $outputpath = $argv[1]; |
| 62 | 62 | $outputdir = dirname($outputpath); |
| 63 | 63 | $outputfile = basename($outputpath); |
| 64 | -$outputfilerss = preg_replace('/\.\w+$/i', '', $outputfile).'-security.rss'; // Replace the .html by -security.rss |
|
| 64 | +$outputfilerss = preg_replace('/\.\w+$/i', '', $outputfile).'-security.rss'; // Replace the .html by -security.rss |
|
| 65 | 65 | |
| 66 | 66 | if (!is_dir($outputdir)) { |
| 67 | 67 | print 'Error: dir '.$outputdir.' does not exists or is not writable'."\n"; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // PHAN setup. Configuration is required, otherwise phan is disabled. |
| 104 | 104 | $PHAN_CONFIG = "{$path}phan/config_extended.php"; |
| 105 | -$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
| 105 | +$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
| 106 | 106 | $PHAN_MIN_PHP = "7.0"; |
| 107 | 107 | $PHAN_MEMORY_OPT = "--memory-limit 5G"; |
| 108 | 108 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Get technical debt with Phan |
| 159 | 159 | $output_arrverphan = array(); |
| 160 | 160 | if ($dirphpstan != 'disabled') { |
| 161 | - $commandcheck = ($dir_phan ? $dir_phan.DIRECTORY_SEPARATOR : '') .'phan --version'; |
|
| 161 | + $commandcheck = ($dir_phan ? $dir_phan.DIRECTORY_SEPARATOR : '').'phan --version'; |
|
| 162 | 162 | print 'Execute Phan to get the version: '.$commandcheck."\n"; |
| 163 | 163 | $resexecverphan = 0; |
| 164 | 164 | exec($commandcheck, $output_arrverphan, $resexecverphan); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | var_dump($arrayofalerts[$alreadyfoundcommitid]['branch']); |
| 351 | 351 | var_dump($tmpval);*/ |
| 352 | 352 | |
| 353 | - $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case. |
|
| 353 | + $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case. |
|
| 354 | 354 | |
| 355 | 355 | if (empty($arrayofalerts[$alreadyfoundcommitid]['issueid']) && !empty($tmpval['issueid'])) { // If not Github was defined, we set it. |
| 356 | 356 | $arrayofalerts[$alreadyfoundcommitid]['issueid'] = $tmpval['issueid']; |
@@ -952,8 +952,8 @@ discard block |
||
| 952 | 952 | fwrite($fh, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); |
| 953 | 953 | fwrite($fh, '<rss version="2.0">'."\n"); |
| 954 | 954 | fwrite($fh, '<channel>'."\n"); |
| 955 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
| 956 | - fwrite($fh, '<description>' . htmlspecialchars("Feed of the latest security reports on the project") . '</description>'."\n"); |
|
| 955 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
| 956 | + fwrite($fh, '<description>'.htmlspecialchars("Feed of the latest security reports on the project").'</description>'."\n"); |
|
| 957 | 957 | //fwrite($fh, '<atom:link href="https://cti.dolibarr.org/index-security.rss" rel="self" type="application/rss+xml" />'."\n"); |
| 958 | 958 | fwrite($fh, '<language>en-US</language>'."\n"); |
| 959 | 959 | fwrite($fh, '<lastBuildDate>'.date('r').'</lastBuildDate>'."\n"); |
@@ -962,14 +962,14 @@ discard block |
||
| 962 | 962 | <atom:link href="https://cti.dolibarr.org/security-index.rss" rel="self" type="application/rss+xml" /> |
| 963 | 963 | */ |
| 964 | 964 | if ($url_site) { |
| 965 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
| 965 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
| 966 | 966 | } |
| 967 | 967 | // Image |
| 968 | 968 | fwrite($fh, '<image>'."\n"); |
| 969 | 969 | fwrite($fh, '<url>https://www.dolibarr.org/medias/image/www.dolibarr.org/badge-openssf.png</url>'."\n"); |
| 970 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
| 970 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
| 971 | 971 | if ($url_site) { |
| 972 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
| 972 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
| 973 | 973 | } |
| 974 | 974 | fwrite($fh, '</image>'."\n"); |
| 975 | 975 | |
@@ -977,13 +977,13 @@ discard block |
||
| 977 | 977 | $alert['url_commit'] = 'https://github.com/Dolibarr/dolibarr/commit/'.$alert['commitid']; |
| 978 | 978 | |
| 979 | 979 | fwrite($fh, '<item>'."\n"); |
| 980 | - fwrite($fh, '<title>' . htmlspecialchars($alert['title']) . '</title>'."\n"); |
|
| 980 | + fwrite($fh, '<title>'.htmlspecialchars($alert['title']).'</title>'."\n"); |
|
| 981 | 981 | // Description of alert, list of links to sources and branches of fixes |
| 982 | - fwrite($fh, '<description>' . $alert['description'] . '</description>'."\n"); // no htmlspeciachars here |
|
| 983 | - fwrite($fh, '<link>' . htmlspecialchars($alert['url_commit']) . '</link>'."\n"); |
|
| 982 | + fwrite($fh, '<description>'.$alert['description'].'</description>'."\n"); // no htmlspeciachars here |
|
| 983 | + fwrite($fh, '<link>'.htmlspecialchars($alert['url_commit']).'</link>'."\n"); |
|
| 984 | 984 | $tmpdate = strtotime($alert['created_at']); |
| 985 | - fwrite($fh, '<pubDate>' . htmlspecialchars(date('r', $tmpdate)) . '</pubDate>'."\n"); |
|
| 986 | - fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
| 985 | + fwrite($fh, '<pubDate>'.htmlspecialchars(date('r', $tmpdate)).'</pubDate>'."\n"); |
|
| 986 | + fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
| 987 | 987 | |
| 988 | 988 | fwrite($fh, '</item>'."\n"); |
| 989 | 989 | } |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | $action = GETPOST('action', 'aZ09'); |
| 47 | 47 | $confirm = GETPOST('confirm', 'alpha'); |
| 48 | 48 | |
| 49 | -$id = GETPOSTINT('id'); // Id of task |
|
| 50 | -$ref = GETPOST('ref', 'alpha'); // Ref of task |
|
| 49 | +$id = GETPOSTINT('id'); // Id of task |
|
| 50 | +$ref = GETPOST('ref', 'alpha'); // Ref of task |
|
| 51 | 51 | $withproject = GETPOSTINT('withproject'); |
| 52 | 52 | $project_ref = GETPOST('project_ref', 'alpha'); |
| 53 | 53 | |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | $userstatic = new User($db); |
| 169 | 169 | $result = $projectstatic->fetch($object->fk_project); |
| 170 | 170 | |
| 171 | -$title = $object->ref . ' - ' . $langs->trans("Contacts"); |
|
| 171 | +$title = $object->ref.' - '.$langs->trans("Contacts"); |
|
| 172 | 172 | if (!empty($withproject)) { |
| 173 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; |
|
| 173 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 174 | 174 | } |
| 175 | 175 | $help_url = ''; |
| 176 | 176 | |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | $cols = 2; |
| 303 | 303 | $savobject = $object; |
| 304 | 304 | $object = $projectstatic; |
| 305 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 305 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 306 | 306 | $object = $savobject; |
| 307 | 307 | |
| 308 | 308 | print '</table>'; |
@@ -44,14 +44,14 @@ discard block |
||
| 44 | 44 | ' |
| 45 | 45 | @phan-var-force ?string $uploaddir |
| 46 | 46 | '; |
| 47 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 48 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
| 49 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 50 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 52 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 53 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 54 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
| 47 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 48 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
| 49 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 53 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 54 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
| 55 | 55 | |
| 56 | 56 | // Load translation files required by the page |
| 57 | 57 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 72 | 72 | $mode = GETPOST('mode', 'alpha'); |
| 73 | 73 | |
| 74 | -$id = GETPOSTINT('id'); // Id of task |
|
| 75 | -$ref = GETPOST('ref', 'alpha'); // Ref of task |
|
| 76 | -$projectid = GETPOSTINT('projectid'); // Id of project |
|
| 77 | -$lineid = GETPOSTINT('lineid'); // Id of time spent line |
|
| 74 | +$id = GETPOSTINT('id'); // Id of task |
|
| 75 | +$ref = GETPOST('ref', 'alpha'); // Ref of task |
|
| 76 | +$projectid = GETPOSTINT('projectid'); // Id of project |
|
| 77 | +$lineid = GETPOSTINT('lineid'); // Id of time spent line |
|
| 78 | 78 | $withproject = GETPOSTINT('withproject'); |
| 79 | 79 | $project_ref = GETPOST('project_ref', 'alpha'); |
| 80 | 80 | $tab = GETPOST('tab', 'aZ09'); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 184 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 185 | 185 | |
| 186 | 186 | // Purge search criteria |
| 187 | 187 | 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 |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | if (!$error) { |
| 294 | 294 | if ($id && GETPOSTINT('taskid') != $id) { // GETPOSTINT('taskid') is the id of new task |
| 295 | - $id_temp = GETPOSTINT('taskid'); // should not overwrite $id |
|
| 295 | + $id_temp = GETPOSTINT('taskid'); // should not overwrite $id |
|
| 296 | 296 | |
| 297 | 297 | $object->fetchTimeSpent($lineid); |
| 298 | 298 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | } |
| 328 | 328 | } |
| 329 | 329 | } else { |
| 330 | - $object->fetch($id, $ref); // $object is Task |
|
| 330 | + $object->fetch($id, $ref); // $object is Task |
|
| 331 | 331 | |
| 332 | 332 | $object->fetchTimeSpent(GETPOSTINT('lineid')); |
| 333 | 333 | |
@@ -370,10 +370,10 @@ discard block |
||
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 373 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 373 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 374 | 374 | |
| 375 | 375 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 376 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 376 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 377 | 377 | |
| 378 | 378 | if ($result < 0) { |
| 379 | 379 | $langs->load("errors"); |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | if (count($tasksarray) > 0) { |
| 394 | 394 | $id = $tasksarray[0]->id; |
| 395 | 395 | } else { |
| 396 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 396 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 397 | 397 | exit; |
| 398 | 398 | } |
| 399 | 399 | } |
@@ -432,9 +432,9 @@ discard block |
||
| 432 | 432 | if (!($projectstatic->thirdparty->id > 0)) { |
| 433 | 433 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 434 | 434 | } else { |
| 435 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 436 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 437 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 435 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 436 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 437 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 438 | 438 | |
| 439 | 439 | $tmpinvoice = new Facture($db); |
| 440 | 440 | $tmptimespent = new Task($db); |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | $arrayoftasks = array(); |
| 501 | 501 | foreach ($toselect as $key => $value) { |
| 502 | 502 | // Get userid, timepent |
| 503 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 503 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 504 | 504 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 505 | 505 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 506 | 506 | } |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | // Add lines |
| 576 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 576 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject); |
|
| 577 | 577 | if ($lineid < 0) { |
| 578 | 578 | $error++; |
| 579 | 579 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -606,16 +606,16 @@ discard block |
||
| 606 | 606 | |
| 607 | 607 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 608 | 608 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 609 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 609 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 610 | 610 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 611 | 611 | |
| 612 | 612 | if (!empty($withdetail)) { |
| 613 | 613 | if (!empty($object->timespent_withhour)) { |
| 614 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 614 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 615 | 615 | } else { |
| 616 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 616 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 617 | 617 | } |
| 618 | - $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)); |
|
| 618 | + $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)); |
|
| 619 | 619 | } |
| 620 | 620 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 621 | 621 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | $arrayoftasks = array(); |
| 694 | 694 | foreach ($toselect as $key => $value) { |
| 695 | 695 | // Get userid, timepent |
| 696 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object) |
|
| 696 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object) |
|
| 697 | 697 | // $object->id is now the task id |
| 698 | 698 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 699 | 699 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -769,7 +769,7 @@ discard block |
||
| 769 | 769 | // Add lines |
| 770 | 770 | $date_start = ''; |
| 771 | 771 | $date_end = ''; |
| 772 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 772 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 773 | 773 | $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); |
| 774 | 774 | if ($lineid < 0) { |
| 775 | 775 | $error++; |
@@ -779,8 +779,8 @@ discard block |
||
| 779 | 779 | |
| 780 | 780 | if (!$error) { |
| 781 | 781 | // Update lineid into line of timespent |
| 782 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 783 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 782 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 783 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 784 | 784 | $result = $db->query($sql); |
| 785 | 785 | if (!$result) { |
| 786 | 786 | $error++; |
@@ -816,12 +816,12 @@ discard block |
||
| 816 | 816 | if (!($projectstatic->thirdparty->id > 0)) { |
| 817 | 817 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 818 | 818 | } else { |
| 819 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 820 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 821 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 819 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 820 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 821 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 822 | 822 | |
| 823 | 823 | |
| 824 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 824 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 825 | 825 | $tmpinter = new Fichinter($db); |
| 826 | 826 | $tmptimespent = new Task($db); |
| 827 | 827 | $fuser = new User($db); |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 834 | 834 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 835 | 835 | $tmpinter->fk_project = $projectstatic->id; |
| 836 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 836 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 837 | 837 | |
| 838 | 838 | if ($interToUse) { |
| 839 | 839 | $tmpinter->fetch($interToUse); |
@@ -866,7 +866,7 @@ discard block |
||
| 866 | 866 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 867 | 867 | |
| 868 | 868 | // Add lines |
| 869 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), (int) $value['date'], $value['timespent']); |
|
| 869 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), (int) $value['date'], $value['timespent']); |
|
| 870 | 870 | |
| 871 | 871 | if ($lineid > 0) { |
| 872 | 872 | // Link timespent to intervention |
@@ -910,9 +910,9 @@ discard block |
||
| 910 | 910 | //$result = $projectstatic->fetch($object->fk_project); |
| 911 | 911 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 912 | 912 | |
| 913 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 913 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 914 | 914 | if (!empty($withproject)) { |
| 915 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 915 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 916 | 916 | } |
| 917 | 917 | $help_url = ''; |
| 918 | 918 | |
@@ -921,13 +921,13 @@ discard block |
||
| 921 | 921 | |
| 922 | 922 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 923 | 923 | if ($search_user) { |
| 924 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 924 | + $param .= '&search_user='.((int) $search_user); |
|
| 925 | 925 | } |
| 926 | 926 | if ($search_month) { |
| 927 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 927 | + $param .= '&search_month='.((int) $search_month); |
|
| 928 | 928 | } |
| 929 | 929 | if ($search_year) { |
| 930 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 930 | + $param .= '&search_year='.((int) $search_year); |
|
| 931 | 931 | } |
| 932 | 932 | |
| 933 | 933 | |
@@ -979,14 +979,14 @@ discard block |
||
| 979 | 979 | $morehtmlref .= $projectstatic->title; |
| 980 | 980 | // Thirdparty |
| 981 | 981 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 982 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 982 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 983 | 983 | } |
| 984 | 984 | $morehtmlref .= '</div>'; |
| 985 | 985 | |
| 986 | 986 | // Define a complementary filter for search of next/prev ref. |
| 987 | 987 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 988 | 988 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 989 | - $projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 989 | + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); |
|
| 990 | 990 | } |
| 991 | 991 | |
| 992 | 992 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -1004,25 +1004,25 @@ discard block |
||
| 1004 | 1004 | print '</td>'; |
| 1005 | 1005 | print '<td>'; |
| 1006 | 1006 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 1007 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 1007 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 1008 | 1008 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 1009 | 1009 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 1010 | 1010 | print '<br>'; |
| 1011 | 1011 | } |
| 1012 | 1012 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 1013 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 1013 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 1014 | 1014 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 1015 | 1015 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 1016 | 1016 | print '<br>'; |
| 1017 | 1017 | } |
| 1018 | 1018 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1019 | - 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"' : '')) . '"> '; |
|
| 1019 | + 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"' : '')).'"> '; |
|
| 1020 | 1020 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 1021 | 1021 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 1022 | 1022 | print '<br>'; |
| 1023 | 1023 | } |
| 1024 | 1024 | if (isModEnabled('eventorganization')) { |
| 1025 | - 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"' : '')) . '"> '; |
|
| 1025 | + 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"' : '')).'"> '; |
|
| 1026 | 1026 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 1027 | 1027 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 1028 | 1028 | } |
@@ -1030,14 +1030,14 @@ discard block |
||
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | 1032 | // Budget |
| 1033 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
| 1033 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
| 1034 | 1034 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
| 1035 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
| 1035 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
| 1036 | 1036 | } |
| 1037 | 1037 | print '</td></tr>'; |
| 1038 | 1038 | |
| 1039 | 1039 | // Date start - end project |
| 1040 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
| 1040 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
| 1041 | 1041 | $start = dol_print_date($projectstatic->date_start, 'day'); |
| 1042 | 1042 | print($start ? $start : '?'); |
| 1043 | 1043 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1049,7 +1049,7 @@ discard block |
||
| 1049 | 1049 | print '</td></tr>'; |
| 1050 | 1050 | |
| 1051 | 1051 | // Visibility |
| 1052 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 1052 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1053 | 1053 | if ($projectstatic->public) { |
| 1054 | 1054 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1055 | 1055 | print $langs->trans('SharedProject'); |
@@ -1063,7 +1063,7 @@ discard block |
||
| 1063 | 1063 | $cols = 2; |
| 1064 | 1064 | $savobject = $object; |
| 1065 | 1065 | $object = $projectstatic; |
| 1066 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1066 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1067 | 1067 | $object = $savobject; |
| 1068 | 1068 | |
| 1069 | 1069 | print '</table>'; |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | |
| 1077 | 1077 | // Categories |
| 1078 | 1078 | if (isModEnabled('category')) { |
| 1079 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1079 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1080 | 1080 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1081 | 1081 | print "</td></tr>"; |
| 1082 | 1082 | } |
@@ -1113,12 +1113,12 @@ discard block |
||
| 1113 | 1113 | |
| 1114 | 1114 | if (!empty($projectidforalltimes)) { |
| 1115 | 1115 | // We are on tab 'Time Spent' of project |
| 1116 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1117 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1116 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1117 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1118 | 1118 | } else { |
| 1119 | 1119 | // We are on tab 'Time Spent' of task |
| 1120 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1121 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1120 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1121 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1122 | 1122 | } |
| 1123 | 1123 | } else { |
| 1124 | 1124 | $linktocreatetimeBtnStatus = -2; |
@@ -1167,15 +1167,15 @@ discard block |
||
| 1167 | 1167 | $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
| 1168 | 1168 | |
| 1169 | 1169 | if ($action == 'deleteline') { |
| 1170 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . $param; |
|
| 1170 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").$param; |
|
| 1171 | 1171 | $formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | 1174 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1175 | 1175 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1176 | - $object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId); |
|
| 1176 | + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); |
|
| 1177 | 1177 | } else { |
| 1178 | - $object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id); |
|
| 1178 | + $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); |
|
| 1179 | 1179 | } |
| 1180 | 1180 | |
| 1181 | 1181 | $morehtmlref = ''; |
@@ -1183,12 +1183,12 @@ discard block |
||
| 1183 | 1183 | // Project |
| 1184 | 1184 | if (empty($withproject)) { |
| 1185 | 1185 | $morehtmlref .= '<div class="refidno">'; |
| 1186 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1186 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1187 | 1187 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1188 | 1188 | $morehtmlref .= '<br>'; |
| 1189 | 1189 | |
| 1190 | 1190 | // Third party |
| 1191 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1191 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1192 | 1192 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1193 | 1193 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1194 | 1194 | } |
@@ -1204,7 +1204,7 @@ discard block |
||
| 1204 | 1204 | print '<table class="border centpercent tableforfield">'; |
| 1205 | 1205 | |
| 1206 | 1206 | // Task parent |
| 1207 | - print '<tr><td>' . $langs->trans("ParentTask") . '</td><td>'; |
|
| 1207 | + print '<tr><td>'.$langs->trans("ParentTask").'</td><td>'; |
|
| 1208 | 1208 | if ($object->fk_task_parent > 0) { |
| 1209 | 1209 | $tasktmp = new Task($db); |
| 1210 | 1210 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | print '</td></tr>'; |
| 1214 | 1214 | |
| 1215 | 1215 | // Date start - Date end task |
| 1216 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1216 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1217 | 1217 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1218 | 1218 | print($start ? $start : '?'); |
| 1219 | 1219 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1225,7 +1225,7 @@ discard block |
||
| 1225 | 1225 | print '</td></tr>'; |
| 1226 | 1226 | |
| 1227 | 1227 | // Planned workload |
| 1228 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1228 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1229 | 1229 | if ($object->planned_workload) { |
| 1230 | 1230 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1231 | 1231 | } |
@@ -1240,21 +1240,21 @@ discard block |
||
| 1240 | 1240 | print '<table class="border tableforfield centpercent">'; |
| 1241 | 1241 | |
| 1242 | 1242 | // Progress declared |
| 1243 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1244 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1243 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1244 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1245 | 1245 | print '</td></tr>'; |
| 1246 | 1246 | |
| 1247 | 1247 | // Progress calculated |
| 1248 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1248 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1249 | 1249 | if ($object->planned_workload) { |
| 1250 | 1250 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1251 | 1251 | if ($tmparray['total_duration'] > 0) { |
| 1252 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1252 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1253 | 1253 | } else { |
| 1254 | 1254 | print '0 %'; |
| 1255 | 1255 | } |
| 1256 | 1256 | } else { |
| 1257 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1257 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1258 | 1258 | } |
| 1259 | 1259 | print '</td>'; |
| 1260 | 1260 | |
@@ -1270,7 +1270,7 @@ discard block |
||
| 1270 | 1270 | print dol_get_fiche_end(); |
| 1271 | 1271 | } else { |
| 1272 | 1272 | if ($action == 'deleteline') { |
| 1273 | - $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).$param; |
|
| 1273 | + $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).$param; |
|
| 1274 | 1274 | $formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1275 | 1275 | } |
| 1276 | 1276 | } |
@@ -1295,10 +1295,10 @@ discard block |
||
| 1295 | 1295 | // Definition of fields for list |
| 1296 | 1296 | $arrayfields = array(); |
| 1297 | 1297 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => '1'); |
| 1298 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => '1'); |
|
| 1298 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => '1'); |
|
| 1299 | 1299 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1300 | 1300 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1301 | - if (! empty($allprojectforuser)) { |
|
| 1301 | + if (!empty($allprojectforuser)) { |
|
| 1302 | 1302 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => '1']; |
| 1303 | 1303 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => '1']; |
| 1304 | 1304 | } |
@@ -1314,13 +1314,13 @@ discard block |
||
| 1314 | 1314 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => '1', 'enabled' => (string) (int) isModEnabled("salaries")); |
| 1315 | 1315 | $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)); |
| 1316 | 1316 | // Extra fields |
| 1317 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1317 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1318 | 1318 | |
| 1319 | 1319 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1320 | 1320 | |
| 1321 | 1321 | $param = ''; |
| 1322 | 1322 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 1323 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 1323 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 1324 | 1324 | } |
| 1325 | 1325 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 1326 | 1326 | $param .= '&limit='.((int) $limit); |
@@ -1329,91 +1329,91 @@ discard block |
||
| 1329 | 1329 | $param .= '&id='.((int) $id); |
| 1330 | 1330 | } |
| 1331 | 1331 | if ($search_month > 0) { |
| 1332 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
| 1332 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1333 | 1333 | } |
| 1334 | 1334 | if ($search_year > 0) { |
| 1335 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1335 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
| 1336 | 1336 | } |
| 1337 | 1337 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
| 1338 | 1338 | $param .= '&search_user='.urlencode($search_user); |
| 1339 | 1339 | } |
| 1340 | 1340 | if ($search_task_ref != '') { |
| 1341 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
| 1341 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
| 1342 | 1342 | } |
| 1343 | 1343 | if ($search_company != '') { |
| 1344 | - $param .= '&search_company=' . urlencode($search_company); |
|
| 1344 | + $param .= '&search_company='.urlencode($search_company); |
|
| 1345 | 1345 | } |
| 1346 | 1346 | if ($search_company_alias != '') { |
| 1347 | - $param .= '&search_company_alias=' . urlencode($search_company_alias); |
|
| 1347 | + $param .= '&search_company_alias='.urlencode($search_company_alias); |
|
| 1348 | 1348 | } |
| 1349 | 1349 | if ($search_project_ref != '') { |
| 1350 | - $param .= '&search_project_ref=' . urlencode($search_project_ref); |
|
| 1350 | + $param .= '&search_project_ref='.urlencode($search_project_ref); |
|
| 1351 | 1351 | } |
| 1352 | 1352 | if ($search_project_label != '') { |
| 1353 | - $param .= '&search_project_label=' . urlencode($search_project_label); |
|
| 1353 | + $param .= '&search_project_label='.urlencode($search_project_label); |
|
| 1354 | 1354 | } |
| 1355 | 1355 | if ($search_task_label != '') { |
| 1356 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
| 1356 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
| 1357 | 1357 | } |
| 1358 | 1358 | if ($search_note != '') { |
| 1359 | - $param .= '&search_note=' . urlencode($search_note); |
|
| 1359 | + $param .= '&search_note='.urlencode($search_note); |
|
| 1360 | 1360 | } |
| 1361 | 1361 | if ($search_duration != '') { |
| 1362 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
| 1362 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
| 1363 | 1363 | } |
| 1364 | 1364 | if ($optioncss != '') { |
| 1365 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 1365 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 1366 | 1366 | } |
| 1367 | 1367 | if ($search_date_startday) { |
| 1368 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
| 1368 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1369 | 1369 | } |
| 1370 | 1370 | if ($search_date_startmonth) { |
| 1371 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1371 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1372 | 1372 | } |
| 1373 | 1373 | if ($search_date_startyear) { |
| 1374 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1374 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1375 | 1375 | } |
| 1376 | 1376 | if ($search_date_endday) { |
| 1377 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1377 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1378 | 1378 | } |
| 1379 | 1379 | if ($search_date_endmonth) { |
| 1380 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1380 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1381 | 1381 | } |
| 1382 | 1382 | if ($search_date_endyear) { |
| 1383 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1383 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1384 | 1384 | } |
| 1385 | 1385 | if ($search_timespent_starthour) { |
| 1386 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1386 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1387 | 1387 | } |
| 1388 | 1388 | if ($search_timespent_startmin) { |
| 1389 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1389 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1390 | 1390 | } |
| 1391 | 1391 | if ($search_timespent_endhour) { |
| 1392 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1392 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1393 | 1393 | } |
| 1394 | 1394 | if ($search_timespent_endmin) { |
| 1395 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1395 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
| 1396 | 1396 | } |
| 1397 | 1397 | /* |
| 1398 | 1398 | // Add $param from extra fields |
| 1399 | 1399 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
| 1400 | 1400 | */ |
| 1401 | 1401 | if ($projectid) { |
| 1402 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1402 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1403 | 1403 | } |
| 1404 | 1404 | if ($withproject) { |
| 1405 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1405 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
| 1406 | 1406 | } |
| 1407 | 1407 | // Add $param from hooks |
| 1408 | 1408 | $parameters = array('param' => &$param); |
| 1409 | 1409 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 1410 | 1410 | $param .= $hookmanager->resPrint; |
| 1411 | 1411 | |
| 1412 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 1412 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 1413 | 1413 | if ($optioncss != '') { |
| 1414 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 1414 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 1415 | 1415 | } |
| 1416 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1416 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1417 | 1417 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 1418 | 1418 | if ($action == 'editline') { |
| 1419 | 1419 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1428,12 +1428,12 @@ discard block |
||
| 1428 | 1428 | } else { |
| 1429 | 1429 | print '<input type="hidden" name="action" value="list">'; |
| 1430 | 1430 | } |
| 1431 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 1432 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 1431 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 1432 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 1433 | 1433 | |
| 1434 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
| 1435 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
| 1436 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
| 1434 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
| 1435 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
| 1436 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
| 1437 | 1437 | print '<input type="hidden" name="page_y" value="">'; |
| 1438 | 1438 | |
| 1439 | 1439 | // Form to convert time spent into invoice |
@@ -1460,7 +1460,7 @@ discard block |
||
| 1460 | 1460 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
| 1461 | 1461 | ); |
| 1462 | 1462 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
| 1463 | - print "\n" . '<script type="text/javascript">'; |
|
| 1463 | + print "\n".'<script type="text/javascript">'; |
|
| 1464 | 1464 | print ' |
| 1465 | 1465 | $(document).ready(function () { |
| 1466 | 1466 | setDetailVisibility(); |
@@ -1477,8 +1477,8 @@ discard block |
||
| 1477 | 1477 | } |
| 1478 | 1478 | }); |
| 1479 | 1479 | '; |
| 1480 | - print '</script>' . "\n"; |
|
| 1481 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
| 1480 | + print '</script>'."\n"; |
|
| 1481 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
| 1482 | 1482 | print '</td>'; |
| 1483 | 1483 | print '</tr>'; |
| 1484 | 1484 | |
@@ -1528,14 +1528,14 @@ discard block |
||
| 1528 | 1528 | |
| 1529 | 1529 | print '<br>'; |
| 1530 | 1530 | print '<div class="center">'; |
| 1531 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
| 1532 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1531 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
| 1532 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1533 | 1533 | print '</div>'; |
| 1534 | 1534 | print '<br>'; |
| 1535 | 1535 | } else { |
| 1536 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
| 1536 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
| 1537 | 1537 | print '<div class="center">'; |
| 1538 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1538 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1539 | 1539 | print '</div>'; |
| 1540 | 1540 | $massaction = ''; |
| 1541 | 1541 | } |
@@ -1548,7 +1548,7 @@ discard block |
||
| 1548 | 1548 | print '<table class="noborder centpercent">'; |
| 1549 | 1549 | print '<tr>'; |
| 1550 | 1550 | print '<td class="titlefield">'; |
| 1551 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
| 1551 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
| 1552 | 1552 | print '</td>'; |
| 1553 | 1553 | print '<td>'; |
| 1554 | 1554 | $forminter = new FormIntervention($db); |
@@ -1558,14 +1558,14 @@ discard block |
||
| 1558 | 1558 | print '</table>'; |
| 1559 | 1559 | |
| 1560 | 1560 | print '<div class="center">'; |
| 1561 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
| 1562 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1561 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
| 1562 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1563 | 1563 | print '</div>'; |
| 1564 | 1564 | print '<br>'; |
| 1565 | 1565 | } else { |
| 1566 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
| 1566 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
| 1567 | 1567 | print '<div class="center">'; |
| 1568 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1568 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1569 | 1569 | print '</div>'; |
| 1570 | 1570 | $massaction = ''; |
| 1571 | 1571 | } |
@@ -1635,14 +1635,14 @@ discard block |
||
| 1635 | 1635 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1636 | 1636 | } elseif (!empty($projectidforalltimes)) { |
| 1637 | 1637 | // Limit on one project |
| 1638 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")"; |
|
| 1638 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize((string) $projectidforalltimes).")"; |
|
| 1639 | 1639 | } elseif (!empty($allprojectforuser)) { |
| 1640 | 1640 | // Limit on on user |
| 1641 | 1641 | if (empty($search_user) && !empty($arrayfields['author']['checked'])) { |
| 1642 | 1642 | $search_user = $user->id; |
| 1643 | 1643 | } |
| 1644 | 1644 | if ($search_user > 0) { |
| 1645 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1645 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1646 | 1646 | } |
| 1647 | 1647 | } |
| 1648 | 1648 | |
@@ -1695,13 +1695,13 @@ discard block |
||
| 1695 | 1695 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1696 | 1696 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1697 | 1697 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1698 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1698 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1699 | 1699 | } |
| 1700 | 1700 | |
| 1701 | 1701 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1702 | 1702 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1703 | 1703 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1704 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1704 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1705 | 1705 | } |
| 1706 | 1706 | } |
| 1707 | 1707 | |
@@ -1749,13 +1749,13 @@ discard block |
||
| 1749 | 1749 | |
| 1750 | 1750 | if ($num >= 0) { |
| 1751 | 1751 | if (!empty($projectidforalltimes)) { |
| 1752 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1752 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1753 | 1753 | |
| 1754 | 1754 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1755 | 1755 | |
| 1756 | 1756 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1757 | 1757 | } else { |
| 1758 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1758 | + print '<!-- List of time spent -->'."\n"; |
|
| 1759 | 1759 | |
| 1760 | 1760 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1761 | 1761 | |
@@ -1779,26 +1779,26 @@ discard block |
||
| 1779 | 1779 | * Form to add a new line of time spent |
| 1780 | 1780 | */ |
| 1781 | 1781 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1782 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1782 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1783 | 1783 | if (!empty($id)) { |
| 1784 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1784 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1785 | 1785 | } |
| 1786 | 1786 | |
| 1787 | 1787 | 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 |
| 1788 | 1788 | print '<table class="noborder nohover centpercent">'; |
| 1789 | 1789 | |
| 1790 | 1790 | print '<tr class="liste_titre">'; |
| 1791 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1791 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1792 | 1792 | if (!empty($allprojectforuser)) { |
| 1793 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1793 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1794 | 1794 | } |
| 1795 | 1795 | if (empty($id)) { |
| 1796 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1796 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1797 | 1797 | } |
| 1798 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1799 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1800 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1801 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1798 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1799 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1800 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1801 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1802 | 1802 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1803 | 1803 | print '<td></td>'; |
| 1804 | 1804 | |
@@ -1852,14 +1852,14 @@ discard block |
||
| 1852 | 1852 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, null, 0, '', $contactsofproject, '0', 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1853 | 1853 | } else { |
| 1854 | 1854 | if ($nboftasks) { |
| 1855 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1855 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1856 | 1856 | } |
| 1857 | 1857 | } |
| 1858 | 1858 | print '</td>'; |
| 1859 | 1859 | |
| 1860 | 1860 | // Note |
| 1861 | 1861 | print '<td>'; |
| 1862 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1862 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1863 | 1863 | print '</td>'; |
| 1864 | 1864 | |
| 1865 | 1865 | // Duration - Time spent |
@@ -1928,7 +1928,7 @@ discard block |
||
| 1928 | 1928 | |
| 1929 | 1929 | print '<!-- Liste of time spent -->'."\n"; |
| 1930 | 1930 | print '<div class="div-table-responsive">'; |
| 1931 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1931 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1932 | 1932 | |
| 1933 | 1933 | // Fields title search |
| 1934 | 1934 | // -------------------------------------------------------------------- |
@@ -1953,20 +1953,20 @@ discard block |
||
| 1953 | 1953 | } |
| 1954 | 1954 | // Thirdparty |
| 1955 | 1955 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1956 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1956 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1957 | 1957 | } |
| 1958 | 1958 | |
| 1959 | 1959 | // Thirdparty alias |
| 1960 | 1960 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1961 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1961 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1962 | 1962 | } |
| 1963 | 1963 | |
| 1964 | 1964 | if (!empty($allprojectforuser)) { |
| 1965 | 1965 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1966 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1966 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1967 | 1967 | } |
| 1968 | 1968 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1969 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1969 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1970 | 1970 | } |
| 1971 | 1971 | } |
| 1972 | 1972 | // Task |
@@ -1984,7 +1984,7 @@ discard block |
||
| 1984 | 1984 | } |
| 1985 | 1985 | // Note |
| 1986 | 1986 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1987 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1987 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1988 | 1988 | } |
| 1989 | 1989 | // Duration |
| 1990 | 1990 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1995,7 +1995,7 @@ discard block |
||
| 1995 | 1995 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1996 | 1996 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1997 | 1997 | } |
| 1998 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1998 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1999 | 1999 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 2000 | 2000 | print '</div>'; |
| 2001 | 2001 | |
@@ -2003,7 +2003,7 @@ discard block |
||
| 2003 | 2003 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 2004 | 2004 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 2005 | 2005 | } |
| 2006 | - print '<div class="nowraponall">' . $langs->trans('to') . ' '; |
|
| 2006 | + print '<div class="nowraponall">'.$langs->trans('to').' '; |
|
| 2007 | 2007 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 2008 | 2008 | print '</div>'; |
| 2009 | 2009 | |
@@ -2019,7 +2019,7 @@ discard block |
||
| 2019 | 2019 | } |
| 2020 | 2020 | // Value billed |
| 2021 | 2021 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 2022 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 2022 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 2023 | 2023 | } |
| 2024 | 2024 | |
| 2025 | 2025 | /* |
@@ -2037,7 +2037,7 @@ discard block |
||
| 2037 | 2037 | print $searchpicto; |
| 2038 | 2038 | print '</td>'; |
| 2039 | 2039 | } |
| 2040 | - print '</tr>' . "\n"; |
|
| 2040 | + print '</tr>'."\n"; |
|
| 2041 | 2041 | |
| 2042 | 2042 | |
| 2043 | 2043 | $totalarray = array(); |
@@ -2155,9 +2155,9 @@ discard block |
||
| 2155 | 2155 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2156 | 2156 | print '<td class="center nowraponall">'; |
| 2157 | 2157 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2158 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2158 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2159 | 2159 | if ($id) { |
| 2160 | - print '<input type="hidden" name="id" value="' . $id . '">'; // If you enable this, the edit will go beack to task view |
|
| 2160 | + print '<input type="hidden" name="id" value="'.$id.'">'; // If you enable this, the edit will go beack to task view |
|
| 2161 | 2161 | } |
| 2162 | 2162 | print '<input type="submit" class="button buttongen reposition smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2163 | 2163 | print '<br>'; |
@@ -2169,7 +2169,7 @@ discard block |
||
| 2169 | 2169 | print '</a>'; |
| 2170 | 2170 | |
| 2171 | 2171 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2172 | - 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' : '') . '">'; |
|
| 2172 | + 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' : '').'">'; |
|
| 2173 | 2173 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2174 | 2174 | print '</a>'; |
| 2175 | 2175 | } |
@@ -2187,12 +2187,12 @@ discard block |
||
| 2187 | 2187 | |
| 2188 | 2188 | // Disable select if task not billable or already invoiced |
| 2189 | 2189 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2190 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2190 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2191 | 2191 | if ($disabled) { |
| 2192 | 2192 | // If disabled, a dbl-click very close outside the control |
| 2193 | 2193 | // will re-enable it, so that user is not blocked if needed. |
| 2194 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2195 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2194 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2195 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2196 | 2196 | } else { |
| 2197 | 2197 | print $ctrl; |
| 2198 | 2198 | } |
@@ -2320,7 +2320,7 @@ discard block |
||
| 2320 | 2320 | } |
| 2321 | 2321 | } |
| 2322 | 2322 | } elseif ($action !== 'createtime') { |
| 2323 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2323 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | 2326 | // Task label |
@@ -2356,9 +2356,9 @@ discard block |
||
| 2356 | 2356 | } |
| 2357 | 2357 | if (count($contactsoftask) > 0) { |
| 2358 | 2358 | print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"'); |
| 2359 | - 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 |
|
| 2359 | + 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 |
|
| 2360 | 2360 | } else { |
| 2361 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2361 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2362 | 2362 | } |
| 2363 | 2363 | } else { |
| 2364 | 2364 | $userstatic->id = $task_time->fk_user; |
@@ -2380,7 +2380,7 @@ discard block |
||
| 2380 | 2380 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2381 | 2381 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2382 | 2382 | print '<td class="small">'; |
| 2383 | - print '<textarea name="timespent_note_line" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2383 | + print '<textarea name="timespent_note_line" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2384 | 2384 | print '</td>'; |
| 2385 | 2385 | } else { |
| 2386 | 2386 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2391,7 +2391,7 @@ discard block |
||
| 2391 | 2391 | $totalarray['nbfield']++; |
| 2392 | 2392 | } |
| 2393 | 2393 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2394 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2394 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2395 | 2395 | } |
| 2396 | 2396 | |
| 2397 | 2397 | // Time spent |
@@ -2452,7 +2452,7 @@ discard block |
||
| 2452 | 2452 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2453 | 2453 | |
| 2454 | 2454 | print '<td class="nowraponall right">'; |
| 2455 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2455 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2456 | 2456 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2457 | 2457 | print '</span>'; |
| 2458 | 2458 | print '</td>'; |
@@ -2508,7 +2508,7 @@ discard block |
||
| 2508 | 2508 | } |
| 2509 | 2509 | } |
| 2510 | 2510 | } else { |
| 2511 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2511 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2512 | 2512 | } |
| 2513 | 2513 | } |
| 2514 | 2514 | print '</td>'; |
@@ -2542,7 +2542,7 @@ discard block |
||
| 2542 | 2542 | print '</a>'; |
| 2543 | 2543 | |
| 2544 | 2544 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2545 | - 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' : '') . '">'; |
|
| 2545 | + 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' : '').'">'; |
|
| 2546 | 2546 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2547 | 2547 | print '</a>'; |
| 2548 | 2548 | } |
@@ -2560,12 +2560,12 @@ discard block |
||
| 2560 | 2560 | |
| 2561 | 2561 | // Disable select if task not billable or already invoiced |
| 2562 | 2562 | $disabled = (intval($task_time->billable) != 1 || $invoiced); |
| 2563 | - $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2563 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2564 | 2564 | if ($disabled) { |
| 2565 | 2565 | // If disabled, a dbl-click very close outside the control |
| 2566 | 2566 | // will re-enable it, so that user is not blocked if needed. |
| 2567 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2568 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2567 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2568 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2569 | 2569 | } else { |
| 2570 | 2570 | print $ctrl; |
| 2571 | 2571 | } |
@@ -2664,7 +2664,7 @@ discard block |
||
| 2664 | 2664 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2665 | 2665 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask); |
| 2666 | 2666 | } else { |
| 2667 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2667 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2668 | 2668 | } |
| 2669 | 2669 | } else { |
| 2670 | 2670 | $userstatic->id = $task_time->fk_user; |
@@ -2681,13 +2681,13 @@ discard block |
||
| 2681 | 2681 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2682 | 2682 | print '<td class="tdoverflowmax300">'; |
| 2683 | 2683 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2684 | - print '<textarea name="timespent_note_line" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2684 | + print '<textarea name="timespent_note_line" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2685 | 2685 | } else { |
| 2686 | 2686 | print dol_nl2br($task_time->note); |
| 2687 | 2687 | } |
| 2688 | 2688 | print '</td>'; |
| 2689 | 2689 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2690 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_2 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2690 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_2.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2691 | 2691 | } |
| 2692 | 2692 | |
| 2693 | 2693 | // Time spent |
@@ -2829,7 +2829,7 @@ discard block |
||
| 2829 | 2829 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2830 | 2830 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, null, 0, '', $contactsoftask); |
| 2831 | 2831 | } else { |
| 2832 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2832 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2833 | 2833 | } |
| 2834 | 2834 | } else { |
| 2835 | 2835 | $userstatic->id = $task_time->fk_user; |
@@ -2846,13 +2846,13 @@ discard block |
||
| 2846 | 2846 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2847 | 2847 | print '<td class="small tdoverflowmax300"">'; |
| 2848 | 2848 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2849 | - print '<textarea name="timespent_note_line_2" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2849 | + print '<textarea name="timespent_note_line_2" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2850 | 2850 | } else { |
| 2851 | 2851 | print dol_nl2br($task_time->note); |
| 2852 | 2852 | } |
| 2853 | 2853 | print '</td>'; |
| 2854 | 2854 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2855 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2855 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2856 | 2856 | } |
| 2857 | 2857 | |
| 2858 | 2858 | // Time spent |
@@ -2927,14 +2927,14 @@ discard block |
||
| 2927 | 2927 | $i++; |
| 2928 | 2928 | if ($i == 1) { |
| 2929 | 2929 | if ($num < $limit && empty($offset)) { |
| 2930 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2930 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2931 | 2931 | } else { |
| 2932 | 2932 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2933 | 2933 | } |
| 2934 | 2934 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2935 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2935 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2936 | 2936 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2937 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2937 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2938 | 2938 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2939 | 2939 | } else { |
| 2940 | 2940 | print '<td></td>'; |
@@ -2950,8 +2950,8 @@ discard block |
||
| 2950 | 2950 | $totalnboffields++; |
| 2951 | 2951 | } |
| 2952 | 2952 | } |
| 2953 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2954 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2953 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2954 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2955 | 2955 | print '</td></tr>'; |
| 2956 | 2956 | } |
| 2957 | 2957 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | if ($type == 'title') { |
| 50 | 50 | $formquestion = array( |
| 51 | - array('type' => 'text', 'name' => 'subtotallinedesc', 'label' => $langs->trans("SubtotalLineDesc"), 'moreattr' => 'placeholder="' . $langs->trans("Description") . '"'), |
|
| 51 | + array('type' => 'text', 'name' => 'subtotallinedesc', 'label' => $langs->trans("SubtotalLineDesc"), 'moreattr' => 'placeholder="'.$langs->trans("Description").'"'), |
|
| 52 | 52 | array('type' => 'select', 'name' => 'subtotallinelevel', 'label' => $langs->trans("SubtotalLineLevel"), 'values' => $depth_array, 'default' => 1, 'select_show_empty' => 0), |
| 53 | 53 | array('type' => 'checkbox', 'value' => true, 'name' => 'titleshowuponpdf', 'label' => $langs->trans("ShowUPOnPDF")), |
| 54 | 54 | array('type' => 'checkbox', 'value' => true, 'name' => 'titleshowtotalexludingvatonpdf', 'label' => $langs->trans("ShowTotalExludingVATOnPDF")), |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | $page = $_SERVER["PHP_SELF"]; |
| 65 | 65 | |
| 66 | 66 | if ($object->element == 'facture') { |
| 67 | - $page .= '?facid=' . $object->id; |
|
| 67 | + $page .= '?facid='.$object->id; |
|
| 68 | 68 | } elseif (in_array($object->element, $object::$ALLOWED_TYPES)) { |
| 69 | - $page .= '?id=' . $object->id; |
|
| 69 | + $page .= '?id='.$object->id; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $form_title = $type == 'title' ? $langs->trans('AddTitleLine') : $langs->trans('AddSubtotalLine'); |
| 73 | 73 | |
| 74 | -print $form->formconfirm($page, $form_title, '', 'confirm_add' . $type . 'line', $formquestion, 'yes', 1); |
|
| 74 | +print $form->formconfirm($page, $form_title, '', 'confirm_add'.$type.'line', $formquestion, 'yes', 1); |
|
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | // Action clone object |
| 205 | 205 | if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd) { |
| 206 | 206 | $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid. |
| 207 | - '@phan-var-force FactureFournisseur $objectutil'; // Same object type for cloned object |
|
| 207 | + '@phan-var-force FactureFournisseur $objectutil'; // Same object type for cloned object |
|
| 208 | 208 | |
| 209 | 209 | if (GETPOST('newsupplierref', 'alphanohtml')) { |
| 210 | 210 | $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml'); |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | $db->begin(); |
| 800 | 800 | |
| 801 | 801 | $error = 0; |
| 802 | - $tmpproject = 0; // Ensure a value |
|
| 802 | + $tmpproject = 0; // Ensure a value |
|
| 803 | 803 | |
| 804 | 804 | // Fill array 'array_options' with data from add form |
| 805 | 805 | $ret = $extrafields->setOptionalsFromPost(null, $object); |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | $error++; |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 810 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 811 | 811 | $datedue = dol_mktime(0, 0, 0, GETPOSTINT('echmonth'), GETPOSTINT('echday'), GETPOSTINT('echyear'), 'tzserver'); |
| 812 | 812 | //var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour')); |
| 813 | 813 | //var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour')); |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); |
| 847 | 847 | $object->socid = GETPOSTINT('socid'); |
| 848 | 848 | $object->label = GETPOST('label', 'alphanohtml'); |
| 849 | - $object->libelle = $object->label; // deprecated |
|
| 849 | + $object->libelle = $object->label; // deprecated |
|
| 850 | 850 | $object->date = $dateinvoice; |
| 851 | 851 | $object->date_echeance = $datedue; |
| 852 | 852 | $object->note_public = GETPOST('note_public', 'restricthtml'); |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | $object->subtype = GETPOSTINT('subtype'); |
| 921 | 921 | $object->socid = GETPOSTINT('socid'); |
| 922 | 922 | $object->label = GETPOST('label', 'alphanohtml'); |
| 923 | - $object->libelle = $object->label; // Deprecated |
|
| 923 | + $object->libelle = $object->label; // Deprecated |
|
| 924 | 924 | $object->date = $dateinvoice; |
| 925 | 925 | $object->date_echeance = $datedue; |
| 926 | 926 | $object->note_public = GETPOST('note_public', 'restricthtml'); |
@@ -1030,7 +1030,7 @@ discard block |
||
| 1030 | 1030 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOSTINT('cond_reglement_id')); |
| 1031 | 1031 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
| 1032 | 1032 | $object->fk_account = GETPOSTINT('fk_account'); |
| 1033 | - $object->amount = (float) price2num(GETPOST('amount')); // FIXME: FactureFournisseur::$amount is deprecated and not used? |
|
| 1033 | + $object->amount = (float) price2num(GETPOST('amount')); // FIXME: FactureFournisseur::$amount is deprecated and not used? |
|
| 1034 | 1034 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
| 1035 | 1035 | //$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2); |
| 1036 | 1036 | $object->fk_incoterms = GETPOSTINT('incoterm_id'); |
@@ -1083,28 +1083,28 @@ discard block |
||
| 1083 | 1083 | $tmpproject = GETPOSTINT('projectid'); |
| 1084 | 1084 | |
| 1085 | 1085 | // Creation invoice |
| 1086 | - $object->socid = GETPOSTINT('socid'); |
|
| 1087 | - $object->type = GETPOST('type', 'alphanohtml'); |
|
| 1088 | - $object->subtype = GETPOSTINT('subtype'); |
|
| 1089 | - $object->ref = GETPOST('ref', 'alphanohtml'); |
|
| 1090 | - $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
|
| 1086 | + $object->socid = GETPOSTINT('socid'); |
|
| 1087 | + $object->type = GETPOST('type', 'alphanohtml'); |
|
| 1088 | + $object->subtype = GETPOSTINT('subtype'); |
|
| 1089 | + $object->ref = GETPOST('ref', 'alphanohtml'); |
|
| 1090 | + $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
|
| 1091 | 1091 | $object->socid = GETPOSTINT('socid'); |
| 1092 | 1092 | $object->label = GETPOST('label', 'alphanohtml'); |
| 1093 | - $object->libelle = $object->label; // deprecated |
|
| 1094 | - $object->date = $dateinvoice; |
|
| 1095 | - $object->date_echeance = $datedue; |
|
| 1096 | - $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1097 | - $object->note_private = GETPOST('note_private', 'restricthtml'); |
|
| 1093 | + $object->libelle = $object->label; // deprecated |
|
| 1094 | + $object->date = $dateinvoice; |
|
| 1095 | + $object->date_echeance = $datedue; |
|
| 1096 | + $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1097 | + $object->note_private = GETPOST('note_private', 'restricthtml'); |
|
| 1098 | 1098 | $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); |
| 1099 | 1099 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
| 1100 | 1100 | $object->fk_account = GETPOSTINT('fk_account'); |
| 1101 | 1101 | $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
| 1102 | 1102 | $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; |
| 1103 | - $object->fk_incoterms = GETPOSTINT('incoterm_id'); |
|
| 1103 | + $object->fk_incoterms = GETPOSTINT('incoterm_id'); |
|
| 1104 | 1104 | $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); |
| 1105 | 1105 | $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); |
| 1106 | - $object->multicurrency_tx = GETPOSTFLOAT('originmulticurrency_tx'); |
|
| 1107 | - $object->transport_mode_id = GETPOSTINT('transport_mode_id'); |
|
| 1106 | + $object->multicurrency_tx = GETPOSTFLOAT('originmulticurrency_tx'); |
|
| 1107 | + $object->transport_mode_id = GETPOSTINT('transport_mode_id'); |
|
| 1108 | 1108 | |
| 1109 | 1109 | // Auto calculation of date due if not filled by user |
| 1110 | 1110 | if (empty($object->date_echeance)) { |
@@ -1317,7 +1317,7 @@ discard block |
||
| 1317 | 1317 | 0, |
| 1318 | 1318 | $object->lines[0]->date_start, |
| 1319 | 1319 | $object->lines[0]->date_end, |
| 1320 | - array(), // array_options |
|
| 1320 | + array(), // array_options |
|
| 1321 | 1321 | 0, |
| 1322 | 1322 | 0, |
| 1323 | 1323 | '', |
@@ -1466,7 +1466,7 @@ discard block |
||
| 1466 | 1466 | // Edit line |
| 1467 | 1467 | $db->begin(); |
| 1468 | 1468 | |
| 1469 | - if (! $object->fetch($id) > 0) { |
|
| 1469 | + if (!$object->fetch($id) > 0) { |
|
| 1470 | 1470 | dol_print_error($db); |
| 1471 | 1471 | } |
| 1472 | 1472 | $object->fetch_thirdparty(); |
@@ -1637,7 +1637,7 @@ discard block |
||
| 1637 | 1637 | $price_ttc_devise = price2num(GETPOST('multicurrency_price_ttc'), 'CU', 2); |
| 1638 | 1638 | } |
| 1639 | 1639 | |
| 1640 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 1640 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 1641 | 1641 | |
| 1642 | 1642 | $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); |
| 1643 | 1643 | |
@@ -1780,7 +1780,7 @@ discard block |
||
| 1780 | 1780 | |
| 1781 | 1781 | // Get vat rate |
| 1782 | 1782 | if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority) |
| 1783 | - $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 1783 | + $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 1784 | 1784 | if (is_numeric($tmpidprodfournprice) && (int) $tmpidprodfournprice > 0) { |
| 1785 | 1785 | $tmpidprodfournprice = (int) $tmpidprodfournprice; |
| 1786 | 1786 | } else { |
@@ -2062,7 +2062,7 @@ discard block |
||
| 2062 | 2062 | } |
| 2063 | 2063 | } |
| 2064 | 2064 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 2065 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 2065 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 2066 | 2066 | |
| 2067 | 2067 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 2068 | 2068 | |
@@ -2153,7 +2153,7 @@ discard block |
||
| 2153 | 2153 | // Mode creation |
| 2154 | 2154 | if ($action == 'create') { |
| 2155 | 2155 | $facturestatic = new FactureFournisseur($db); |
| 2156 | - $selectedLines = array(); // Ensure initialised |
|
| 2156 | + $selectedLines = array(); // Ensure initialised |
|
| 2157 | 2157 | |
| 2158 | 2158 | print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice'); |
| 2159 | 2159 | |
@@ -2171,7 +2171,7 @@ discard block |
||
| 2171 | 2171 | } |
| 2172 | 2172 | } |
| 2173 | 2173 | |
| 2174 | - $objectsrc = null; // Initialise |
|
| 2174 | + $objectsrc = null; // Initialise |
|
| 2175 | 2175 | if (!empty($origin) && !empty($originid)) { |
| 2176 | 2176 | // Parse element/subelement (ex: project_task) |
| 2177 | 2177 | $element = $subelement = $origin; |
@@ -2350,7 +2350,7 @@ discard block |
||
| 2350 | 2350 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
| 2351 | 2351 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 2352 | 2352 | print '<input type="hidden" name="action" value="add">'; |
| 2353 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2353 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2354 | 2354 | |
| 2355 | 2355 | if (!empty($societe->id) && $societe->id > 0) { |
| 2356 | 2356 | print '<input type="hidden" name="socid" value="'.$societe->id.'">'."\n"; |
@@ -2434,7 +2434,7 @@ discard block |
||
| 2434 | 2434 | |
| 2435 | 2435 | $sql = 'SELECT r.rowid, r.titre as title, r.total_ttc'; |
| 2436 | 2436 | $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_rec as r'; |
| 2437 | - $sql .= ' WHERE r.fk_soc = '. (int) $invoice_predefined->socid; |
|
| 2437 | + $sql .= ' WHERE r.fk_soc = '.(int) $invoice_predefined->socid; |
|
| 2438 | 2438 | |
| 2439 | 2439 | $resql = $db->query($sql); |
| 2440 | 2440 | if ($resql) { |
@@ -2501,7 +2501,7 @@ discard block |
||
| 2501 | 2501 | // Deposit - Down payment |
| 2502 | 2502 | if (!getDolGlobalString('INVOICE_DISABLE_DEPOSIT')) { |
| 2503 | 2503 | print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; |
| 2504 | - $tmp = '<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOSTINT('type') == 3 ? ' checked' : '') . '> '; |
|
| 2504 | + $tmp = '<input type="radio" id="radio_deposit" name="type" value="3"'.(GETPOSTINT('type') == 3 ? ' checked' : '').'> '; |
|
| 2505 | 2505 | print '<script type="text/javascript"> |
| 2506 | 2506 | jQuery(document).ready(function() { |
| 2507 | 2507 | jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() { |
@@ -2571,7 +2571,7 @@ discard block |
||
| 2571 | 2571 | print $form->selectarray('typedeposit', $arraylist, $typedeposit, 0, 0, 0, '', 1); |
| 2572 | 2572 | print '</td>'; |
| 2573 | 2573 | print '<td class="nowrap" style="padding-left: 5px">'; |
| 2574 | - print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="' . $valuedeposit . '"/>'; |
|
| 2574 | + print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="'.$valuedeposit.'"/>'; |
|
| 2575 | 2575 | print '</td>'; |
| 2576 | 2576 | } |
| 2577 | 2577 | print '</tr></table>'; |
@@ -2821,8 +2821,8 @@ discard block |
||
| 2821 | 2821 | |
| 2822 | 2822 | // Vat reverse-charge by default |
| 2823 | 2823 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 2824 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
| 2825 | - print '<tr><td>' . $langs->trans('VATReverseCharge') . '</td><td>'; |
|
| 2824 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
| 2825 | + print '<tr><td>'.$langs->trans('VATReverseCharge').'</td><td>'; |
|
| 2826 | 2826 | // Try to propose to use VAT reverse charge even if the VAT reverse charge is not activated in the supplier card, if this corresponds to the context of use, the activation is proposed |
| 2827 | 2827 | if (GETPOSTISSET('vat_reverse_charge')) { // Check if form was submitted previously |
| 2828 | 2828 | $vat_reverse_charge = (GETPOST('vat_reverse_charge', 'alpha') == 'on' || GETPOST('vat_reverse_charge', 'alpha') == '1') ? 1 : 0; |
@@ -2832,7 +2832,7 @@ discard block |
||
| 2832 | 2832 | $vat_reverse_charge = 0; |
| 2833 | 2833 | } |
| 2834 | 2834 | |
| 2835 | - print '<input type="checkbox" name="vat_reverse_charge"'. (!empty($vat_reverse_charge) ? ' checked ' : '') . '>'; |
|
| 2835 | + print '<input type="checkbox" name="vat_reverse_charge"'.(!empty($vat_reverse_charge) ? ' checked ' : '').'>'; |
|
| 2836 | 2836 | print '</td></tr>'; |
| 2837 | 2837 | } |
| 2838 | 2838 | |
@@ -3406,7 +3406,7 @@ discard block |
||
| 3406 | 3406 | $creditnote->fetch($invoiceid); |
| 3407 | 3407 | $invoicecredits[] = $creditnote->getNomUrl(1); |
| 3408 | 3408 | } |
| 3409 | - print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits); |
|
| 3409 | + print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir").(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits); |
|
| 3410 | 3410 | print '</span>'; |
| 3411 | 3411 | } |
| 3412 | 3412 | if (isset($objectidnext) && $objectidnext > 0) { |
@@ -3553,12 +3553,12 @@ discard block |
||
| 3553 | 3553 | print '<input type="hidden" name="action" value="setvatreversecharge">'; |
| 3554 | 3554 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 3555 | 3555 | |
| 3556 | - print '<input type="checkbox" name="vat_reverse_charge"' . ($object->vat_reverse_charge == '1' ? ' checked ' : '') . '>'; |
|
| 3556 | + print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').'>'; |
|
| 3557 | 3557 | |
| 3558 | 3558 | print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; |
| 3559 | 3559 | print '</form>'; |
| 3560 | 3560 | } else { |
| 3561 | - print '<input type="checkbox" name="vat_reverse_charge"'. ($object->vat_reverse_charge == '1' ? ' checked ' : '') . ' disabled>'; |
|
| 3561 | + print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').' disabled>'; |
|
| 3562 | 3562 | } |
| 3563 | 3563 | print '</td></tr>'; |
| 3564 | 3564 | } |
@@ -3654,15 +3654,15 @@ discard block |
||
| 3654 | 3654 | include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php'; |
| 3655 | 3655 | |
| 3656 | 3656 | print '<tr>'; |
| 3657 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 3658 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3657 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 3658 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3659 | 3659 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3660 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3660 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3661 | 3661 | } |
| 3662 | 3662 | print '</tr>'; |
| 3663 | 3663 | |
| 3664 | 3664 | print '<tr>'; |
| 3665 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
| 3665 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
| 3666 | 3666 | print '<td class="nowrap amountcard right">'; |
| 3667 | 3667 | if (GETPOST('calculationrule')) { |
| 3668 | 3668 | $calculationrule = GETPOST('calculationrule', 'alpha'); |
@@ -3676,40 +3676,40 @@ discard block |
||
| 3676 | 3676 | } |
| 3677 | 3677 | // Show link for "recalculate" |
| 3678 | 3678 | if ($object->getVentilExportCompta() == 0) { |
| 3679 | - $s = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("ReCalculate") . ' </span>'; |
|
| 3680 | - $s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&token='.newToken().'&calculationrule=totalofround">' . $langs->trans("Mode1") . '</a>'; |
|
| 3679 | + $s = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("ReCalculate").' </span>'; |
|
| 3680 | + $s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&token='.newToken().'&calculationrule=totalofround">'.$langs->trans("Mode1").'</a>'; |
|
| 3681 | 3681 | $s .= ' / '; |
| 3682 | - $s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&token='.newToken().'&calculationrule=roundoftotal">' . ($conf->dol_optimize_smallscreen ? "2" : $langs->trans("Mode2")) . '</a>'; |
|
| 3682 | + $s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&token='.newToken().'&calculationrule=roundoftotal">'.($conf->dol_optimize_smallscreen ? "2" : $langs->trans("Mode2")).'</a>'; |
|
| 3683 | 3683 | print '<div class="inline-block">'; |
| 3684 | - print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum) . '<br>' . $langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help', 'class="paddingleft paddingright"'), '', 3, '', 0, 'recalculate'); |
|
| 3684 | + print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum).'<br>'.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help', 'class="paddingleft paddingright"'), '', 3, '', 0, 'recalculate'); |
|
| 3685 | 3685 | print ' '; |
| 3686 | 3686 | print '</div>'; |
| 3687 | 3687 | } |
| 3688 | 3688 | print '<span class="nowraponall">'.price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency).'</span>'; |
| 3689 | 3689 | print '</td>'; |
| 3690 | 3690 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3691 | - print '<td class="nowraponall amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3691 | + print '<td class="nowraponall amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3692 | 3692 | } |
| 3693 | 3693 | print '</tr>'; |
| 3694 | 3694 | |
| 3695 | 3695 | if ($societe->localtax1_assuj == "1") { //Localtax1 |
| 3696 | 3696 | print '<tr>'; |
| 3697 | - print '<td>' . $langs->transcountry("AmountLT1", $societe->country_code) . '</td>'; |
|
| 3698 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3697 | + print '<td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>'; |
|
| 3698 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3699 | 3699 | print '</tr>'; |
| 3700 | 3700 | } |
| 3701 | 3701 | if ($societe->localtax2_assuj == "1") { //Localtax2 |
| 3702 | 3702 | print '<tr>'; |
| 3703 | - print '<td>' . $langs->transcountry("AmountLT2", $societe->country_code) . '</td>'; |
|
| 3704 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3703 | + print '<td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>'; |
|
| 3704 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3705 | 3705 | print '</tr>'; |
| 3706 | 3706 | } |
| 3707 | 3707 | |
| 3708 | 3708 | print '<tr>'; |
| 3709 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3710 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3709 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3710 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3711 | 3711 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3712 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3712 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3713 | 3713 | } |
| 3714 | 3714 | print '</tr>'; |
| 3715 | 3715 | |
@@ -4293,7 +4293,7 @@ discard block |
||
| 4293 | 4293 | } |
| 4294 | 4294 | |
| 4295 | 4295 | // Clone as predefined / Create template |
| 4296 | - if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->status == 0 && $usercancreate) { |
|
| 4296 | + if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->status == 0 && $usercancreate) { |
|
| 4297 | 4297 | if (!$objectidnext && count($object->lines) > 0) { |
| 4298 | 4298 | print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>'; |
| 4299 | 4299 | } |