@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe") ) { |
|
| 252 | + if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe")) { |
|
| 253 | 253 | $sql = "SELECT a.rowid as id"; |
| 254 | 254 | $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; |
| 255 | 255 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s"; |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $ok = false; |
| 379 | 379 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) { |
| 380 | 380 | if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) { |
| 381 | - $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 381 | + $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 382 | 382 | } else { |
| 383 | 383 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()'; |
| 384 | 384 | } |
@@ -419,9 +419,9 @@ discard block |
||
| 419 | 419 | $adh->note_private = GETPOST('note_private'); |
| 420 | 420 | $adh->morphy = getDolGlobalString("MEMBER_NEWFORM_FORCEMORPHY", GETPOST('morphy')); |
| 421 | 421 | $adh->birth = $birthday; |
| 422 | - $adh->phone = GETPOST('phone'); |
|
| 422 | + $adh->phone = GETPOST('phone'); |
|
| 423 | 423 | $adh->phone_perso = GETPOST('phone_perso'); |
| 424 | - $adh->phone_mobile= GETPOST('phone_mobile'); |
|
| 424 | + $adh->phone_mobile = GETPOST('phone_mobile'); |
|
| 425 | 425 | |
| 426 | 426 | $adh->ip = getUserRemoteIP(); |
| 427 | 427 | |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | $to = $adh->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')); |
| 534 | 534 | $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); |
| 535 | 535 | $mailfile = new CMailFile( |
| 536 | - '['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 536 | + '['.$appli.'] '.getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 537 | 537 | $to, |
| 538 | 538 | $from, |
| 539 | 539 | $adh->makeSubstitution(getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL')), |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | } |
| 722 | 722 | } else { |
| 723 | 723 | $adht->fetch(getDolGlobalInt('MEMBER_NEWFORM_FORCETYPE')); |
| 724 | - print '<input type="hidden" id="typeid" name="typeid" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 724 | + print '<input type="hidden" id="typeid" name="typeid" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 725 | 725 | } |
| 726 | 726 | print '</td></tr>'."\n"; |
| 727 | 727 | |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | "mor" => $langs->trans("Moral"), |
| 733 | 733 | ]; |
| 734 | 734 | $checkednature = GETPOST("morphy", 'alpha'); |
| 735 | - $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 735 | + $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 736 | 736 | $listetype_natures_json = json_encode($listetype_natures); |
| 737 | 737 | |
| 738 | 738 | if (!getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY')) { |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | print '</td></tr>'."\n"; |
| 825 | 825 | } else { |
| 826 | 826 | //print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; |
| 827 | - print '<input type="hidden" id="morphy" name="morphy" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 827 | + print '<input type="hidden" id="morphy" name="morphy" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | // Company // TODO : optional hide |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | // Other attributes |
| 936 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 936 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 937 | 937 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
| 938 | 938 | |
| 939 | 939 | // Comments |
@@ -994,9 +994,9 @@ discard block |
||
| 994 | 994 | $adht = new AdherentType($db); |
| 995 | 995 | $adht->fetch($typeid); |
| 996 | 996 | $caneditamount = $adht->caneditamount; |
| 997 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 997 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 998 | 998 | $amountbytype_json = json_encode($amountbytype); |
| 999 | - $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 999 | + $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 1000 | 1000 | $caneditamountbytype_json = json_encode($caneditamountbytype); |
| 1001 | 1001 | |
| 1002 | 1002 | |
@@ -1020,7 +1020,7 @@ discard block |
||
| 1020 | 1020 | |
| 1021 | 1021 | print '<tr><td>'.$langs->trans("Subscription"); |
| 1022 | 1022 | if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1023 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1023 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1024 | 1024 | } |
| 1025 | 1025 | print '</td><td class="nowrap">'; |
| 1026 | 1026 | |
@@ -1081,7 +1081,7 @@ discard block |
||
| 1081 | 1081 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) { |
| 1082 | 1082 | print '<tr><td class="titlefield"><label><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td><br>'; |
| 1083 | 1083 | if (method_exists($captchaobj, 'getCaptchaCodeForForm')) { |
| 1084 | - print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1084 | + print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1085 | 1085 | } else { |
| 1086 | 1086 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()'; |
| 1087 | 1087 | } |
@@ -1149,10 +1149,10 @@ discard block |
||
| 1149 | 1149 | |
| 1150 | 1150 | $i = 0; |
| 1151 | 1151 | while ($i < $num) { |
| 1152 | - $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1152 | + $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1153 | 1153 | |
| 1154 | 1154 | $caneditamount = $objp->caneditamount; |
| 1155 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1155 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1156 | 1156 | |
| 1157 | 1157 | print '<tr class="oddeven">'; |
| 1158 | 1158 | // Label |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); |
| 94 | 94 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
| 95 | 95 | |
| 96 | - $logofile = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
| 96 | + $logofile = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
| 97 | 97 | dol_delete_file($logofile); |
| 98 | 98 | dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND", $conf->entity); |
| 99 | 99 | $mysoc->logo = ''; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | //dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities |
| 291 | 291 | |
| 292 | 292 | $varforimage = 'imagebackground'; |
| 293 | - $dirforimage = $conf->mycompany->dir_output . '/logos/'; |
|
| 293 | + $dirforimage = $conf->mycompany->dir_output.'/logos/'; |
|
| 294 | 294 | if ($_FILES[$varforimage]["tmp_name"]) { |
| 295 | 295 | $reg = array(); |
| 296 | 296 | if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { |
@@ -298,11 +298,11 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | $isimage = image_format_supported($original_file); |
| 300 | 300 | if ($isimage >= 0) { |
| 301 | - dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file); |
|
| 301 | + dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); |
|
| 302 | 302 | if (!is_dir($dirforimage)) { |
| 303 | 303 | dol_mkdir($dirforimage); |
| 304 | 304 | } |
| 305 | - $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
| 305 | + $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
| 306 | 306 | if ($result > 0) { |
| 307 | 307 | dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity); |
| 308 | 308 | } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | if ($mode == 'css') { |
| 327 | - $csscontent = GETPOST('MAIN_IHM_CUSTOM_CSS', 'restricthtml'); // Will return a sanitized HTML content (so with double spaes that may be replaced with one, ... |
|
| 327 | + $csscontent = GETPOST('MAIN_IHM_CUSTOM_CSS', 'restricthtml'); // Will return a sanitized HTML content (so with double spaes that may be replaced with one, ... |
|
| 328 | 328 | $csscontent = dol_string_nohtmltag($csscontent, 2, 'UTF-8', 0, 0); |
| 329 | 329 | |
| 330 | 330 | dolibarr_set_const($db, "MAIN_IHM_CUSTOM_CSS", $csscontent, 'chaine', 0, '', $conf->entity); |
@@ -411,17 +411,17 @@ discard block |
||
| 411 | 411 | print '</tr>'; |
| 412 | 412 | |
| 413 | 413 | // Multilingual GUI |
| 414 | - print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>'; |
|
| 414 | + print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>'; |
|
| 415 | 415 | print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language'); |
| 416 | 416 | print '</td>'; |
| 417 | 417 | print '</tr>'; |
| 418 | 418 | |
| 419 | - print '</table>' . "\n"; |
|
| 419 | + print '</table>'."\n"; |
|
| 420 | 420 | print '</div>'; |
| 421 | 421 | |
| 422 | 422 | print '<div class="center">'; |
| 423 | - print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
| 424 | - print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 423 | + print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
| 424 | + print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 425 | 425 | print '</div>'; |
| 426 | 426 | |
| 427 | 427 | print '<br>'; |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | |
| 440 | 440 | if (!empty($conf->use_javascript_ajax)) { |
| 441 | 441 | // Show Quick Add link |
| 442 | - print '<tr class="oddeven"><td>' . $langs->trans("ShowQuickAddLink") . '</td><td>'; |
|
| 442 | + print '<tr class="oddeven"><td>'.$langs->trans("ShowQuickAddLink").'</td><td>'; |
|
| 443 | 443 | print ajax_constantonoff("MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 444 | 444 | print '</td>'; |
| 445 | 445 | print '</tr>'; |
@@ -447,13 +447,13 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | // Hide wiki link on login page |
| 449 | 449 | $pictohelp = '<span class="fa fa-question-circle"></span>'; |
| 450 | - print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>'; |
|
| 450 | + print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>'; |
|
| 451 | 451 | print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 452 | 452 | print '</td>'; |
| 453 | 453 | print '</tr>'; |
| 454 | 454 | |
| 455 | 455 | // Max size of lists |
| 456 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'; |
|
| 456 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'; |
|
| 457 | 457 | if (getDolGlobalInt('MAIN_SIZE_LISTE_LIMIT') > 0) { |
| 458 | 458 | print getDolGlobalString('MAIN_SIZE_LISTE_LIMIT'); |
| 459 | 459 | } |
@@ -465,48 +465,48 @@ discard block |
||
| 465 | 465 | print '</tr>'; |
| 466 | 466 | |
| 467 | 467 | // Max size of short lists on customer card |
| 468 | - 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>'; |
|
| 468 | + 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>'; |
|
| 469 | 469 | print '</tr>'; |
| 470 | 470 | |
| 471 | 471 | // Display checkboxes and fields menu left / right |
| 472 | - print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>'; |
|
| 472 | + print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td><td>'; |
|
| 473 | 473 | print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 1, '', 'other'); |
| 474 | 474 | print '</td>'; |
| 475 | 475 | print '</tr>'; |
| 476 | 476 | |
| 477 | 477 | // First day for weeks |
| 478 | - print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>'; |
|
| 478 | + print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>'; |
|
| 479 | 479 | print $formother->select_dayofweek(getDolGlobalString('MAIN_START_WEEK', '1'), 'MAIN_START_WEEK', 0); |
| 480 | 480 | print '</td>'; |
| 481 | 481 | print '</tr>'; |
| 482 | 482 | |
| 483 | 483 | // DefaultWorkingDays |
| 484 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>'; |
|
| 485 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS', '1-5') . '">'; |
|
| 484 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>'; |
|
| 485 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS', '1-5').'">'; |
|
| 486 | 486 | print '</td>'; |
| 487 | 487 | print '</tr>'; |
| 488 | 488 | |
| 489 | 489 | // DefaultWorkingHours |
| 490 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>'; |
|
| 491 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS', '9-18') . '">'; |
|
| 490 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>'; |
|
| 491 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS', '9-18').'">'; |
|
| 492 | 492 | print '</td>'; |
| 493 | 493 | print '</tr>'; |
| 494 | 494 | |
| 495 | 495 | // Firstname/Name |
| 496 | - print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>'; |
|
| 497 | - $array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname")); |
|
| 496 | + print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>'; |
|
| 497 | + $array = array(0 => $langs->trans("Firstname").' '.$langs->trans("Lastname"), 1 => $langs->trans("Lastname").' '.$langs->trans("Firstname")); |
|
| 498 | 498 | print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, getDolGlobalInt('MAIN_FIRSTNAME_NAME_POSITION', 0)); |
| 499 | 499 | print '</td>'; |
| 500 | 500 | print '</tr>'; |
| 501 | 501 | |
| 502 | 502 | // Hide unauthorized menus |
| 503 | - print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>'; |
|
| 503 | + print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>'; |
|
| 504 | 504 | print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 505 | 505 | print '</td>'; |
| 506 | 506 | print '</tr>'; |
| 507 | 507 | |
| 508 | 508 | // Hide unauthorized button |
| 509 | - print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>'; |
|
| 509 | + print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>'; |
|
| 510 | 510 | print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 511 | 511 | print '</td>'; |
| 512 | 512 | print '</tr>'; |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | |
| 523 | 523 | |
| 524 | 524 | // Show search area in top menu |
| 525 | - print '<tr class="oddeven"><td>' . img_picto('', 'search', 'class="pictofixedwidth"'). ' '.$langs->trans("ShowSearchAreaInTopMenu") .'</td><td>'; |
|
| 525 | + print '<tr class="oddeven"><td>'.img_picto('', 'search', 'class="pictofixedwidth"').' '.$langs->trans("ShowSearchAreaInTopMenu").'</td><td>'; |
|
| 526 | 526 | print ajax_constantonoff("MAIN_USE_TOP_MENU_SEARCH_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 527 | 527 | print '</td>'; |
| 528 | 528 | print '</tr>'; |
@@ -531,17 +531,17 @@ discard block |
||
| 531 | 531 | print '<tr class="oddeven"><td>'; |
| 532 | 532 | print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc")); |
| 533 | 533 | print '</td><td>'; |
| 534 | - print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') . '">'; |
|
| 534 | + print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.getDolGlobalString('MAIN_BUGTRACK_ENABLELINK').'">'; |
|
| 535 | 535 | print '</td>'; |
| 536 | 536 | print '</tr>'; |
| 537 | 537 | |
| 538 | 538 | // Disable javascript and ajax |
| 539 | - print '<tr class="oddeven"><td>' . $form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")) . '</td><td>'; |
|
| 539 | + print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")).'</td><td>'; |
|
| 540 | 540 | print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
| 541 | 541 | print '</td>'; |
| 542 | 542 | print '</tr>'; |
| 543 | 543 | |
| 544 | - print '</table>' . "\n"; |
|
| 544 | + print '</table>'."\n"; |
|
| 545 | 545 | print '</div>'; |
| 546 | 546 | } |
| 547 | 547 | |
@@ -561,9 +561,9 @@ discard block |
||
| 561 | 561 | complete_substitutions_array($substitutionarray, $langs); |
| 562 | 562 | |
| 563 | 563 | print '<tr class="oddeven width25p"><td>'; |
| 564 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
| 564 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
| 565 | 565 | foreach ($substitutionarray as $key => $val) { |
| 566 | - $texthelp .= $key . '<br>'; |
|
| 566 | + $texthelp .= $key.'<br>'; |
|
| 567 | 567 | } |
| 568 | 568 | print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); |
| 569 | 569 | |
@@ -587,86 +587,86 @@ discard block |
||
| 587 | 587 | print '</td><td class="titlefieldmiddle">'; |
| 588 | 588 | print '</td></tr>'; |
| 589 | 589 | |
| 590 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>'; |
|
| 590 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableGlobal').'</td><td>'; |
|
| 591 | 591 | print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
| 592 | 592 | print '</td>'; |
| 593 | 593 | print '</tr>'; |
| 594 | 594 | |
| 595 | 595 | if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD')) { |
| 596 | 596 | // Block meteo |
| 597 | - print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>'; |
|
| 597 | + print '<tr class="oddeven"><td>'.$langs->trans('MAIN_DISABLE_METEO').'</td><td>'; |
|
| 598 | 598 | print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 599 | 599 | print '</td>'; |
| 600 | 600 | print '</tr>'; |
| 601 | 601 | |
| 602 | 602 | // Block agenda |
| 603 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>'; |
|
| 603 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAgenda').'</td><td>'; |
|
| 604 | 604 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 605 | 605 | print '</td>'; |
| 606 | 606 | print '</tr>'; |
| 607 | 607 | |
| 608 | 608 | // Block agenda |
| 609 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>'; |
|
| 609 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockProject').'</td><td>'; |
|
| 610 | 610 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 611 | 611 | print '</td>'; |
| 612 | 612 | print '</tr>'; |
| 613 | 613 | |
| 614 | 614 | // Block customer |
| 615 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>'; |
|
| 615 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockCustomer').'</td><td>'; |
|
| 616 | 616 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 617 | 617 | print '</td>'; |
| 618 | 618 | print '</tr>'; |
| 619 | 619 | |
| 620 | 620 | // Block supplier |
| 621 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>'; |
|
| 621 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockSupplier').'</td><td>'; |
|
| 622 | 622 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 623 | 623 | print '</td>'; |
| 624 | 624 | print '</tr>'; |
| 625 | 625 | |
| 626 | 626 | // Block contract |
| 627 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>'; |
|
| 627 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockContract').'</td><td>'; |
|
| 628 | 628 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 629 | 629 | print '</td>'; |
| 630 | 630 | print '</tr>'; |
| 631 | 631 | |
| 632 | 632 | // Block ticket |
| 633 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>'; |
|
| 633 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockTicket').'</td><td>'; |
|
| 634 | 634 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 635 | 635 | print '</td>'; |
| 636 | 636 | print '</tr>'; |
| 637 | 637 | |
| 638 | 638 | // Block bank |
| 639 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>'; |
|
| 639 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockBank').'</td><td>'; |
|
| 640 | 640 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 641 | 641 | print '</td>'; |
| 642 | 642 | print '</tr>'; |
| 643 | 643 | |
| 644 | 644 | // Block adherent |
| 645 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>'; |
|
| 645 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAdherent').'</td><td>'; |
|
| 646 | 646 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 647 | 647 | print '</td>'; |
| 648 | 648 | print '</tr>'; |
| 649 | 649 | |
| 650 | 650 | // Block expense report |
| 651 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>'; |
|
| 651 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockExpenseReport').'</td><td>'; |
|
| 652 | 652 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 653 | 653 | print '</td>'; |
| 654 | 654 | print '</tr>'; |
| 655 | 655 | |
| 656 | 656 | // Block holiday |
| 657 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>'; |
|
| 657 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockHoliday').'</td><td>'; |
|
| 658 | 658 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 659 | 659 | print '</td>'; |
| 660 | 660 | print '</tr>'; |
| 661 | 661 | |
| 662 | 662 | // Block mrp |
| 663 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockMrp') . '</td><td>'; |
|
| 663 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockMrp').'</td><td>'; |
|
| 664 | 664 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_MRP", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '_red', 'dashboard'); |
| 665 | 665 | print '</td>'; |
| 666 | 666 | print '</tr>'; |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | - print '</table>' . "\n"; |
|
| 669 | + print '</table>'."\n"; |
|
| 670 | 670 | print '</div>'; |
| 671 | 671 | } |
| 672 | 672 | |
@@ -694,18 +694,18 @@ discard block |
||
| 694 | 694 | $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); |
| 695 | 695 | complete_substitutions_array($substitutionarray, $langs); |
| 696 | 696 | print '<tr class="oddeven"><td>'; |
| 697 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
| 697 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
| 698 | 698 | foreach ($substitutionarray as $key => $val) { |
| 699 | - $texthelp .= $key . '<br>'; |
|
| 699 | + $texthelp .= $key.'<br>'; |
|
| 700 | 700 | } |
| 701 | 701 | print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); |
| 702 | 702 | print '</td><td>'; |
| 703 | 703 | $doleditor = new DolEditor('main_home', getDolGlobalString('MAIN_HOME'), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); |
| 704 | 704 | $doleditor->Create(); |
| 705 | - print '</td></tr>' . "\n"; |
|
| 705 | + print '</td></tr>'."\n"; |
|
| 706 | 706 | |
| 707 | 707 | // Background |
| 708 | - print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td>'; |
|
| 708 | + print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td>'; |
|
| 709 | 709 | print '<div class="centpercent inline-block">'; |
| 710 | 710 | $disabled = ''; |
| 711 | 711 | if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) { |
@@ -714,25 +714,25 @@ discard block |
||
| 714 | 714 | $maxfilesizearray = getMaxFileSizeArray(); |
| 715 | 715 | $maxmin = $maxfilesizearray['maxmin']; |
| 716 | 716 | if ($maxmin > 0) { |
| 717 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 717 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 718 | 718 | } |
| 719 | - print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>'; |
|
| 719 | + print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>'; |
|
| 720 | 720 | if ($disabled) { |
| 721 | - print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') '; |
|
| 721 | + print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; |
|
| 722 | 722 | } |
| 723 | 723 | if (getDolGlobalString('MAIN_LOGIN_BACKGROUND')) { |
| 724 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'&mode=login">' . img_delete($langs->trans("Delete")) . '</a>'; |
|
| 725 | - if (file_exists($conf->mycompany->dir_output . '/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
| 724 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin&token='.newToken().'&mode=login">'.img_delete($langs->trans("Delete")).'</a>'; |
|
| 725 | + if (file_exists($conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
| 726 | 726 | print ' '; |
| 727 | - print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&file=' . urlencode('logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND')) . '">'; |
|
| 727 | + print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND')).'">'; |
|
| 728 | 728 | } |
| 729 | 729 | } else { |
| 730 | - print '<img class="marginleftonly valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">'; |
|
| 730 | + print '<img class="marginleftonly valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">'; |
|
| 731 | 731 | } |
| 732 | 732 | print '</div>'; |
| 733 | 733 | print '</td></tr>'; |
| 734 | 734 | |
| 735 | - print '</table>' . "\n"; |
|
| 735 | + print '</table>'."\n"; |
|
| 736 | 736 | print '</div>'; |
| 737 | 737 | } |
| 738 | 738 | |
@@ -756,8 +756,8 @@ discard block |
||
| 756 | 756 | |
| 757 | 757 | |
| 758 | 758 | print '<div class="center">'; |
| 759 | -print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
| 760 | -print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 759 | +print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
| 760 | +print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 761 | 761 | print '</div>'; |
| 762 | 762 | |
| 763 | 763 | print '</form>'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
| 44 | 44 | |
| 45 | 45 | // If not defined, we select menu "home" |
| 46 | -$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ? |
|
| 46 | +$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ? |
|
| 47 | 47 | $action = GETPOST('action', 'aZ09'); |
| 48 | 48 | |
| 49 | 49 | $hookmanager->initHooks(array('index')); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | // Number of supplier proposals open (expired) |
| 218 | - if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
| 218 | + if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
| 219 | 219 | $langs->load("supplier_proposal"); |
| 220 | 220 | include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; |
| 221 | 221 | $board = new SupplierProposal($db); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | // Number of sales orders |
| 228 | - if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
| 228 | + if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
| 229 | 229 | include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
| 230 | 230 | $board = new Commande($db); |
| 231 | 231 | // Number of customer orders to be shipped (validated and in progress) |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | // Number of suppliers orders |
| 242 | - if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
| 242 | + if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
| 243 | 243 | include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; |
| 244 | 244 | $board = new CommandeFournisseur($db); |
| 245 | 245 | $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | // Number of contract / services enabled (delayed) |
| 250 | - if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
| 250 | + if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
| 251 | 251 | include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; |
| 252 | 252 | $board = new Contrat($db); |
| 253 | 253 | $dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive"); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | // Number of tickets open |
| 259 | - if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
| 259 | + if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
| 260 | 260 | include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; |
| 261 | 261 | $board = new Ticket($db); |
| 262 | 262 | $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | // Number of transactions to conciliate |
| 282 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 282 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 283 | 283 | include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; |
| 284 | 284 | $board = new Account($db); |
| 285 | 285 | $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate |
@@ -290,26 +290,26 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | |
| 292 | 292 | // Number of cheque to send |
| 293 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 293 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 294 | 294 | if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) { |
| 295 | - include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; |
|
| 295 | + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; |
|
| 296 | 296 | $board = new RemiseCheque($db); |
| 297 | 297 | $dashboardlines[$board->element] = $board->load_board($user); |
| 298 | 298 | } |
| 299 | 299 | if (isModEnabled('prelevement')) { |
| 300 | 300 | include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; |
| 301 | 301 | $board = new BonPrelevement($db); |
| 302 | - $dashboardlines[$board->element . '_direct_debit'] = $board->load_board($user, 'direct_debit'); |
|
| 302 | + $dashboardlines[$board->element.'_direct_debit'] = $board->load_board($user, 'direct_debit'); |
|
| 303 | 303 | } |
| 304 | 304 | if (isModEnabled('paymentbybanktransfer')) { |
| 305 | 305 | include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; |
| 306 | 306 | $board = new BonPrelevement($db); |
| 307 | - $dashboardlines[$board->element . '_credit_transfer'] = $board->load_board($user, 'credit_transfer'); |
|
| 307 | + $dashboardlines[$board->element.'_credit_transfer'] = $board->load_board($user, 'credit_transfer'); |
|
| 308 | 308 | } |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | // Number of foundation members |
| 312 | - if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
| 312 | + if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
| 313 | 313 | include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
| 314 | 314 | $board = new Adherent($db); |
| 315 | 315 | $dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift'); |
@@ -317,27 +317,27 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | // Number of expense reports to approve |
| 320 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
| 320 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
| 321 | 321 | include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; |
| 322 | 322 | $board = new ExpenseReport($db); |
| 323 | 323 | $dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove'); |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | // Number of expense reports to pay |
| 327 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
| 327 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
| 328 | 328 | include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; |
| 329 | 329 | $board = new ExpenseReport($db); |
| 330 | 330 | $dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay'); |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | // Number of holidays to approve |
| 334 | - if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
| 334 | + if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
| 335 | 335 | include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; |
| 336 | 336 | $board = new Holiday($db); |
| 337 | 337 | $dashboardlines[$board->element] = $board->load_board($user); |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - if (isModEnabled('mrp') && !getDolGlobalString('MAIN_DISABLE_BLOCK_MRP')) { |
|
| 340 | + if (isModEnabled('mrp') && !getDolGlobalString('MAIN_DISABLE_BLOCK_MRP')) { |
|
| 341 | 341 | include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; |
| 342 | 342 | $board = new Mo($db); |
| 343 | 343 | $dashboardlines[$board->element] = $board->load_board($user); |
@@ -620,9 +620,9 @@ discard block |
||
| 620 | 620 | |
| 621 | 621 | $dateOrder = ''; |
| 622 | 622 | if ($board->id == 'mo') { |
| 623 | - $dateOrder = $langs->trans("DateToday") . " > " . $langs->trans("DateReference"); |
|
| 623 | + $dateOrder = $langs->trans("DateToday")." > ".$langs->trans("DateReference"); |
|
| 624 | 624 | } else { |
| 625 | - $dateOrder = $langs->trans("DateReference") . " > " . $langs->trans("DateToday"); |
|
| 625 | + $dateOrder = $langs->trans("DateReference")." > ".$langs->trans("DateToday"); |
|
| 626 | 626 | } |
| 627 | 627 | $warningDelay = ceil(empty($board->warning_delay) ? 0 : $board->warning_delay); |
| 628 | 628 | $sign = ''; |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | $sign = '+'; |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | - $textLateTitle .= " (" . $langs->trans("Late") . " = $dateOrder $sign$warningDelay " . $langs->trans("days") . ")"; |
|
| 633 | + $textLateTitle .= " (".$langs->trans("Late")." = $dateOrder $sign$warningDelay ".$langs->trans("days").")"; |
|
| 634 | 634 | |
| 635 | 635 | if ($board->id == 'bank_account') { |
| 636 | 636 | $textLateTitle .= '<br><span class="opacitymedium">'.$langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")).'</span>'; |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | throw new RestException(400, 'No stock movement with id 0 can exist'); |
| 83 | 83 | } |
| 84 | 84 | $result = $this->stockmovement->fetch($id); |
| 85 | - if (!$result ) { |
|
| 85 | + if (!$result) { |
|
| 86 | 86 | throw new RestException(404, 'stock movement not found'); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -116,8 +116,8 @@ discard block |
||
| 116 | 116 | $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); |
| 117 | 117 | $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); |
| 118 | 118 | |
| 119 | -$pastmonth = null; // Initialise, could be unset |
|
| 120 | -$pastmonthyear = null; // Initialise, could be unset |
|
| 119 | +$pastmonth = null; // Initialise, could be unset |
|
| 120 | +$pastmonthyear = null; // Initialise, could be unset |
|
| 121 | 121 | |
| 122 | 122 | if (empty($date_startmonth)) { |
| 123 | 123 | // Period by default on transfer |
@@ -167,14 +167,14 @@ discard block |
||
| 167 | 167 | $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd"; |
| 168 | 168 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
| 169 | 169 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 170 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
| 170 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
| 171 | 171 | } |
| 172 | 172 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; |
| 173 | 173 | $sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn"; |
| 174 | 174 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
| 175 | 175 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; |
| 176 | 176 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 177 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); |
|
| 177 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity); |
|
| 178 | 178 | } |
| 179 | 179 | $parameters = array(); |
| 180 | 180 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $rcclocaltax2 = getDolGlobalString('ACCOUNTING_LT2_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined'); |
| 234 | 234 | $rcdlocaltax2 = getDolGlobalString('ACCOUNTING_LT2_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined'); |
| 235 | 235 | $noTaxDispatchingKeepWithLines = getDolGlobalInt('ACCOUNTING_PURCHASES_DO_NOT_DISPATCH_TAXES'); //If enabled, Tax will NOT get split off from the base entry and credited to a separate tax account (good for non-VAT countries like USA) |
| 236 | -$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
| 236 | +$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
| 237 | 237 | |
| 238 | 238 | $result = $db->query($sql); |
| 239 | 239 | if ($result) { |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - $tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : ''); |
|
| 259 | + $tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''); |
|
| 260 | 260 | if (array_key_exists($tax_id, $vatdata_cache)) { |
| 261 | 261 | $vatdata = $vatdata_cache[$tax_id]; |
| 262 | 262 | } else { |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | // VAT Reverse charge |
| 313 | 313 | if (($mysoc->country_code == 'FR' || getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) && $obj->vat_reverse_charge == 1 && in_array($obj->country_code, $country_code_in_EEC)) { |
| 314 | - $rcvatdata = getTaxesFromId($obj->product_buy_vat . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''), $mysoc, $mysoc, 0); |
|
| 314 | + $rcvatdata = getTaxesFromId($obj->product_buy_vat.($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : ''), $mysoc, $mysoc, 0); |
|
| 315 | 315 | $rcc_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva); |
| 316 | 316 | $rcd_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva); |
| 317 | 317 | $rcc_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcclocaltax1); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $rcc_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcclocaltax2); |
| 320 | 320 | $rcd_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdlocaltax2); |
| 321 | 321 | if (price2num($obj->product_buy_vat) || !empty($obj->product_buy_default_vat_code)) { |
| 322 | - $vat_key = vatrate($obj->product_buy_vat) . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''); |
|
| 322 | + $vat_key = vatrate($obj->product_buy_vat).($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : ''); |
|
| 323 | 323 | $val_value = $vat_key; |
| 324 | 324 | $def_tva[$obj->rowid][$rcc_compta_tva][$vat_key] = $val_value; |
| 325 | 325 | $def_tva[$obj->rowid][$rcd_compta_tva][$vat_key] = $val_value; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | fk_facture_fourn, |
| 421 | 421 | COUNT(fd.rowid) as nb |
| 422 | 422 | FROM |
| 423 | - " . MAIN_DB_PREFIX . "facture_fourn_det as fd |
|
| 423 | + " . MAIN_DB_PREFIX."facture_fourn_det as fd |
|
| 424 | 424 | WHERE |
| 425 | 425 | fd.product_type <= 2 |
| 426 | 426 | AND fd.fk_code_ventilation <= 0 |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | $totalcredit = 0; |
| 460 | 460 | $totaldebit = 0; |
| 461 | 461 | |
| 462 | - $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 462 | + $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 463 | 463 | |
| 464 | 464 | $companystatic->id = $tabcompany[$key]['id']; |
| 465 | 465 | $companystatic->name = $tabcompany[$key]['name']; |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | } |
| 548 | 548 | } else { |
| 549 | 549 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) { |
| 550 | - require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php'; |
|
| 550 | + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php'; |
|
| 551 | 551 | $lettering_static = new Lettering($db); |
| 552 | 552 | |
| 553 | 553 | $nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id)); |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | |
| 667 | 667 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 668 | 668 | if ($mt) { |
| 669 | - $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 669 | + $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 670 | 670 | $label_account = $accountingaccount->label; |
| 671 | 671 | |
| 672 | 672 | $bookkeeping = new BookKeeping($db); |
@@ -1030,7 +1030,7 @@ discard block |
||
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | 1032 | // Button to write into Ledger |
| 1033 | - $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['','-1']); |
|
| 1033 | + $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['', '-1']); |
|
| 1034 | 1034 | if ($acctSupplierNotConfigured) { |
| 1035 | 1035 | print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
| 1036 | 1036 | $desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | print $accountoshow; |
| 1187 | 1187 | } |
| 1188 | 1188 | print '</td>'; |
| 1189 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount"), 1) . "</td>"; |
|
| 1189 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount"), 1)."</td>"; |
|
| 1190 | 1190 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1191 | 1191 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1192 | 1192 | print "</tr>"; |
@@ -1224,12 +1224,12 @@ discard block |
||
| 1224 | 1224 | print length_accounta($tabcompany[$key]['code_compta_fournisseur']); |
| 1225 | 1225 | } |
| 1226 | 1226 | } elseif (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1227 | - print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>'; |
|
| 1227 | + print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>'; |
|
| 1228 | 1228 | } |
| 1229 | 1229 | print '</td>'; |
| 1230 | 1230 | $companystatic->id = $tabcompany[$key]['id']; |
| 1231 | 1231 | $companystatic->name = $tabcompany[$key]['name']; |
| 1232 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $accountingaccount->label, 1) . "</td>"; |
|
| 1232 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $accountingaccount->label, 1)."</td>"; |
|
| 1233 | 1233 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1234 | 1234 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1235 | 1235 | print "</tr>"; |
@@ -1292,7 +1292,7 @@ discard block |
||
| 1292 | 1292 | $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); |
| 1293 | 1293 | $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; |
| 1294 | 1294 | $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); |
| 1295 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate, 1) . "</td>"; |
|
| 1295 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate, 1)."</td>"; |
|
| 1296 | 1296 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1297 | 1297 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1298 | 1298 | print "</tr>"; |
@@ -1322,7 +1322,7 @@ discard block |
||
| 1322 | 1322 | // Subledger account |
| 1323 | 1323 | print "<td>"; |
| 1324 | 1324 | print '</td>'; |
| 1325 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("VAT")." NPR (counterpart)", 1) . "</td>"; |
|
| 1325 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("VAT")." NPR (counterpart)", 1)."</td>"; |
|
| 1326 | 1326 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1327 | 1327 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1328 | 1328 | print "</tr>"; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | |
| 52 | 52 | $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB', 5); |
| 53 | -$DELAYFORCACHE = 300; // 300 seconds |
|
| 53 | +$DELAYFORCACHE = 300; // 300 seconds |
|
| 54 | 54 | |
| 55 | 55 | $disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); |
| 56 | 56 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $socid = ''; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | -$canedit = 1; // can read events of others |
|
| 89 | +$canedit = 1; // can read events of others |
|
| 90 | 90 | if (!$user->hasRight('agenda', 'myactions', 'read')) { |
| 91 | 91 | accessforbidden(); |
| 92 | 92 | } |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $sql .= " ON bc.rowid = ba.fk_bookcal_calendar"; |
| 554 | 554 | $sql .= " WHERE bc.status = 1"; |
| 555 | 555 | $sql .= " AND ba.status = 1"; |
| 556 | - $sql .= " AND bc.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 556 | + $sql .= " AND bc.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 557 | 557 | if (!empty($filtert) && $filtert != '-1' && $filtert != '-2') { |
| 558 | 558 | $sql .= " AND bc.visibility IN (".$db->sanitize($filtert, 0, 0, 0, 0).")"; |
| 559 | 559 | } |
@@ -594,9 +594,9 @@ discard block |
||
| 594 | 594 | // Holiday calendar |
| 595 | 595 | if ($user->hasRight("holiday", "read")) { |
| 596 | 596 | $s .= ' |
| 597 | - <div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="marginleftonly check_holiday"' . ($check_holiday ? ' checked' : '') . '> |
|
| 597 | + <div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="marginleftonly check_holiday"' . ($check_holiday ? ' checked' : '').'> |
|
| 598 | 598 | <label for="check_holiday" class="labelcalendar"> |
| 599 | - <span class="check_holiday_text">' . $langs->trans("Holidays") . '</span> |
|
| 599 | + <span class="check_holiday_text">' . $langs->trans("Holidays").'</span> |
|
| 600 | 600 | </label> |
| 601 | 601 | </div>'; |
| 602 | 602 | } |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | // External calendars |
| 605 | 605 | if (count($showextcals) > 0) { |
| 606 | 606 | foreach ($showextcals as $val) { |
| 607 | - $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
| 607 | + $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
| 608 | 608 | |
| 609 | 609 | $s .= '<script type="text/javascript">'."\n"; |
| 610 | 610 | $s .= 'jQuery(document).ready(function () {'."\n"; |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | $s .= "\n".'<!-- End div to calendars selectors -->'."\n"; |
| 650 | 650 | } else { // If javascript off |
| 651 | 651 | $newparam = $param; // newparam is for birthday links |
| 652 | - $newparam = preg_replace('/showbirthday=[0-1]/i', 'showbirthday='.($showbirthday ? '1' : '0'), $newparam); // Always false @phpstan-ignore-line |
|
| 652 | + $newparam = preg_replace('/showbirthday=[0-1]/i', 'showbirthday='.($showbirthday ? '1' : '0'), $newparam); // Always false @phpstan-ignore-line |
|
| 653 | 653 | if (!preg_match('/showbirthday=/i', $newparam)) { |
| 654 | 654 | $newparam .= '&showbirthday=1'; |
| 655 | 655 | } |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | // TODO Replace with a AND EXISTS |
| 699 | 699 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as ar"; |
| 700 | 700 | $sql .= " ON ar.fk_actioncomm = a.id AND ar.element_type = 'user'"; |
| 701 | - if ($filtert != '' && $filtert != '-1' && $filtert != '-2' && $filtert != '-3') { |
|
| 701 | + if ($filtert != '' && $filtert != '-1' && $filtert != '-2' && $filtert != '-3') { |
|
| 702 | 702 | $sql .= " AND ar.fk_element IN (".$db->sanitize($filtert).")"; |
| 703 | 703 | } elseif ($filtert == '-3') { |
| 704 | 704 | $sql .= " AND ar.fk_element IN (".$db->sanitize(implode(',', $user->getAllChildIds(1))).")"; |
@@ -709,14 +709,14 @@ discard block |
||
| 709 | 709 | } |
| 710 | 710 | |
| 711 | 711 | $sql .= " WHERE a.fk_action = ca.id"; |
| 712 | -$sql .= " AND a.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 712 | +$sql .= " AND a.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 713 | 713 | |
| 714 | 714 | // Condition on actioncode |
| 715 | 715 | if (!empty($actioncode)) { |
| 716 | 716 | if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) { |
| 717 | 717 | if ((is_array($actioncode) && in_array('AC_NON_AUTO', $actioncode)) || $actioncode == 'AC_NON_AUTO') { |
| 718 | 718 | $sql .= " AND ca.type != 'systemauto'"; |
| 719 | - } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode == 'AC_ALL_AUTO') { |
|
| 719 | + } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode == 'AC_ALL_AUTO') { |
|
| 720 | 720 | $sql .= " AND ca.type = 'systemauto'"; |
| 721 | 721 | } else { |
| 722 | 722 | if ((is_array($actioncode) && in_array('AC_OTH', $actioncode)) || $actioncode == 'AC_OTH') { |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | } else { |
| 730 | 730 | if ((is_array($actioncode) && in_array('AC_NON_AUTO', $actioncode)) || $actioncode === 'AC_NON_AUTO') { |
| 731 | 731 | $sql .= " AND ca.type != 'systemauto'"; |
| 732 | - } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode === 'AC_ALL_AUTO') { |
|
| 732 | + } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode === 'AC_ALL_AUTO') { |
|
| 733 | 733 | $sql .= " AND ca.type = 'systemauto'"; |
| 734 | 734 | } elseif ((is_array($actioncode) && !in_array('-1', $actioncode) && !in_array('-3', $actioncode)) || ($actioncode !== '-1' && $actioncode !== '-3')) { |
| 735 | 735 | if (is_array($actioncode)) { |
@@ -875,7 +875,7 @@ discard block |
||
| 875 | 875 | // event->datep and event->datef must be GMT date. |
| 876 | 876 | if ($event->fulldayevent) { |
| 877 | 877 | $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); |
| 878 | - $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
| 878 | + $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
| 879 | 879 | $event->datef = $db->jdate($obj->datep2, $tzforfullday ? 'tzuser' : 'tzserver'); |
| 880 | 880 | } else { |
| 881 | 881 | // Example: $obj->datep = '1970-01-01 01:00:00', jdate will return 0 if TZ of PHP server is Europe/Berlin (+1) |
@@ -951,8 +951,8 @@ discard block |
||
| 951 | 951 | // Loop on each day covered by action to prepare an index to show on calendar |
| 952 | 952 | $loop = true; |
| 953 | 953 | $j = 0; |
| 954 | - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
| 955 | - $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
| 954 | + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
| 955 | + $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
| 956 | 956 | /* |
| 957 | 957 | print 'GMT '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt').'<br>'; |
| 958 | 958 | print 'TZSERVER '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzserver').'<br>'; |
@@ -1154,9 +1154,9 @@ discard block |
||
| 1154 | 1154 | } elseif (in_array($obj->halfday, array(-1, 2)) && $firstdayofholiday) { |
| 1155 | 1155 | $newevent->label .= ' ('.$langs->trans("Afternoon").')'; |
| 1156 | 1156 | } |
| 1157 | - $eventarray[$daykey][] = $newevent; // We need to use ->gtTypePicto, getXXXon object, so clone must be PHP clone. |
|
| 1157 | + $eventarray[$daykey][] = $newevent; // We need to use ->gtTypePicto, getXXXon object, so clone must be PHP clone. |
|
| 1158 | 1158 | } else { |
| 1159 | - $eventarray[$daykey][] = $event; // We can use the event unchanged |
|
| 1159 | + $eventarray[$daykey][] = $event; // We can use the event unchanged |
|
| 1160 | 1160 | } |
| 1161 | 1161 | |
| 1162 | 1162 | $daykey += 60 * 60 * 24; |
@@ -1931,8 +1931,8 @@ discard block |
||
| 1931 | 1931 | // We are in a particular day for $username, now we scan all events |
| 1932 | 1932 | foreach ($eventarray as $daykey => $notused) { |
| 1933 | 1933 | $annee = (int) dol_print_date($daykey, '%Y', 'tzuserrel'); |
| 1934 | - $mois = (int) dol_print_date($daykey, '%m', 'tzuserrel'); |
|
| 1935 | - $jour = (int) dol_print_date($daykey, '%d', 'tzuserrel'); |
|
| 1934 | + $mois = (int) dol_print_date($daykey, '%m', 'tzuserrel'); |
|
| 1935 | + $jour = (int) dol_print_date($daykey, '%d', 'tzuserrel'); |
|
| 1936 | 1936 | //var_dump("daykey=$daykey day=$day jour=$jour, month=$month mois=$mois, year=$year annee=$annee ".dol_print_date($daykey, 'dayhour', 'gmt')); |
| 1937 | 1937 | //var_dump($notused); |
| 1938 | 1938 | |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
| 50 | 50 | |
| 51 | 51 | $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB', 5); |
| 52 | -$DELAYFORCACHE = 300; // 300 seconds |
|
| 52 | +$DELAYFORCACHE = 300; // 300 seconds |
|
| 53 | 53 | |
| 54 | 54 | $action = GETPOST('action', 'aZ09'); |
| 55 | 55 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 56 | 56 | $mode = GETPOST('mode', 'aZ09'); |
| 57 | 57 | if (empty($mode) && preg_match('/show_/', $action)) { |
| 58 | - $mode = $action; // For backward compatibility |
|
| 58 | + $mode = $action; // For backward compatibility |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | $status = ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS') || $disabledefaultvalues) ? '' : getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS')); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | -$defaultview = getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'); // default for app |
|
| 152 | -$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
| 151 | +$defaultview = getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'); // default for app |
|
| 152 | +$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
| 153 | 153 | if (empty($mode) && !GETPOSTISSET('mode')) { |
| 154 | 154 | $mode = $defaultview; |
| 155 | 155 | } |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | |
| 566 | 566 | $viewmode .= '</div>'; |
| 567 | 567 | |
| 568 | -$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
| 568 | +$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
| 569 | 569 | |
| 570 | 570 | |
| 571 | 571 | $newparam = ''; |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | $sql .= " ON bc.rowid = ba.fk_bookcal_calendar"; |
| 601 | 601 | $sql .= " WHERE bc.status = 1"; |
| 602 | 602 | $sql .= " AND ba.status = 1"; |
| 603 | - $sql .= " AND bc.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 603 | + $sql .= " AND bc.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 604 | 604 | if (!empty($filtert) && $filtert != '-1') { |
| 605 | 605 | $sql .= " AND bc.visibility IN (".$db->sanitize($filtert, 0, 0, 0, 0).")"; |
| 606 | 606 | } |
@@ -656,9 +656,9 @@ discard block |
||
| 656 | 656 | if ($user->hasRight("holiday", "read")) { |
| 657 | 657 | $s .= ' |
| 658 | 658 | <div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="marginleftonly check_holiday"' . ($check_holiday |
| 659 | - ? ' checked' : '') . '> |
|
| 659 | + ? ' checked' : '').'> |
|
| 660 | 660 | <label for="check_holiday" class="labelcalendar"> |
| 661 | - <span class="check_holiday_text">' . $langs->trans("Holidays") . '</span> |
|
| 661 | + <span class="check_holiday_text">' . $langs->trans("Holidays").'</span> |
|
| 662 | 662 | </label> |
| 663 | 663 | </div>'; |
| 664 | 664 | } |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | $s .= '</script>'."\n"; |
| 685 | 685 | |
| 686 | 686 | foreach ($showextcals as $val) { |
| 687 | - $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
| 687 | + $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
| 688 | 688 | |
| 689 | 689 | if (!empty($val['default']) || GETPOSTINT('check_ext'.$htmlname)) { |
| 690 | 690 | $default = "checked"; |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | if (($filtert != '-1' && $filtert != '-2') || $usergroup > 0) { |
| 775 | 775 | // TODO Replace with a AND EXISTS |
| 776 | 776 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as ar ON ar.fk_actioncomm = a.id AND ar.element_type = 'user'"; |
| 777 | - if ($filtert != '-1' && $filtert != '-2' && $filtert != '-3') { |
|
| 777 | + if ($filtert != '-1' && $filtert != '-2' && $filtert != '-3') { |
|
| 778 | 778 | $sql .= " AND (ar.fk_element IN (".$db->sanitize($filtert).") OR (ar.fk_element IS NULL AND a.fk_user_action = ".((int) $filtert)."))"; // The OR is for backward compatibility |
| 779 | 779 | } elseif ($filtert == '-3') { |
| 780 | 780 | $sql .= " AND ar.fk_element IN (".$db->sanitize(implode(',', $user->getAllChildIds(1))).")"; |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | $sql .= $hookmanager->resPrint; |
| 796 | 796 | |
| 797 | 797 | $sql .= " WHERE a.fk_action = ca.id"; |
| 798 | -$sql .= " AND a.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 798 | +$sql .= " AND a.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda |
|
| 799 | 799 | // Condition on actioncode |
| 800 | 800 | if (!empty($actioncode)) { |
| 801 | 801 | if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) { |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | } else { |
| 815 | 815 | if ((is_array($actioncode) && in_array('AC_NON_AUTO', $actioncode)) || $actioncode === 'AC_NON_AUTO') { |
| 816 | 816 | $sql .= " AND ca.type != 'systemauto'"; |
| 817 | - } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode === 'AC_ALL_AUTO') { |
|
| 817 | + } elseif ((is_array($actioncode) && in_array('AC_ALL_AUTO', $actioncode)) || $actioncode === 'AC_ALL_AUTO') { |
|
| 818 | 818 | $sql .= " AND ca.type = 'systemauto'"; |
| 819 | 819 | } else { |
| 820 | 820 | if (is_array($actioncode)) { |
@@ -825,7 +825,7 @@ discard block |
||
| 825 | 825 | * @param string $value |
| 826 | 826 | * @return bool |
| 827 | 827 | */ |
| 828 | - function ($value) { |
|
| 828 | + function($value) { |
|
| 829 | 829 | return ((string) $value !== '-1'); |
| 830 | 830 | } |
| 831 | 831 | ); |
@@ -952,7 +952,7 @@ discard block |
||
| 952 | 952 | // event->datep and event->datef must be GMT date. |
| 953 | 953 | if ($event->fulldayevent) { |
| 954 | 954 | $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); |
| 955 | - $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
| 955 | + $event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz |
|
| 956 | 956 | $event->datef = $db->jdate($obj->datep2, $tzforfullday ? 'tzuser' : 'tzserver'); |
| 957 | 957 | } else { |
| 958 | 958 | // Example: $obj->datep = '1970-01-01 01:00:00', jdate will return 0 if TZ of PHP server is Europe/Berlin (+1) |
@@ -1030,8 +1030,8 @@ discard block |
||
| 1030 | 1030 | // Loop on each day covered by action to prepare an index to show on calendar |
| 1031 | 1031 | $loop = true; |
| 1032 | 1032 | $j = 0; |
| 1033 | - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
| 1034 | - $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
| 1033 | + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz |
|
| 1034 | + $daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz |
|
| 1035 | 1035 | /* |
| 1036 | 1036 | print 'GMT '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt').'<br>'; |
| 1037 | 1037 | print 'TZSERVER '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzserver').'<br>'; |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) |
| 1161 | 1161 | if ($mode == 'show_day') { |
| 1162 | 1162 | // Request only leaves for the current selected day |
| 1163 | - $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 |
|
| 1163 | + $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 |
|
| 1164 | 1164 | } elseif ($mode == 'show_week') { |
| 1165 | 1165 | // Restrict on current month (we get more, but we will filter later) |
| 1166 | 1166 | $sql .= " AND x.date_debut < '".$db->idate(dol_get_last_day($year, $month))."'"; |
@@ -1245,9 +1245,9 @@ discard block |
||
| 1245 | 1245 | } elseif (in_array($obj->halfday, array(-1, 2)) && $firstdayofholiday) { |
| 1246 | 1246 | $newevent->label .= ' ('.$langs->trans("Afternoon").')'; |
| 1247 | 1247 | } |
| 1248 | - $eventarray[$daykey][] = $newevent; // We need to use ->gtTypePicto, getXXXon object, so clone must be PHP clone. |
|
| 1248 | + $eventarray[$daykey][] = $newevent; // We need to use ->gtTypePicto, getXXXon object, so clone must be PHP clone. |
|
| 1249 | 1249 | } else { |
| 1250 | - $eventarray[$daykey][] = $event; // We can use the event unchanged |
|
| 1250 | + $eventarray[$daykey][] = $event; // We can use the event unchanged |
|
| 1251 | 1251 | } |
| 1252 | 1252 | |
| 1253 | 1253 | $daykey += 60 * 60 * 24; |
@@ -1760,7 +1760,7 @@ discard block |
||
| 1760 | 1760 | |
| 1761 | 1761 | for ($iter_day = 0; $iter_day < 7; $iter_day++) { |
| 1762 | 1762 | // Show days of the current week |
| 1763 | - $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
| 1763 | + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
| 1764 | 1764 | $tmpday = (int) dol_print_date($curtime, '%d', 'tzuserrel'); |
| 1765 | 1765 | $tmpmonth = (int) dol_print_date($curtime, '%m', 'tzuserrel'); |
| 1766 | 1766 | $tmpyear = (int) dol_print_date($curtime, '%Y', 'tzuserrel'); |
@@ -2000,9 +2000,9 @@ discard block |
||
| 2000 | 2000 | $tmpholiday = new Holiday($db); |
| 2001 | 2001 | |
| 2002 | 2002 | foreach ($eventarray as $daykey => $notused) { // daykey is the 'YYYYMMDD' to show according to user |
| 2003 | - $annee = (int) dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2004 | - $mois = (int) dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2005 | - $jour = (int) dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2003 | + $annee = (int) dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2004 | + $mois = (int) dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2005 | + $jour = (int) dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
| 2006 | 2006 | |
| 2007 | 2007 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."<br>\n"; |
| 2008 | 2008 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' day='.$day.' month='.$month.' year='.$year."<br>\n"; |
@@ -2272,7 +2272,7 @@ discard block |
||
| 2272 | 2272 | $event->label = $titletoshow; |
| 2273 | 2273 | // Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user. |
| 2274 | 2274 | $titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : ''); |
| 2275 | - $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 '...' |
|
| 2275 | + $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 '...' |
|
| 2276 | 2276 | $event->label = $savlabel; |
| 2277 | 2277 | } |
| 2278 | 2278 | |
@@ -2316,7 +2316,7 @@ discard block |
||
| 2316 | 2316 | $thirdparty = $cachethirdparties[$thirdparty_id]; |
| 2317 | 2317 | } |
| 2318 | 2318 | if (!empty($thirdparty->id)) { |
| 2319 | - $linerelatedto .= $thirdparty->getNomUrl(1, '', 0, 0, -1, 0, '', 'valignmiddle inline'); // using inline-block make the content completely replace with ... when too large |
|
| 2319 | + $linerelatedto .= $thirdparty->getNomUrl(1, '', 0, 0, -1, 0, '', 'valignmiddle inline'); // using inline-block make the content completely replace with ... when too large |
|
| 2320 | 2320 | } |
| 2321 | 2321 | } |
| 2322 | 2322 | if (!empty($contact_id) && $contact_id > 0) { |
@@ -2331,7 +2331,7 @@ discard block |
||
| 2331 | 2331 | $linerelatedto .= ' '; |
| 2332 | 2332 | } |
| 2333 | 2333 | if (!empty($contact->id)) { |
| 2334 | - $linerelatedto .= $contact->getNomUrl(1, '', 0, '', -1, 0, 'valignmiddle inline'); // using inline-block make the content completely replace with ... when too large |
|
| 2334 | + $linerelatedto .= $contact->getNomUrl(1, '', 0, '', -1, 0, 'valignmiddle inline'); // using inline-block make the content completely replace with ... when too large |
|
| 2335 | 2335 | } |
| 2336 | 2336 | } |
| 2337 | 2337 | if (!empty($event->fk_element) && $event->fk_element > 0 && !empty($event->elementtype) && getDolGlobalString('AGENDA_SHOW_LINKED_OBJECT')) { |
@@ -44,24 +44,24 @@ discard block |
||
| 44 | 44 | // Load Dolibarr environment |
| 45 | 45 | require '../../main.inc.php'; |
| 46 | 46 | require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
| 47 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 49 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formpropal.class.php'; |
|
| 50 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 52 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
| 53 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/propale/modules_propale.php'; |
|
| 54 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php'; |
|
| 55 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
| 56 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 57 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 47 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 49 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
| 53 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; |
|
| 54 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; |
|
| 55 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
| 56 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 57 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 58 | 58 | if (isModEnabled('project')) { |
| 59 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 60 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 59 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 60 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if (isModEnabled('variants')) { |
| 64 | - require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductCombination.class.php'; |
|
| 64 | + require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $cancel = GETPOST('cancel', 'alpha'); |
| 94 | 94 | $origin = GETPOST('origin', 'alpha'); |
| 95 | 95 | $originid = GETPOSTINT('originid'); |
| 96 | -$renewal = GETPOST('renewal'); // for contract renewal |
|
| 96 | +$renewal = GETPOST('renewal'); // for contract renewal |
|
| 97 | 97 | $confirm = GETPOST('confirm', 'alpha'); |
| 98 | 98 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 99 | 99 | $lineid = GETPOSTINT('lineid'); |
@@ -178,34 +178,34 @@ discard block |
||
| 178 | 178 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 179 | 179 | } |
| 180 | 180 | if (empty($reshook)) { |
| 181 | - $backurlforlist = DOL_URL_ROOT . '/comm/propal/list.php'; |
|
| 181 | + $backurlforlist = DOL_URL_ROOT.'/comm/propal/list.php'; |
|
| 182 | 182 | |
| 183 | 183 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 184 | 184 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
| 185 | 185 | if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { |
| 186 | 186 | $backtopage = $backurlforlist; |
| 187 | 187 | } else { |
| 188 | - $backtopage = DOL_URL_ROOT . '/comm/propal/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 188 | + $backtopage = DOL_URL_ROOT.'/comm/propal/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($cancel) { |
| 194 | 194 | if (!empty($backtopageforcancel)) { |
| 195 | - header("Location: " . $backtopageforcancel); |
|
| 195 | + header("Location: ".$backtopageforcancel); |
|
| 196 | 196 | exit; |
| 197 | 197 | } elseif (!empty($backtopage)) { |
| 198 | - header("Location: " . $backtopage); |
|
| 198 | + header("Location: ".$backtopage); |
|
| 199 | 199 | exit; |
| 200 | 200 | } |
| 201 | 201 | $action = ''; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once |
|
| 204 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once |
|
| 205 | 205 | |
| 206 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 206 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 207 | 207 | |
| 208 | - include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 208 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 209 | 209 | // Action clone object |
| 210 | 210 | if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { |
| 211 | 211 | if (!($socid > 0)) { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $object->delivery_date = $date_delivery; |
| 240 | 240 | foreach ($object->lines as $line) { |
| 241 | 241 | if (isset($line->date_start)) { |
| 242 | - $line->date_start += $difference; |
|
| 242 | + $line->date_start += $difference; |
|
| 243 | 243 | } |
| 244 | 244 | if (isset($line->date_end)) { |
| 245 | 245 | $line->date_end += $difference; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | setEventMessages('', $warningMsgLineList, 'warnings'); |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); |
|
| 270 | + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); |
|
| 271 | 271 | exit(); |
| 272 | 272 | } else { |
| 273 | 273 | if (count($object->errors) > 0) { |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | // Cancel proposal |
| 282 | 282 | $result = $object->setCancel($user); |
| 283 | 283 | if ($result > 0) { |
| 284 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 284 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 285 | 285 | exit(); |
| 286 | 286 | } else { |
| 287 | 287 | $langs->load("errors"); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | // Delete proposal |
| 292 | 292 | $result = $object->delete($user); |
| 293 | 293 | if ($result > 0) { |
| 294 | - header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1'); |
|
| 294 | + header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'); |
|
| 295 | 295 | exit(); |
| 296 | 296 | } else { |
| 297 | 297 | $langs->load("errors"); |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 326 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 327 | 327 | exit(); |
| 328 | 328 | } elseif ($action == 'confirm_delete_subtotalline' && $confirm == 'yes' && $usercancreate) { |
| 329 | 329 | // Delete line |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 354 | 354 | } |
| 355 | 355 | if ($result >= 0) { |
| 356 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 356 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 357 | 357 | exit(); |
| 358 | 358 | } |
| 359 | 359 | } else { |
@@ -625,14 +625,14 @@ discard block |
||
| 625 | 625 | |
| 626 | 626 | $id = $object->create($user); |
| 627 | 627 | if ($id > 0) { |
| 628 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 628 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 629 | 629 | |
| 630 | 630 | $classname = ucfirst($subelement); |
| 631 | 631 | $srcobject = new $classname($db); |
| 632 | - '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 632 | + '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 633 | 633 | /** @var Commande|Propal|Contrat|Fichinter|Expedition $srcobject */ |
| 634 | 634 | |
| 635 | - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); |
|
| 635 | + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); |
|
| 636 | 636 | $result = $srcobject->fetch($object->origin_id); |
| 637 | 637 | |
| 638 | 638 | if ($result > 0) { |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | |
| 698 | 698 | $tva_tx = $lines[$i]->tva_tx; |
| 699 | 699 | if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) { |
| 700 | - $tva_tx .= ' (' . $lines[$i]->vat_src_code . ')'; |
|
| 700 | + $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; |
|
| 701 | 701 | } |
| 702 | 702 | |
| 703 | 703 | $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit); |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | } |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 790 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 791 | 791 | exit(); |
| 792 | 792 | } else { |
| 793 | 793 | $db->rollback(); |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | $error++; |
| 836 | 836 | } else { |
| 837 | 837 | // Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded) |
| 838 | - $locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id; |
|
| 838 | + $locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id; |
|
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | $deposit = null; |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | !$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOST('generate_deposit') == 'on' |
| 847 | 847 | && !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer') |
| 848 | 848 | ) { |
| 849 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 849 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 850 | 850 | |
| 851 | 851 | $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); |
| 852 | 852 | $forceFields = array(); |
@@ -859,10 +859,10 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | if ($deposit) { |
| 861 | 861 | setEventMessage('DepositGenerated'); |
| 862 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 862 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 863 | 863 | } else { |
| 864 | 864 | $error++; |
| 865 | - setEventMessages("Failed to create down payment - " . $object->error, $object->errors, 'errors'); |
|
| 865 | + setEventMessages("Failed to create down payment - ".$object->error, $object->errors, 'errors'); |
|
| 866 | 866 | } |
| 867 | 867 | } |
| 868 | 868 | |
@@ -887,12 +887,12 @@ discard block |
||
| 887 | 887 | } |
| 888 | 888 | |
| 889 | 889 | if ($locationTarget) { |
| 890 | - header('Location: ' . $locationTarget); |
|
| 890 | + header('Location: '.$locationTarget); |
|
| 891 | 891 | exit; |
| 892 | 892 | } |
| 893 | 893 | } else { |
| 894 | 894 | $object->status = $oldstatus; |
| 895 | - $object->statut = $oldstatus; // deprecated |
|
| 895 | + $object->statut = $oldstatus; // deprecated |
|
| 896 | 896 | |
| 897 | 897 | $db->rollback(); |
| 898 | 898 | $action = ''; |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | setEventMessages($object->error, $object->errors, 'errors'); |
| 912 | 912 | $error++; |
| 913 | 913 | } else { |
| 914 | - $object->statut = $newstatus; // deprecated |
|
| 914 | + $object->statut = $newstatus; // deprecated |
|
| 915 | 915 | $object->status = $newstatus; |
| 916 | 916 | } |
| 917 | 917 | |
@@ -929,13 +929,13 @@ discard block |
||
| 929 | 929 | |
| 930 | 930 | if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) { |
| 931 | 931 | if ($fromElement == 'commande') { |
| 932 | - dol_include_once('/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 932 | + dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 933 | 933 | $lineClassName = 'OrderLine'; |
| 934 | 934 | } elseif ($fromElement == 'propal') { |
| 935 | - dol_include_once('/comm/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 935 | + dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 936 | 936 | $lineClassName = 'PropaleLigne'; |
| 937 | 937 | } elseif ($fromElement == 'facture') { |
| 938 | - dol_include_once('/compta/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 938 | + dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 939 | 939 | $lineClassName = 'FactureLigne'; |
| 940 | 940 | } else { |
| 941 | 941 | $lineClassName = null; |
@@ -1002,14 +1002,14 @@ discard block |
||
| 1002 | 1002 | $object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'discount', $discount); |
| 1003 | 1003 | } |
| 1004 | 1004 | |
| 1005 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 1005 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 1006 | 1006 | |
| 1007 | 1007 | // Actions to send emails |
| 1008 | 1008 | $actiontypecode = 'AC_OTH_AUTO'; |
| 1009 | 1009 | $triggersendname = 'PROPAL_SENTBYMAIL'; |
| 1010 | 1010 | $autocopy = 'MAIN_MAIL_AUTOCOPY_PROPOSAL_TO'; |
| 1011 | - $trackid = 'pro' . $object->id; |
|
| 1012 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 1011 | + $trackid = 'pro'.$object->id; |
|
| 1012 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 1013 | 1013 | |
| 1014 | 1014 | |
| 1015 | 1015 | // Go back to draft |
@@ -1078,7 +1078,7 @@ discard block |
||
| 1078 | 1078 | } |
| 1079 | 1079 | $tvatx = $line->tva_tx; |
| 1080 | 1080 | if (!empty($line->vat_src_code)) { |
| 1081 | - $tvatx .= ' (' . $line->vat_src_code . ')'; |
|
| 1081 | + $tvatx .= ' ('.$line->vat_src_code.')'; |
|
| 1082 | 1082 | } |
| 1083 | 1083 | $result = $object->updateline($line->id, $line->subprice, $line->qty, (float) $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); |
| 1084 | 1084 | $object->lines[$key] = $object->line; |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | if ($prod->price_min > $subprice) { |
| 1097 | 1097 | $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1098 | 1098 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1099 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 1099 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 1100 | 1100 | } |
| 1101 | 1101 | // Manage $line->subprice and $line->multicurrency_subprice |
| 1102 | 1102 | if ($line->subprice <> 0) { |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | } else { |
| 1167 | 1167 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1168 | 1168 | } |
| 1169 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 1169 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 1170 | 1170 | exit(); |
| 1171 | 1171 | } elseif ($action == 'confirm_addsubtotalline' && $usercancreate) { |
| 1172 | 1172 | // Handling adding a new subtotal line for subtotals module |
@@ -1218,7 +1218,7 @@ discard block |
||
| 1218 | 1218 | } else { |
| 1219 | 1219 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1220 | 1220 | } |
| 1221 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 1221 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 1222 | 1222 | exit(); |
| 1223 | 1223 | } elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && !GETPOST('markforalllines', 'alpha') && $usercancreate) { |
| 1224 | 1224 | // Add line |
@@ -1260,8 +1260,8 @@ discard block |
||
| 1260 | 1260 | |
| 1261 | 1261 | $tva_tx = GETPOST('tva_tx', 'alpha'); |
| 1262 | 1262 | |
| 1263 | - $qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2); |
|
| 1264 | - $remise_percent = (GETPOSTISSET('remise_percent' . $predef) ? price2num(GETPOST('remise_percent' . $predef, 'alpha'), '', 2) : 0); |
|
| 1263 | + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); |
|
| 1264 | + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); |
|
| 1265 | 1265 | if (empty($remise_percent)) { |
| 1266 | 1266 | $remise_percent = 0; |
| 1267 | 1267 | } |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | if (is_array($extralabelsline)) { |
| 1274 | 1274 | // Get extra fields |
| 1275 | 1275 | foreach ($extralabelsline as $key => $value) { |
| 1276 | - unset($_POST["options_" . $key]); |
|
| 1276 | + unset($_POST["options_".$key]); |
|
| 1277 | 1277 | } |
| 1278 | 1278 | } |
| 1279 | 1279 | |
@@ -1345,7 +1345,7 @@ discard block |
||
| 1345 | 1345 | |
| 1346 | 1346 | if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { |
| 1347 | 1347 | // If price per customer |
| 1348 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1348 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1349 | 1349 | $prodcustprice = new ProductCustomerPrice($db); |
| 1350 | 1350 | $filter = array('t.fk_product' => (string) $prod->id, 't.fk_soc' => (string) $object->thirdparty->id); |
| 1351 | 1351 | |
@@ -1409,7 +1409,7 @@ discard block |
||
| 1409 | 1409 | } |
| 1410 | 1410 | } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { |
| 1411 | 1411 | // If price per customer |
| 1412 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1412 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1413 | 1413 | |
| 1414 | 1414 | $prodcustprice = new ProductCustomerPrice($db); |
| 1415 | 1415 | |
@@ -1556,23 +1556,23 @@ discard block |
||
| 1556 | 1556 | $outputlangs->load('products'); |
| 1557 | 1557 | } |
| 1558 | 1558 | if (!empty($prod->customcode)) { |
| 1559 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1559 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1560 | 1560 | } |
| 1561 | 1561 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1562 | 1562 | $tmptxt .= ' - '; |
| 1563 | 1563 | } |
| 1564 | 1564 | if (!empty($prod->country_code)) { |
| 1565 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1565 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1566 | 1566 | } |
| 1567 | 1567 | } else { |
| 1568 | 1568 | if (!empty($prod->customcode)) { |
| 1569 | - $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1569 | + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1570 | 1570 | } |
| 1571 | 1571 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1572 | 1572 | $tmptxt .= ' - '; |
| 1573 | 1573 | } |
| 1574 | 1574 | if (!empty($prod->country_code)) { |
| 1575 | - $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1575 | + $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1576 | 1576 | } |
| 1577 | 1577 | } |
| 1578 | 1578 | $tmptxt .= ')'; |
@@ -1611,11 +1611,11 @@ discard block |
||
| 1611 | 1611 | $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr); |
| 1612 | 1612 | |
| 1613 | 1613 | // Margin |
| 1614 | - $fournprice = (int) (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1615 | - $buyingprice = price2num((GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1614 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1615 | + $buyingprice = price2num((GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1616 | 1616 | |
| 1617 | - $date_start = dol_mktime(GETPOSTINT('date_start' . $predef . 'hour'), GETPOSTINT('date_start' . $predef . 'min'), GETPOSTINT('date_start' . $predef . 'sec'), GETPOSTINT('date_start' . $predef . 'month'), GETPOSTINT('date_start' . $predef . 'day'), GETPOSTINT('date_start' . $predef . 'year')); |
|
| 1618 | - $date_end = dol_mktime(GETPOSTINT('date_end' . $predef . 'hour'), GETPOSTINT('date_end' . $predef . 'min'), GETPOSTINT('date_end' . $predef . 'sec'), GETPOSTINT('date_end' . $predef . 'month'), GETPOSTINT('date_end' . $predef . 'day'), GETPOSTINT('date_end' . $predef . 'year')); |
|
| 1617 | + $date_start = dol_mktime(GETPOSTINT('date_start'.$predef.'hour'), GETPOSTINT('date_start'.$predef.'min'), GETPOSTINT('date_start'.$predef.'sec'), GETPOSTINT('date_start'.$predef.'month'), GETPOSTINT('date_start'.$predef.'day'), GETPOSTINT('date_start'.$predef.'year')); |
|
| 1618 | + $date_end = dol_mktime(GETPOSTINT('date_end'.$predef.'hour'), GETPOSTINT('date_end'.$predef.'min'), GETPOSTINT('date_end'.$predef.'sec'), GETPOSTINT('date_end'.$predef.'month'), GETPOSTINT('date_end'.$predef.'day'), GETPOSTINT('date_end'.$predef.'year')); |
|
| 1619 | 1619 | |
| 1620 | 1620 | // Prepare a price equivalent for minimum price check |
| 1621 | 1621 | $pu_equivalent = $pu_ht; |
@@ -1746,7 +1746,7 @@ discard block |
||
| 1746 | 1746 | if ($prod->price_min > $line->subprice) { |
| 1747 | 1747 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1748 | 1748 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1749 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 1749 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 1750 | 1750 | } else { |
| 1751 | 1751 | setEventMessages($prod->error, $prod->errors, 'errors'); |
| 1752 | 1752 | } |
@@ -1884,7 +1884,7 @@ discard block |
||
| 1884 | 1884 | $pu_ttc = price2num(GETPOST('price_ttc'), '', 2); |
| 1885 | 1885 | |
| 1886 | 1886 | // Add buying price |
| 1887 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1887 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1888 | 1888 | $buyingprice = price2num((GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''), '', 2); // If buying_price is '0', we must keep this value |
| 1889 | 1889 | |
| 1890 | 1890 | $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | if (is_array($extralabelsline)) { |
| 1932 | 1932 | // Get extra fields |
| 1933 | 1933 | foreach ($extralabelsline as $key => $value) { |
| 1934 | - unset($_POST["options_" . $key]); |
|
| 1934 | + unset($_POST["options_".$key]); |
|
| 1935 | 1935 | } |
| 1936 | 1936 | } |
| 1937 | 1937 | |
@@ -2063,7 +2063,7 @@ discard block |
||
| 2063 | 2063 | } |
| 2064 | 2064 | } |
| 2065 | 2065 | } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) { |
| 2066 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To re-display card in edit mode |
|
| 2066 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To re-display card in edit mode |
|
| 2067 | 2067 | exit(); |
| 2068 | 2068 | } elseif ($action == 'classin' && $usercancreate) { |
| 2069 | 2069 | // Set project |
@@ -2077,8 +2077,8 @@ discard block |
||
| 2077 | 2077 | } elseif ($action == 'setconditions' && $usercancreate) { |
| 2078 | 2078 | // Terms of payment |
| 2079 | 2079 | $sql = "SELECT code "; |
| 2080 | - $sql .= "FROM " . $db->prefix() . "c_payment_term"; |
|
| 2081 | - $sql .= " WHERE rowid = " . ((int) GETPOST('cond_reglement_id', 'int')); |
|
| 2080 | + $sql .= "FROM ".$db->prefix()."c_payment_term"; |
|
| 2081 | + $sql .= " WHERE rowid = ".((int) GETPOST('cond_reglement_id', 'int')); |
|
| 2082 | 2082 | $result = $db->query($sql); |
| 2083 | 2083 | if ($result) { |
| 2084 | 2084 | $obj = $db->fetch_object($result); |
@@ -2143,7 +2143,7 @@ discard block |
||
| 2143 | 2143 | } |
| 2144 | 2144 | |
| 2145 | 2145 | if ($result >= 0) { |
| 2146 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2146 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2147 | 2147 | exit(); |
| 2148 | 2148 | } else { |
| 2149 | 2149 | if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -2166,7 +2166,7 @@ discard block |
||
| 2166 | 2166 | $result = $object->delete_contact($lineid); |
| 2167 | 2167 | |
| 2168 | 2168 | if ($result >= 0) { |
| 2169 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2169 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2170 | 2170 | exit(); |
| 2171 | 2171 | } else { |
| 2172 | 2172 | dol_print_error($db); |
@@ -2177,7 +2177,7 @@ discard block |
||
| 2177 | 2177 | // Actions to build doc |
| 2178 | 2178 | $upload_dir = !empty($conf->propal->multidir_output[$object->entity ?? $conf->entity]) ? $conf->propal->multidir_output[$object->entity ?? $conf->entity] : $conf->propal->dir_output; |
| 2179 | 2179 | $permissiontoadd = $usercancreate; |
| 2180 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 2180 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 2181 | 2181 | } |
| 2182 | 2182 | |
| 2183 | 2183 | |
@@ -2194,7 +2194,7 @@ discard block |
||
| 2194 | 2194 | $formproject = new FormProjets($db); |
| 2195 | 2195 | } |
| 2196 | 2196 | |
| 2197 | -$title = $object->ref . " - " . $langs->trans('Card'); |
|
| 2197 | +$title = $object->ref." - ".$langs->trans('Card'); |
|
| 2198 | 2198 | if ($action == 'create') { |
| 2199 | 2199 | $title = $langs->trans("NewPropal"); |
| 2200 | 2200 | } |
@@ -2260,11 +2260,11 @@ discard block |
||
| 2260 | 2260 | $element = $subelement = 'expedition'; |
| 2261 | 2261 | } |
| 2262 | 2262 | |
| 2263 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 2263 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 2264 | 2264 | |
| 2265 | 2265 | $classname = ucfirst($subelement); |
| 2266 | 2266 | $objectsrc = new $classname($db); |
| 2267 | - '@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic |
|
| 2267 | + '@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic |
|
| 2268 | 2268 | /** @var Commande|Propal|Contrat|Expedition $objectsrc */ |
| 2269 | 2269 | $objectsrc->fetch($originid); |
| 2270 | 2270 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
@@ -2340,19 +2340,19 @@ discard block |
||
| 2340 | 2340 | } |
| 2341 | 2341 | } |
| 2342 | 2342 | |
| 2343 | - print '<form name="addprop" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
|
| 2344 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2343 | + print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
|
| 2344 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2345 | 2345 | print '<input type="hidden" name="action" value="add">'; |
| 2346 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2347 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 2346 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2347 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 2348 | 2348 | if ($origin != 'project' && $originid) { |
| 2349 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
| 2350 | - print '<input type="hidden" name="originid" value="' . $originid . '">'; |
|
| 2349 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
| 2350 | + print '<input type="hidden" name="originid" value="'.$originid.'">'; |
|
| 2351 | 2351 | if ($origin == 'contrat' && !empty($renewal)) { |
| 2352 | - print '<input type="hidden" name="renewal" value="' . $renewal . '">'; |
|
| 2352 | + print '<input type="hidden" name="renewal" value="'.$renewal.'">'; |
|
| 2353 | 2353 | } |
| 2354 | 2354 | } elseif ($origin == 'project' && !empty($projectid)) { |
| 2355 | - print '<input type="hidden" name="projectid" value="' . $projectid . '">'; |
|
| 2355 | + print '<input type="hidden" name="projectid" value="'.$projectid.'">'; |
|
| 2356 | 2356 | } |
| 2357 | 2357 | |
| 2358 | 2358 | print dol_get_fiche_head(); |
@@ -2365,22 +2365,22 @@ discard block |
||
| 2365 | 2365 | print '<table class="border centpercent">'; |
| 2366 | 2366 | |
| 2367 | 2367 | // Reference |
| 2368 | - print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td class="valuefieldcreate">' . $langs->trans("Draft") . '</td></tr>'; |
|
| 2368 | + print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td class="valuefieldcreate">'.$langs->trans("Draft").'</td></tr>'; |
|
| 2369 | 2369 | |
| 2370 | 2370 | // Ref customer |
| 2371 | - print '<tr class="field_ref_client"><td class="titlefieldcreate">' . $langs->trans('RefCustomer') . '</td><td class="valuefieldcreate">'; |
|
| 2372 | - print '<input type="text" name="ref_client" value="' . (!empty($ref_client) ? $ref_client : GETPOST('ref_client')) . '"></td>'; |
|
| 2371 | + print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">'; |
|
| 2372 | + print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>'; |
|
| 2373 | 2373 | print '</tr>'; |
| 2374 | 2374 | |
| 2375 | 2375 | // Third party |
| 2376 | 2376 | print '<tr class="field_socid">'; |
| 2377 | - print '<td class="titlefieldcreate fieldrequired">' . $langs->trans('Customer') . '</td>'; |
|
| 2377 | + print '<td class="titlefieldcreate fieldrequired">'.$langs->trans('Customer').'</td>'; |
|
| 2378 | 2378 | $shipping_method_id = 0; |
| 2379 | 2379 | $warehouse_id = 0; |
| 2380 | 2380 | if ($socid > 0) { |
| 2381 | 2381 | print '<td class="valuefieldcreate">'; |
| 2382 | 2382 | print $soc->getNomUrl(1, 'customer'); |
| 2383 | - print '<input type="hidden" name="socid" value="' . $soc->id . '">'; |
|
| 2383 | + print '<input type="hidden" name="socid" value="'.$soc->id.'">'; |
|
| 2384 | 2384 | print '</td>'; |
| 2385 | 2385 | if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) { |
| 2386 | 2386 | $shipping_method_id = $soc->shipping_method_id; |
@@ -2389,7 +2389,7 @@ discard block |
||
| 2389 | 2389 | } else { |
| 2390 | 2390 | print '<td class="valuefieldcreate">'; |
| 2391 | 2391 | $filter = '((s.client:IN:1,2,3) AND (s.status:=:1))'; |
| 2392 | - print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); |
|
| 2392 | + print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); |
|
| 2393 | 2393 | // reload page to retrieve customer information |
| 2394 | 2394 | if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) { |
| 2395 | 2395 | print '<script> |
@@ -2405,63 +2405,63 @@ discard block |
||
| 2405 | 2405 | }); |
| 2406 | 2406 | </script>'; |
| 2407 | 2407 | } |
| 2408 | - print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
|
| 2408 | + print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; |
|
| 2409 | 2409 | print '</td>'; |
| 2410 | 2410 | } |
| 2411 | - print '</tr>' . "\n"; |
|
| 2411 | + print '</tr>'."\n"; |
|
| 2412 | 2412 | |
| 2413 | 2413 | if ($socid > 0) { |
| 2414 | 2414 | // Contacts (ask contact only if thirdparty already defined). |
| 2415 | - print '<tr class="field_contactid"><td class="titlefieldcreate">' . $langs->trans("DefaultContact") . '</td><td class="valuefieldcreate">'; |
|
| 2415 | + print '<tr class="field_contactid"><td class="titlefieldcreate">'.$langs->trans("DefaultContact").'</td><td class="valuefieldcreate">'; |
|
| 2416 | 2416 | print img_picto('', 'contact', 'class="pictofixedwidth"'); |
| 2417 | 2417 | //print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, '', '', 0, 'minwidth300 widthcentpercentminusx'); |
| 2418 | 2418 | print $form->select_contact($soc->id, $contactid, 'contactid', 1, '', '', 1, 'maxwidth300 widthcentpercentminusx', true); |
| 2419 | 2419 | print '</td></tr>'; |
| 2420 | 2420 | |
| 2421 | 2421 | // Third party discounts info line |
| 2422 | - print '<tr class="field_discount_info"><td class="titlefieldcreate">' . $langs->trans('Discounts') . '</td><td class="valuefieldcreate">'; |
|
| 2422 | + print '<tr class="field_discount_info"><td class="titlefieldcreate">'.$langs->trans('Discounts').'</td><td class="valuefieldcreate">'; |
|
| 2423 | 2423 | |
| 2424 | 2424 | $absolute_discount = $soc->getAvailableDiscounts(); |
| 2425 | 2425 | |
| 2426 | 2426 | $thirdparty = $soc; |
| 2427 | 2427 | $discount_type = 0; |
| 2428 | - $backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid'))); |
|
| 2429 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 2428 | + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
|
| 2429 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 2430 | 2430 | print '</td></tr>'; |
| 2431 | 2431 | } |
| 2432 | 2432 | |
| 2433 | 2433 | $newdatepropal = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); |
| 2434 | 2434 | // Date |
| 2435 | - print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">' . $langs->trans('DatePropal') . '</td><td class="valuefieldcreate">'; |
|
| 2435 | + print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">'.$langs->trans('DatePropal').'</td><td class="valuefieldcreate">'; |
|
| 2436 | 2436 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 2437 | 2437 | print $form->selectDate($newdatepropal ? $newdatepropal : $datepropal, '', 0, 0, 0, "addprop", 1, 1); |
| 2438 | 2438 | print '</td></tr>'; |
| 2439 | 2439 | |
| 2440 | 2440 | // Validaty duration |
| 2441 | - print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td class="valuefieldcreate">' . img_picto('', 'clock', 'class="pictofixedwidth"') . '<input name="duree_validite" class="width50" value="' . (GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')) . '"> ' . $langs->trans("days") . '</td></tr>'; |
|
| 2441 | + print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">'.$langs->trans("ValidityDuration").'</td><td class="valuefieldcreate">'.img_picto('', 'clock', 'class="pictofixedwidth"').'<input name="duree_validite" class="width50" value="'.(GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')).'"> '.$langs->trans("days").'</td></tr>'; |
|
| 2442 | 2442 | |
| 2443 | 2443 | // Terms of payment |
| 2444 | - print '<tr class="field_cond_reglement_id"><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>'; |
|
| 2444 | + print '<tr class="field_cond_reglement_id"><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; |
|
| 2445 | 2445 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
| 2446 | 2446 | // at last resort we take the payment term id which may be filled by default values set (if not getpostisset) |
| 2447 | 2447 | print $form->getSelectConditionsPaiements((int) $cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent); |
| 2448 | 2448 | print '</td></tr>'; |
| 2449 | 2449 | |
| 2450 | 2450 | // Mode of payment |
| 2451 | - print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">' . $langs->trans('PaymentMode') . '</td><td class="valuefieldcreate">'; |
|
| 2451 | + print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">'.$langs->trans('PaymentMode').'</td><td class="valuefieldcreate">'; |
|
| 2452 | 2452 | print img_picto('', 'bank', 'class="pictofixedwidth"'); |
| 2453 | 2453 | print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); |
| 2454 | 2454 | print '</td></tr>'; |
| 2455 | 2455 | |
| 2456 | 2456 | // Bank Account |
| 2457 | 2457 | if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') && isModEnabled("bank")) { |
| 2458 | - print '<tr class="field_fk_account"><td class="titlefieldcreate">' . $langs->trans('BankAccount') . '</td><td class="valuefieldcreate">'; |
|
| 2459 | - print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2458 | + print '<tr class="field_fk_account"><td class="titlefieldcreate">'.$langs->trans('BankAccount').'</td><td class="valuefieldcreate">'; |
|
| 2459 | + print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2460 | 2460 | print '</td></tr>'; |
| 2461 | 2461 | } |
| 2462 | 2462 | |
| 2463 | 2463 | // Source / Channel - What trigger creation |
| 2464 | - print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">' . $langs->trans('Source') . '</td><td class="valuefieldcreate">'; |
|
| 2464 | + print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">'.$langs->trans('Source').'</td><td class="valuefieldcreate">'; |
|
| 2465 | 2465 | print img_picto('', 'question', 'class="pictofixedwidth"'); |
| 2466 | 2466 | $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOSTINT('demand_reason_id') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx'); |
| 2467 | 2467 | print '</td></tr>'; |
@@ -2471,7 +2471,7 @@ discard block |
||
| 2471 | 2471 | if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) { |
| 2472 | 2472 | $shipping_method_id = $soc->shipping_method_id; |
| 2473 | 2473 | } |
| 2474 | - print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">' . $langs->trans('SendingMethod') . '</td><td class="valuefieldcreate">'; |
|
| 2474 | + print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">'.$langs->trans('SendingMethod').'</td><td class="valuefieldcreate">'; |
|
| 2475 | 2475 | print img_picto('', 'dolly', 'class="pictofixedwidth"'); |
| 2476 | 2476 | $form->selectShippingMethod((string) (GETPOSTISSET('shipping_method_id') ? GETPOSTINT('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); |
| 2477 | 2477 | print '</td></tr>'; |
@@ -2480,17 +2480,17 @@ discard block |
||
| 2480 | 2480 | $formproduct = null; |
| 2481 | 2481 | // Warehouse |
| 2482 | 2482 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) { |
| 2483 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2483 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2484 | 2484 | $formproduct = new FormProduct($db); |
| 2485 | - print '<tr class="field_warehouse_id"><td class="titlefieldcreate">' . $langs->trans('Warehouse') . '</td><td class="valuefieldcreate">'; |
|
| 2486 | - print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2485 | + print '<tr class="field_warehouse_id"><td class="titlefieldcreate">'.$langs->trans('Warehouse').'</td><td class="valuefieldcreate">'; |
|
| 2486 | + print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2487 | 2487 | print '</td></tr>'; |
| 2488 | 2488 | } |
| 2489 | 2489 | |
| 2490 | 2490 | // Delivery delay |
| 2491 | - print '<tr class="field_availability_id"><td class="titlefieldcreate">' . $langs->trans('AvailabilityPeriod'); |
|
| 2491 | + print '<tr class="field_availability_id"><td class="titlefieldcreate">'.$langs->trans('AvailabilityPeriod'); |
|
| 2492 | 2492 | if (isModEnabled('order')) { |
| 2493 | - print ' (' . $langs->trans('AfterOrder') . ')'; |
|
| 2493 | + print ' ('.$langs->trans('AfterOrder').')'; |
|
| 2494 | 2494 | } |
| 2495 | 2495 | print '</td><td class="valuefieldcreate">'; |
| 2496 | 2496 | print img_picto('', 'clock', 'class="pictofixedwidth"'); |
@@ -2498,7 +2498,7 @@ discard block |
||
| 2498 | 2498 | print '</td></tr>'; |
| 2499 | 2499 | |
| 2500 | 2500 | // Delivery date (or manufacturing) |
| 2501 | - print '<tr class="field_date_livraison"><td class="titlefieldcreate">' . $langs->trans("DeliveryDate") . '</td>'; |
|
| 2501 | + print '<tr class="field_date_livraison"><td class="titlefieldcreate">'.$langs->trans("DeliveryDate").'</td>'; |
|
| 2502 | 2502 | print '<td class="valuefieldcreate">'; |
| 2503 | 2503 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 2504 | 2504 | if (is_numeric(getDolGlobalString('DATE_LIVRAISON_WEEK_DELAY'))) { // If value set to 0 or a num, not empty |
@@ -2506,7 +2506,7 @@ discard block |
||
| 2506 | 2506 | $syear = date("Y", $tmpdte); |
| 2507 | 2507 | $smonth = date("m", $tmpdte); |
| 2508 | 2508 | $sday = date("d", $tmpdte); |
| 2509 | - print $form->selectDate($syear . "-" . $smonth . "-" . $sday, 'date_livraison', 0, 0, 0, "addprop"); |
|
| 2509 | + print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', 0, 0, 0, "addprop"); |
|
| 2510 | 2510 | } else { |
| 2511 | 2511 | $tmp_date_delivery = GETPOST('date_delivery') ?: -1; |
| 2512 | 2512 | print $form->selectDate($tmp_date_delivery, 'date_livraison', 0, 0, 0, "addprop", 1, 1); |
@@ -2527,7 +2527,7 @@ discard block |
||
| 2527 | 2527 | // Incoterms |
| 2528 | 2528 | if (isModEnabled('incoterm')) { |
| 2529 | 2529 | print '<tr class="field_incoterm_id">'; |
| 2530 | - print '<td class="titlefieldcreate"><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1) . '</label></td>'; |
|
| 2530 | + print '<td class="titlefieldcreate"><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1).'</label></td>'; |
|
| 2531 | 2531 | print '<td class="valuefieldcreate maxwidthonsmartphone">'; |
| 2532 | 2532 | print img_picto('', 'incoterm', 'class="pictofixedwidth"'); |
| 2533 | 2533 | print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms) ? $soc->location_incoterms : '')); |
@@ -2541,7 +2541,7 @@ discard block |
||
| 2541 | 2541 | } |
| 2542 | 2542 | // Template to use by default |
| 2543 | 2543 | print '<tr class="field_model">'; |
| 2544 | - print '<td class="titlefieldcreate">' . $langs->trans("DefaultModel") . '</td>'; |
|
| 2544 | + print '<td class="titlefieldcreate">'.$langs->trans("DefaultModel").'</td>'; |
|
| 2545 | 2545 | print '<td class="valuefieldcreate">'; |
| 2546 | 2546 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
| 2547 | 2547 | $liste = ModelePDFPropales::liste_modeles($db); |
@@ -2552,15 +2552,15 @@ discard block |
||
| 2552 | 2552 | // Multicurrency |
| 2553 | 2553 | if (isModEnabled("multicurrency")) { |
| 2554 | 2554 | print '<tr class="field_currency">'; |
| 2555 | - print '<td class="titlefieldcreate">' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>'; |
|
| 2555 | + print '<td class="titlefieldcreate">'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
|
| 2556 | 2556 | print '<td class="valuefieldcreate maxwidthonsmartphone">'; |
| 2557 | - print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2557 | + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2558 | 2558 | print '</td></tr>'; |
| 2559 | 2559 | } |
| 2560 | 2560 | |
| 2561 | 2561 | // Public note |
| 2562 | 2562 | print '<tr class="field_note_public">'; |
| 2563 | - print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePublic') . '</td>'; |
|
| 2563 | + print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePublic').'</td>'; |
|
| 2564 | 2564 | print '<td class="valuefieldcreate">'; |
| 2565 | 2565 | $note_public = GETPOST('note_public', 'restricthtml'); |
| 2566 | 2566 | if (!GETPOSTISSET('note_public') && empty($note_public) && !empty($objectsrc)) { |
@@ -2572,7 +2572,7 @@ discard block |
||
| 2572 | 2572 | // Private note |
| 2573 | 2573 | if (empty($user->socid)) { |
| 2574 | 2574 | print '<tr class="field_note_private">'; |
| 2575 | - print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePrivate') . '</td>'; |
|
| 2575 | + print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePrivate').'</td>'; |
|
| 2576 | 2576 | print '<td class="valuefieldcreate">'; |
| 2577 | 2577 | $note_private = GETPOST('note_private', 'restricthtml'); |
| 2578 | 2578 | if (!GETPOSTISSET('note_private') && empty($note_private) && !empty($objectsrc)) { |
@@ -2585,7 +2585,7 @@ discard block |
||
| 2585 | 2585 | } |
| 2586 | 2586 | |
| 2587 | 2587 | // Other attributes |
| 2588 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
|
| 2588 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
|
| 2589 | 2589 | |
| 2590 | 2590 | // Lines from source |
| 2591 | 2591 | if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { |
@@ -2597,13 +2597,13 @@ discard block |
||
| 2597 | 2597 | $objectsrc->update_price(1, 'auto', 1); |
| 2598 | 2598 | } |
| 2599 | 2599 | |
| 2600 | - print "\n<!-- " . $classname . " info -->"; |
|
| 2600 | + print "\n<!-- ".$classname." info -->"; |
|
| 2601 | 2601 | print "\n"; |
| 2602 | - print '<input type="hidden" name="amount" value="' . $objectsrc->total_ht . '">' . "\n"; |
|
| 2603 | - print '<input type="hidden" name="total" value="' . $objectsrc->total_ttc . '">' . "\n"; |
|
| 2604 | - print '<input type="hidden" name="tva" value="' . $objectsrc->total_tva . '">' . "\n"; |
|
| 2605 | - print '<input type="hidden" name="origin" value="' . $objectsrc->element . '">'; |
|
| 2606 | - print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">'; |
|
| 2602 | + print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; |
|
| 2603 | + print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n"; |
|
| 2604 | + print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n"; |
|
| 2605 | + print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; |
|
| 2606 | + print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; |
|
| 2607 | 2607 | |
| 2608 | 2608 | $newclassname = $classname; |
| 2609 | 2609 | if ($newclassname == 'Propal') { |
@@ -2616,22 +2616,22 @@ discard block |
||
| 2616 | 2616 | $newclassname = 'Intervention'; |
| 2617 | 2617 | } |
| 2618 | 2618 | |
| 2619 | - print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>'; |
|
| 2620 | - print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>'; |
|
| 2621 | - print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2619 | + print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>'; |
|
| 2620 | + print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td></tr>'; |
|
| 2621 | + print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2622 | 2622 | if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 |
| 2623 | - print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2623 | + print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2624 | 2624 | } |
| 2625 | 2625 | |
| 2626 | 2626 | if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 |
| 2627 | - print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2627 | + print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2628 | 2628 | } |
| 2629 | - print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2629 | + print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2630 | 2630 | |
| 2631 | 2631 | if (isModEnabled("multicurrency")) { |
| 2632 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; |
|
| 2633 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; |
|
| 2634 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; |
|
| 2632 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; |
|
| 2633 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>"; |
|
| 2634 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>"; |
|
| 2635 | 2635 | } |
| 2636 | 2636 | } |
| 2637 | 2637 | |
@@ -2652,16 +2652,16 @@ discard block |
||
| 2652 | 2652 | // For backward compatibility |
| 2653 | 2653 | print '<tr>'; |
| 2654 | 2654 | print '<td><input type="radio" name="createmode" value="copy"></td>'; |
| 2655 | - print '<td>' . $langs->trans("CopyPropalFrom") . ' </td>'; |
|
| 2655 | + print '<td>'.$langs->trans("CopyPropalFrom").' </td>'; |
|
| 2656 | 2656 | print '<td>'; |
| 2657 | 2657 | $liste_propal = array(); |
| 2658 | 2658 | $liste_propal[0] = ''; |
| 2659 | 2659 | |
| 2660 | 2660 | $sql = "SELECT p.rowid as id, p.ref, s.nom"; |
| 2661 | - $sql .= " FROM " . MAIN_DB_PREFIX . "propal p"; |
|
| 2662 | - $sql .= ", " . MAIN_DB_PREFIX . "societe s"; |
|
| 2661 | + $sql .= " FROM ".MAIN_DB_PREFIX."propal p"; |
|
| 2662 | + $sql .= ", ".MAIN_DB_PREFIX."societe s"; |
|
| 2663 | 2663 | $sql .= " WHERE s.rowid = p.fk_soc"; |
| 2664 | - $sql .= " AND p.entity IN (" . getEntity('propal') . ")"; |
|
| 2664 | + $sql .= " AND p.entity IN (".getEntity('propal').")"; |
|
| 2665 | 2665 | $sql .= " AND p.fk_statut <> 0"; |
| 2666 | 2666 | $sql .= " ORDER BY Id"; |
| 2667 | 2667 | |
@@ -2671,7 +2671,7 @@ discard block |
||
| 2671 | 2671 | $i = 0; |
| 2672 | 2672 | while ($i < $num) { |
| 2673 | 2673 | $row = $db->fetch_row($resql); |
| 2674 | - $propalRefAndSocName = $row[1] . " - " . $row[2]; |
|
| 2674 | + $propalRefAndSocName = $row[1]." - ".$row[2]; |
|
| 2675 | 2675 | $liste_propal[$row[0]] = $propalRefAndSocName; |
| 2676 | 2676 | $i++; |
| 2677 | 2677 | } |
@@ -2682,7 +2682,7 @@ discard block |
||
| 2682 | 2682 | print '</td></tr>'; |
| 2683 | 2683 | |
| 2684 | 2684 | print '<tr><td class="tdtop"><input type="radio" name="createmode" value="empty" checked></td>'; |
| 2685 | - print '<td valign="top" colspan="2">' . $langs->trans("CreateEmptyPropal") . '</td></tr>'; |
|
| 2685 | + print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>'; |
|
| 2686 | 2686 | print '</table>'; |
| 2687 | 2687 | } |
| 2688 | 2688 | } |
@@ -2762,9 +2762,9 @@ discard block |
||
| 2762 | 2762 | //Form to close proposal (signed or not) |
| 2763 | 2763 | $formquestion = array(); |
| 2764 | 2764 | if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { |
| 2765 | - $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">' . $langs->trans("CloseAs") . '</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
|
| 2765 | + $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
|
| 2766 | 2766 | } |
| 2767 | - $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2767 | + $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2768 | 2768 | |
| 2769 | 2769 | if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
| 2770 | 2770 | // This is a hidden option: |
@@ -2774,7 +2774,7 @@ discard block |
||
| 2774 | 2774 | $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2775 | 2775 | |
| 2776 | 2776 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) { |
| 2777 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2777 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2778 | 2778 | |
| 2779 | 2779 | $object->fetchObjectLinked(); |
| 2780 | 2780 | |
@@ -2860,7 +2860,7 @@ discard block |
||
| 2860 | 2860 | 'type' => 'onecolumn', |
| 2861 | 2861 | 'value' => ' |
| 2862 | 2862 | <script> |
| 2863 | - let signedValue = ' . $object::STATUS_SIGNED . '; |
|
| 2863 | + let signedValue = ' . $object::STATUS_SIGNED.'; |
|
| 2864 | 2864 | |
| 2865 | 2865 | $(document).ready(function() { |
| 2866 | 2866 | $("[name=generate_deposit]").change(function () { |
@@ -2900,7 +2900,7 @@ discard block |
||
| 2900 | 2900 | } |
| 2901 | 2901 | |
| 2902 | 2902 | if (isModEnabled('notification')) { |
| 2903 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2903 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2904 | 2904 | $notify = new Notify($db); |
| 2905 | 2905 | $formquestion = array_merge($formquestion, array( |
| 2906 | 2906 | array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), |
@@ -2910,7 +2910,7 @@ discard block |
||
| 2910 | 2910 | if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { |
| 2911 | 2911 | $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
| 2912 | 2912 | } else { |
| 2913 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2913 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2914 | 2914 | } |
| 2915 | 2915 | } elseif ($action == 'cancel') { |
| 2916 | 2916 | // Confirm cancel |
@@ -2923,7 +2923,7 @@ discard block |
||
| 2923 | 2923 | $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); |
| 2924 | 2924 | } elseif ($action == 'ask_deleteline') { |
| 2925 | 2925 | // Confirmation delete product/service line |
| 2926 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2926 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2927 | 2927 | } elseif ($action == 'ask_subtotal_deleteline') { |
| 2928 | 2928 | // Confirmation de la suppression d'une ligne subtotal |
| 2929 | 2929 | $langs->load("subtotals"); |
@@ -2934,7 +2934,7 @@ discard block |
||
| 2934 | 2934 | $title = "DeleteTitleLine"; |
| 2935 | 2935 | $question = "ConfirmDeleteTitleLine"; |
| 2936 | 2936 | } |
| 2937 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2937 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2938 | 2938 | } elseif ($action == 'validate') { |
| 2939 | 2939 | // Confirm validate proposal |
| 2940 | 2940 | $error = 0; |
@@ -2953,7 +2953,7 @@ discard block |
||
| 2953 | 2953 | |
| 2954 | 2954 | $text = $langs->trans('ConfirmValidateProp', $numref); |
| 2955 | 2955 | if (isModEnabled('notification')) { |
| 2956 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2956 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2957 | 2957 | $notify = new Notify($db); |
| 2958 | 2958 | $text .= '<br>'; |
| 2959 | 2959 | $text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid, $object); |
@@ -2963,7 +2963,7 @@ discard block |
||
| 2963 | 2963 | $nbMandated = 0; |
| 2964 | 2964 | foreach ($object->lines as $line) { |
| 2965 | 2965 | $res = $line->fetch_product(); |
| 2966 | - if ($res > 0) { |
|
| 2966 | + if ($res > 0) { |
|
| 2967 | 2967 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
| 2968 | 2968 | $nbMandated++; |
| 2969 | 2969 | break; |
@@ -2975,7 +2975,7 @@ discard block |
||
| 2975 | 2975 | setEventMessages($langs->trans("mandatoryPeriodNeedTobeSetMsgValidate"), null, 'errors'); |
| 2976 | 2976 | $error++; |
| 2977 | 2977 | } else { |
| 2978 | - $text .= '<div><span class="clearboth nowraponall warning">' . img_warning() . $langs->trans("mandatoryPeriodNeedTobeSetMsgValidate") . '</span></div>'; |
|
| 2978 | + $text .= '<div><span class="clearboth nowraponall warning">'.img_warning().$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2979 | 2979 | } |
| 2980 | 2980 | } |
| 2981 | 2981 | |
@@ -2999,16 +2999,16 @@ discard block |
||
| 2999 | 2999 | |
| 3000 | 3000 | // Proposal card |
| 3001 | 3001 | |
| 3002 | - $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 3002 | + $linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 3003 | 3003 | |
| 3004 | 3004 | $morehtmlref = '<div class="refidno">'; |
| 3005 | 3005 | // Ref customer |
| 3006 | 3006 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); |
| 3007 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 3007 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 3008 | 3008 | // Thirdparty |
| 3009 | - $morehtmlref .= '<br>' . $soc->getNomUrl(1, 'customer'); |
|
| 3009 | + $morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer'); |
|
| 3010 | 3010 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) { |
| 3011 | - $morehtmlref .= ' (<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?socid=' . $soc->id . '&search_societe=' . urlencode($soc->name) . '">' . $langs->trans("OtherProposals") . '</a>)'; |
|
| 3011 | + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$soc->id.'&search_societe='.urlencode($soc->name).'">'.$langs->trans("OtherProposals").'</a>)'; |
|
| 3012 | 3012 | } |
| 3013 | 3013 | // Project |
| 3014 | 3014 | if (isModEnabled('project')) { |
@@ -3017,16 +3017,16 @@ discard block |
||
| 3017 | 3017 | if ($usercancreate) { |
| 3018 | 3018 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
| 3019 | 3019 | if ($action != 'classify') { |
| 3020 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
| 3020 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
| 3021 | 3021 | } |
| 3022 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 3022 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 3023 | 3023 | } else { |
| 3024 | 3024 | if (!empty($object->fk_project)) { |
| 3025 | 3025 | $proj = new Project($db); |
| 3026 | 3026 | $proj->fetch($object->fk_project); |
| 3027 | 3027 | $morehtmlref .= $proj->getNomUrl(1); |
| 3028 | 3028 | if ($proj->title) { |
| 3029 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
| 3029 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
| 3030 | 3030 | } |
| 3031 | 3031 | } |
| 3032 | 3032 | } |
@@ -3056,7 +3056,7 @@ discard block |
||
| 3056 | 3056 | $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; |
| 3057 | 3057 | } |
| 3058 | 3058 | |
| 3059 | - print '<tr><td class="titlefieldmax45">' . $langs->trans('Discounts') . '</td><td>'; |
|
| 3059 | + print '<tr><td class="titlefieldmax45">'.$langs->trans('Discounts').'</td><td>'; |
|
| 3060 | 3060 | |
| 3061 | 3061 | $absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount); |
| 3062 | 3062 | $absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote); |
@@ -3067,8 +3067,8 @@ discard block |
||
| 3067 | 3067 | |
| 3068 | 3068 | $thirdparty = $soc; |
| 3069 | 3069 | $discount_type = 0; |
| 3070 | - $backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id; |
|
| 3071 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 3070 | + $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id; |
|
| 3071 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 3072 | 3072 | |
| 3073 | 3073 | print '</td></tr>'; |
| 3074 | 3074 | |
@@ -3087,12 +3087,12 @@ discard block |
||
| 3087 | 3087 | print $form->editfieldkey("DatePropal", 'date', '', $object, (int) $editenable); |
| 3088 | 3088 | print '</td><td class="valuefield">'; |
| 3089 | 3089 | if ($action == 'editdate' && $usercancreate && $caneditfield) { |
| 3090 | - print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3091 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3090 | + print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3091 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3092 | 3092 | print '<input type="hidden" name="action" value="setdate">'; |
| 3093 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3093 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3094 | 3094 | print $form->selectDate($object->date, 're', 0, 0, 0, "editdate"); |
| 3095 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3095 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3096 | 3096 | print '</form>'; |
| 3097 | 3097 | } else { |
| 3098 | 3098 | if ($object->date) { |
@@ -3110,17 +3110,17 @@ discard block |
||
| 3110 | 3110 | print $langs->trans('DateEndPropal'); |
| 3111 | 3111 | print '</td>'; |
| 3112 | 3112 | if ($action != 'editecheance' && $usercancreate && $caneditfield) { |
| 3113 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editecheance&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>'; |
|
| 3113 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editecheance&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; |
|
| 3114 | 3114 | } |
| 3115 | 3115 | print '</tr></table>'; |
| 3116 | 3116 | print '</td><td class="valuefield">'; |
| 3117 | 3117 | if ($action == 'editecheance' && $usercancreate && $caneditfield) { |
| 3118 | - print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3119 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3118 | + print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3119 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3120 | 3120 | print '<input type="hidden" name="action" value="setecheance">'; |
| 3121 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3121 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3122 | 3122 | print $form->selectDate($object->fin_validite, 'ech', 0, 0, 0, "editecheance"); |
| 3123 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3123 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3124 | 3124 | print '</form>'; |
| 3125 | 3125 | } else { |
| 3126 | 3126 | if (!empty($object->fin_validite)) { |
@@ -3141,14 +3141,14 @@ discard block |
||
| 3141 | 3141 | print $langs->trans('PaymentConditionsShort'); |
| 3142 | 3142 | print '</td>'; |
| 3143 | 3143 | if ($action != 'editconditions' && $usercancreate && $caneditfield) { |
| 3144 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '</a></td>'; |
|
| 3144 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'</a></td>'; |
|
| 3145 | 3145 | } |
| 3146 | 3146 | print '</tr></table>'; |
| 3147 | 3147 | print '</td><td class="valuefield">'; |
| 3148 | 3148 | if ($action == 'editconditions' && $usercancreate && $caneditfield) { |
| 3149 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent); |
|
| 3149 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent); |
|
| 3150 | 3150 | } else { |
| 3151 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent); |
|
| 3151 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent); |
|
| 3152 | 3152 | } |
| 3153 | 3153 | print '</td>'; |
| 3154 | 3154 | print '</tr>'; |
@@ -3160,14 +3160,14 @@ discard block |
||
| 3160 | 3160 | print $langs->trans('PaymentMode'); |
| 3161 | 3161 | print '</td>'; |
| 3162 | 3162 | if ($action != 'editmode' && $usercancreate && $caneditfield) { |
| 3163 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmode&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '</a></td>'; |
|
| 3163 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'</a></td>'; |
|
| 3164 | 3164 | } |
| 3165 | 3165 | print '</tr></table>'; |
| 3166 | 3166 | print '</td><td class="valuefieldcreate">'; |
| 3167 | 3167 | if ($action == 'editmode' && $usercancreate && $caneditfield) { |
| 3168 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3168 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3169 | 3169 | } else { |
| 3170 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3170 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3171 | 3171 | } |
| 3172 | 3172 | print '</td></tr>'; |
| 3173 | 3173 | |
@@ -3183,20 +3183,20 @@ discard block |
||
| 3183 | 3183 | print '<tr class="fielddeliverydelay"><td>'; |
| 3184 | 3184 | print '<table class="nobordernopadding centpercent"><tr><td>'; |
| 3185 | 3185 | if (isModEnabled('order')) { |
| 3186 | - print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod') . ' (' . $langs->trans('AfterOrder') . ')'); |
|
| 3186 | + print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')'); |
|
| 3187 | 3187 | } else { |
| 3188 | 3188 | print $langs->trans('AvailabilityPeriod'); |
| 3189 | 3189 | } |
| 3190 | 3190 | print '</td>'; |
| 3191 | 3191 | if ($action != 'editavailability' && $usercancreate && $caneditfield) { |
| 3192 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>'; |
|
| 3192 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editavailability&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'</a></td>'; |
|
| 3193 | 3193 | } |
| 3194 | 3194 | print '</tr></table>'; |
| 3195 | 3195 | print '</td><td class="valuefield">'; |
| 3196 | 3196 | if ($action == 'editavailability' && $usercancreate && $caneditfield) { |
| 3197 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3197 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3198 | 3198 | } else { |
| 3199 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1); |
|
| 3199 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1); |
|
| 3200 | 3200 | } |
| 3201 | 3201 | |
| 3202 | 3202 | print '</td>'; |
@@ -3209,14 +3209,14 @@ discard block |
||
| 3209 | 3209 | print $langs->trans('SendingMethod'); |
| 3210 | 3210 | print '</td>'; |
| 3211 | 3211 | if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) { |
| 3212 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshippingmethod&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingMode'), 1) . '</a></td>'; |
|
| 3212 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'</a></td>'; |
|
| 3213 | 3213 | } |
| 3214 | 3214 | print '</tr></table>'; |
| 3215 | 3215 | print '</td><td class="valuefield">'; |
| 3216 | 3216 | if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) { |
| 3217 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3217 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3218 | 3218 | } else { |
| 3219 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3219 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3220 | 3220 | } |
| 3221 | 3221 | print '</td>'; |
| 3222 | 3222 | print '</tr>'; |
@@ -3225,16 +3225,16 @@ discard block |
||
| 3225 | 3225 | // Warehouse |
| 3226 | 3226 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) { |
| 3227 | 3227 | $langs->load('stocks'); |
| 3228 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 3228 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 3229 | 3229 | $formproduct = new FormProduct($db); |
| 3230 | 3230 | print '<tr class="field_warehouse_id"><td>'; |
| 3231 | 3231 | $editenable = $usercancreate; |
| 3232 | 3232 | print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable); |
| 3233 | 3233 | print '</td><td class="valuefieldcreate">'; |
| 3234 | 3234 | if ($action == 'editwarehouse') { |
| 3235 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3235 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3236 | 3236 | } else { |
| 3237 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none'); |
|
| 3237 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); |
|
| 3238 | 3238 | } |
| 3239 | 3239 | print '</td>'; |
| 3240 | 3240 | print '</tr>'; |
@@ -3246,14 +3246,14 @@ discard block |
||
| 3246 | 3246 | print $langs->trans('Source'); |
| 3247 | 3247 | print '</td>'; |
| 3248 | 3248 | if ($action != 'editdemandreason' && $usercancreate) { |
| 3249 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . '</a></td>'; |
|
| 3249 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdemandreason&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'</a></td>'; |
|
| 3250 | 3250 | } |
| 3251 | 3251 | print '</tr></table>'; |
| 3252 | 3252 | print '</td><td class="valuefield">'; |
| 3253 | 3253 | if ($action == 'editdemandreason' && $usercancreate) { |
| 3254 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3254 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3255 | 3255 | } else { |
| 3256 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3256 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3257 | 3257 | } |
| 3258 | 3258 | print '</td>'; |
| 3259 | 3259 | print '</tr>'; |
@@ -3265,7 +3265,7 @@ discard block |
||
| 3265 | 3265 | print '</td><td class="valuefield">'; |
| 3266 | 3266 | $arrayoutstandingbills = $soc->getOutstandingBills(); |
| 3267 | 3267 | print($arrayoutstandingbills['opened'] > $soc->outstanding_limit ? img_warning() : ''); |
| 3268 | - print price($arrayoutstandingbills['opened']) . ' / '; |
|
| 3268 | + print price($arrayoutstandingbills['opened']).' / '; |
|
| 3269 | 3269 | print price($soc->outstanding_limit, 0, $langs, 1, -1, -1, $conf->currency); |
| 3270 | 3270 | print '</td>'; |
| 3271 | 3271 | print '</tr>'; |
@@ -3278,14 +3278,14 @@ discard block |
||
| 3278 | 3278 | print $langs->trans('BankAccount'); |
| 3279 | 3279 | print '</td>'; |
| 3280 | 3280 | if ($action != 'editbankaccount' && $usercancreate) { |
| 3281 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editbankaccount&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetBankAccount'), 1) . '</a></td>'; |
|
| 3281 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; |
|
| 3282 | 3282 | } |
| 3283 | 3283 | print '</tr></table>'; |
| 3284 | 3284 | print '</td><td class="valuefield">'; |
| 3285 | 3285 | if ($action == 'editbankaccount') { |
| 3286 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3286 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3287 | 3287 | } else { |
| 3288 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none'); |
|
| 3288 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none'); |
|
| 3289 | 3289 | } |
| 3290 | 3290 | print '</td>'; |
| 3291 | 3291 | print '</tr>'; |
@@ -3296,13 +3296,13 @@ discard block |
||
| 3296 | 3296 | $totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0; |
| 3297 | 3297 | $totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0; |
| 3298 | 3298 | if ($totalWeight) { |
| 3299 | - print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>'; |
|
| 3299 | + print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>'; |
|
| 3300 | 3300 | print '<td class="valuefield">'; |
| 3301 | 3301 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'), 1); |
| 3302 | 3302 | print '</td></tr>'; |
| 3303 | 3303 | } |
| 3304 | 3304 | if ($totalVolume) { |
| 3305 | - print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>'; |
|
| 3305 | + print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>'; |
|
| 3306 | 3306 | print '<td class="valuefield">'; |
| 3307 | 3307 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1); |
| 3308 | 3308 | print '</td></tr>'; |
@@ -3316,7 +3316,7 @@ discard block |
||
| 3316 | 3316 | print $langs->trans('IncotermLabel'); |
| 3317 | 3317 | print '<td><td class="right">'; |
| 3318 | 3318 | if ($action != 'editincoterm' && $usercancreate && $caneditfield) { |
| 3319 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
| 3319 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>'; |
|
| 3320 | 3320 | } else { |
| 3321 | 3321 | print ' '; |
| 3322 | 3322 | } |
@@ -3324,7 +3324,7 @@ discard block |
||
| 3324 | 3324 | print '</td>'; |
| 3325 | 3325 | print '<td class="valuefield">'; |
| 3326 | 3326 | if ($action == 'editincoterm' && $usercancreate && $caneditfield) { |
| 3327 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
| 3327 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
| 3328 | 3328 | } else { |
| 3329 | 3329 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
| 3330 | 3330 | } |
@@ -3359,7 +3359,7 @@ discard block |
||
| 3359 | 3359 | } |
| 3360 | 3360 | |
| 3361 | 3361 | // Other attributes |
| 3362 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 3362 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 3363 | 3363 | |
| 3364 | 3364 | print '</table>'; |
| 3365 | 3365 | |
@@ -3369,53 +3369,53 @@ discard block |
||
| 3369 | 3369 | |
| 3370 | 3370 | print '<table class="border tableforfield centpercent">'; |
| 3371 | 3371 | |
| 3372 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php'; |
|
| 3372 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php'; |
|
| 3373 | 3373 | |
| 3374 | 3374 | print '<tr>'; |
| 3375 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 3376 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3375 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 3376 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3377 | 3377 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3378 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3378 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3379 | 3379 | } |
| 3380 | 3380 | print '</tr>'; |
| 3381 | 3381 | |
| 3382 | 3382 | print '<tr>'; |
| 3383 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
| 3384 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3383 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
| 3384 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3385 | 3385 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3386 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3386 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3387 | 3387 | } |
| 3388 | 3388 | print '</tr>'; |
| 3389 | 3389 | |
| 3390 | 3390 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 3391 | 3391 | print '<tr>'; |
| 3392 | - print '<td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 3393 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3392 | + print '<td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 3393 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3394 | 3394 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3395 | 3395 | $object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
| 3396 | 3396 | |
| 3397 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3397 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3398 | 3398 | } |
| 3399 | 3399 | print '</tr>'; |
| 3400 | 3400 | } |
| 3401 | 3401 | |
| 3402 | 3402 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 3403 | 3403 | print '<tr>'; |
| 3404 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 3405 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3404 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 3405 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3406 | 3406 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3407 | 3407 | $object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
| 3408 | 3408 | |
| 3409 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3409 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3410 | 3410 | } |
| 3411 | 3411 | print '</tr>'; |
| 3412 | 3412 | } |
| 3413 | 3413 | |
| 3414 | 3414 | print '<tr>'; |
| 3415 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3416 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3415 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3416 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3417 | 3417 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3418 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3418 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3419 | 3419 | } |
| 3420 | 3420 | print '</tr>'; |
| 3421 | 3421 | |
@@ -3434,13 +3434,13 @@ discard block |
||
| 3434 | 3434 | if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) { |
| 3435 | 3435 | $blocname = 'contacts'; |
| 3436 | 3436 | $title = $langs->trans('ContactsAddresses'); |
| 3437 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3437 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3438 | 3438 | } |
| 3439 | 3439 | |
| 3440 | 3440 | if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) { |
| 3441 | 3441 | $blocname = 'notes'; |
| 3442 | 3442 | $title = $langs->trans('Notes'); |
| 3443 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3443 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3444 | 3444 | } |
| 3445 | 3445 | |
| 3446 | 3446 | /* |
@@ -3455,20 +3455,20 @@ discard block |
||
| 3455 | 3455 | global $inputalsopricewithtax; |
| 3456 | 3456 | $inputalsopricewithtax = 1; |
| 3457 | 3457 | |
| 3458 | - print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST"> |
|
| 3459 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
| 3460 | - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '"> |
|
| 3458 | + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST"> |
|
| 3459 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
| 3460 | + <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> |
|
| 3461 | 3461 | <input type="hidden" name="mode" value=""> |
| 3462 | 3462 | <input type="hidden" name="page_y" value=""> |
| 3463 | - <input type="hidden" name="backtopage" value="' . $backtopage . '"> |
|
| 3464 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
| 3463 | + <input type="hidden" name="backtopage" value="' . $backtopage.'"> |
|
| 3464 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
| 3465 | 3465 | '; |
| 3466 | 3466 | |
| 3467 | 3467 | if (!empty($conf->use_javascript_ajax) && $object->status == Propal::STATUS_DRAFT) { |
| 3468 | 3468 | if (isModEnabled('subtotals')) { |
| 3469 | - include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3469 | + include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3470 | 3470 | } else { |
| 3471 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
| 3471 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
| 3472 | 3472 | } |
| 3473 | 3473 | } |
| 3474 | 3474 | |
@@ -3523,7 +3523,7 @@ discard block |
||
| 3523 | 3523 | if (empty($reshook)) { |
| 3524 | 3524 | if ($action != 'editline') { |
| 3525 | 3525 | // Subtotal |
| 3526 | - if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_' . strtoupper($object->element))) { |
|
| 3526 | + if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) { |
|
| 3527 | 3527 | $langs->load('subtotals'); |
| 3528 | 3528 | |
| 3529 | 3529 | $url_button = array(); |
@@ -3533,7 +3533,7 @@ discard block |
||
| 3533 | 3533 | 'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT), |
| 3534 | 3534 | 'perm' => (bool) $usercancreate, |
| 3535 | 3535 | 'label' => $langs->trans('AddTitleLine'), |
| 3536 | - 'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_title_line&token=' . newToken() |
|
| 3536 | + 'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_title_line&token='.newToken() |
|
| 3537 | 3537 | ); |
| 3538 | 3538 | |
| 3539 | 3539 | $url_button[] = array( |
@@ -3541,7 +3541,7 @@ discard block |
||
| 3541 | 3541 | 'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT), |
| 3542 | 3542 | 'perm' => (bool) $usercancreate, |
| 3543 | 3543 | 'label' => $langs->trans('AddSubtotalLine'), |
| 3544 | - 'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_subtotal_line&token=' . newToken() |
|
| 3544 | + 'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken() |
|
| 3545 | 3545 | ); |
| 3546 | 3546 | |
| 3547 | 3547 | print dolGetButtonAction('', $langs->trans('Subtotal'), 'default', $url_button, '', true); |
@@ -3552,9 +3552,9 @@ discard block |
||
| 3552 | 3552 | || ($object->status == Propal::STATUS_DRAFT && getDolGlobalString('PROPAL_ENABLE_NEGATIVE') && count($object->lines) > 0) |
| 3553 | 3553 | ) { |
| 3554 | 3554 | if ($usercanvalidate) { |
| 3555 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=validate&token=' . newToken() . '">' . (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')) . '</a>'; |
|
| 3555 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate&token='.newToken().'">'.(!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')).'</a>'; |
|
| 3556 | 3556 | } else { |
| 3557 | - print '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans('Validate') . '</a>'; |
|
| 3557 | + print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Validate').'</a>'; |
|
| 3558 | 3558 | } |
| 3559 | 3559 | } |
| 3560 | 3560 | // Create event |
@@ -3564,23 +3564,23 @@ discard block |
||
| 3564 | 3564 | }*/ |
| 3565 | 3565 | // Edit |
| 3566 | 3566 | if ($object->status == Propal::STATUS_VALIDATED && $usercancreate) { |
| 3567 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=modif&token=' . newToken() . '">' . $langs->trans('Modify') . '</a>'; |
|
| 3567 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=modif&token='.newToken().'">'.$langs->trans('Modify').'</a>'; |
|
| 3568 | 3568 | } |
| 3569 | 3569 | |
| 3570 | 3570 | // ReOpen |
| 3571 | 3571 | if (((getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && $object->status == Propal::STATUS_NOTSIGNED) || (!getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED)))) { |
| 3572 | 3572 | if ($usercanreopen) { |
| 3573 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=reopen&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen') . '"'; |
|
| 3574 | - print '>' . $langs->trans('ReOpen') . '</a>'; |
|
| 3573 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen').'"'; |
|
| 3574 | + print '>'.$langs->trans('ReOpen').'</a>'; |
|
| 3575 | 3575 | } else { |
| 3576 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ReOpen") . '</a>'; |
|
| 3576 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ReOpen").'</a>'; |
|
| 3577 | 3577 | } |
| 3578 | 3578 | } |
| 3579 | 3579 | |
| 3580 | 3580 | // Send |
| 3581 | 3581 | if (empty($user->socid)) { |
| 3582 | 3582 | if ($object->status == Propal::STATUS_VALIDATED || $object->status == Propal::STATUS_SIGNED || getDolGlobalString('PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS')) { |
| 3583 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '', $usercansend); |
|
| 3583 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $usercansend); |
|
| 3584 | 3584 | } |
| 3585 | 3585 | } |
| 3586 | 3586 | |
@@ -3592,7 +3592,7 @@ discard block |
||
| 3592 | 3592 | 'enabled' => (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED), |
| 3593 | 3593 | 'perm' => $usercancreateorder, |
| 3594 | 3594 | 'label' => 'AddOrder', |
| 3595 | - 'url' => '/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3595 | + 'url' => '/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3596 | 3596 | ); |
| 3597 | 3597 | /*if (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED) { |
| 3598 | 3598 | if ($usercancreateorder) { |
@@ -3607,7 +3607,7 @@ discard block |
||
| 3607 | 3607 | 'enabled' => ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")), |
| 3608 | 3608 | 'perm' => $usercancreatepurchaseorder, |
| 3609 | 3609 | 'label' => 'AddPurchaseOrder', |
| 3610 | - 'url' => '/fourn/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3610 | + 'url' => '/fourn/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3611 | 3611 | ); |
| 3612 | 3612 | /*if ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")) { |
| 3613 | 3613 | if ($usercancreatepurchaseorder) { |
@@ -3622,7 +3622,7 @@ discard block |
||
| 3622 | 3622 | 'enabled' => (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED), |
| 3623 | 3623 | 'perm' => $usercancreateintervention, |
| 3624 | 3624 | 'label' => 'AddIntervention', |
| 3625 | - 'url' => '/fichinter/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3625 | + 'url' => '/fichinter/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3626 | 3626 | ); |
| 3627 | 3627 | /*if (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED) { |
| 3628 | 3628 | if ($usercancreateintervention) { |
@@ -3637,7 +3637,7 @@ discard block |
||
| 3637 | 3637 | 'enabled' => (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED), |
| 3638 | 3638 | 'perm' => $usercancreatecontract, |
| 3639 | 3639 | 'label' => 'AddContract', |
| 3640 | - 'url' => '/contrat/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3640 | + 'url' => '/contrat/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3641 | 3641 | ); |
| 3642 | 3642 | /*if (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED) { |
| 3643 | 3643 | $langs->load("contracts"); |
@@ -3654,7 +3654,7 @@ discard block |
||
| 3654 | 3654 | 'enabled' => isModEnabled('invoice'), |
| 3655 | 3655 | 'perm' => $usercancreateinvoice, |
| 3656 | 3656 | 'label' => 'CreateBill', |
| 3657 | - 'url' => '/compta/facture/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid), |
|
| 3657 | + 'url' => '/compta/facture/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid), |
|
| 3658 | 3658 | ]; |
| 3659 | 3659 | /*if (isModEnabled('invoice') && $usercancreateinvoice) { |
| 3660 | 3660 | print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; |
@@ -3663,7 +3663,7 @@ discard block |
||
| 3663 | 3663 | |
| 3664 | 3664 | $actionButtonsParameters = [ |
| 3665 | 3665 | "areDropdownButtons" => !getDolGlobalInt("MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER"), |
| 3666 | - "backtopage" => $_SERVER["PHP_SELF"] . "?id=" . ((int) $id) |
|
| 3666 | + "backtopage" => $_SERVER["PHP_SELF"]."?id=".((int) $id) |
|
| 3667 | 3667 | ]; |
| 3668 | 3668 | |
| 3669 | 3669 | if ($numlines > 0) { |
@@ -3676,9 +3676,9 @@ discard block |
||
| 3676 | 3676 | $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); |
| 3677 | 3677 | if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || !getDolGlobalString('WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED')) { |
| 3678 | 3678 | if ($usercanclose) { |
| 3679 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifybilled&token=' . newToken() . '&socid=' . $object->socid . '">' . $langs->trans("ClassifyBilled") . '</a>'; |
|
| 3679 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled&token='.newToken().'&socid='.$object->socid.'">'.$langs->trans("ClassifyBilled").'</a>'; |
|
| 3680 | 3680 | } else { |
| 3681 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ClassifyBilled") . '</a>'; |
|
| 3681 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ClassifyBilled").'</a>'; |
|
| 3682 | 3682 | } |
| 3683 | 3683 | } |
| 3684 | 3684 | } |
@@ -3687,33 +3687,33 @@ discard block |
||
| 3687 | 3687 | // Close as accepted/refused |
| 3688 | 3688 | if ($object->status == Propal::STATUS_VALIDATED) { |
| 3689 | 3689 | if ($usercanclose) { |
| 3690 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"'; |
|
| 3691 | - print '>' . $langs->trans('SetAcceptedRefused') . '</a>'; |
|
| 3690 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"'; |
|
| 3691 | + print '>'.$langs->trans('SetAcceptedRefused').'</a>'; |
|
| 3692 | 3692 | } else { |
| 3693 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '"'; |
|
| 3694 | - print '>' . $langs->trans('SetAcceptedRefused') . '</a>'; |
|
| 3693 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'"'; |
|
| 3694 | + print '>'.$langs->trans('SetAcceptedRefused').'</a>'; |
|
| 3695 | 3695 | } |
| 3696 | 3696 | } |
| 3697 | 3697 | } else { |
| 3698 | 3698 | // Set not signed (close) |
| 3699 | 3699 | if ($object->status == Propal::STATUS_DRAFT && $usercanclose) { |
| 3700 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token=' . newToken() . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"'; |
|
| 3701 | - print '>' . $langs->trans('SetRefusedAndClose') . '</a>'; |
|
| 3700 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"'; |
|
| 3701 | + print '>'.$langs->trans('SetRefusedAndClose').'</a>'; |
|
| 3702 | 3702 | } |
| 3703 | 3703 | } |
| 3704 | 3704 | |
| 3705 | 3705 | // Cancel propal |
| 3706 | 3706 | if ($object->status > Propal::STATUS_DRAFT && $usercanclose) { |
| 3707 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel&token=' . newToken() . '">' . $langs->trans("CancelPropal") . '</a>'; |
|
| 3707 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelPropal").'</a>'; |
|
| 3708 | 3708 | } |
| 3709 | 3709 | |
| 3710 | 3710 | // Clone |
| 3711 | 3711 | if ($usercancreate) { |
| 3712 | - print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&token=' . newToken() . '&object=' . $object->element . '">' . $langs->trans("ToClone") . '</a>'; |
|
| 3712 | + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object='.$object->element.'">'.$langs->trans("ToClone").'</a>'; |
|
| 3713 | 3713 | } |
| 3714 | 3714 | |
| 3715 | 3715 | // Delete |
| 3716 | - print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $usercandelete); |
|
| 3716 | + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $usercandelete); |
|
| 3717 | 3717 | } |
| 3718 | 3718 | } |
| 3719 | 3719 | |
@@ -3732,8 +3732,8 @@ discard block |
||
| 3732 | 3732 | * Generated documents |
| 3733 | 3733 | */ |
| 3734 | 3734 | $objref = dol_sanitizeFileName($object->ref); |
| 3735 | - $filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity] . "/" . dol_sanitizeFileName($object->ref); |
|
| 3736 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 3735 | + $filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".dol_sanitizeFileName($object->ref); |
|
| 3736 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 3737 | 3737 | $genallowed = $usercanread; |
| 3738 | 3738 | $delallowed = $usercancreate; |
| 3739 | 3739 | $tooltipAfterComboOfModels = ''; |
@@ -3760,19 +3760,19 @@ discard block |
||
| 3760 | 3760 | |
| 3761 | 3761 | if ($object->status != Propal::STATUS_DRAFT && $useonlinesignature) { |
| 3762 | 3762 | print '<br><!-- Link to sign -->'; |
| 3763 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
| 3764 | - print showOnlineSignatureUrl('proposal', $object->ref, $object) . '<br>'; |
|
| 3763 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
| 3764 | + print showOnlineSignatureUrl('proposal', $object->ref, $object).'<br>'; |
|
| 3765 | 3765 | } |
| 3766 | 3766 | |
| 3767 | 3767 | print '</div><div class="fichehalfright">'; |
| 3768 | 3768 | |
| 3769 | 3769 | $MAXEVENT = 10; |
| 3770 | 3770 | |
| 3771 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/comm/propal/messaging.php?id=' . $object->id); |
|
| 3772 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/comm/propal/agenda.php?id=' . $object->id); |
|
| 3771 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/comm/propal/messaging.php?id='.$object->id); |
|
| 3772 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/comm/propal/agenda.php?id='.$object->id); |
|
| 3773 | 3773 | |
| 3774 | 3774 | // List of actions on element |
| 3775 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 3775 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 3776 | 3776 | $formactions = new FormActions($db); |
| 3777 | 3777 | $somethingshown = $formactions->showactions($object, 'propal', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty |
| 3778 | 3778 | |
@@ -3783,9 +3783,9 @@ discard block |
||
| 3783 | 3783 | $modelmail = 'propal_send'; |
| 3784 | 3784 | $defaulttopic = 'SendPropalRef'; |
| 3785 | 3785 | $diroutput = $conf->propal->multidir_output[$object->entity ?? $conf->entity]; |
| 3786 | - $trackid = 'pro' . $object->id; |
|
| 3786 | + $trackid = 'pro'.$object->id; |
|
| 3787 | 3787 | |
| 3788 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
| 3788 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
| 3789 | 3789 | } |
| 3790 | 3790 | |
| 3791 | 3791 | // End of page |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * \brief File of class with all html predefined components for WebPortal |
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; |
|
| 29 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Class to manage generation of HTML components |
@@ -72,19 +72,19 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $out = ''; |
| 74 | 74 | if ($label != '') { |
| 75 | - $out .= '<label for="' . $id . '">'; |
|
| 75 | + $out .= '<label for="'.$id.'">'; |
|
| 76 | 76 | } |
| 77 | - $out .= '<input type="' . $type . '"'; |
|
| 78 | - $out .= ($morecss ? ' class="' . $morecss . '"' : ''); |
|
| 77 | + $out .= '<input type="'.$type.'"'; |
|
| 78 | + $out .= ($morecss ? ' class="'.$morecss.'"' : ''); |
|
| 79 | 79 | if ($id != '') { |
| 80 | - $out .= ' id="' . $id . '"'; |
|
| 80 | + $out .= ' id="'.$id.'"'; |
|
| 81 | 81 | } |
| 82 | - $out .= ' name="' . $name . '"'; |
|
| 83 | - $out .= ' value="' . $value . '"'; |
|
| 84 | - $out .= ($moreparam ? ' ' . $moreparam : ''); |
|
| 85 | - $out .= ' />' . $addInputLabel; |
|
| 82 | + $out .= ' name="'.$name.'"'; |
|
| 83 | + $out .= ' value="'.$value.'"'; |
|
| 84 | + $out .= ($moreparam ? ' '.$moreparam : ''); |
|
| 85 | + $out .= ' />'.$addInputLabel; |
|
| 86 | 86 | if ($label != '') { |
| 87 | - $out .= $label . '</label>'; |
|
| 87 | + $out .= $label.'</label>'; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return $out; |
@@ -164,16 +164,16 @@ discard block |
||
| 164 | 164 | $out = ''; |
| 165 | 165 | |
| 166 | 166 | $idname = str_replace(array('[', ']'), array('', ''), $htmlname); |
| 167 | - $out .= '<select id="' . preg_replace('/^\./', '', $idname) . '"' . ($disabled ? ' disabled="disabled"' : '') . ' class="' . ($morecss ? ' ' . $morecss : '') . '"'; |
|
| 168 | - $out .= ' name="' . preg_replace('/^\./', '', $htmlname) . '"' . ($moreparam ? ' ' . $moreparam : ''); |
|
| 169 | - $out .= '>' . "\n"; |
|
| 167 | + $out .= '<select id="'.preg_replace('/^\./', '', $idname).'"'.($disabled ? ' disabled="disabled"' : '').' class="'.($morecss ? ' '.$morecss : '').'"'; |
|
| 168 | + $out .= ' name="'.preg_replace('/^\./', '', $htmlname).'"'.($moreparam ? ' '.$moreparam : ''); |
|
| 169 | + $out .= '>'."\n"; |
|
| 170 | 170 | |
| 171 | 171 | if ($show_empty) { |
| 172 | 172 | $textforempty = ' '; |
| 173 | 173 | if (!is_numeric($show_empty)) { |
| 174 | 174 | $textforempty = $show_empty; |
| 175 | 175 | } |
| 176 | - $out .= '<option value="' . ($show_empty < 0 ? $show_empty : -1) . '"' . ($id == $show_empty ? ' selected' : '') . '>' . $textforempty . '</option>' . "\n"; |
|
| 176 | + $out .= '<option value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ? ' selected' : '').'>'.$textforempty.'</option>'."\n"; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | if (is_array($array)) { |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | if ($key_in_label) { |
| 208 | - $selectOptionValue = dol_escape_htmltag($key . ' - ' . ($maxlen ? dol_trunc($value, $maxlen) : $value)); |
|
| 208 | + $selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen ? dol_trunc($value, $maxlen) : $value)); |
|
| 209 | 209 | } else { |
| 210 | 210 | $selectOptionValue = dol_escape_htmltag($maxlen ? dol_trunc($value, $maxlen) : $value); |
| 211 | 211 | if ($value == '' || $value == '-') { |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $out .= '<option value="' . $key . '"'; |
|
| 216 | + $out .= '<option value="'.$key.'"'; |
|
| 217 | 217 | $out .= $disabled; |
| 218 | 218 | if (is_array($id)) { |
| 219 | 219 | if (in_array($key, $id) && !$disabled) { |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | if (is_array($tmpvalue)) { |
| 229 | 229 | foreach ($tmpvalue as $keyforvalue => $valueforvalue) { |
| 230 | 230 | if (preg_match('/^data-/', $keyforvalue)) { |
| 231 | - $out .= ' ' . $keyforvalue . '="' . dol_escape_htmltag($valueforvalue) . '"'; |
|
| 231 | + $out .= ' '.$keyforvalue.'="'.dol_escape_htmltag($valueforvalue).'"'; |
|
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | public function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = '', $morecss = '', $allfiles = 0) |
| 260 | 260 | { |
| 261 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
|
| 261 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
| 262 | 262 | |
| 263 | 263 | $out = ''; |
| 264 | 264 | |
@@ -274,21 +274,21 @@ discard block |
||
| 274 | 274 | // Get object entity |
| 275 | 275 | if (isModEnabled('multicompany')) { |
| 276 | 276 | $regs = array(); |
| 277 | - preg_match('/\/([0-9]+)\/[^\/]+\/' . preg_quote($modulesubdir, '/') . '$/', $filedir, $regs); |
|
| 277 | + preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir, '/').'$/', $filedir, $regs); |
|
| 278 | 278 | $entity = ((!empty($regs[1]) && $regs[1] > 1) ? $regs[1] : 1); // If entity id not found in $filedir this is entity 1 by default |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | // Get list of files starting with name of ref (Note: files with '^ref\.extension' are generated files, files with '^ref-...' are uploaded files) |
| 282 | 282 | if ($allfiles || getDolGlobalString('MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP')) { |
| 283 | - $filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/'); |
|
| 283 | + $filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/'); |
|
| 284 | 284 | } else { |
| 285 | - $filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/') . '\.'; |
|
| 285 | + $filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/').'\.'; |
|
| 286 | 286 | } |
| 287 | 287 | $file_list = dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview |
| 288 | 288 | |
| 289 | 289 | //var_dump($file_list); |
| 290 | 290 | // For ajax treatment |
| 291 | - $out .= '<!-- html.formwebportal::getDocumentsLink -->' . "\n"; |
|
| 291 | + $out .= '<!-- html.formwebportal::getDocumentsLink -->'."\n"; |
|
| 292 | 292 | if (!empty($file_list)) { |
| 293 | 293 | $tmpout = ''; |
| 294 | 294 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $i = 0; |
| 298 | 298 | foreach ($file_list as $file) { |
| 299 | 299 | $i++; |
| 300 | - if ($filter && !preg_match('/' . $filter . '/i', $file["name"])) { |
|
| 300 | + if ($filter && !preg_match('/'.$filter.'/i', $file["name"])) { |
|
| 301 | 301 | continue; // Discard this. It does not match provided filter. |
| 302 | 302 | } |
| 303 | 303 | |
@@ -305,11 +305,11 @@ discard block |
||
| 305 | 305 | // Define relative path for download link (depends on module) |
| 306 | 306 | $relativepath = $file["name"]; // Cas general |
| 307 | 307 | if ($modulesubdir) { |
| 308 | - $relativepath = $modulesubdir . "/" . $file["name"]; // Cas propal, facture... |
|
| 308 | + $relativepath = $modulesubdir."/".$file["name"]; // Cas propal, facture... |
|
| 309 | 309 | } |
| 310 | 310 | // Autre cas |
| 311 | 311 | if ($modulepart == 'donation') { |
| 312 | - $relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation') . $file["name"]; |
|
| 312 | + $relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation').$file["name"]; |
|
| 313 | 313 | } |
| 314 | 314 | if ($modulepart == 'export') { |
| 315 | 315 | $relativepath = $file["name"]; |
@@ -326,9 +326,9 @@ discard block |
||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | // Download |
| 329 | - $url = $context->getControllerUrl('document') . '&modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($relativepath) . '&soc_id=' . $context->logged_thirdparty->id; |
|
| 329 | + $url = $context->getControllerUrl('document').'&modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($relativepath).'&soc_id='.$context->logged_thirdparty->id; |
|
| 330 | 330 | |
| 331 | - $tmpout .= '<a href="' . $url . '" class="btn-download-link ' . $morecss . '" role="downloadlink"'; |
|
| 331 | + $tmpout .= '<a href="'.$url.'" class="btn-download-link '.$morecss.'" role="downloadlink"'; |
|
| 332 | 332 | $mime = dol_mimetype($relativepath, '', 0); |
| 333 | 333 | if (preg_match('/text/', $mime)) { |
| 334 | 334 | $tmpout .= ' target="_blank" rel="noopener noreferrer"'; |
@@ -361,10 +361,10 @@ discard block |
||
| 361 | 361 | { |
| 362 | 362 | global $langs; |
| 363 | 363 | require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
| 364 | - $out = '<!-- html.formwebportal::getSignatureLink -->' . "\n"; |
|
| 364 | + $out = '<!-- html.formwebportal::getSignatureLink -->'."\n"; |
|
| 365 | 365 | $url = getOnlineSignatureUrl(0, $modulepart, $object->ref, 1, $object); |
| 366 | 366 | if (!empty($url)) { |
| 367 | - $out .= '<a target="_blank" rel="noopener noreferrer" href="' . $url . '"' . ($morecss ? ' class="' . $morecss . '"' : '') . ' role="signaturelink">'; |
|
| 367 | + $out .= '<a target="_blank" rel="noopener noreferrer" href="'.$url.'"'.($morecss ? ' class="'.$morecss.'"' : '').' role="signaturelink">'; |
|
| 368 | 368 | $out .= '<i class="fa fa-file-signature"></i>'; |
| 369 | 369 | $out .= $langs->trans("Sign"); |
| 370 | 370 | $out .= '</a>'; |
@@ -406,9 +406,9 @@ discard block |
||
| 406 | 406 | $vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]); |
| 407 | 407 | $reg = array(); |
| 408 | 408 | if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) { |
| 409 | - $InfoFieldList[4] = $reg[1]; // take the sort field |
|
| 409 | + $InfoFieldList[4] = $reg[1]; // take the sort field |
|
| 410 | 410 | } |
| 411 | - $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
| 411 | + $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
| 412 | 412 | |
| 413 | 413 | $classname = $InfoFieldList[0]; |
| 414 | 414 | $classpath = $InfoFieldList[1]; |
@@ -430,11 +430,11 @@ discard block |
||
| 430 | 430 | } |
| 431 | 431 | } |
| 432 | 432 | if (!is_object($objecttmp)) { |
| 433 | - dol_syslog('Error bad setup of type for field ' . implode(',', $InfoFieldList), LOG_WARNING); |
|
| 434 | - return 'Error bad setup of type for field ' . implode(',', $InfoFieldList); |
|
| 433 | + dol_syslog('Error bad setup of type for field '.implode(',', $InfoFieldList), LOG_WARNING); |
|
| 434 | + return 'Error bad setup of type for field '.implode(',', $InfoFieldList); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | - dol_syslog(__METHOD__ . ' filter=' . $filter, LOG_DEBUG); |
|
| 437 | + dol_syslog(__METHOD__.' filter='.$filter, LOG_DEBUG); |
|
| 438 | 438 | $out = ''; |
| 439 | 439 | // Immediate load of table record. |
| 440 | 440 | $out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled, $sortfield, $filter); |
@@ -469,22 +469,22 @@ discard block |
||
| 469 | 469 | $size = !empty($val['size']) ? $val['size'] : 0; |
| 470 | 470 | // see common object class |
| 471 | 471 | if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 472 | - $param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N'); |
|
| 472 | + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); |
|
| 473 | 473 | $type = 'link'; |
| 474 | 474 | } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 475 | - $param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N'); |
|
| 475 | + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); |
|
| 476 | 476 | $type = 'link'; |
| 477 | 477 | } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { |
| 478 | - $param['options'] = array($reg[2] . ':' . $reg[3] => 'N'); |
|
| 478 | + $param['options'] = array($reg[2].':'.$reg[3] => 'N'); |
|
| 479 | 479 | $type = 'link'; |
| 480 | 480 | } elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 481 | - $param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N'); |
|
| 481 | + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); |
|
| 482 | 482 | $type = 'sellist'; |
| 483 | 483 | } elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 484 | - $param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N'); |
|
| 484 | + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); |
|
| 485 | 485 | $type = 'sellist'; |
| 486 | 486 | } elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) { |
| 487 | - $param['options'] = array($reg[2] . ':' . $reg[3] => 'N'); |
|
| 487 | + $param['options'] = array($reg[2].':'.$reg[3] => 'N'); |
|
| 488 | 488 | $type = 'sellist'; |
| 489 | 489 | } elseif (preg_match('/^varchar\((\d+)\)/', $val['type'], $reg)) { |
| 490 | 490 | $param['options'] = array(); |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | |
| 523 | 523 | if ($computed) { |
| 524 | 524 | if (!preg_match('/^search_/', $keyprefix)) { |
| 525 | - return '<span>' . $langs->trans("AutomaticallyCalculated") . '</span>'; |
|
| 525 | + return '<span>'.$langs->trans("AutomaticallyCalculated").'</span>'; |
|
| 526 | 526 | } else { |
| 527 | 527 | return ''; |
| 528 | 528 | } |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | $morecss = $val['css']; |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | - $htmlName = $keyprefix . $key . $keysuffix; |
|
| 536 | + $htmlName = $keyprefix.$key.$keysuffix; |
|
| 537 | 537 | $htmlId = $htmlName; |
| 538 | 538 | //$moreparam .= (!empty($required) ? ' required' : ''); |
| 539 | 539 | switch ($type) { |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | |
| 554 | 554 | if ($type == 'datetime') { |
| 555 | 555 | //$moreparam .= ' step="1"'; to show seconds |
| 556 | - $out .= ' ' . $this->inputType('time', $htmlName.'_time', $valueTime, $htmlId, $morecss, $moreparam); |
|
| 556 | + $out .= ' '.$this->inputType('time', $htmlName.'_time', $valueTime, $htmlId, $morecss, $moreparam); |
|
| 557 | 557 | } |
| 558 | 558 | break; |
| 559 | 559 | |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | |
| 564 | 564 | case 'text': |
| 565 | 565 | case 'html': |
| 566 | - $moreparam .= ($size > 0 ? ' maxlength="' . $size . '"' : ''); |
|
| 566 | + $moreparam .= ($size > 0 ? ' maxlength="'.$size.'"' : ''); |
|
| 567 | 567 | $out = $this->inputType('text', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam); |
| 568 | 568 | break; |
| 569 | 569 | |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | if (!empty($value)) { |
| 584 | 584 | $value = price($value); // $value in memory is a php numeric, we format it into user number format. |
| 585 | 585 | } |
| 586 | - $addInputLabel = ' ' . $langs->getCurrencySymbol($conf->currency); |
|
| 586 | + $addInputLabel = ' '.$langs->getCurrencySymbol($conf->currency); |
|
| 587 | 587 | $out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam, '', $addInputLabel); |
| 588 | 588 | break; |
| 589 | 589 | |
@@ -600,14 +600,14 @@ discard block |
||
| 600 | 600 | |
| 601 | 601 | case 'radio': |
| 602 | 602 | foreach ($param['options'] as $keyopt => $valopt) { |
| 603 | - $htmlId = $htmlName . '_' . $keyopt; |
|
| 604 | - $htmlMoreParam = $moreparam . ($value == $keyopt ? ' checked' : ''); |
|
| 605 | - $out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt) . '<br>'; |
|
| 603 | + $htmlId = $htmlName.'_'.$keyopt; |
|
| 604 | + $htmlMoreParam = $moreparam.($value == $keyopt ? ' checked' : ''); |
|
| 605 | + $out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt).'<br>'; |
|
| 606 | 606 | } |
| 607 | 607 | break; |
| 608 | 608 | |
| 609 | 609 | case 'select': |
| 610 | - $out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . ' >'; |
|
| 610 | + $out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').' >'; |
|
| 611 | 611 | if ($default == '' || $notNull != 1) { |
| 612 | 612 | $out .= '<option value="0"> </option>'; |
| 613 | 613 | } |
@@ -618,15 +618,15 @@ discard block |
||
| 618 | 618 | if (strpos($valb, "|") !== false) { |
| 619 | 619 | list($valb, $parent) = explode('|', $valb); |
| 620 | 620 | } |
| 621 | - $out .= '<option value="' . $keyb . '"'; |
|
| 621 | + $out .= '<option value="'.$keyb.'"'; |
|
| 622 | 622 | $out .= (((string) $value == $keyb) ? ' selected' : ''); |
| 623 | - $out .= (!empty($parent) ? ' parent="' . $parent . '"' : ''); |
|
| 624 | - $out .= '>' . $valb . '</option>'; |
|
| 623 | + $out .= (!empty($parent) ? ' parent="'.$parent.'"' : ''); |
|
| 624 | + $out .= '>'.$valb.'</option>'; |
|
| 625 | 625 | } |
| 626 | 626 | $out .= '</select>'; |
| 627 | 627 | break; |
| 628 | 628 | case 'sellist': |
| 629 | - $out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . '>'; |
|
| 629 | + $out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').'>'; |
|
| 630 | 630 | |
| 631 | 631 | $param_list = array_keys($param['options']); |
| 632 | 632 | $InfoFieldList = explode(":", $param_list[0]); |
@@ -639,18 +639,18 @@ discard block |
||
| 639 | 639 | // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value |
| 640 | 640 | // 5 : id category type |
| 641 | 641 | // 6 : ids categories list separated by comma for category root |
| 642 | - $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2] . ' as rowid'); |
|
| 642 | + $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); |
|
| 643 | 643 | |
| 644 | 644 | if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { |
| 645 | 645 | if (strpos($InfoFieldList[4], 'extra.') !== false) { |
| 646 | - $keyList = 'main.' . $InfoFieldList[2] . ' as rowid'; |
|
| 646 | + $keyList = 'main.'.$InfoFieldList[2].' as rowid'; |
|
| 647 | 647 | } else { |
| 648 | - $keyList = $InfoFieldList[2] . ' as rowid'; |
|
| 648 | + $keyList = $InfoFieldList[2].' as rowid'; |
|
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { |
| 652 | 652 | list($parentName, $parentField) = explode('|', $InfoFieldList[3]); |
| 653 | - $keyList .= ', ' . $parentField; |
|
| 653 | + $keyList .= ', '.$parentField; |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | $filter_categorie = false; |
@@ -668,8 +668,8 @@ discard block |
||
| 668 | 668 | } |
| 669 | 669 | |
| 670 | 670 | $sqlwhere = ''; |
| 671 | - $sql = "SELECT " . $keyList; |
|
| 672 | - $sql .= " FROM " . $this->db->prefix() . $InfoFieldList[0]; |
|
| 671 | + $sql = "SELECT ".$keyList; |
|
| 672 | + $sql .= " FROM ".$this->db->prefix().$InfoFieldList[0]; |
|
| 673 | 673 | if (!empty($InfoFieldList[4])) { |
| 674 | 674 | // can use SELECT request |
| 675 | 675 | if (strpos($InfoFieldList[4], '$SEL$') !== false) { |
@@ -681,24 +681,24 @@ discard block |
||
| 681 | 681 | |
| 682 | 682 | //We have to join on extrafield table |
| 683 | 683 | if (strpos($InfoFieldList[4], 'extra') !== false) { |
| 684 | - $sql .= " as main, " . $this->db->prefix() . $InfoFieldList[0] . "_extrafields as extra"; |
|
| 685 | - $sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4]; |
|
| 684 | + $sql .= " as main, ".$this->db->prefix().$InfoFieldList[0]."_extrafields as extra"; |
|
| 685 | + $sqlwhere .= " WHERE extra.fk_object=main.".$InfoFieldList[2]." AND ".$InfoFieldList[4]; |
|
| 686 | 686 | } else { |
| 687 | - $sqlwhere .= " WHERE " . $InfoFieldList[4]; |
|
| 687 | + $sqlwhere .= " WHERE ".$InfoFieldList[4]; |
|
| 688 | 688 | } |
| 689 | 689 | } else { |
| 690 | 690 | $sqlwhere .= ' WHERE 1=1'; |
| 691 | 691 | } |
| 692 | 692 | // Some tables may have field, some other not. For the moment we disable it. |
| 693 | 693 | if (in_array($InfoFieldList[0], array('tablewithentity'))) { |
| 694 | - $sqlwhere .= " AND entity = " . ((int) $conf->entity); |
|
| 694 | + $sqlwhere .= " AND entity = ".((int) $conf->entity); |
|
| 695 | 695 | } |
| 696 | 696 | $sql .= $sqlwhere; |
| 697 | 697 | //print $sql; |
| 698 | 698 | |
| 699 | - $sql .= ' ORDER BY ' . implode(', ', $fields_label); |
|
| 699 | + $sql .= ' ORDER BY '.implode(', ', $fields_label); |
|
| 700 | 700 | |
| 701 | - dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG); |
|
| 701 | + dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); |
|
| 702 | 702 | $resql = $this->db->query($sql); |
| 703 | 703 | if ($resql) { |
| 704 | 704 | $out .= '<option value="0"> </option>'; |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | if (count($fields_label) > 1) { |
| 715 | 715 | $notrans = true; |
| 716 | 716 | foreach ($fields_label as $field_toshow) { |
| 717 | - $labeltoshow .= $obj->$field_toshow . ' '; |
|
| 717 | + $labeltoshow .= $obj->$field_toshow.' '; |
|
| 718 | 718 | } |
| 719 | 719 | } else { |
| 720 | 720 | $labeltoshow = $obj->{$InfoFieldList[1]}; |
@@ -725,12 +725,12 @@ discard block |
||
| 725 | 725 | foreach ($fields_label as $field_toshow) { |
| 726 | 726 | $translabel = $langs->trans($obj->$field_toshow); |
| 727 | 727 | if ($translabel != $obj->$field_toshow) { |
| 728 | - $labeltoshow = dol_trunc($translabel) . ' '; |
|
| 728 | + $labeltoshow = dol_trunc($translabel).' '; |
|
| 729 | 729 | } else { |
| 730 | - $labeltoshow = dol_trunc($obj->$field_toshow) . ' '; |
|
| 730 | + $labeltoshow = dol_trunc($obj->$field_toshow).' '; |
|
| 731 | 731 | } |
| 732 | 732 | } |
| 733 | - $out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>'; |
|
| 733 | + $out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>'; |
|
| 734 | 734 | } else { |
| 735 | 735 | if (!$notrans) { |
| 736 | 736 | $translabel = $langs->trans($obj->{$InfoFieldList[1]}); |
@@ -744,28 +744,28 @@ discard block |
||
| 744 | 744 | $labeltoshow = '(not defined)'; |
| 745 | 745 | } |
| 746 | 746 | if ($value == $obj->rowid) { |
| 747 | - $out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>'; |
|
| 747 | + $out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>'; |
|
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | if (!empty($InfoFieldList[3]) && $parentField) { |
| 751 | - $parent = $parentName . ':' . $obj->{$parentField}; |
|
| 751 | + $parent = $parentName.':'.$obj->{$parentField}; |
|
| 752 | 752 | $isDependList = 1; |
| 753 | 753 | } |
| 754 | 754 | |
| 755 | - $out .= '<option value="' . $obj->rowid . '"'; |
|
| 755 | + $out .= '<option value="'.$obj->rowid.'"'; |
|
| 756 | 756 | $out .= ($value == $obj->rowid ? ' selected' : ''); |
| 757 | - $out .= (!empty($parent) ? ' parent="' . $parent . '"' : ''); |
|
| 758 | - $out .= '>' . $labeltoshow . '</option>'; |
|
| 757 | + $out .= (!empty($parent) ? ' parent="'.$parent.'"' : ''); |
|
| 758 | + $out .= '>'.$labeltoshow.'</option>'; |
|
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | $i++; |
| 762 | 762 | } |
| 763 | 763 | $this->db->free($resql); |
| 764 | 764 | } else { |
| 765 | - $out .= 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>'; |
|
| 765 | + $out .= 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>'; |
|
| 766 | 766 | } |
| 767 | 767 | } else { |
| 768 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 768 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 769 | 769 | $categorytype = $InfoFieldList[5]; |
| 770 | 770 | if (is_numeric($categorytype)) { // deprecated: must use the category code instead of id. For backward compatibility. |
| 771 | 771 | $tmpcategory = new Categorie($this->db); |
@@ -776,9 +776,9 @@ discard block |
||
| 776 | 776 | $data = $this->select_all_categories($categorytype, '', 'parent', 64, $InfoFieldList[6], 1, 1); |
| 777 | 777 | $out .= '<option value="0"> </option>'; |
| 778 | 778 | foreach ($data as $data_key => $data_value) { |
| 779 | - $out .= '<option value="' . $data_key . '"'; |
|
| 779 | + $out .= '<option value="'.$data_key.'"'; |
|
| 780 | 780 | $out .= ($value == $data_key ? ' selected' : ''); |
| 781 | - $out .= '>' . $data_value . '</option>'; |
|
| 781 | + $out .= '>'.$data_value.'</option>'; |
|
| 782 | 782 | } |
| 783 | 783 | } |
| 784 | 784 | $out .= '</select>'; |
@@ -855,19 +855,19 @@ discard block |
||
| 855 | 855 | } |
| 856 | 856 | if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) { |
| 857 | 857 | $type = 'link'; |
| 858 | - $stringforoptions = $reg[1] . ':' . $reg[2]; |
|
| 858 | + $stringforoptions = $reg[1].':'.$reg[2]; |
|
| 859 | 859 | if ($reg[1] == 'User') { |
| 860 | 860 | $stringforoptions .= ':-1'; |
| 861 | 861 | } |
| 862 | 862 | $param['options'] = array($stringforoptions => $stringforoptions); |
| 863 | 863 | } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 864 | - $param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N'); |
|
| 864 | + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); |
|
| 865 | 865 | $type = 'sellist'; |
| 866 | 866 | } elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) { |
| 867 | - $param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] => 'N'); |
|
| 867 | + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N'); |
|
| 868 | 868 | $type = 'sellist'; |
| 869 | 869 | } elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) { |
| 870 | - $param['options'] = array($reg[1] . ':' . $reg[2] => 'N'); |
|
| 870 | + $param['options'] = array($reg[1].':'.$reg[2] => 'N'); |
|
| 871 | 871 | $type = 'sellist'; |
| 872 | 872 | } elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) { |
| 873 | 873 | $param['options'] = array($reg[1] => 'N'); |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | // |
| 921 | 921 | } elseif ($type == 'date') { |
| 922 | 922 | if (!empty($value)) { |
| 923 | - $value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output) |
|
| 923 | + $value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output) |
|
| 924 | 924 | } else { |
| 925 | 925 | $value = ''; |
| 926 | 926 | } |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | $value = ''; |
| 932 | 932 | } |
| 933 | 933 | } elseif ($type == 'duration') { |
| 934 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 934 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 935 | 935 | if (!is_null($value) && $value !== '') { |
| 936 | 936 | $value = convertSecondToTime((int) $value, 'allhourmin'); |
| 937 | 937 | } else { |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | if (!empty($value)) { |
| 951 | 951 | $checked = ' checked '; |
| 952 | 952 | } |
| 953 | - $value = '<input type="checkbox" ' . $checked . ' ' . ($moreparam ? $moreparam : '') . ' readonly disabled>'; |
|
| 953 | + $value = '<input type="checkbox" '.$checked.' '.($moreparam ? $moreparam : '').' readonly disabled>'; |
|
| 954 | 954 | } elseif ($type == 'mail' || $type == 'email') { |
| 955 | 955 | $value = dol_print_email($value, 0, 0, 0, 64, 1, 1); |
| 956 | 956 | } elseif ($type == 'url') { |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | |
| 978 | 978 | if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { |
| 979 | 979 | $selectkey = $InfoFieldList[2]; |
| 980 | - $keyList = $InfoFieldList[2] . ' as rowid'; |
|
| 980 | + $keyList = $InfoFieldList[2].' as rowid'; |
|
| 981 | 981 | } |
| 982 | 982 | |
| 983 | 983 | $fields_label = explode('|', $InfoFieldList[1]); |
@@ -993,20 +993,20 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | - $sql = "SELECT " . $keyList; |
|
| 997 | - $sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0]; |
|
| 996 | + $sql = "SELECT ".$keyList; |
|
| 997 | + $sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0]; |
|
| 998 | 998 | if (strpos($InfoFieldList[4], 'extra') !== false) { |
| 999 | 999 | $sql .= ' as main'; |
| 1000 | 1000 | } |
| 1001 | 1001 | if ($selectkey == 'rowid' && empty($value)) { |
| 1002 | - $sql .= " WHERE " . $selectkey . " = 0"; |
|
| 1002 | + $sql .= " WHERE ".$selectkey." = 0"; |
|
| 1003 | 1003 | } elseif ($selectkey == 'rowid') { |
| 1004 | - $sql .= " WHERE " . $selectkey . " = " . ((int) $value); |
|
| 1004 | + $sql .= " WHERE ".$selectkey." = ".((int) $value); |
|
| 1005 | 1005 | } else { |
| 1006 | - $sql .= " WHERE " . $selectkey . " = '" . $this->db->escape($value) . "'"; |
|
| 1006 | + $sql .= " WHERE ".$selectkey." = '".$this->db->escape($value)."'"; |
|
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | - dol_syslog(__METHOD__ . ' type=sellist', LOG_DEBUG); |
|
| 1009 | + dol_syslog(__METHOD__.' type=sellist', LOG_DEBUG); |
|
| 1010 | 1010 | $resql = $this->db->query($sql); |
| 1011 | 1011 | if ($resql) { |
| 1012 | 1012 | if (!$filter_categorie) { |
@@ -1025,9 +1025,9 @@ discard block |
||
| 1025 | 1025 | $translabel = $langs->trans($obj->$field_toshow); |
| 1026 | 1026 | } |
| 1027 | 1027 | if ($translabel != $field_toshow) { |
| 1028 | - $value .= dol_trunc($translabel, 18) . ' '; |
|
| 1028 | + $value .= dol_trunc($translabel, 18).' '; |
|
| 1029 | 1029 | } else { |
| 1030 | - $value .= $obj->$field_toshow . ' '; |
|
| 1030 | + $value .= $obj->$field_toshow.' '; |
|
| 1031 | 1031 | } |
| 1032 | 1032 | } |
| 1033 | 1033 | } else { |
@@ -1043,7 +1043,7 @@ discard block |
||
| 1043 | 1043 | } |
| 1044 | 1044 | } |
| 1045 | 1045 | } else { |
| 1046 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 1046 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 1047 | 1047 | |
| 1048 | 1048 | $toprint = array(); |
| 1049 | 1049 | $obj = $this->db->fetch_object($resql); |
@@ -1051,12 +1051,12 @@ discard block |
||
| 1051 | 1051 | $c->fetch($obj->rowid); |
| 1052 | 1052 | $ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text |
| 1053 | 1053 | foreach ($ways as $way) { |
| 1054 | - $toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>'; |
|
| 1054 | + $toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>'; |
|
| 1055 | 1055 | } |
| 1056 | - $value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>'; |
|
| 1056 | + $value = '<div><ul>'.implode(' ', $toprint).'</ul></div>'; |
|
| 1057 | 1057 | } |
| 1058 | 1058 | } else { |
| 1059 | - dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING); |
|
| 1059 | + dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | } elseif ($type == 'radio') { |
| 1062 | 1062 | $value = (string) $param['options'][$value]; |
@@ -1067,11 +1067,11 @@ discard block |
||
| 1067 | 1067 | $toprint = array(); |
| 1068 | 1068 | foreach ($value_arr as $valueval) { |
| 1069 | 1069 | if (!empty($valueval)) { |
| 1070 | - $toprint[] = '<li>' . $param['options'][$valueval] . '</li>'; |
|
| 1070 | + $toprint[] = '<li>'.$param['options'][$valueval].'</li>'; |
|
| 1071 | 1071 | } |
| 1072 | 1072 | } |
| 1073 | 1073 | if (!empty($toprint)) { |
| 1074 | - $value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>'; |
|
| 1074 | + $value = '<div><ul>'.implode(' ', $toprint).'</ul></div>'; |
|
| 1075 | 1075 | } |
| 1076 | 1076 | } |
| 1077 | 1077 | } elseif ($type == 'chkbxlst') { |
@@ -1085,7 +1085,7 @@ discard block |
||
| 1085 | 1085 | |
| 1086 | 1086 | if (count($InfoFieldList) >= 3) { |
| 1087 | 1087 | $selectkey = $InfoFieldList[2]; |
| 1088 | - $keyList = $InfoFieldList[2] . ' as rowid'; |
|
| 1088 | + $keyList = $InfoFieldList[2].' as rowid'; |
|
| 1089 | 1089 | } |
| 1090 | 1090 | |
| 1091 | 1091 | $fields_label = explode('|', $InfoFieldList[1]); |
@@ -1101,15 +1101,15 @@ discard block |
||
| 1101 | 1101 | } |
| 1102 | 1102 | } |
| 1103 | 1103 | |
| 1104 | - $sql = "SELECT " . $keyList; |
|
| 1105 | - $sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0]; |
|
| 1104 | + $sql = "SELECT ".$keyList; |
|
| 1105 | + $sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0]; |
|
| 1106 | 1106 | if (strpos($InfoFieldList[4], 'extra') !== false) { |
| 1107 | 1107 | $sql .= ' as main'; |
| 1108 | 1108 | } |
| 1109 | 1109 | // $sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'"; |
| 1110 | 1110 | // $sql.= ' AND entity = '.$conf->entity; |
| 1111 | 1111 | |
| 1112 | - dol_syslog(__METHOD__ . ' type=chkbxlst', LOG_DEBUG); |
|
| 1112 | + dol_syslog(__METHOD__.' type=chkbxlst', LOG_DEBUG); |
|
| 1113 | 1113 | $resql = $this->db->query($sql); |
| 1114 | 1114 | if ($resql) { |
| 1115 | 1115 | if (!$filter_categorie) { |
@@ -1126,9 +1126,9 @@ discard block |
||
| 1126 | 1126 | $translabel = $langs->trans($obj->$field_toshow); |
| 1127 | 1127 | } |
| 1128 | 1128 | if ($translabel != $field_toshow) { |
| 1129 | - $toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>'; |
|
| 1129 | + $toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>'; |
|
| 1130 | 1130 | } else { |
| 1131 | - $toprint[] = '<li>' . $obj->$field_toshow . '</li>'; |
|
| 1131 | + $toprint[] = '<li>'.$obj->$field_toshow.'</li>'; |
|
| 1132 | 1132 | } |
| 1133 | 1133 | } |
| 1134 | 1134 | } else { |
@@ -1137,15 +1137,15 @@ discard block |
||
| 1137 | 1137 | $translabel = $langs->trans($obj->{$InfoFieldList[1]}); |
| 1138 | 1138 | } |
| 1139 | 1139 | if ($translabel != $obj->{$InfoFieldList[1]}) { |
| 1140 | - $toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>'; |
|
| 1140 | + $toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>'; |
|
| 1141 | 1141 | } else { |
| 1142 | - $toprint[] = '<li>' . $obj->{$InfoFieldList[1]} . '</li>'; |
|
| 1142 | + $toprint[] = '<li>'.$obj->{$InfoFieldList[1]}.'</li>'; |
|
| 1143 | 1143 | } |
| 1144 | 1144 | } |
| 1145 | 1145 | } |
| 1146 | 1146 | } |
| 1147 | 1147 | } else { |
| 1148 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 1148 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 1149 | 1149 | |
| 1150 | 1150 | $toprint = array(); |
| 1151 | 1151 | while ($obj = $this->db->fetch_object($resql)) { |
@@ -1154,14 +1154,14 @@ discard block |
||
| 1154 | 1154 | $c->fetch($obj->rowid); |
| 1155 | 1155 | $ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text |
| 1156 | 1156 | foreach ($ways as $way) { |
| 1157 | - $toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>'; |
|
| 1157 | + $toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>'; |
|
| 1158 | 1158 | } |
| 1159 | 1159 | } |
| 1160 | 1160 | } |
| 1161 | 1161 | } |
| 1162 | - $value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>'; |
|
| 1162 | + $value = '<div><ul>'.implode(' ', $toprint).'</ul></div>'; |
|
| 1163 | 1163 | } else { |
| 1164 | - dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING); |
|
| 1164 | + dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING); |
|
| 1165 | 1165 | } |
| 1166 | 1166 | } elseif ($type == 'link') { |
| 1167 | 1167 | // only if something to display (perf) |
@@ -1181,16 +1181,16 @@ discard block |
||
| 1181 | 1181 | $value = ''; |
| 1182 | 1182 | if ($result > 0) { |
| 1183 | 1183 | if (property_exists($object, 'label')) { |
| 1184 | - $value = (string) $object->label; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1184 | + $value = (string) $object->label; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1185 | 1185 | } elseif (property_exists($object, 'libelle')) { |
| 1186 | - $value = (string) $object->libelle; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1186 | + $value = (string) $object->libelle; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1187 | 1187 | } elseif (property_exists($object, 'nom')) { |
| 1188 | - $value = (string) $object->nom; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1188 | + $value = (string) $object->nom; // @phan-suppress-current-line PhanUndeclaredProperty |
|
| 1189 | 1189 | } |
| 1190 | 1190 | } |
| 1191 | 1191 | } |
| 1192 | 1192 | } else { |
| 1193 | - dol_syslog(__METHOD__ . ' Error bad setup of field', LOG_WARNING); |
|
| 1193 | + dol_syslog(__METHOD__.' Error bad setup of field', LOG_WARNING); |
|
| 1194 | 1194 | return 'Error bad setup of field'; |
| 1195 | 1195 | } |
| 1196 | 1196 | } else { |