@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); |
82 | 82 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
83 | 83 | |
84 | - $logofile = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
84 | + $logofile = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
85 | 85 | dol_delete_file($logofile); |
86 | 86 | dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND", $conf->entity); |
87 | 87 | $mysoc->logo = ''; |
@@ -225,14 +225,14 @@ discard block |
||
225 | 225 | dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity); |
226 | 226 | } |
227 | 227 | |
228 | - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array())))); |
|
228 | + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array())))); |
|
229 | 229 | if ($val == '') { |
230 | 230 | dolibarr_del_const($db, 'THEME_ELDY_BTNACTION', $conf->entity); |
231 | 231 | } else { |
232 | 232 | dolibarr_set_const($db, 'THEME_ELDY_BTNACTION', $val, 'chaine', 0, '', $conf->entity); |
233 | 233 | } |
234 | 234 | |
235 | - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array())))); |
|
235 | + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array())))); |
|
236 | 236 | if ($val == '') { |
237 | 237 | dolibarr_del_const($db, 'THEME_ELDY_TEXTBTNACTION', $conf->entity); |
238 | 238 | } else { |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | //dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities |
274 | 274 | |
275 | 275 | $varforimage = 'imagebackground'; |
276 | - $dirforimage = $conf->mycompany->dir_output . '/logos/'; |
|
276 | + $dirforimage = $conf->mycompany->dir_output.'/logos/'; |
|
277 | 277 | if ($_FILES[$varforimage]["tmp_name"]) { |
278 | 278 | $reg = array(); |
279 | 279 | if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { |
@@ -281,11 +281,11 @@ discard block |
||
281 | 281 | |
282 | 282 | $isimage = image_format_supported($original_file); |
283 | 283 | if ($isimage >= 0) { |
284 | - dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file); |
|
284 | + dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); |
|
285 | 285 | if (!is_dir($dirforimage)) { |
286 | 286 | dol_mkdir($dirforimage); |
287 | 287 | } |
288 | - $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
288 | + $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
289 | 289 | if ($result > 0) { |
290 | 290 | dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity); |
291 | 291 | } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { |
@@ -391,17 +391,17 @@ discard block |
||
391 | 391 | print '</tr>'; |
392 | 392 | |
393 | 393 | // Multilingual GUI |
394 | - print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>'; |
|
394 | + print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>'; |
|
395 | 395 | print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language'); |
396 | 396 | print '</td>'; |
397 | 397 | print '</tr>'; |
398 | 398 | |
399 | - print '</table>' . "\n"; |
|
399 | + print '</table>'."\n"; |
|
400 | 400 | print '</div>'; |
401 | 401 | |
402 | 402 | print '<div class="center">'; |
403 | - print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
404 | - print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
403 | + print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
404 | + print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
405 | 405 | print '</div>'; |
406 | 406 | |
407 | 407 | print '<br>'; |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | |
420 | 420 | if (!empty($conf->use_javascript_ajax)) { |
421 | 421 | // Show Quick Add link |
422 | - print '<tr class="oddeven"><td>' . $langs->trans("ShowQuickAddLink") . '</td><td>'; |
|
422 | + print '<tr class="oddeven"><td>'.$langs->trans("ShowQuickAddLink").'</td><td>'; |
|
423 | 423 | print ajax_constantonoff("MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
424 | 424 | print '</td>'; |
425 | 425 | print '</tr>'; |
@@ -427,22 +427,22 @@ discard block |
||
427 | 427 | |
428 | 428 | // Hide wiki link on login page |
429 | 429 | $pictohelp = '<span class="fa fa-question-circle"></span>'; |
430 | - print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>'; |
|
430 | + print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>'; |
|
431 | 431 | print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
432 | 432 | //print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1); |
433 | 433 | print '</td>'; |
434 | 434 | print '</tr>'; |
435 | 435 | |
436 | 436 | // Max size of lists |
437 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="' . getDolGlobalString('MAIN_SIZE_LISTE_LIMIT') . '"></td>'; |
|
437 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'.getDolGlobalString('MAIN_SIZE_LISTE_LIMIT').'"></td>'; |
|
438 | 438 | print '</tr>'; |
439 | 439 | |
440 | 440 | // Max size of short lists on customer card |
441 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT') . '"></td>'; |
|
441 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'"></td>'; |
|
442 | 442 | print '</tr>'; |
443 | 443 | |
444 | 444 | // Display checkboxes and fields menu left / right |
445 | - print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>'; |
|
445 | + print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td><td>'; |
|
446 | 446 | print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
447 | 447 | print '</td>'; |
448 | 448 | print '</tr>'; |
@@ -456,39 +456,39 @@ discard block |
||
456 | 456 | */ |
457 | 457 | |
458 | 458 | // First day for weeks |
459 | - print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>'; |
|
459 | + print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>'; |
|
460 | 460 | print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0); |
461 | 461 | print '</td>'; |
462 | 462 | print '</tr>'; |
463 | 463 | |
464 | 464 | // DefaultWorkingDays |
465 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>'; |
|
466 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">'; |
|
465 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>'; |
|
466 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5').'">'; |
|
467 | 467 | print '</td>'; |
468 | 468 | print '</tr>'; |
469 | 469 | |
470 | 470 | // DefaultWorkingHours |
471 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>'; |
|
472 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">'; |
|
471 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>'; |
|
472 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18').'">'; |
|
473 | 473 | print '</td>'; |
474 | 474 | print '</tr>'; |
475 | 475 | |
476 | 476 | // Firstname/Name |
477 | - print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>'; |
|
478 | - $array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname")); |
|
477 | + print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>'; |
|
478 | + $array = array(0 => $langs->trans("Firstname").' '.$langs->trans("Lastname"), 1 => $langs->trans("Lastname").' '.$langs->trans("Firstname")); |
|
479 | 479 | print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0)); |
480 | 480 | print '</td>'; |
481 | 481 | print '</tr>'; |
482 | 482 | |
483 | 483 | // Hide unauthorized menus |
484 | - print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>'; |
|
484 | + print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>'; |
|
485 | 485 | //print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1); |
486 | 486 | print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
487 | 487 | print '</td>'; |
488 | 488 | print '</tr>'; |
489 | 489 | |
490 | 490 | // Hide unauthorized button |
491 | - print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>'; |
|
491 | + print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>'; |
|
492 | 492 | //print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1); |
493 | 493 | print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
494 | 494 | print '</td>'; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | |
506 | 506 | |
507 | 507 | // Show search area in top menu |
508 | - print '<tr class="oddeven"><td>' . $langs->trans("ShowSearchAreaInTopMenu") . '</td><td>'; |
|
508 | + print '<tr class="oddeven"><td>'.$langs->trans("ShowSearchAreaInTopMenu").'</td><td>'; |
|
509 | 509 | print ajax_constantonoff("MAIN_USE_TOP_MENU_SEARCH_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
510 | 510 | print '</td>'; |
511 | 511 | print '</tr>'; |
@@ -514,17 +514,17 @@ discard block |
||
514 | 514 | print '<tr class="oddeven"><td>'; |
515 | 515 | print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc")); |
516 | 516 | print '</td><td>'; |
517 | - print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">'; |
|
517 | + print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.(!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK).'">'; |
|
518 | 518 | print '</td>'; |
519 | 519 | print '</tr>'; |
520 | 520 | |
521 | 521 | // Disable javascript and ajax |
522 | - print '<tr class="oddeven"><td>' . $form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")) . '</td><td>'; |
|
522 | + print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")).'</td><td>'; |
|
523 | 523 | print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
524 | 524 | print '</td>'; |
525 | 525 | print '</tr>'; |
526 | 526 | |
527 | - print '</table>' . "\n"; |
|
527 | + print '</table>'."\n"; |
|
528 | 528 | print '</div>'; |
529 | 529 | } |
530 | 530 | |
@@ -544,9 +544,9 @@ discard block |
||
544 | 544 | complete_substitutions_array($substitutionarray, $langs); |
545 | 545 | |
546 | 546 | print '<tr class="oddeven width25p"><td>'; |
547 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
547 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
548 | 548 | foreach ($substitutionarray as $key => $val) { |
549 | - $texthelp .= $key . '<br>'; |
|
549 | + $texthelp .= $key.'<br>'; |
|
550 | 550 | } |
551 | 551 | print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); |
552 | 552 | |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); |
556 | 556 | $doleditor->Create(); |
557 | 557 | |
558 | - print '</td></tr>' . "\n"; |
|
558 | + print '</td></tr>'."\n"; |
|
559 | 559 | |
560 | 560 | /* no more need for this option. It is now a widget already controlled by end user |
561 | 561 | print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>'; |
@@ -577,80 +577,80 @@ discard block |
||
577 | 577 | print '</td><td class="titlefieldmiddle">'; |
578 | 578 | print '</td></tr>'; |
579 | 579 | |
580 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>'; |
|
580 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableGlobal').'</td><td>'; |
|
581 | 581 | print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
582 | 582 | print '</td>'; |
583 | 583 | print '</tr>'; |
584 | 584 | |
585 | 585 | if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD')) { |
586 | 586 | // Block meteo |
587 | - print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>'; |
|
587 | + print '<tr class="oddeven"><td>'.$langs->trans('MAIN_DISABLE_METEO').'</td><td>'; |
|
588 | 588 | print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
589 | 589 | print '</td>'; |
590 | 590 | print '</tr>'; |
591 | 591 | |
592 | 592 | // Block agenda |
593 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>'; |
|
593 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAgenda').'</td><td>'; |
|
594 | 594 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
595 | 595 | print '</td>'; |
596 | 596 | print '</tr>'; |
597 | 597 | |
598 | 598 | // Block agenda |
599 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>'; |
|
599 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockProject').'</td><td>'; |
|
600 | 600 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
601 | 601 | print '</td>'; |
602 | 602 | print '</tr>'; |
603 | 603 | |
604 | 604 | // Block customer |
605 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>'; |
|
605 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockCustomer').'</td><td>'; |
|
606 | 606 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
607 | 607 | print '</td>'; |
608 | 608 | print '</tr>'; |
609 | 609 | |
610 | 610 | // Block supplier |
611 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>'; |
|
611 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockSupplier').'</td><td>'; |
|
612 | 612 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
613 | 613 | print '</td>'; |
614 | 614 | print '</tr>'; |
615 | 615 | |
616 | 616 | // Block contract |
617 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>'; |
|
617 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockContract').'</td><td>'; |
|
618 | 618 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
619 | 619 | print '</td>'; |
620 | 620 | print '</tr>'; |
621 | 621 | |
622 | 622 | // Block ticket |
623 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>'; |
|
623 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockTicket').'</td><td>'; |
|
624 | 624 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
625 | 625 | print '</td>'; |
626 | 626 | print '</tr>'; |
627 | 627 | |
628 | 628 | // Block bank |
629 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>'; |
|
629 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockBank').'</td><td>'; |
|
630 | 630 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
631 | 631 | print '</td>'; |
632 | 632 | print '</tr>'; |
633 | 633 | |
634 | 634 | // Block adherent |
635 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>'; |
|
635 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAdherent').'</td><td>'; |
|
636 | 636 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
637 | 637 | print '</td>'; |
638 | 638 | print '</tr>'; |
639 | 639 | |
640 | 640 | // Block expense report |
641 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>'; |
|
641 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockExpenseReport').'</td><td>'; |
|
642 | 642 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
643 | 643 | print '</td>'; |
644 | 644 | print '</tr>'; |
645 | 645 | |
646 | 646 | // Block holiday |
647 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>'; |
|
647 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockHoliday').'</td><td>'; |
|
648 | 648 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
649 | 649 | print '</td>'; |
650 | 650 | print '</tr>'; |
651 | 651 | } |
652 | 652 | |
653 | - print '</table>' . "\n"; |
|
653 | + print '</table>'."\n"; |
|
654 | 654 | print '</div>'; |
655 | 655 | } |
656 | 656 | |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | print '</td></tr>'; |
668 | 668 | |
669 | 669 | // Hide helpcenter link on login page |
670 | - print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>'; |
|
670 | + print '<tr class="oddeven"><td>'.$langs->trans("DisableLinkToHelpCenter").'</td><td>'; |
|
671 | 671 | print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login'); |
672 | 672 | print '</td>'; |
673 | 673 | print '</tr>'; |
@@ -676,18 +676,18 @@ discard block |
||
676 | 676 | $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); |
677 | 677 | complete_substitutions_array($substitutionarray, $langs); |
678 | 678 | print '<tr class="oddeven"><td>'; |
679 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
679 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
680 | 680 | foreach ($substitutionarray as $key => $val) { |
681 | - $texthelp .= $key . '<br>'; |
|
681 | + $texthelp .= $key.'<br>'; |
|
682 | 682 | } |
683 | 683 | print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); |
684 | 684 | print '</td><td>'; |
685 | 685 | $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); |
686 | 686 | $doleditor->Create(); |
687 | - print '</td></tr>' . "\n"; |
|
687 | + print '</td></tr>'."\n"; |
|
688 | 688 | |
689 | 689 | // Background |
690 | - print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td>'; |
|
690 | + print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td>'; |
|
691 | 691 | print '<div class="centpercent inline-block">'; |
692 | 692 | $disabled = ''; |
693 | 693 | if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) { |
@@ -696,25 +696,25 @@ discard block |
||
696 | 696 | $maxfilesizearray = getMaxFileSizeArray(); |
697 | 697 | $maxmin = $maxfilesizearray['maxmin']; |
698 | 698 | if ($maxmin > 0) { |
699 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
699 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
700 | 700 | } |
701 | - print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>'; |
|
701 | + print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>'; |
|
702 | 702 | if ($disabled) { |
703 | - print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') '; |
|
703 | + print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; |
|
704 | 704 | } |
705 | 705 | if (getDolGlobalString('MAIN_LOGIN_BACKGROUND')) { |
706 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'&mode=login">' . img_delete($langs->trans("Delete")) . '</a>'; |
|
707 | - if (file_exists($conf->mycompany->dir_output . '/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
706 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin&token='.newToken().'&mode=login">'.img_delete($langs->trans("Delete")).'</a>'; |
|
707 | + if (file_exists($conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
708 | 708 | print ' '; |
709 | - print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&file=' . urlencode('logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND')) . '">'; |
|
709 | + print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND')).'">'; |
|
710 | 710 | } |
711 | 711 | } else { |
712 | - print '<img class="marginleftonly valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">'; |
|
712 | + print '<img class="marginleftonly valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">'; |
|
713 | 713 | } |
714 | 714 | print '</div>'; |
715 | 715 | print '</td></tr>'; |
716 | 716 | |
717 | - print '</table>' . "\n"; |
|
717 | + print '</table>'."\n"; |
|
718 | 718 | print '</div>'; |
719 | 719 | } |
720 | 720 | |
@@ -738,8 +738,8 @@ discard block |
||
738 | 738 | |
739 | 739 | |
740 | 740 | print '<div class="center">'; |
741 | -print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
742 | -print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
741 | +print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
742 | +print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
743 | 743 | print '</div>'; |
744 | 744 | |
745 | 745 | print '</form>'; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $permissiontoadd = $user->hasRight('projet', 'creer'); |
113 | 113 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
114 | -$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
114 | +$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
115 | 115 | |
116 | 116 | |
117 | 117 | /* |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $action = ''; |
163 | 163 | } |
164 | 164 | |
165 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
165 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
166 | 166 | |
167 | 167 | // Action setdraft object |
168 | 168 | if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | $object->date_end_event = (!GETPOST('date_end_event')) ? '' : $date_end_event; |
323 | 323 | $object->location = $location; |
324 | 324 | if (GETPOSTISSET('opp_amount')) { |
325 | - $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
325 | + $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
326 | 326 | } |
327 | 327 | if (GETPOSTISSET('budget_amount')) { |
328 | 328 | $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
511 | 511 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
512 | 512 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
513 | - $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1'; |
|
513 | + $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1'; |
|
514 | 514 | } else { |
515 | 515 | $urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1'; |
516 | 516 | } |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | print '<br>'; |
1072 | 1072 | } |
1073 | 1073 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
1074 | - print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '> '; |
|
1074 | + print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'> '; |
|
1075 | 1075 | $htmltext = $langs->trans("ProjectFollowTasks"); |
1076 | 1076 | print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>'; |
1077 | 1077 | print '<script>'; |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | print '<br>'; |
1098 | 1098 | } |
1099 | 1099 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
1100 | - print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '> '; |
|
1100 | + print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'> '; |
|
1101 | 1101 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
1102 | 1102 | print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; |
1103 | 1103 | print '<script>'; |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | print '<br>'; |
1124 | 1124 | } |
1125 | 1125 | if (isModEnabled('eventorganization')) { |
1126 | - print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '> '; |
|
1126 | + print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'> '; |
|
1127 | 1127 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
1128 | 1128 | print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>'; |
1129 | 1129 | print '<script>'; |
@@ -1302,7 +1302,7 @@ discard block |
||
1302 | 1302 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
1303 | 1303 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
1304 | 1304 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
1305 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
1305 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
1306 | 1306 | } else { |
1307 | 1307 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
1308 | 1308 | } |
@@ -1390,8 +1390,8 @@ discard block |
||
1390 | 1390 | print '<a class="editfielda paddingtop" href="'.$_SERVER["PHP_SELF"].'?action=edit_opp_status&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>'; |
1391 | 1391 | } |
1392 | 1392 | print '</td><td>'; |
1393 | - $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
1394 | - $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
1393 | + $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
1394 | + $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
1395 | 1395 | $percent_value = (GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ? vatrate($object->opp_percent) : '')); |
1396 | 1396 | $formproject->formOpportunityStatus($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->opp_status, $percent_value, $html_name_status, $html_name_percent); |
1397 | 1397 | print '</td></tr>'; |
@@ -1602,7 +1602,7 @@ discard block |
||
1602 | 1602 | if ($userWrite > 0) { |
1603 | 1603 | print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_setdraft&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
1604 | 1604 | } else { |
1605 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1605 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1606 | 1606 | } |
1607 | 1607 | } |
1608 | 1608 | } |
@@ -1612,7 +1612,7 @@ discard block |
||
1612 | 1612 | if ($userWrite > 0) { |
1613 | 1613 | print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); |
1614 | 1614 | } else { |
1615 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1615 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1616 | 1616 | } |
1617 | 1617 | } |
1618 | 1618 | |
@@ -1621,7 +1621,7 @@ discard block |
||
1621 | 1621 | if ($userWrite > 0) { |
1622 | 1622 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, ''); |
1623 | 1623 | } else { |
1624 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1624 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1625 | 1625 | } |
1626 | 1626 | } |
1627 | 1627 | |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | if ($userWrite > 0) { |
1631 | 1631 | print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.$object->id, ''); |
1632 | 1632 | } else { |
1633 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1633 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1634 | 1634 | } |
1635 | 1635 | } |
1636 | 1636 | |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | if ($userWrite > 0) { |
1640 | 1640 | print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
1641 | 1641 | } else { |
1642 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1642 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1643 | 1643 | } |
1644 | 1644 | } |
1645 | 1645 | |
@@ -1668,7 +1668,7 @@ discard block |
||
1668 | 1668 | if ($userWrite > 0) { |
1669 | 1669 | print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.((int) $object->id), ''); |
1670 | 1670 | } else { |
1671 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1671 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1672 | 1672 | } |
1673 | 1673 | } |
1674 | 1674 | |
@@ -1677,7 +1677,7 @@ discard block |
||
1677 | 1677 | if ($userDelete > 0 || ($object->statut == Project::STATUS_DRAFT && $user->hasRight('projet', 'creer'))) { |
1678 | 1678 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
1679 | 1679 | } else { |
1680 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
1680 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
1681 | 1681 | } |
1682 | 1682 | } |
1683 | 1683 | } |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | |
32 | 32 | // Load Dolibarr environment |
33 | 33 | require '../../main.inc.php'; |
34 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
35 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
39 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
40 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
41 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
39 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
40 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
41 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
42 | 42 | |
43 | 43 | // Load translation files required by the page |
44 | 44 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
165 | 165 | } |
166 | 166 | |
167 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
167 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
168 | 168 | |
169 | 169 | // Purge search criteria |
170 | 170 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -350,10 +350,10 @@ discard block |
||
350 | 350 | } |
351 | 351 | |
352 | 352 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
353 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
353 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
354 | 354 | |
355 | 355 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
356 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
356 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
357 | 357 | |
358 | 358 | if ($result < 0) { |
359 | 359 | $langs->load("errors"); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | if (count($tasksarray) > 0) { |
374 | 374 | $id = $tasksarray[0]->id; |
375 | 375 | } else { |
376 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
376 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
377 | 377 | exit; |
378 | 378 | } |
379 | 379 | } |
@@ -410,9 +410,9 @@ discard block |
||
410 | 410 | if (!($projectstatic->thirdparty->id > 0)) { |
411 | 411 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
412 | 412 | } else { |
413 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
414 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
415 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
413 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
414 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
415 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
416 | 416 | |
417 | 417 | $tmpinvoice = new Facture($db); |
418 | 418 | $tmptimespent = new Task($db); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | $arrayoftasks = array(); |
479 | 479 | foreach ($toselect as $key => $value) { |
480 | 480 | // Get userid, timepent |
481 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
481 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
482 | 482 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
483 | 483 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
484 | 484 | } |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | } |
551 | 551 | |
552 | 552 | // Add lines |
553 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject); |
|
553 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject); |
|
554 | 554 | if ($lineid < 0) { |
555 | 555 | $error++; |
556 | 556 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -583,16 +583,16 @@ discard block |
||
583 | 583 | |
584 | 584 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
585 | 585 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
586 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
586 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
587 | 587 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
588 | 588 | |
589 | 589 | if (!empty($withdetail)) { |
590 | 590 | if (!empty($object->timespent_withhour)) { |
591 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
591 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
592 | 592 | } else { |
593 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
593 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
594 | 594 | } |
595 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
595 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
596 | 596 | } |
597 | 597 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
598 | 598 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $arrayoftasks = array(); |
671 | 671 | foreach ($toselect as $key => $value) { |
672 | 672 | // Get userid, timepent |
673 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
673 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
674 | 674 | // $object->id is now the task id |
675 | 675 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
676 | 676 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | // Add lines |
747 | 747 | $date_start = ''; |
748 | 748 | $date_end = ''; |
749 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
749 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
750 | 750 | $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); |
751 | 751 | if ($lineid < 0) { |
752 | 752 | $error++; |
@@ -756,8 +756,8 @@ discard block |
||
756 | 756 | |
757 | 757 | if (!$error) { |
758 | 758 | // Update lineid into line of timespent |
759 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
760 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
759 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
760 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
761 | 761 | $result = $db->query($sql); |
762 | 762 | if (!$result) { |
763 | 763 | $error++; |
@@ -795,12 +795,12 @@ discard block |
||
795 | 795 | if (!($projectstatic->thirdparty->id > 0)) { |
796 | 796 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
797 | 797 | } else { |
798 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
799 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
800 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
798 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
799 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
800 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
801 | 801 | |
802 | 802 | |
803 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
803 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
804 | 804 | $tmpinter = new Fichinter($db); |
805 | 805 | $tmptimespent = new Task($db); |
806 | 806 | $fuser = new User($db); |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | $tmpinter->socid = $projectstatic->thirdparty->id; |
813 | 813 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
814 | 814 | $tmpinter->fk_project = $projectstatic->id; |
815 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
815 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
816 | 816 | |
817 | 817 | if ($interToUse) { |
818 | 818 | $tmpinter->fetch($interToUse); |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
846 | 846 | |
847 | 847 | // Add lines |
848 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
848 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
849 | 849 | } |
850 | 850 | } |
851 | 851 | |
@@ -876,9 +876,9 @@ discard block |
||
876 | 876 | //$result = $projectstatic->fetch($object->fk_project); |
877 | 877 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
878 | 878 | |
879 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
879 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
880 | 880 | if (!empty($withproject)) { |
881 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
881 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
882 | 882 | } |
883 | 883 | $help_url = ''; |
884 | 884 | |
@@ -927,13 +927,13 @@ discard block |
||
927 | 927 | |
928 | 928 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
929 | 929 | if ($search_user) { |
930 | - $param .= '&search_user=' . ((int) $search_user); |
|
930 | + $param .= '&search_user='.((int) $search_user); |
|
931 | 931 | } |
932 | 932 | if ($search_month) { |
933 | - $param .= '&search_month=' . ((int) $search_month); |
|
933 | + $param .= '&search_month='.((int) $search_month); |
|
934 | 934 | } |
935 | 935 | if ($search_year) { |
936 | - $param .= '&search_year=' . ((int) $search_year); |
|
936 | + $param .= '&search_year='.((int) $search_year); |
|
937 | 937 | } |
938 | 938 | |
939 | 939 | // Project card |
@@ -945,14 +945,14 @@ discard block |
||
945 | 945 | $morehtmlref .= $projectstatic->title; |
946 | 946 | // Thirdparty |
947 | 947 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
948 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
948 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
949 | 949 | } |
950 | 950 | $morehtmlref .= '</div>'; |
951 | 951 | |
952 | 952 | // Define a complementary filter for search of next/prev ref. |
953 | 953 | if (!$user->hasRight('projet', 'all', 'lire')) { |
954 | 954 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
955 | - $projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")"; |
|
955 | + $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; |
|
956 | 956 | } |
957 | 957 | |
958 | 958 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -970,25 +970,25 @@ discard block |
||
970 | 970 | print '</td>'; |
971 | 971 | print '<td>'; |
972 | 972 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
973 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
973 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
974 | 974 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
975 | 975 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
976 | 976 | print '<br>'; |
977 | 977 | } |
978 | 978 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
979 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
979 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
980 | 980 | $htmltext = $langs->trans("ProjectFollowTasks"); |
981 | 981 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
982 | 982 | print '<br>'; |
983 | 983 | } |
984 | 984 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
985 | - print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> '; |
|
985 | + print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; |
|
986 | 986 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
987 | 987 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
988 | 988 | print '<br>'; |
989 | 989 | } |
990 | 990 | if (isModEnabled('eventorganization')) { |
991 | - print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> '; |
|
991 | + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> '; |
|
992 | 992 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
993 | 993 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
994 | 994 | } |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | } |
997 | 997 | |
998 | 998 | // Visibility |
999 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
999 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
1000 | 1000 | if ($projectstatic->public) { |
1001 | 1001 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
1002 | 1002 | print $langs->trans('SharedProject'); |
@@ -1007,14 +1007,14 @@ discard block |
||
1007 | 1007 | print '</td></tr>'; |
1008 | 1008 | |
1009 | 1009 | // Budget |
1010 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
1010 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
1011 | 1011 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
1012 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
1012 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
1013 | 1013 | } |
1014 | 1014 | print '</td></tr>'; |
1015 | 1015 | |
1016 | 1016 | // Date start - end project |
1017 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
1017 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
1018 | 1018 | $start = dol_print_date($projectstatic->date_start, 'day'); |
1019 | 1019 | print($start ? $start : '?'); |
1020 | 1020 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | $cols = 2; |
1030 | 1030 | $savobject = $object; |
1031 | 1031 | $object = $projectstatic; |
1032 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
1032 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
1033 | 1033 | $object = $savobject; |
1034 | 1034 | |
1035 | 1035 | print '</table>'; |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | |
1048 | 1048 | // Categories |
1049 | 1049 | if (isModEnabled('category')) { |
1050 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
1050 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
1051 | 1051 | print $form->showCategories($projectstatic->id, 'project', 1); |
1052 | 1052 | print "</td></tr>"; |
1053 | 1053 | } |
@@ -1076,12 +1076,12 @@ discard block |
||
1076 | 1076 | |
1077 | 1077 | if (!empty($projectidforalltimes)) { |
1078 | 1078 | // We are on tab 'Time Spent' of project |
1079 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
1080 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
1079 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
1080 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
1081 | 1081 | } else { |
1082 | 1082 | // We are on tab 'Time Spent' of task |
1083 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
1084 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
1083 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
1084 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
1085 | 1085 | } |
1086 | 1086 | } else { |
1087 | 1087 | $linktocreatetimeBtnStatus = -2; |
@@ -1126,19 +1126,19 @@ discard block |
||
1126 | 1126 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
1127 | 1127 | |
1128 | 1128 | if ($action == 'deleteline') { |
1129 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
1129 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
1130 | 1130 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | $param = ($withproject ? '&withproject=1' : ''); |
1134 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
1135 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
1134 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
1135 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
1136 | 1136 | |
1137 | 1137 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
1138 | 1138 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
1139 | - $object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")"; |
|
1139 | + $object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")"; |
|
1140 | 1140 | } else { |
1141 | - $object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id); |
|
1141 | + $object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id); |
|
1142 | 1142 | } |
1143 | 1143 | |
1144 | 1144 | $morehtmlref = ''; |
@@ -1146,12 +1146,12 @@ discard block |
||
1146 | 1146 | // Project |
1147 | 1147 | if (empty($withproject)) { |
1148 | 1148 | $morehtmlref .= '<div class="refidno">'; |
1149 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
1149 | + $morehtmlref .= $langs->trans("Project").': '; |
|
1150 | 1150 | $morehtmlref .= $projectstatic->getNomUrl(1); |
1151 | 1151 | $morehtmlref .= '<br>'; |
1152 | 1152 | |
1153 | 1153 | // Third party |
1154 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
1154 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
1155 | 1155 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
1156 | 1156 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
1157 | 1157 | } |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | print '<table class="border centpercent tableforfield">'; |
1168 | 1168 | |
1169 | 1169 | // Task parent |
1170 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
1170 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
1171 | 1171 | if ($object->fk_task_parent > 0) { |
1172 | 1172 | $tasktmp = new Task($db); |
1173 | 1173 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | print '</td></tr>'; |
1177 | 1177 | |
1178 | 1178 | // Date start - Date end task |
1179 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
1179 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
1180 | 1180 | $start = dol_print_date($object->date_start, 'dayhour'); |
1181 | 1181 | print($start ? $start : '?'); |
1182 | 1182 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | print '</td></tr>'; |
1189 | 1189 | |
1190 | 1190 | // Planned workload |
1191 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
1191 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
1192 | 1192 | if ($object->planned_workload) { |
1193 | 1193 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
1194 | 1194 | } |
@@ -1203,21 +1203,21 @@ discard block |
||
1203 | 1203 | print '<table class="border tableforfield centpercent">'; |
1204 | 1204 | |
1205 | 1205 | // Progress declared |
1206 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
1207 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
1206 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
1207 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
1208 | 1208 | print '</td></tr>'; |
1209 | 1209 | |
1210 | 1210 | // Progress calculated |
1211 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
1211 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
1212 | 1212 | if ($object->planned_workload) { |
1213 | 1213 | $tmparray = $object->getSummaryOfTimeSpent(); |
1214 | 1214 | if ($tmparray['total_duration'] > 0) { |
1215 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
1215 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
1216 | 1216 | } else { |
1217 | 1217 | print '0 %'; |
1218 | 1218 | } |
1219 | 1219 | } else { |
1220 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
1220 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
1221 | 1221 | } |
1222 | 1222 | print '</td>'; |
1223 | 1223 | |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | print dol_get_fiche_end(); |
1234 | 1234 | } else { |
1235 | 1235 | if ($action == 'deleteline') { |
1236 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
1236 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
1237 | 1237 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1238 | 1238 | } |
1239 | 1239 | } |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | |
1248 | 1248 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
1249 | 1249 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
1250 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT('lineid') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage); |
|
1250 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT('lineid').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage); |
|
1251 | 1251 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
1252 | 1252 | } |
1253 | 1253 | |
@@ -1266,10 +1266,10 @@ discard block |
||
1266 | 1266 | // Definition of fields for list |
1267 | 1267 | $arrayfields = array(); |
1268 | 1268 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1); |
1269 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1); |
|
1269 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1); |
|
1270 | 1270 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
1271 | 1271 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
1272 | - if (! empty($allprojectforuser)) { |
|
1272 | + if (!empty($allprojectforuser)) { |
|
1273 | 1273 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
1274 | 1274 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
1275 | 1275 | } |
@@ -1285,83 +1285,83 @@ discard block |
||
1285 | 1285 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => 1, 'enabled' => isModEnabled("salaries")); |
1286 | 1286 | $arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => 1, 'enabled' => (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time)); |
1287 | 1287 | // Extra fields |
1288 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1288 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1289 | 1289 | |
1290 | 1290 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
1291 | - '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
1291 | + '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
1292 | 1292 | |
1293 | 1293 | $param = ''; |
1294 | 1294 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
1295 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
1295 | + $param .= '&contextpage='.urlencode($contextpage); |
|
1296 | 1296 | } |
1297 | 1297 | if ($limit > 0 && $limit != $conf->liste_limit) { |
1298 | 1298 | $param .= '&limit='.((int) $limit); |
1299 | 1299 | } |
1300 | 1300 | if ($search_month > 0) { |
1301 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
1301 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
1302 | 1302 | } |
1303 | 1303 | if ($search_year > 0) { |
1304 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
1304 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
1305 | 1305 | } |
1306 | 1306 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
1307 | 1307 | $param .= '&search_user='.urlencode($search_user); |
1308 | 1308 | } |
1309 | 1309 | if ($search_task_ref != '') { |
1310 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
1310 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
1311 | 1311 | } |
1312 | 1312 | if ($search_company != '') { |
1313 | - $param .= '&$search_company=' . urlencode($search_company); |
|
1313 | + $param .= '&$search_company='.urlencode($search_company); |
|
1314 | 1314 | } |
1315 | 1315 | if ($search_company_alias != '') { |
1316 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
1316 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
1317 | 1317 | } |
1318 | 1318 | if ($search_project_ref != '') { |
1319 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
1319 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
1320 | 1320 | } |
1321 | 1321 | if ($search_project_label != '') { |
1322 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
1322 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
1323 | 1323 | } |
1324 | 1324 | if ($search_task_label != '') { |
1325 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
1325 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
1326 | 1326 | } |
1327 | 1327 | if ($search_note != '') { |
1328 | - $param .= '&search_note=' . urlencode($search_note); |
|
1328 | + $param .= '&search_note='.urlencode($search_note); |
|
1329 | 1329 | } |
1330 | 1330 | if ($search_duration != '') { |
1331 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
1331 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
1332 | 1332 | } |
1333 | 1333 | if ($optioncss != '') { |
1334 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
1334 | + $param .= '&optioncss='.urlencode($optioncss); |
|
1335 | 1335 | } |
1336 | 1336 | if ($search_date_startday) { |
1337 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
1337 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
1338 | 1338 | } |
1339 | 1339 | if ($search_date_startmonth) { |
1340 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
1340 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
1341 | 1341 | } |
1342 | 1342 | if ($search_date_startyear) { |
1343 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
1343 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
1344 | 1344 | } |
1345 | 1345 | if ($search_date_endday) { |
1346 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
1346 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
1347 | 1347 | } |
1348 | 1348 | if ($search_date_endmonth) { |
1349 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
1349 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
1350 | 1350 | } |
1351 | 1351 | if ($search_date_endyear) { |
1352 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
1352 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
1353 | 1353 | } |
1354 | 1354 | if ($search_timespent_starthour) { |
1355 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
1355 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
1356 | 1356 | } |
1357 | 1357 | if ($search_timespent_startmin) { |
1358 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
1358 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
1359 | 1359 | } |
1360 | 1360 | if ($search_timespent_endhour) { |
1361 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
1361 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
1362 | 1362 | } |
1363 | 1363 | if ($search_timespent_endmin) { |
1364 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
1364 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
1365 | 1365 | } |
1366 | 1366 | |
1367 | 1367 | /* |
@@ -1369,24 +1369,24 @@ discard block |
||
1369 | 1369 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
1370 | 1370 | */ |
1371 | 1371 | if ($id) { |
1372 | - $param .= '&id=' . urlencode((string) ($id)); |
|
1372 | + $param .= '&id='.urlencode((string) ($id)); |
|
1373 | 1373 | } |
1374 | 1374 | if ($projectid) { |
1375 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
1375 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
1376 | 1376 | } |
1377 | 1377 | if ($withproject) { |
1378 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
1378 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
1379 | 1379 | } |
1380 | 1380 | // Add $param from hooks |
1381 | 1381 | $parameters = array('param' => &$param); |
1382 | 1382 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
1383 | 1383 | $param .= $hookmanager->resPrint; |
1384 | 1384 | |
1385 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
1385 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
1386 | 1386 | if ($optioncss != '') { |
1387 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
1387 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
1388 | 1388 | } |
1389 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1389 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1390 | 1390 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
1391 | 1391 | if ($action == 'editline') { |
1392 | 1392 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1401,13 +1401,13 @@ discard block |
||
1401 | 1401 | } else { |
1402 | 1402 | print '<input type="hidden" name="action" value="list">'; |
1403 | 1403 | } |
1404 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
1405 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
1404 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
1405 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
1406 | 1406 | |
1407 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
1408 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
1409 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
1410 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
1407 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
1408 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
1409 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
1410 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
1411 | 1411 | print '<input type="hidden" name="page_y" value="">'; |
1412 | 1412 | |
1413 | 1413 | // Form to convert time spent into invoice |
@@ -1434,7 +1434,7 @@ discard block |
||
1434 | 1434 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
1435 | 1435 | ); |
1436 | 1436 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
1437 | - print "\n" . '<script type="text/javascript">'; |
|
1437 | + print "\n".'<script type="text/javascript">'; |
|
1438 | 1438 | print ' |
1439 | 1439 | $(document).ready(function () { |
1440 | 1440 | setDetailVisibility(); |
@@ -1451,8 +1451,8 @@ discard block |
||
1451 | 1451 | } |
1452 | 1452 | }); |
1453 | 1453 | '; |
1454 | - print '</script>' . "\n"; |
|
1455 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
1454 | + print '</script>'."\n"; |
|
1455 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
1456 | 1456 | print '</td>'; |
1457 | 1457 | print '</tr>'; |
1458 | 1458 | |
@@ -1502,14 +1502,14 @@ discard block |
||
1502 | 1502 | |
1503 | 1503 | print '<br>'; |
1504 | 1504 | print '<div class="center">'; |
1505 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
1506 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1505 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
1506 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1507 | 1507 | print '</div>'; |
1508 | 1508 | print '<br>'; |
1509 | 1509 | } else { |
1510 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
1510 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
1511 | 1511 | print '<div class="center">'; |
1512 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1512 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1513 | 1513 | print '</div>'; |
1514 | 1514 | $massaction = ''; |
1515 | 1515 | } |
@@ -1522,7 +1522,7 @@ discard block |
||
1522 | 1522 | print '<table class="noborder centpercent">'; |
1523 | 1523 | print '<tr>'; |
1524 | 1524 | print '<td class="titlefield">'; |
1525 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
1525 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
1526 | 1526 | print '</td>'; |
1527 | 1527 | print '<td>'; |
1528 | 1528 | $forminter = new FormIntervention($db); |
@@ -1532,14 +1532,14 @@ discard block |
||
1532 | 1532 | print '</table>'; |
1533 | 1533 | |
1534 | 1534 | print '<div class="center">'; |
1535 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
1536 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
1535 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
1536 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
1537 | 1537 | print '</div>'; |
1538 | 1538 | print '<br>'; |
1539 | 1539 | } else { |
1540 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
1540 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
1541 | 1541 | print '<div class="center">'; |
1542 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
1542 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
1543 | 1543 | print '</div>'; |
1544 | 1544 | $massaction = ''; |
1545 | 1545 | } |
@@ -1601,14 +1601,14 @@ discard block |
||
1601 | 1601 | $sql .= " AND t.fk_element =".((int) $object->id); |
1602 | 1602 | } elseif (!empty($projectidforalltimes)) { |
1603 | 1603 | // Limit on one project |
1604 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")"; |
|
1604 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; |
|
1605 | 1605 | } elseif (!empty($allprojectforuser)) { |
1606 | 1606 | // Limit on on user |
1607 | 1607 | if (empty($search_user)) { |
1608 | 1608 | $search_user = $user->id; |
1609 | 1609 | } |
1610 | 1610 | if ($search_user > 0) { |
1611 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
1611 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
1612 | 1612 | } |
1613 | 1613 | } |
1614 | 1614 | |
@@ -1661,13 +1661,13 @@ discard block |
||
1661 | 1661 | if ($search_timespent_starthour || $search_timespent_startmin) { |
1662 | 1662 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
1663 | 1663 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
1664 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
1664 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | if ($search_timespent_endhour || $search_timespent_endmin) { |
1668 | 1668 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
1669 | 1669 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
1670 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
1670 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
1671 | 1671 | } |
1672 | 1672 | } |
1673 | 1673 | |
@@ -1715,13 +1715,13 @@ discard block |
||
1715 | 1715 | |
1716 | 1716 | if ($num >= 0) { |
1717 | 1717 | if (!empty($projectidforalltimes)) { |
1718 | - print '<!-- List of time spent for project -->' . "\n"; |
|
1718 | + print '<!-- List of time spent for project -->'."\n"; |
|
1719 | 1719 | |
1720 | 1720 | $title = $langs->trans("ListTaskTimeUserProject"); |
1721 | 1721 | |
1722 | 1722 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
1723 | 1723 | } else { |
1724 | - print '<!-- List of time spent -->' . "\n"; |
|
1724 | + print '<!-- List of time spent -->'."\n"; |
|
1725 | 1725 | |
1726 | 1726 | $title = $langs->trans("ListTaskTimeForTask"); |
1727 | 1727 | |
@@ -1743,26 +1743,26 @@ discard block |
||
1743 | 1743 | * Form to add a new line of time spent |
1744 | 1744 | */ |
1745 | 1745 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
1746 | - print '<!-- table to add time spent -->' . "\n"; |
|
1746 | + print '<!-- table to add time spent -->'."\n"; |
|
1747 | 1747 | if (!empty($id)) { |
1748 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
1748 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
1749 | 1749 | } |
1750 | 1750 | |
1751 | 1751 | 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 |
1752 | 1752 | print '<table class="noborder nohover centpercent">'; |
1753 | 1753 | |
1754 | 1754 | print '<tr class="liste_titre">'; |
1755 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
1755 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
1756 | 1756 | if (!empty($allprojectforuser)) { |
1757 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
1757 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
1758 | 1758 | } |
1759 | 1759 | if (empty($id)) { |
1760 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
1760 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
1761 | 1761 | } |
1762 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
1763 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
1764 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
1765 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
1762 | + print '<td>'.$langs->trans("By").'</td>'; |
|
1763 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
1764 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
1765 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
1766 | 1766 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
1767 | 1767 | print '<td></td>'; |
1768 | 1768 | |
@@ -1816,14 +1816,14 @@ discard block |
||
1816 | 1816 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
1817 | 1817 | } else { |
1818 | 1818 | if ($nboftasks) { |
1819 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
1819 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
1820 | 1820 | } |
1821 | 1821 | } |
1822 | 1822 | print '</td>'; |
1823 | 1823 | |
1824 | 1824 | // Note |
1825 | 1825 | print '<td>'; |
1826 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
1826 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
1827 | 1827 | print '</td>'; |
1828 | 1828 | |
1829 | 1829 | // Duration - Time spent |
@@ -1891,7 +1891,7 @@ discard block |
||
1891 | 1891 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1892 | 1892 | |
1893 | 1893 | print '<div class="div-table-responsive">'; |
1894 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
1894 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
1895 | 1895 | |
1896 | 1896 | // Fields title search |
1897 | 1897 | // -------------------------------------------------------------------- |
@@ -1916,20 +1916,20 @@ discard block |
||
1916 | 1916 | } |
1917 | 1917 | // Thirdparty |
1918 | 1918 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
1919 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
1919 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
1920 | 1920 | } |
1921 | 1921 | |
1922 | 1922 | // Thirdparty alias |
1923 | 1923 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
1924 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
1924 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
1925 | 1925 | } |
1926 | 1926 | |
1927 | 1927 | if (!empty($allprojectforuser)) { |
1928 | 1928 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
1929 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
1929 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
1930 | 1930 | } |
1931 | 1931 | if (!empty($arrayfields['p.project_label']['checked'])) { |
1932 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
1932 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
1933 | 1933 | } |
1934 | 1934 | } |
1935 | 1935 | // Task |
@@ -1947,7 +1947,7 @@ discard block |
||
1947 | 1947 | } |
1948 | 1948 | // Note |
1949 | 1949 | if (!empty($arrayfields['t.note']['checked'])) { |
1950 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
1950 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
1951 | 1951 | } |
1952 | 1952 | // Duration |
1953 | 1953 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1958,7 +1958,7 @@ discard block |
||
1958 | 1958 | if ($search_timespent_starthour || $search_timespent_startmin) { |
1959 | 1959 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
1960 | 1960 | } |
1961 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
1961 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
1962 | 1962 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
1963 | 1963 | print '</div>'; |
1964 | 1964 | |
@@ -1966,7 +1966,7 @@ discard block |
||
1966 | 1966 | if ($search_timespent_endhour || $search_timespent_endmin) { |
1967 | 1967 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
1968 | 1968 | } |
1969 | - print '<div class="nowraponall">' . $langs->trans('to') . ' '; |
|
1969 | + print '<div class="nowraponall">'.$langs->trans('to').' '; |
|
1970 | 1970 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
1971 | 1971 | print '</div>'; |
1972 | 1972 | |
@@ -1982,7 +1982,7 @@ discard block |
||
1982 | 1982 | } |
1983 | 1983 | // Value billed |
1984 | 1984 | if (!empty($arrayfields['valuebilled']['checked'])) { |
1985 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
1985 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
1986 | 1986 | } |
1987 | 1987 | |
1988 | 1988 | /* |
@@ -2000,7 +2000,7 @@ discard block |
||
2000 | 2000 | print $searchpicto; |
2001 | 2001 | print '</td>'; |
2002 | 2002 | } |
2003 | - print '</tr>' . "\n"; |
|
2003 | + print '</tr>'."\n"; |
|
2004 | 2004 | |
2005 | 2005 | |
2006 | 2006 | $totalarray = array(); |
@@ -2114,7 +2114,7 @@ discard block |
||
2114 | 2114 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
2115 | 2115 | print '<td class="center nowraponall">'; |
2116 | 2116 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
2117 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
2117 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
2118 | 2118 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
2119 | 2119 | print '<br>'; |
2120 | 2120 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2125,7 +2125,7 @@ discard block |
||
2125 | 2125 | print '</a>'; |
2126 | 2126 | |
2127 | 2127 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
2128 | - 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' : '') . '">'; |
|
2128 | + 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' : '').'">'; |
|
2129 | 2129 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
2130 | 2130 | print '</a>'; |
2131 | 2131 | } |
@@ -2140,7 +2140,7 @@ discard block |
||
2140 | 2140 | $selected = 1; |
2141 | 2141 | } |
2142 | 2142 | print ' '; |
2143 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
2143 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
2144 | 2144 | } |
2145 | 2145 | } |
2146 | 2146 | } |
@@ -2259,7 +2259,7 @@ discard block |
||
2259 | 2259 | } |
2260 | 2260 | } |
2261 | 2261 | } elseif ($action !== 'createtime') { |
2262 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
2262 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
2263 | 2263 | } |
2264 | 2264 | |
2265 | 2265 | // Task label |
@@ -2288,9 +2288,9 @@ discard block |
||
2288 | 2288 | } |
2289 | 2289 | if (count($contactsoftask) > 0) { |
2290 | 2290 | print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"'); |
2291 | - 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 |
|
2291 | + 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 |
|
2292 | 2292 | } else { |
2293 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2293 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2294 | 2294 | } |
2295 | 2295 | } else { |
2296 | 2296 | $userstatic->id = $task_time->fk_user; |
@@ -2312,7 +2312,7 @@ discard block |
||
2312 | 2312 | if (!empty($arrayfields['t.note']['checked'])) { |
2313 | 2313 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2314 | 2314 | print '<td class="small">'; |
2315 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2315 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2316 | 2316 | print '</td>'; |
2317 | 2317 | } else { |
2318 | 2318 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2323,7 +2323,7 @@ discard block |
||
2323 | 2323 | $totalarray['nbfield']++; |
2324 | 2324 | } |
2325 | 2325 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2326 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2326 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2327 | 2327 | } |
2328 | 2328 | |
2329 | 2329 | // Time spent |
@@ -2384,7 +2384,7 @@ discard block |
||
2384 | 2384 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
2385 | 2385 | |
2386 | 2386 | print '<td class="nowraponall right">'; |
2387 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
2387 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
2388 | 2388 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
2389 | 2389 | print '</span>'; |
2390 | 2390 | print '</td>'; |
@@ -2435,7 +2435,7 @@ discard block |
||
2435 | 2435 | print $langs->trans("No"); |
2436 | 2436 | } |
2437 | 2437 | } else { |
2438 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
2438 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
2439 | 2439 | } |
2440 | 2440 | } |
2441 | 2441 | print '</td>'; |
@@ -2469,7 +2469,7 @@ discard block |
||
2469 | 2469 | print '</a>'; |
2470 | 2470 | |
2471 | 2471 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
2472 | - 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' : '') . '">'; |
|
2472 | + 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' : '').'">'; |
|
2473 | 2473 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
2474 | 2474 | print '</a>'; |
2475 | 2475 | } |
@@ -2484,7 +2484,7 @@ discard block |
||
2484 | 2484 | $selected = 1; |
2485 | 2485 | } |
2486 | 2486 | print ' '; |
2487 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
2487 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
2488 | 2488 | } |
2489 | 2489 | } |
2490 | 2490 | } |
@@ -2579,7 +2579,7 @@ discard block |
||
2579 | 2579 | print img_object('', 'user', 'class="hideonsmartphone"'); |
2580 | 2580 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); |
2581 | 2581 | } else { |
2582 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2582 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2583 | 2583 | } |
2584 | 2584 | } else { |
2585 | 2585 | $userstatic->id = $task_time->fk_user; |
@@ -2596,13 +2596,13 @@ discard block |
||
2596 | 2596 | if (!empty($arrayfields['t.note']['checked'])) { |
2597 | 2597 | print '<td class="tdoverflowmax300">'; |
2598 | 2598 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2599 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2599 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2600 | 2600 | } else { |
2601 | 2601 | print dol_nl2br($task_time->note); |
2602 | 2602 | } |
2603 | 2603 | print '</td>'; |
2604 | 2604 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2605 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2605 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2606 | 2606 | } |
2607 | 2607 | |
2608 | 2608 | // Time spent |
@@ -2743,7 +2743,7 @@ discard block |
||
2743 | 2743 | print img_object('', 'user', 'class="hideonsmartphone"'); |
2744 | 2744 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask); |
2745 | 2745 | } else { |
2746 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
2746 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
2747 | 2747 | } |
2748 | 2748 | } else { |
2749 | 2749 | $userstatic->id = $task_time->fk_user; |
@@ -2760,13 +2760,13 @@ discard block |
||
2760 | 2760 | if (!empty($arrayfields['t.note']['checked'])) { |
2761 | 2761 | print '<td class="small tdoverflowmax300"">'; |
2762 | 2762 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2763 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
2763 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
2764 | 2764 | } else { |
2765 | 2765 | print dol_nl2br($task_time->note); |
2766 | 2766 | } |
2767 | 2767 | print '</td>'; |
2768 | 2768 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
2769 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
2769 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
2770 | 2770 | } |
2771 | 2771 | |
2772 | 2772 | // Time spent |
@@ -2840,14 +2840,14 @@ discard block |
||
2840 | 2840 | $i++; |
2841 | 2841 | if ($i == 1) { |
2842 | 2842 | if ($num < $limit && empty($offset)) { |
2843 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
2843 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
2844 | 2844 | } else { |
2845 | 2845 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
2846 | 2846 | } |
2847 | 2847 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
2848 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
2848 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
2849 | 2849 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
2850 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
2850 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
2851 | 2851 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
2852 | 2852 | } else { |
2853 | 2853 | print '<td></td>'; |
@@ -2863,8 +2863,8 @@ discard block |
||
2863 | 2863 | $totalnboffields++; |
2864 | 2864 | } |
2865 | 2865 | } |
2866 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
2867 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
2866 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
2867 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
2868 | 2868 | print '</td></tr>'; |
2869 | 2869 | } |
2870 | 2870 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $conf->global->AGENDA_EXT_NB = 5; |
51 | 51 | } |
52 | 52 | $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB'); |
53 | -$DELAYFORCACHE = 300; // 300 seconds |
|
53 | +$DELAYFORCACHE = 300; // 300 seconds |
|
54 | 54 | |
55 | 55 | $disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); |
56 | 56 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $mode = GETPOST('mode', 'aZ09'); |
109 | 109 | if (empty($mode) && preg_match('/show_/', $action)) { |
110 | - $mode = $action; // For backward compatibility |
|
110 | + $mode = $action; // For backward compatibility |
|
111 | 111 | } |
112 | 112 | $resourceid = GETPOST("search_resourceid", 'int'); |
113 | 113 | $year = GETPOSTINT("year") ? GETPOSTINT("year") : date("Y"); |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | $status = ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS') || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); |
142 | 142 | } |
143 | 143 | |
144 | -$defaultview = getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'); // default for app |
|
145 | -$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
144 | +$defaultview = getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'); // default for app |
|
145 | +$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
146 | 146 | if (empty($mode) && !GETPOSTISSET('mode')) { |
147 | 147 | $mode = $defaultview; |
148 | 148 | } |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | |
538 | 538 | $viewmode .= '</div>'; |
539 | 539 | |
540 | -$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
540 | +$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
541 | 541 | |
542 | 542 | |
543 | 543 | $newparam = ''; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $newparam .= '&month='.((int) $month).'&year='.((int) $tmpforcreatebutton['year']).'&mode='.urlencode($mode); |
549 | 549 | |
550 | 550 | //$param='month='.$monthshown.'&year='.$year; |
551 | - $hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
551 | + $hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
552 | 552 | |
553 | 553 | $urltocreateaction = DOL_URL_ROOT.'/comm/action/card.php?action=create'; |
554 | 554 | $urltocreateaction .= '&apyear='.$tmpforcreatebutton['year'].'&apmonth='.$tmpforcreatebutton['mon'].'&apday='.$tmpforcreatebutton['mday'].'&aphour='.$tmpforcreatebutton['hours'].'&apmin='.$tmpforcreatebutton['minutes']; |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | $sql .= " WHERE bc.status = 1"; |
575 | 575 | $sql .= " AND ba.status = 1"; |
576 | 576 | if (!empty($filtert) && $filtert != -1) { |
577 | - $sql .= " AND bc.visibility = ".(int) $filtert ; |
|
577 | + $sql .= " AND bc.visibility = ".(int) $filtert; |
|
578 | 578 | } |
579 | 579 | $resql = $db->query($sql); |
580 | 580 | if ($resql) { |
@@ -628,9 +628,9 @@ discard block |
||
628 | 628 | if ($user->hasRight("holiday", "read")) { |
629 | 629 | $s .= ' |
630 | 630 | <div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="check_holiday"' . ($check_holiday |
631 | - ? ' checked' : '') . '> |
|
631 | + ? ' checked' : '').'> |
|
632 | 632 | <label for="check_holiday" class="labelcalendar"> |
633 | - <span class="check_holiday_text">' . $langs->trans("Holidays") . '</span> |
|
633 | + <span class="check_holiday_text">' . $langs->trans("Holidays").'</span> |
|
634 | 634 | </label> |
635 | 635 | </div>'; |
636 | 636 | } |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $s .= '</script>'."\n"; |
657 | 657 | |
658 | 658 | foreach ($showextcals as $val) { |
659 | - $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
659 | + $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
660 | 660 | |
661 | 661 | if (!empty($val['default']) || GETPOSTINT('check_ext'.$htmlname)) { |
662 | 662 | $default = "checked"; |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | // event->datep and event->datef must be GMT date. |
902 | 902 | if ($event->fulldayevent) { |
903 | 903 | $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); |
904 | - $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
904 | + $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
905 | 905 | $event->datef = $db->jdate($obj->datep2, $tzforfullday ? 'tzuser' : 'tzserver'); |
906 | 906 | } else { |
907 | 907 | // Example: $obj->datep = '1970-01-01 01:00:00', jdate will return 0 if TZ of PHP server is Europe/Berlin (+1) |
@@ -978,8 +978,8 @@ discard block |
||
978 | 978 | // Loop on each day covered by action to prepare an index to show on calendar |
979 | 979 | $loop = true; |
980 | 980 | $j = 0; |
981 | - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
982 | - $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
981 | + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
982 | + $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
983 | 983 | /* |
984 | 984 | print 'GMT '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt').'<br>'; |
985 | 985 | print 'TZSERVER '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzserver').'<br>'; |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | |
1108 | 1108 | if ($mode == 'show_day') { |
1109 | 1109 | // Request only leaves for the current selected day |
1110 | - $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time |
|
1110 | + $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time |
|
1111 | 1111 | } elseif ($mode == 'show_week') { |
1112 | 1112 | // Restrict on current month (we get more, but we will filter later) |
1113 | 1113 | $sql .= " AND date_debut < '".$db->idate(dol_get_last_day($year, $month))."'"; |
@@ -1653,7 +1653,7 @@ discard block |
||
1653 | 1653 | |
1654 | 1654 | for ($iter_day = 0; $iter_day < 7; $iter_day++) { |
1655 | 1655 | // Show days of the current week |
1656 | - $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
1656 | + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
1657 | 1657 | $tmpday = dol_print_date($curtime, '%d', 'tzuserrel'); |
1658 | 1658 | $tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel'); |
1659 | 1659 | $tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel'); |
@@ -1883,9 +1883,9 @@ discard block |
||
1883 | 1883 | $tmpholiday = new Holiday($db); |
1884 | 1884 | |
1885 | 1885 | foreach ($eventarray as $daykey => $notused) { // daykey is the 'YYYYMMDD' to show according to user |
1886 | - $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1887 | - $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1888 | - $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1886 | + $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1887 | + $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1888 | + $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1889 | 1889 | |
1890 | 1890 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."<br>\n"; |
1891 | 1891 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' day='.$day.' month='.$month.' year='.$year."<br>\n"; |
@@ -2177,7 +2177,7 @@ discard block |
||
2177 | 2177 | $event->label = $titletoshow; |
2178 | 2178 | // Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user. |
2179 | 2179 | $titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : ''); |
2180 | - $titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title valignmiddle', '', 0, 0); // do not add 'inline-block' in css here: it makes the title transformed completely into '...' |
|
2180 | + $titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title valignmiddle', '', 0, 0); // do not add 'inline-block' in css here: it makes the title transformed completely into '...' |
|
2181 | 2181 | $event->label = $savlabel; |
2182 | 2182 | } |
2183 | 2183 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $nbContacts = $dataretrieved; |
59 | 59 | } else { |
60 | 60 | $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); |
61 | - dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
61 | + dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
62 | 62 | } |
63 | 63 | $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
64 | 64 | $head[$h][1] = $langs->trans("ProjectContact"); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
83 | 83 | $taskstatic = new Task($db); |
84 | 84 | $nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0)); |
85 | - dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
85 | + dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
86 | 86 | } |
87 | 87 | $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
88 | 88 | $head[$h][1] = $langs->trans("Tasks"); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $obj = $db->fetch_object($resql); |
112 | 112 | if ($obj) { |
113 | 113 | $nbTimeSpent = 1; |
114 | - dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
114 | + dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
115 | 115 | } |
116 | 116 | } else { |
117 | 117 | dol_print_error($db); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | if (isModEnabled("bank")) { |
202 | 202 | $nbElements += $project->getElementCount('variouspayment', 'payment_various'); |
203 | 203 | } |
204 | - dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
204 | + dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
205 | 205 | } |
206 | 206 | $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$project->id; |
207 | 207 | $head[$h][1] = $langs->trans("ProjectOverview"); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | if (isModEnabled('eventorganization') && !empty($project->usage_organize_event)) { |
229 | 229 | $langs->load('eventorganization'); |
230 | - $head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id; |
|
230 | + $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?projectid='.$project->id; |
|
231 | 231 | $head[$h][1] = $langs->trans("EventOrganization"); |
232 | 232 | |
233 | 233 | // Enable caching of conf or booth count |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } else { |
249 | 249 | $nbConfOrBooth = count($result); |
250 | 250 | } |
251 | - dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
251 | + dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
252 | 252 | } |
253 | 253 | $cachekey = 'count_attendees_'.$project->id; |
254 | 254 | $dataretrieved = dol_getcache($cachekey); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } else { |
265 | 265 | $nbAttendees = count($result); |
266 | 266 | } |
267 | - dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
267 | + dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
268 | 268 | } |
269 | 269 | if ($nbConfOrBooth > 0 || $nbAttendees > 0) { |
270 | 270 | $head[$h][1] .= '<span class="badge marginleftonlyshort">'; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
317 | 317 | $nbLinks = Link::count($db, $project->element, $project->id); |
318 | 318 | $totalAttached = $nbFiles + $nbLinks; |
319 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
319 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
320 | 320 | } |
321 | 321 | $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$project->id; |
322 | 322 | $head[$h][1] = $langs->trans('Documents'); |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $nbComments = $dataretrieved; |
338 | 338 | } else { |
339 | 339 | $nbComments = $project->getNbComments(); |
340 | - dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
340 | + dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
341 | 341 | } |
342 | 342 | $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$project->id; |
343 | 343 | $head[$h][1] = $langs->trans("CommentLink"); |
@@ -552,11 +552,11 @@ discard block |
||
552 | 552 | $h++; |
553 | 553 | |
554 | 554 | if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
555 | - $head[$h][0] = DOL_URL_ROOT . '/projet/admin/project_task_extrafields.php'; |
|
555 | + $head[$h][0] = DOL_URL_ROOT.'/projet/admin/project_task_extrafields.php'; |
|
556 | 556 | $head[$h][1] = $langs->trans("ExtraFieldsProjectTask"); |
557 | 557 | $nbExtrafields = $extrafields->attributes['projet_task']['count']; |
558 | 558 | if ($nbExtrafields > 0) { |
559 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbExtrafields . '</span>'; |
|
559 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>'; |
|
560 | 560 | } |
561 | 561 | $head[$h][2] = 'attributes_task'; |
562 | 562 | $h++; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | $taskstatic->label = (!empty($taskrole[$lines[$i]->id]) ? $langs->trans("YourRole").': '.$taskrole[$lines[$i]->id] : ''); |
684 | 684 | $taskstatic->projectstatus = $lines[$i]->projectstatus; |
685 | 685 | $taskstatic->progress = $lines[$i]->progress; |
686 | - $taskstatic->fk_statut = $lines[$i]->status; // deprecated |
|
686 | + $taskstatic->fk_statut = $lines[$i]->status; // deprecated |
|
687 | 687 | $taskstatic->status = $lines[$i]->status; |
688 | 688 | $taskstatic->date_start = $lines[$i]->date_start; |
689 | 689 | $taskstatic->date_end = $lines[$i]->date_end; |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | if (in_array($lines[$i]->id, $arrayofselected)) { |
700 | 700 | $selected = 1; |
701 | 701 | } |
702 | - print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
702 | + print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
703 | 703 | print '</td>'; |
704 | 704 | } |
705 | 705 | |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | if (in_array($lines[$i]->id, $arrayofselected)) { |
953 | 953 | $selected = 1; |
954 | 954 | } |
955 | - print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
955 | + print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
956 | 956 | |
957 | 957 | print '</td>'; |
958 | 958 | } |
@@ -2097,7 +2097,7 @@ discard block |
||
2097 | 2097 | |
2098 | 2098 | $disabledtaskday = $disabledtask; |
2099 | 2099 | |
2100 | - if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2100 | + if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2101 | 2101 | $disabledtaskday = 1; |
2102 | 2102 | } |
2103 | 2103 | |
@@ -2381,7 +2381,7 @@ discard block |
||
2381 | 2381 | $j = 0; |
2382 | 2382 | foreach ($TWeek as $weekIndex => $weekNb) { |
2383 | 2383 | $j++; |
2384 | - $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ; |
|
2384 | + $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0; |
|
2385 | 2385 | if (!isset($totalforeachweek[$weekNb])) { |
2386 | 2386 | $totalforeachweek[$weekNb] = 0; |
2387 | 2387 | } |
@@ -2396,7 +2396,7 @@ discard block |
||
2396 | 2396 | $disabledtaskweek = $disabledtask; |
2397 | 2397 | $firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year); |
2398 | 2398 | |
2399 | - if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2399 | + if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2400 | 2400 | $disabledtaskweek = 1; |
2401 | 2401 | } |
2402 | 2402 |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | |
310 | 310 | print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="'.$fieldv.'" name="progress">%</td>'; |
311 | 311 | } else { |
312 | - print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="' . (GETPOSTISSET('progress') ? GETPOST('progress') : $line->situation_percent) . '" name="progress">%</td>'; |
|
312 | + print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="'.(GETPOSTISSET('progress') ? GETPOST('progress') : $line->situation_percent).'" name="progress">%</td>'; |
|
313 | 313 | } |
314 | 314 | $coldisplay++; |
315 | 315 | print '<td></td>'; |
@@ -408,39 +408,39 @@ discard block |
||
408 | 408 | } |
409 | 409 | if (!$line->date_start) { |
410 | 410 | if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) { |
411 | - print 'jQuery("#date_starthour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");'; |
|
411 | + print 'jQuery("#date_starthour").val("'.getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");'; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | |
415 | 415 | if (isset($conf->global->MAIN_DEFAULT_DATE_START_MIN)) { |
416 | - print 'jQuery("#date_startmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");'; |
|
416 | + print 'jQuery("#date_startmin").val("'.getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");'; |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | $res = 1; |
420 | 420 | if (!is_object($line->product)) { |
421 | - $res = $line->fetch_product(); // fetch product to know its type and allow isMandatoryperiod() |
|
421 | + $res = $line->fetch_product(); // fetch product to know its type and allow isMandatoryperiod() |
|
422 | 422 | } |
423 | 423 | if ($res > 0) { |
424 | 424 | if ($line->product->isMandatoryPeriod() && $line->product->isService()) { |
425 | - print 'jQuery("#date_start").addClass("inputmandatory");'; // Do not add tag "required", this block the cancel action when value not set |
|
425 | + print 'jQuery("#date_start").addClass("inputmandatory");'; // Do not add tag "required", this block the cancel action when value not set |
|
426 | 426 | } |
427 | 427 | } |
428 | 428 | } |
429 | 429 | if (!$line->date_end) { |
430 | 430 | if (isset($conf->global->MAIN_DEFAULT_DATE_END_HOUR)) { |
431 | - print 'jQuery("#date_endhour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");'; |
|
431 | + print 'jQuery("#date_endhour").val("'.getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");'; |
|
432 | 432 | } |
433 | 433 | if (isset($conf->global->MAIN_DEFAULT_DATE_END_MIN)) { |
434 | - print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");'; |
|
434 | + print 'jQuery("#date_endmin").val("'.getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");'; |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | $res = 1; |
438 | 438 | if (!is_object($line->product)) { |
439 | - $res = $line->fetch_product(); // fetch product to know its type and allow isMandatoryperiod() |
|
439 | + $res = $line->fetch_product(); // fetch product to know its type and allow isMandatoryperiod() |
|
440 | 440 | } |
441 | - if ($res > 0) { |
|
441 | + if ($res > 0) { |
|
442 | 442 | if ($line->product->isMandatoryperiod() && $line->product->isService()) { |
443 | - print 'jQuery("#date_end").addClass("inputmandatory");'; // Do not add tag "required", this block the cancel action when value not set |
|
443 | + print 'jQuery("#date_end").addClass("inputmandatory");'; // Do not add tag "required", this block the cancel action when value not set |
|
444 | 444 | } |
445 | 445 | } |
446 | 446 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $html = '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">'; |
70 | 70 | if ($useempty) { |
71 | - $html.='<option value="-1"> </option>'; |
|
71 | + $html .= '<option value="-1"> </option>'; |
|
72 | 72 | } |
73 | 73 | $arrayoflabels = $tmpep->labelStatus; |
74 | 74 | if ($useshortlabel) { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | if (!empty($selected) && $selected == $key) { |
79 | 79 | $html .= '<option value="'.$key.'" selected>'; |
80 | 80 | } else { |
81 | - $html .= '<option value="'.$key.'">'; |
|
81 | + $html .= '<option value="'.$key.'">'; |
|
82 | 82 | } |
83 | 83 | $html .= $langs->trans($val); |
84 | 84 | $html .= '</option>'; |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $search_date_due_start = ''; |
283 | 283 | // Due date end |
284 | 284 | $search_date_due_end_day = ''; |
285 | - $search_date_due_end_month = ''; |
|
285 | + $search_date_due_end_month = ''; |
|
286 | 286 | $search_date_due_end_year = ''; |
287 | 287 | $search_date_due_end = ''; |
288 | 288 | $search_lettering_code = ''; |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | } else { |
326 | 326 | $filter['t.numero_compte>='] = $search_accountancy_code_start; |
327 | 327 | } |
328 | - $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); |
|
328 | + $param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start); |
|
329 | 329 | } |
330 | 330 | if (!empty($search_accountancy_code_end)) { |
331 | 331 | if ($type == 'sub') { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | } else { |
334 | 334 | $filter['t.numero_compte<='] = $search_accountancy_code_end; |
335 | 335 | } |
336 | - $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); |
|
336 | + $param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end); |
|
337 | 337 | } |
338 | 338 | if (!empty($search_label_account)) { |
339 | 339 | $filter['t.label_compte'] = $search_label_account; |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | if (!$error) { |
528 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
528 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
529 | 529 | exit(); |
530 | 530 | } |
531 | 531 | } elseif ($massaction == 'letteringmanual') { |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | setEventMessages('', $lettering->errors, 'errors'); |
536 | 536 | } else { |
537 | 537 | setEventMessages($langs->trans($result == 0 ? 'AccountancyNoLetteringModified' : 'AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); |
538 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
538 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
539 | 539 | exit(); |
540 | 540 | } |
541 | 541 | } elseif ($type == 'sub' && $massaction == 'letteringpartial') { |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | setEventMessages('', $lettering->errors, 'errors'); |
546 | 546 | } else { |
547 | 547 | setEventMessages($langs->trans($result == 0 ? 'AccountancyNoLetteringModified' : 'AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); |
548 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
548 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
549 | 549 | exit(); |
550 | 550 | } |
551 | 551 | } elseif ($action == 'unletteringauto' && $confirm == "yes") { |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | } |
567 | 567 | |
568 | 568 | if (!$error) { |
569 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
569 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
570 | 570 | exit(); |
571 | 571 | } |
572 | 572 | } elseif ($action == 'unletteringmanual' && $confirm == "yes") { |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | setEventMessages('', $lettering->errors, 'errors'); |
577 | 577 | } else { |
578 | 578 | setEventMessages($langs->trans($result == 0 ? 'AccountancyNoUnletteringModified' : 'AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); |
579 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
579 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
580 | 580 | exit(); |
581 | 581 | } |
582 | 582 | } |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter, 'AND', 0); |
628 | 628 | } |
629 | 629 | //$num = count($object->lines); |
630 | - $num = $result; // $result is total nb of lines, or limit + 1, but $object->lines is always limited to $limit |
|
630 | + $num = $result; // $result is total nb of lines, or limit + 1, but $object->lines is always limited to $limit |
|
631 | 631 | |
632 | 632 | if ($result < 0) { |
633 | 633 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -684,13 +684,13 @@ discard block |
||
684 | 684 | // List of mass actions available |
685 | 685 | $arrayofmassactions = array(); |
686 | 686 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { |
687 | - $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringAuto'); |
|
688 | - $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringAuto'); |
|
689 | - $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringManual'); |
|
687 | + $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringAuto'); |
|
688 | + $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringAuto'); |
|
689 | + $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringManual'); |
|
690 | 690 | if ($type == 'sub') { |
691 | - $arrayofmassactions['letteringpartial'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringPartial'); |
|
691 | + $arrayofmassactions['letteringpartial'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringPartial'); |
|
692 | 692 | } |
693 | - $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringManual'); |
|
693 | + $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringManual'); |
|
694 | 694 | } |
695 | 695 | if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { |
696 | 696 | $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
@@ -723,11 +723,11 @@ discard block |
||
723 | 723 | if (empty($reshook)) { |
724 | 724 | $newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); |
725 | 725 | if ($type == 'sub') { |
726 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
727 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
726 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
727 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
728 | 728 | } else { |
729 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
730 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
729 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
730 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
731 | 731 | } |
732 | 732 | $newcardbutton .= dolGetButtonTitleSeparator(); |
733 | 733 | $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'); |
@@ -805,8 +805,8 @@ discard block |
||
805 | 805 | } else { |
806 | 806 | $stringforfirstkey .= ' CTL +'; |
807 | 807 | } |
808 | -$moreforfilter .= ' <a id="previous_account" accesskey="p" title="' . $stringforfirstkey . ' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
809 | -$moreforfilter .= ' <a id="next_account" accesskey="n" title="' . $stringforfirstkey . ' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
808 | +$moreforfilter .= ' <a id="previous_account" accesskey="p" title="'.$stringforfirstkey.' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
809 | +$moreforfilter .= ' <a id="next_account" accesskey="n" title="'.$stringforfirstkey.' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
810 | 810 | $moreforfilter .= <<<SCRIPT |
811 | 811 | <script type="text/javascript"> |
812 | 812 | jQuery(document).ready(function() { |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | $totalarray['val'] = array(); |
1033 | 1033 | $totalarray['val']['totaldebit'] = 0; |
1034 | 1034 | $totalarray['val']['totalcredit'] = 0; |
1035 | -$totalarray['val']['totalbalance']=0; |
|
1035 | +$totalarray['val']['totalbalance'] = 0; |
|
1036 | 1036 | |
1037 | 1037 | while ($i < min($num, $limit)) { |
1038 | 1038 | $line = $object->lines[$i]; |
@@ -1044,8 +1044,8 @@ discard block |
||
1044 | 1044 | } |
1045 | 1045 | //if (empty($accountg)) $accountg = '-'; |
1046 | 1046 | |
1047 | - $colspan = 0; // colspan before field 'label of operation' |
|
1048 | - $colspanend = 0; // colspan after debit/credit |
|
1047 | + $colspan = 0; // colspan before field 'label of operation' |
|
1048 | + $colspanend = 0; // colspan after debit/credit |
|
1049 | 1049 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
1050 | 1050 | $colspan++; |
1051 | 1051 | } |
@@ -1098,9 +1098,9 @@ discard block |
||
1098 | 1098 | if (isset($displayed_account_number)) { |
1099 | 1099 | print '<tr class="liste_total">'; |
1100 | 1100 | if ($type == 'sub') { |
1101 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accounta($displayed_account_number) . ':</td>'; |
|
1101 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accounta($displayed_account_number).':</td>'; |
|
1102 | 1102 | } else { |
1103 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accountg($displayed_account_number) . ':</td>'; |
|
1103 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accountg($displayed_account_number).':</td>'; |
|
1104 | 1104 | } |
1105 | 1105 | print '<td class="nowrap right">'.price(price2num($sous_total_debit, 'MT')).'</td>'; |
1106 | 1106 | print '<td class="nowrap right">'.price(price2num($sous_total_credit, 'MT')).'</td>'; |
@@ -1139,9 +1139,9 @@ discard block |
||
1139 | 1139 | print length_accounta($line->subledger_account); |
1140 | 1140 | } else { |
1141 | 1141 | // Should not happen: subledger account must be null or a non empty value |
1142 | - print '<span class="error">' . $langs->trans("Unknown"); |
|
1142 | + print '<span class="error">'.$langs->trans("Unknown"); |
|
1143 | 1143 | if ($line->subledger_label) { |
1144 | - print ' (' . $line->subledger_label . ')'; |
|
1144 | + print ' ('.$line->subledger_label.')'; |
|
1145 | 1145 | $htmltext = 'EmptyStringForSubledgerAccountButSubledgerLabelDefined'; |
1146 | 1146 | } else { |
1147 | 1147 | $htmltext = 'EmptyStringForSubledgerAccountAndSubledgerLabel'; |
@@ -1151,9 +1151,9 @@ discard block |
||
1151 | 1151 | } |
1152 | 1152 | } else { |
1153 | 1153 | if ($line->numero_compte != "" && $line->numero_compte != '-1') { |
1154 | - print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte); |
|
1154 | + print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte); |
|
1155 | 1155 | } else { |
1156 | - print '<span class="error">' . $langs->trans("Unknown") . '</span>'; |
|
1156 | + print '<span class="error">'.$langs->trans("Unknown").'</span>'; |
|
1157 | 1157 | } |
1158 | 1158 | } |
1159 | 1159 | print '</td>'; |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | if (in_array($line->id, $arrayofselected)) { |
1177 | 1177 | $selected = 1; |
1178 | 1178 | } |
1179 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
1179 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
1180 | 1180 | } |
1181 | 1181 | print '</td>'; |
1182 | 1182 | if (!$i) { |
@@ -1270,7 +1270,7 @@ discard block |
||
1270 | 1270 | } elseif ($line->doc_type == 'bank') { |
1271 | 1271 | print $objectstatic->getNomUrl(1); |
1272 | 1272 | $bank_ref = strstr($line->doc_ref, '-'); |
1273 | - print " " . $bank_ref; |
|
1273 | + print " ".$bank_ref; |
|
1274 | 1274 | } else { |
1275 | 1275 | print $line->doc_ref; |
1276 | 1276 | } |
@@ -1383,7 +1383,7 @@ discard block |
||
1383 | 1383 | if (in_array($line->id, $arrayofselected)) { |
1384 | 1384 | $selected = 1; |
1385 | 1385 | } |
1386 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
1386 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
1387 | 1387 | } |
1388 | 1388 | print '</td>'; |
1389 | 1389 | if (!$i) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $search_type = GETPOST("search_type", 'alpha'); |
78 | 78 | $search_account = GETPOST("search_account", 'int') ? GETPOST("search_account", 'int') : GETPOST("account", 'int'); |
79 | 79 | $search_accountancy_code = GETPOST('search_accountancy_code', 'alpha') ? GETPOST('search_accountancy_code', 'alpha') : GETPOST('accountancy_code', 'alpha'); |
80 | -$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int'); // Category id |
|
80 | +$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int'); // Category id |
|
81 | 81 | $search_ref = GETPOST('search_ref', 'alpha'); |
82 | 82 | $search_description = GETPOST("search_description", 'alpha'); |
83 | 83 | $search_dt_start = dol_mktime(0, 0, 0, GETPOSTINT('search_start_dtmonth'), GETPOSTINT('search_start_dtday'), GETPOSTINT('search_start_dtyear')); |
@@ -150,12 +150,12 @@ discard block |
||
150 | 150 | $search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '', 'search_'); |
151 | 151 | |
152 | 152 | $arrayfields = array( |
153 | - 'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1,'position' => 10), |
|
154 | - 'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1,'position' => 20), |
|
155 | - 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1,'position' => 30), |
|
156 | - 'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40), |
|
157 | - 'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50), |
|
158 | - 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60), |
|
153 | + 'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1, 'position' => 10), |
|
154 | + 'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1, 'position' => 20), |
|
155 | + 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1, 'position' => 30), |
|
156 | + 'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1, 'position' => 40), |
|
157 | + 'type' => array('label' => $langs->trans("Type"), 'checked' => 1, 'position' => 50), |
|
158 | + 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1, 'position' => 60), |
|
159 | 159 | 'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70), |
160 | 160 | 'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80), |
161 | 161 | 'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 90), |
@@ -652,20 +652,20 @@ discard block |
||
652 | 652 | $sql .= " AND b.rappro = ".((int) $search_conciliated); |
653 | 653 | } |
654 | 654 | if ($search_fk_bordereau > 0) { |
655 | - $sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau); |
|
655 | + $sql .= " AND b.fk_bordereau = ".((int) $search_fk_bordereau); |
|
656 | 656 | } |
657 | 657 | if ($search_thirdparty_user) { |
658 | 658 | $sql .= " AND (b.rowid IN "; |
659 | 659 | $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
660 | 660 | $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
661 | 661 | $sql .= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; |
662 | - $sql .= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; |
|
662 | + $sql .= " WHERE ".natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; |
|
663 | 663 | |
664 | 664 | $sql .= " OR b.rowid IN "; |
665 | 665 | $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
666 | 666 | $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
667 | 667 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; |
668 | - $sql .= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); |
|
668 | + $sql .= " WHERE ".natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); |
|
669 | 669 | $sql .= "))"; |
670 | 670 | } |
671 | 671 | if ($search_description) { |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | } |
1090 | 1090 | |
1091 | 1091 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1092 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1092 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1093 | 1093 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1094 | 1094 | $selectedfields .= ($action == 'reconcile' ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1095 | 1095 | |
@@ -1455,10 +1455,10 @@ discard block |
||
1455 | 1455 | $backgroundcolor = "class='oddeven'"; |
1456 | 1456 | } else { |
1457 | 1457 | if ($objp->amount < 0) { |
1458 | - $color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955'); |
|
1458 | + $color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955'); |
|
1459 | 1459 | $backgroundcolor = 'style="background: '.$color.';"'; |
1460 | 1460 | } else { |
1461 | - $color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86'); |
|
1461 | + $color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86'); |
|
1462 | 1462 | $backgroundcolor = 'style="background: '.$color.';"'; |
1463 | 1463 | } |
1464 | 1464 | } |
@@ -1607,7 +1607,7 @@ discard block |
||
1607 | 1607 | } |
1608 | 1608 | } |
1609 | 1609 | |
1610 | - print $labeltoshow; // Already escaped |
|
1610 | + print $labeltoshow; // Already escaped |
|
1611 | 1611 | |
1612 | 1612 | print '</td>'; |
1613 | 1613 | if (!$i) { |
@@ -1695,8 +1695,7 @@ discard block |
||
1695 | 1695 | $companylinked_id = $donstatic->socid; |
1696 | 1696 | if (!$companylinked_id) { |
1697 | 1697 | $thirdstr = ($donstatic->societe !== "" ? |
1698 | - $donstatic->societe : |
|
1699 | - $donstatic->firstname." ".$donstatic->lastname); |
|
1698 | + $donstatic->societe : $donstatic->firstname." ".$donstatic->lastname); |
|
1700 | 1699 | } |
1701 | 1700 | } |
1702 | 1701 | if ($links[$key]['type'] == 'payment_expensereport') { |
@@ -1851,7 +1850,7 @@ discard block |
||
1851 | 1850 | |
1852 | 1851 | // Fields from hook |
1853 | 1852 | $parameters = array('arrayfields' => $arrayfields, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray); |
1854 | - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook |
|
1853 | + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook |
|
1855 | 1854 | print $hookmanager->resPrint; |
1856 | 1855 | |
1857 | 1856 | // Action edit/delete and select |