@@ -1159,8 +1159,8 @@ discard block |
||
1159 | 1159 | if (count($prodcustprice->lines) > 0) { |
1160 | 1160 | $pu_ht = price($prodcustprice->lines[0]->price); |
1161 | 1161 | $pu_ttc = price($prodcustprice->lines[0]->price_ttc); |
1162 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
1163 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
1162 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
1163 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
1164 | 1164 | $price_base_type = $prodcustprice->lines[0]->price_base_type; |
1165 | 1165 | /*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); |
1166 | 1166 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
@@ -1904,7 +1904,7 @@ discard block |
||
1904 | 1904 | print '<form name="addprop" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
1905 | 1905 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
1906 | 1906 | print '<input type="hidden" name="action" value="add">'; |
1907 | - 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 |
|
1907 | + 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 |
|
1908 | 1908 | print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
1909 | 1909 | if ($origin != 'project' && $originid) { |
1910 | 1910 | print '<input type="hidden" name="origin" value="' . $origin . '">'; |
@@ -2295,7 +2295,7 @@ discard block |
||
2295 | 2295 | if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { |
2296 | 2296 | $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))); |
2297 | 2297 | } |
2298 | - $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
2298 | + $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
2299 | 2299 | |
2300 | 2300 | if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
2301 | 2301 | // This is a hidden option: |
@@ -2479,7 +2479,7 @@ discard block |
||
2479 | 2479 | $nbMandated = 0; |
2480 | 2480 | foreach ($object->lines as $line) { |
2481 | 2481 | $res = $line->fetch_product(); |
2482 | - if ($res > 0) { |
|
2482 | + if ($res > 0) { |
|
2483 | 2483 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
2484 | 2484 | $nbMandated++; |
2485 | 2485 | break; |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | |
473 | 473 | // Action send test emailing |
474 | - if ($action == 'send' && ! $cancel && $permissiontovalidatesend) { |
|
474 | + if ($action == 'send' && !$cancel && $permissiontovalidatesend) { |
|
475 | 475 | $error = 0; |
476 | 476 | |
477 | 477 | $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id, 2, 0, 1, $object, 'mailing'); |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | if ($action == 'add' && $permissiontocreate) { |
550 | 550 | $mesgs = array(); |
551 | 551 | |
552 | - $object->messtype = (string) GETPOST("messtype"); |
|
552 | + $object->messtype = (string) GETPOST("messtype"); |
|
553 | 553 | if ($object->messtype == 'sms') { |
554 | 554 | $object->email_from = (string) GETPOST("from_phone", 'alphawithlgt'); // Must allow 'name <email>' |
555 | 555 | } else { |
@@ -1515,7 +1515,7 @@ discard block |
||
1515 | 1515 | $maxfilesizearray = getMaxFileSizeArray(); |
1516 | 1516 | $maxmin = $maxfilesizearray['maxmin']; |
1517 | 1517 | if ($maxmin > 0) { |
1518 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
1518 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
1519 | 1519 | } |
1520 | 1520 | $out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="' . $langs->trans("Upload") . '" />'; |
1521 | 1521 | $out .= ' '; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | } |
395 | 395 | } |
396 | 396 | if (empty($nbemail)) { |
397 | - $nbemail .= ' ' . img_warning($langs->trans('ToAddRecipientsChooseHere'));//.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>'; |
|
397 | + $nbemail .= ' ' . img_warning($langs->trans('ToAddRecipientsChooseHere')); //.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>'; |
|
398 | 398 | } |
399 | 399 | if ($text) { |
400 | 400 | // @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
@@ -549,12 +549,12 @@ discard block |
||
549 | 549 | } |
550 | 550 | print img_object($langs->trans("EmailingTargetSelector") . ': ' . get_class($obj), $obj->picto, 'class="valignmiddle width25 size15x"'); |
551 | 551 | print '</div>'; |
552 | - print '<div class="tagtd valignmiddle">'; // style="height: 4em" |
|
552 | + print '<div class="tagtd valignmiddle">'; // style="height: 4em" |
|
553 | 553 | print $obj->getDesc(); |
554 | 554 | print '</div>'; |
555 | 555 | |
556 | 556 | try { |
557 | - $obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out. |
|
557 | + $obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out. |
|
558 | 558 | |
559 | 559 | $nbofrecipient = $obj->getNbOfRecipients(''); |
560 | 560 | } catch (Exception $e) { |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | print '<td class="center nowraponall">'; |
900 | 900 | if ($obj->status != $object::STATUS_DRAFT) { // If status of target line is not draft |
901 | 901 | // Date sent |
902 | - print $obj->date_envoi; // @TODO Must store date in date format |
|
902 | + print $obj->date_envoi; // @TODO Must store date in date format |
|
903 | 903 | } |
904 | 904 | print '</td>'; |
905 | 905 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // Initialize technical objects |
65 | 65 | $object = new Mailing($db); |
66 | 66 | $extrafields = new ExtraFields($db); |
67 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
67 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
68 | 68 | |
69 | 69 | // Fetch optionals attributes and labels |
70 | 70 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $offsetunit = GETPOST('offsetunittype_duration', 'aZ09'); |
76 | 76 | $remindertype = GETPOST('selectremindertype', 'aZ09'); |
77 | 77 | $modelmail = GETPOSTINT('actioncommsendmodel_mail'); |
78 | -$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
78 | +$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
79 | 79 | $private = GETPOST('private', 'alphanohtml'); |
80 | 80 | if ($complete == 'na' || $complete == -2) { |
81 | 81 | $complete = -1; |
@@ -610,12 +610,12 @@ discard block |
||
610 | 610 | if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) { |
611 | 611 | $firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear")); |
612 | 612 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel'); |
613 | - $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after |
|
613 | + $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd'); //We begin the week after |
|
614 | 614 | $dayoffset = 7; |
615 | 615 | $monthoffset = 0; |
616 | 616 | } elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) { |
617 | 617 | $firstday = $selectedrecurrulebymonthday; |
618 | - $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth");//We begin the week after |
|
618 | + $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth"); //We begin the week after |
|
619 | 619 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstmonth, $firstday, GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); |
620 | 620 | $dayoffset = 0; |
621 | 621 | $monthoffset = 1; |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | reset($object->socpeopleassigned); |
820 | 820 | $object->contact_id = key($object->socpeopleassigned); |
821 | 821 | } |
822 | - $object->fk_project = GETPOSTINT("projectid"); |
|
822 | + $object->fk_project = GETPOSTINT("projectid"); |
|
823 | 823 | $object->note_private = trim(GETPOST("note", "restricthtml")); |
824 | 824 | |
825 | 825 | if (GETPOST("elementtype", 'alpha')) { |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { |
1064 | 1064 | $error = 0; |
1065 | 1065 | |
1066 | - $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1066 | + $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1067 | 1067 | $smin = dol_print_date($object->datep, "%M", 'tzuserrel'); |
1068 | 1068 | |
1069 | 1069 | $newdate = GETPOST('newdate', 'alpha'); |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | $default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV'); |
1274 | 1274 | print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"'); |
1275 | 1275 | $selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default); |
1276 | - print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1276 | + print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1277 | 1277 | print '</td></tr>'; |
1278 | 1278 | } |
1279 | 1279 | |
@@ -1587,7 +1587,7 @@ discard block |
||
1587 | 1587 | } |
1588 | 1588 | //var_dump('origin='.$origin.' originid='.$originid.' hasPermissionOnLinkedObject='.$hasPermissionOnLinkedObject); |
1589 | 1589 | |
1590 | - if (! in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1590 | + if (!in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1591 | 1591 | // We do not use link for object that already contains a hard coded field to make links with agenda events |
1592 | 1592 | print '<tr><td class="titlefieldcreate">' . $langs->trans("LinkedObject") . '</td>'; |
1593 | 1593 | print '<td colspan="3">'; |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | $object->socpeopleassigned[$id] = array('id' => $tmpid); |
1739 | 1739 | } |
1740 | 1740 | $object->contact_id = GETPOSTINT("contactid"); |
1741 | - $object->fk_project = GETPOSTINT("projectid"); |
|
1741 | + $object->fk_project = GETPOSTINT("projectid"); |
|
1742 | 1742 | |
1743 | 1743 | $object->note_private = GETPOST("note", 'restricthtml'); |
1744 | 1744 | } |
@@ -1814,7 +1814,7 @@ discard block |
||
1814 | 1814 | if ($backtopage) { |
1815 | 1815 | print '<input type="hidden" name="backtopage" value="' . ($backtopage != '1' ? $backtopage : '') . '">'; |
1816 | 1816 | } |
1817 | - if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1817 | + if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && !preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1818 | 1818 | print '<input type="hidden" name="actioncode" value="' . $object->type_code . '">'; |
1819 | 1819 | } |
1820 | 1820 | |
@@ -2187,7 +2187,7 @@ discard block |
||
2187 | 2187 | })'; |
2188 | 2188 | print '</script>' . "\n"; |
2189 | 2189 | |
2190 | - print '</div>'; // End of div for reminderparameters |
|
2190 | + print '</div>'; // End of div for reminderparameters |
|
2191 | 2191 | } |
2192 | 2192 | |
2193 | 2193 | print dol_get_fiche_end(); |
@@ -1156,8 +1156,8 @@ |
||
1156 | 1156 | // We are in a particular day for $username, now we scan all events |
1157 | 1157 | foreach ($eventarray as $daykey => $notused) { |
1158 | 1158 | $annee = dol_print_date($daykey, '%Y', 'tzuserrel'); |
1159 | - $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | - $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1159 | + $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | + $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1161 | 1161 | //var_dump("daykey=$daykey day=$day jour=$jour, month=$month mois=$mois, year=$year annee=$annee"); |
1162 | 1162 | |
1163 | 1163 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * \brief Page to edit absolute discounts for a customer |
27 | 27 | */ |
28 | 28 | |
29 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
29 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
30 | 30 | define('CSRFCHECK_WITH_TOKEN', '1'); |
31 | 31 | } // Force use of CSRF protection with tokens even for GET |
32 | 32 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Parameters |
69 | 69 | $action = GETPOST('action', 'aZ09'); |
70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
72 | 72 | |
73 | 73 | $value = GETPOST('value', 'alpha'); |
74 | 74 | $label = GETPOST('label', 'alpha'); |
@@ -39,13 +39,13 @@ |
||
39 | 39 | // Get parameters |
40 | 40 | $id = GETPOSTINT('id'); |
41 | 41 | $ref = GETPOST('ref', 'alpha'); |
42 | -$lineid = GETPOSTINT('lineid'); |
|
42 | +$lineid = GETPOSTINT('lineid'); |
|
43 | 43 | |
44 | 44 | $action = GETPOST('action', 'aZ09'); |
45 | 45 | $confirm = GETPOST('confirm', 'alpha'); |
46 | 46 | $cancel = GETPOST('cancel', 'aZ09'); |
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
48 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
48 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
50 | 50 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
51 | 51 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |