@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | // General $Variables |
95 | -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
95 | +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
96 | 96 | $ref = GETPOST('ref', 'alpha'); |
97 | 97 | $socid = GETPOSTINT('socid'); |
98 | 98 | $action = GETPOST('action', 'aZ09'); |
99 | 99 | $confirm = GETPOST('confirm', 'alpha'); |
100 | 100 | $cancel = GETPOST('cancel', 'alpha'); |
101 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
101 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
103 | 103 | $lineid = GETPOSTINT('lineid'); |
104 | 104 | $userid = GETPOSTINT('userid'); |
105 | 105 | $search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | setEventMessages('', $warningMsgLineList, 'warnings'); |
276 | 276 | } |
277 | 277 | |
278 | - header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); |
|
278 | + header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); |
|
279 | 279 | exit(); |
280 | 280 | } else { |
281 | 281 | $langs->load("errors"); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | // Validation |
402 | 402 | $object->fetch($id); |
403 | 403 | |
404 | - if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
404 | + if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
405 | 405 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
406 | 406 | ) { |
407 | 407 | $object->date = dol_now(); |
@@ -834,8 +834,8 @@ discard block |
||
834 | 834 | // We check if invoice has payments |
835 | 835 | $totalpaid = 0; |
836 | 836 | $sql = 'SELECT pf.amount'; |
837 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf'; |
|
838 | - $sql .= ' WHERE pf.fk_facture = ' . ((int) $object->id); |
|
837 | + $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf'; |
|
838 | + $sql .= ' WHERE pf.fk_facture = '.((int) $object->id); |
|
839 | 839 | |
840 | 840 | $result = $db->query($sql); |
841 | 841 | if ($result) { |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | if ($result < 0) { |
905 | 905 | setEventMessages($object->error, $object->errors, 'errors'); |
906 | 906 | } else { |
907 | - $object->fetch($object->id); // Reload properties |
|
907 | + $object->fetch($object->id); // Reload properties |
|
908 | 908 | } |
909 | 909 | } else { |
910 | 910 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | if ($result < 0) { |
920 | 920 | setEventMessages($object->error, $object->errors, 'errors'); |
921 | 921 | } else { |
922 | - $object->fetch($object->id); // Reload properties |
|
922 | + $object->fetch($object->id); // Reload properties |
|
923 | 923 | } |
924 | 924 | } else { |
925 | 925 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | // Set invoice as paid |
1105 | 1105 | $result = $object->setPaid($user); |
1106 | 1106 | if ($result >= 0) { |
1107 | - $object->fetch($object->id); // Reload properties |
|
1107 | + $object->fetch($object->id); // Reload properties |
|
1108 | 1108 | $db->commit(); |
1109 | 1109 | } else { |
1110 | 1110 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | $error++; |
1156 | 1156 | } |
1157 | 1157 | |
1158 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1158 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1159 | 1159 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
1160 | 1160 | |
1161 | 1161 | // Replacement invoice |
@@ -1187,7 +1187,7 @@ discard block |
||
1187 | 1187 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1188 | 1188 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1189 | 1189 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1190 | - $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1190 | + $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1191 | 1191 | $object->fk_project = GETPOSTINT('projectid'); |
1192 | 1192 | $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); |
1193 | 1193 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
@@ -1248,9 +1248,9 @@ discard block |
||
1248 | 1248 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1249 | 1249 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1250 | 1250 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1251 | - $object->model_pdf = GETPOST('model'); |
|
1251 | + $object->model_pdf = GETPOST('model'); |
|
1252 | 1252 | $object->fk_project = GETPOSTINT('projectid'); |
1253 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1253 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1254 | 1254 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1255 | 1255 | $object->fk_account = GETPOSTINT('fk_account'); |
1256 | 1256 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
1574 | 1574 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1575 | 1575 | $object->ref_client = GETPOST('ref_client'); |
1576 | - $object->ref_customer = GETPOST('ref_client'); |
|
1576 | + $object->ref_customer = GETPOST('ref_client'); |
|
1577 | 1577 | $object->model_pdf = GETPOST('model'); |
1578 | 1578 | $object->fk_project = GETPOSTINT('projectid'); |
1579 | 1579 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -1637,7 +1637,7 @@ discard block |
||
1637 | 1637 | $element = $subelement = 'expedition'; |
1638 | 1638 | } |
1639 | 1639 | |
1640 | - $object->origin = $origin; // deprecated |
|
1640 | + $object->origin = $origin; // deprecated |
|
1641 | 1641 | $object->origin_type = $origin; |
1642 | 1642 | $object->origin_id = $originid; |
1643 | 1643 | |
@@ -1672,7 +1672,7 @@ discard block |
||
1672 | 1672 | dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines"); |
1673 | 1673 | $result = $srcobject->fetch($object->origin_id); |
1674 | 1674 | |
1675 | - $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1675 | + $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1676 | 1676 | // If deposit invoice - down payment with 1 line (fixed amount or percent) |
1677 | 1677 | if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) { |
1678 | 1678 | // Define the array $amountdeposit |
@@ -2090,7 +2090,7 @@ discard block |
||
2090 | 2090 | if (!empty($origin) && !empty($originid)) { |
2091 | 2091 | include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; |
2092 | 2092 | |
2093 | - $object->origin = $origin; // deprecated |
|
2093 | + $object->origin = $origin; // deprecated |
|
2094 | 2094 | $object->origin_type = $origin; |
2095 | 2095 | $object->origin_id = $originid; |
2096 | 2096 | |
@@ -2116,7 +2116,7 @@ discard block |
||
2116 | 2116 | $line->fk_prev_id = $line->id; |
2117 | 2117 | $line->fetch_optionals(); |
2118 | 2118 | if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { |
2119 | - $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2119 | + $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2120 | 2120 | } else { |
2121 | 2121 | $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note |
2122 | 2122 | } |
@@ -2233,7 +2233,7 @@ discard block |
||
2233 | 2233 | } else { |
2234 | 2234 | $db->rollback(); |
2235 | 2235 | $action = 'create'; |
2236 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2236 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2237 | 2237 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
2238 | 2238 | setEventMessages($object->error, $object->errors, 'errors'); |
2239 | 2239 | } |
@@ -2699,7 +2699,7 @@ discard block |
||
2699 | 2699 | */ |
2700 | 2700 | |
2701 | 2701 | // Margin |
2702 | - $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 |
|
2702 | + $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 |
|
2703 | 2703 | $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
2704 | 2704 | |
2705 | 2705 | |
@@ -2835,7 +2835,7 @@ discard block |
||
2835 | 2835 | if ($prod->price_min > $line->subprice) { |
2836 | 2836 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
2837 | 2837 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
2838 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
2838 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
2839 | 2839 | } else { |
2840 | 2840 | setEventMessages($prod->error, $prod->errors, 'errors'); |
2841 | 2841 | } |
@@ -2986,7 +2986,7 @@ discard block |
||
2986 | 2986 | $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty); |
2987 | 2987 | |
2988 | 2988 | // Add buying price |
2989 | - $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 |
|
2989 | + $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 |
|
2990 | 2990 | $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
2991 | 2991 | |
2992 | 2992 | // Prepare a price equivalent for minimum price check |
@@ -3029,7 +3029,7 @@ discard block |
||
3029 | 3029 | // Define special_code for special lines |
3030 | 3030 | $special_code = GETPOSTINT('special_code'); |
3031 | 3031 | if ($special_code == 3) { |
3032 | - $special_code = 0; // Options should not exists on invoices |
|
3032 | + $special_code = 0; // Options should not exists on invoices |
|
3033 | 3033 | } |
3034 | 3034 | |
3035 | 3035 | $line = new FactureLigne($db); |
@@ -3477,7 +3477,7 @@ discard block |
||
3477 | 3477 | |
3478 | 3478 | |
3479 | 3479 | if ($action == 'update_extras' && $permissiontoeditextra) { |
3480 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3480 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3481 | 3481 | |
3482 | 3482 | $attribute_name = GETPOST('attribute', 'aZ09'); |
3483 | 3483 | |
@@ -3594,7 +3594,7 @@ discard block |
||
3594 | 3594 | $fk_account = GETPOSTINT('fk_account'); |
3595 | 3595 | |
3596 | 3596 | // Load objectsrc |
3597 | - $objectsrc = null; // Initialise |
|
3597 | + $objectsrc = null; // Initialise |
|
3598 | 3598 | //$remise_absolue = 0; |
3599 | 3599 | if (!empty($origin) && !empty($originid)) { |
3600 | 3600 | // Parse element/subelement (ex: project_task) |
@@ -3605,7 +3605,7 @@ discard block |
||
3605 | 3605 | $subelement = $regs[2]; |
3606 | 3606 | } |
3607 | 3607 | |
3608 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3608 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3609 | 3609 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
3610 | 3610 | |
3611 | 3611 | if ($element == 'project') { |
@@ -3683,8 +3683,8 @@ discard block |
||
3683 | 3683 | $fk_account = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
3684 | 3684 | |
3685 | 3685 | if (isModEnabled('multicurrency')) { |
3686 | - $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3687 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3686 | + $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3687 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3688 | 3688 | } |
3689 | 3689 | |
3690 | 3690 | // replicate input reason |
@@ -3784,7 +3784,7 @@ discard block |
||
3784 | 3784 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
3785 | 3785 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
3786 | 3786 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
3787 | - 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 |
|
3787 | + 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 |
|
3788 | 3788 | if ($soc->id > 0) { |
3789 | 3789 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
3790 | 3790 | } |
@@ -3966,7 +3966,7 @@ discard block |
||
3966 | 3966 | print $form->selectarray('typestandard', $arraylist, GETPOST('typestandard', 'aZ09'), 0, 0, 0, '', 1); |
3967 | 3967 | print '</td>';*/ |
3968 | 3968 | if (!getDolGlobalInt('INVOICE_DEPOSIT_INVOICE_ONLY_SAME_LINES')) { |
3969 | - print '<span class="opacitymedium marginleftonly">' . $langs->trans('PercentOfOriginalObject') . '</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="' . (GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%') . '"/>'; |
|
3969 | + print '<span class="opacitymedium marginleftonly">'.$langs->trans('PercentOfOriginalObject').'</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="'.(GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%').'"/>'; |
|
3970 | 3970 | } |
3971 | 3971 | } |
3972 | 3972 | print '</div></div>'."\n"; |
@@ -4320,8 +4320,8 @@ discard block |
||
4320 | 4320 | if ($socid > 0) { |
4321 | 4321 | print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">'; |
4322 | 4322 | |
4323 | - $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4324 | - $discount_type = 0; // used by object_discounts.tpl.php |
|
4323 | + $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4324 | + $discount_type = 0; // used by object_discounts.tpl.php |
|
4325 | 4325 | $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
4326 | 4326 | include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
4327 | 4327 | |
@@ -4362,7 +4362,7 @@ discard block |
||
4362 | 4362 | if (empty($retained_warranty)) { |
4363 | 4363 | if ($objectsrc !== null && property_exists($objectsrc, 'retained_warranty') && !empty($objectsrc->retained_warranty)) { // use previous situation value |
4364 | 4364 | // Facture->retained_warranty (does not exist on Expedition) |
4365 | - $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4365 | + $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4366 | 4366 | } |
4367 | 4367 | } |
4368 | 4368 | $retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT'); |
@@ -4863,7 +4863,7 @@ discard block |
||
4863 | 4863 | $nbMandated = 0; |
4864 | 4864 | foreach ($object->lines as $line) { |
4865 | 4865 | $res = $line->fetch_product(); |
4866 | - if ($res > 0) { |
|
4866 | + if ($res > 0) { |
|
4867 | 4867 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
4868 | 4868 | $nbMandated++; |
4869 | 4869 | break; |
@@ -5106,7 +5106,7 @@ discard block |
||
5106 | 5106 | } |
5107 | 5107 | // Ref customer |
5108 | 5108 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string', '', 0, 1); |
5109 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5109 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5110 | 5110 | // Thirdparty |
5111 | 5111 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
5112 | 5112 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
@@ -5237,7 +5237,7 @@ discard block |
||
5237 | 5237 | print '</td><td class="valuefield fieldname_type">'; |
5238 | 5238 | print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">'; |
5239 | 5239 | print '<input type="hidden" name="action" value="setposinfo">'; |
5240 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
5240 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
5241 | 5241 | if ($action == 'editposinfo') { |
5242 | 5242 | print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> '; |
5243 | 5243 | print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">'; |
@@ -5570,45 +5570,45 @@ discard block |
||
5570 | 5570 | } |
5571 | 5571 | print '<tr>'; |
5572 | 5572 | // Amount HT |
5573 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
5574 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5573 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
5574 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5575 | 5575 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5576 | 5576 | // Multicurrency Amount HT |
5577 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5577 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5578 | 5578 | } |
5579 | 5579 | print '</tr>'; |
5580 | 5580 | |
5581 | 5581 | print '<tr>'; |
5582 | 5582 | // Amount VAT |
5583 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
5584 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5583 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
5584 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5585 | 5585 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5586 | 5586 | // Multicurrency Amount VAT |
5587 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5587 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5588 | 5588 | } |
5589 | 5589 | print '</tr>'; |
5590 | 5590 | |
5591 | 5591 | // Amount Local Taxes |
5592 | 5592 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
5593 | 5593 | print '<tr>'; |
5594 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
5595 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5594 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
5595 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5596 | 5596 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5597 | 5597 | $object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
5598 | 5598 | |
5599 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5599 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5600 | 5600 | } |
5601 | 5601 | print '</tr>'; |
5602 | 5602 | } |
5603 | 5603 | |
5604 | 5604 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
5605 | 5605 | print '<tr>'; |
5606 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
5607 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5606 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
5607 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5608 | 5608 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5609 | 5609 | $object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
5610 | 5610 | |
5611 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5611 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5612 | 5612 | } |
5613 | 5613 | print '</tr>'; |
5614 | 5614 | } |
@@ -5668,11 +5668,11 @@ discard block |
||
5668 | 5668 | |
5669 | 5669 | print '<tr>'; |
5670 | 5670 | // Amount TTC |
5671 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
5672 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5671 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
5672 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5673 | 5673 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5674 | 5674 | // Multicurrency Amount TTC |
5675 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5675 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5676 | 5676 | } |
5677 | 5677 | print '</tr>'; |
5678 | 5678 | |
@@ -6243,7 +6243,7 @@ discard block |
||
6243 | 6243 | if (isModEnabled('subtotals')) { |
6244 | 6244 | include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
6245 | 6245 | } else { |
6246 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
6246 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
6247 | 6247 | } |
6248 | 6248 | } |
6249 | 6249 | |
@@ -6306,10 +6306,10 @@ discard block |
||
6306 | 6306 | if (!$objectidnext && $object->is_last_in_cycle()) { |
6307 | 6307 | if ($usercanunvalidate) { |
6308 | 6308 | unset($params['attr']['title']); |
6309 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', true, $params); |
|
6309 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params); |
|
6310 | 6310 | } else { |
6311 | 6311 | $params['attr']['title'] = $langs->trans('NotEnoughPermissions'); |
6312 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', false, $params); |
|
6312 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params); |
|
6313 | 6313 | } |
6314 | 6314 | } elseif (!$object->is_last_in_cycle()) { |
6315 | 6315 | $params['attr']['title'] = $langs->trans('NotLastInCycle'); |
@@ -6350,7 +6350,7 @@ discard block |
||
6350 | 6350 | $langs->load("contracts"); |
6351 | 6351 | |
6352 | 6352 | if ($usercancreatecontract) { |
6353 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
6353 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
6354 | 6354 | } |
6355 | 6355 | } |
6356 | 6356 | } |
@@ -6600,7 +6600,7 @@ discard block |
||
6600 | 6600 | if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) |
6601 | 6601 | $enableDelete = false; |
6602 | 6602 | $deleteHref = '#'; |
6603 | - if ($isErasable > 0 && ! $objectidnext) { |
|
6603 | + if ($isErasable > 0 && !$objectidnext) { |
|
6604 | 6604 | $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); |
6605 | 6605 | $enableDelete = true; |
6606 | 6606 | } |