@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | if ($invoiceid > 0) { |
133 | 133 | $ret = $invoice->fetch($invoiceid); |
134 | 134 | } else { |
135 | - $ret = $invoice->fetch('', '(PROV-POS'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '') .'-'.$place.')'); |
|
135 | + $ret = $invoice->fetch('', '(PROV-POS'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '').'-'.$place.')'); |
|
136 | 136 | } |
137 | 137 | if ($ret > 0) { |
138 | 138 | $placeid = $invoice->id; |
139 | 139 | } |
140 | 140 | |
141 | -$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
141 | +$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
142 | 142 | |
143 | 143 | $soc = new Societe($db); |
144 | 144 | if ($invoice->socid > 0) { |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | * Actions |
160 | 160 | */ |
161 | 161 | |
162 | -$parameters=array(); |
|
163 | -$reshook=$hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
162 | +$parameters = array(); |
|
163 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
164 | 164 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
165 | 165 | |
166 | 166 | if (empty($reshook)) { |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | $bankaccount = GETPOST('accountid', 'int'); |
174 | 174 | } else { |
175 | 175 | if ($pay == 'LIQ') { |
176 | - $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
176 | + $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
177 | 177 | } elseif ($pay == "CHQ") { |
178 | - $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
178 | + $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
179 | 179 | } else { |
180 | 180 | $accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"]; |
181 | 181 | $bankaccount = getDolGlobalString($accountname); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | if ($res < 0) { |
251 | 251 | $error++; |
252 | 252 | $langs->load("admin"); |
253 | - dol_htmloutput_errors($invoice->error == 'NotConfigured' ? $langs->trans("NotConfigured").' (TakePos numbering module)': $invoice->error, $invoice->errors, 1); |
|
253 | + dol_htmloutput_errors($invoice->error == 'NotConfigured' ? $langs->trans("NotConfigured").' (TakePos numbering module)' : $invoice->error, $invoice->errors, 1); |
|
254 | 254 | } |
255 | 255 | } |
256 | 256 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $creditnote->socid = $invoice->socid; |
312 | 312 | $creditnote->date = dol_now(); |
313 | 313 | $creditnote->module_source = 'takepos'; |
314 | - $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
314 | + $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
315 | 315 | $creditnote->type = Facture::TYPE_CREDIT_NOTE; |
316 | 316 | $creditnote->fk_facture_source = $placeid; |
317 | 317 | $creditnote->remise_absolue = $invoice->remise_absolue; |
@@ -462,9 +462,9 @@ discard block |
||
462 | 462 | // If we add a line and no invoice yet, we create the invoice |
463 | 463 | if (($action == "addline" || $action == "freezone") && $placeid == 0) { |
464 | 464 | $invoice->socid = getDolGlobalString($constforcompanyid); |
465 | - $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
465 | + $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
466 | 466 | $invoice->module_source = 'takepos'; |
467 | - $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
467 | + $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
468 | 468 | $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; |
469 | 469 | |
470 | 470 | if ($invoice->socid <= 0) { |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | if (!empty($conf->global->TAKEPOS_GROUP_SAME_PRODUCT)) { |
525 | 525 | foreach ($invoice->lines as $line) { |
526 | 526 | if ($line->product_ref == $prod->ref) { |
527 | - if ($line->special_code==4) continue; // If this line is sended to printer create new line |
|
527 | + if ($line->special_code == 4) continue; // If this line is sended to printer create new line |
|
528 | 528 | $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty + $qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
529 | 529 | if ($result < 0) { |
530 | 530 | dol_htmloutput_errors($invoice->error, $invoice->errors, 1); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | |
565 | 565 | // complete line by hook |
566 | 566 | $parameters = array('prod' => $prod, 'line' => $line); |
567 | - $reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
567 | + $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
568 | 568 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
569 | 569 | |
570 | 570 | |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | |
609 | 609 | if ($action == "addnote") { |
610 | 610 | $desc = GETPOST('addnote', 'alpha'); |
611 | - if ($idline==0) { |
|
611 | + if ($idline == 0) { |
|
612 | 612 | $invoice->update_note($desc, '_public'); |
613 | 613 | } else foreach ($invoice->lines as $line) { |
614 | 614 | if ($line->id == $idline) { |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | } else { |
709 | 709 | if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) { |
710 | 710 | dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1); |
711 | - } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
711 | + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
712 | 712 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
713 | 713 | } else { |
714 | 714 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | } |
904 | 904 | $sectionwithinvoicelink .= '</span><br>'; |
905 | 905 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
906 | - $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
906 | + $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
907 | 907 | } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { |
908 | 908 | if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { |
909 | 909 | $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>'; |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | <script type="text/javascript"> |
966 | 966 | var selectedline=0; |
967 | 967 | var selectedtext=""; |
968 | -<?php if ($action=="valid") echo "var place=0;";?> // Set to default place after close sale |
|
968 | +<?php if ($action == "valid") echo "var place=0;"; ?> // Set to default place after close sale |
|
969 | 969 | var placeid=<?php echo ($placeid > 0 ? $placeid : 0); ?>; |
970 | 970 | $(document).ready(function() { |
971 | 971 | var idoflineadded = <?php echo (empty($idoflineadded) ? 0 : $idoflineadded); ?>; |
@@ -1203,10 +1203,10 @@ discard block |
||
1203 | 1203 | $s = ''; |
1204 | 1204 | |
1205 | 1205 | $idwarehouse = 0; |
1206 | - $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1206 | + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1207 | 1207 | if (isModEnabled('stock')) { |
1208 | 1208 | if (getDolGlobalString($constantforkey) != "1") { |
1209 | - $constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1209 | + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1210 | 1210 | $idwarehouse = getDolGlobalString($constantforkey); |
1211 | 1211 | if ($idwarehouse > 0) { |
1212 | 1212 | $s = '<span class="small">'; |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $result = $adh->fetch('', '', $invoice->socid); |
1250 | 1250 | if ($result > 0) { |
1251 | 1251 | $adh->ref = $adh->getFullName($langs); |
1252 | - if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED ) { |
|
1252 | + if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED) { |
|
1253 | 1253 | $s .= "<s>"; |
1254 | 1254 | } |
1255 | 1255 | $s .= $adh->getFullName($langs); |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.'"></script>'."\n"; |
1306 | 1306 | } |
1307 | 1307 | |
1308 | -print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"])?'':$_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n"; |
|
1308 | +print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"]) ? '' : $_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n"; |
|
1309 | 1309 | print '<div class="div-table-responsive-no-min invoice">'; |
1310 | 1310 | print '<table id="tablelines" class="noborder noshadow postablelines centpercent">'; |
1311 | 1311 | if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) { |
@@ -1349,8 +1349,8 @@ discard block |
||
1349 | 1349 | print '</td>'; |
1350 | 1350 | |
1351 | 1351 | // complete header by hook |
1352 | -$parameters=array(); |
|
1353 | -$reshook=$hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1352 | +$parameters = array(); |
|
1353 | +$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1354 | 1354 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1355 | 1355 | print $hookmanager->resPrint; |
1356 | 1356 | |
@@ -1359,16 +1359,16 @@ discard block |
||
1359 | 1359 | print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; |
1360 | 1360 | if (getDolGlobalString('TAKEPOS_SHOW_HT')) { |
1361 | 1361 | print '<td class="linecolht right nowraponall">'; |
1362 | - print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>'; |
|
1362 | + print '<span class="opacitymedium small">'.$langs->trans('TotalHTShort').'</span><br>'; |
|
1363 | 1363 | // In phone version only show when it is invoice page |
1364 | 1364 | if (empty($mobilepage) || $mobilepage == "invoice") { |
1365 | - print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>'; |
|
1365 | + print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">'.price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency).'</span>'; |
|
1366 | 1366 | if (isModEnabled('multicurrency') && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
1367 | 1367 | //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
1368 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
1368 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
1369 | 1369 | $multicurrency = new MultiCurrency($db); |
1370 | 1370 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
1371 | - print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
1371 | + print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
1372 | 1372 | } |
1373 | 1373 | print '</td>'; |
1374 | 1374 | } |
@@ -1513,8 +1513,8 @@ discard block |
||
1513 | 1513 | $htmlsupplements[$line->fk_parent_line] .= '</td>'; |
1514 | 1514 | |
1515 | 1515 | // complete line by hook |
1516 | - $parameters=array('line' => $line); |
|
1517 | - $reshook=$hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1516 | + $parameters = array('line' => $line); |
|
1517 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1518 | 1518 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1519 | 1519 | $htmlsupplements[$line->fk_parent_line] .= $hookmanager->resPrint; |
1520 | 1520 | |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | } |
1562 | 1562 | } |
1563 | 1563 | if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { |
1564 | - $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1564 | + $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>'.$line->product_ref.'</b> - '.$line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1565 | 1565 | } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { |
1566 | 1566 | $htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
1567 | 1567 | } else { |
@@ -1607,8 +1607,8 @@ discard block |
||
1607 | 1607 | $htmlforlines .= '</td>'; |
1608 | 1608 | |
1609 | 1609 | // complete line by hook |
1610 | - $parameters=array('line' => $line); |
|
1611 | - $reshook=$hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1610 | + $parameters = array('line' => $line); |
|
1611 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1612 | 1612 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1613 | 1613 | $htmlforlines .= $hookmanager->resPrint; |
1614 | 1614 | |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE && empty($conf->global->TAKEPOS_NO_CREDITNOTE)) { |
1698 | 1698 | print '<button id="buttonprint" type="button" onclick="ModalBox(\'ModalCreditNote\')">'.$langs->trans('CreateCreditNote').'</button>'; |
1699 | 1699 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
1700 | - print ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
1700 | + print ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
1701 | 1701 | } |
1702 | 1702 | } |
1703 | 1703 |
@@ -56,17 +56,17 @@ discard block |
||
56 | 56 | * Actions |
57 | 57 | */ |
58 | 58 | |
59 | -if ($action=="split") { |
|
59 | +if ($action == "split") { |
|
60 | 60 | $line = GETPOST('line', 'int'); |
61 | 61 | $split = GETPOST('split', 'int'); |
62 | - if ($split==1) { // Split line |
|
62 | + if ($split == 1) { // Split line |
|
63 | 63 | $invoice = new Facture($db); |
64 | 64 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)'); |
65 | 65 | if ($ret > 0) { |
66 | 66 | $placeid = $invoice->id; |
67 | 67 | } else { |
68 | 68 | $constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]; |
69 | - $invoice->socid =getDolGlobalInt($constforcompanyid); |
|
69 | + $invoice->socid = getDolGlobalInt($constforcompanyid); |
|
70 | 70 | $invoice->date = dol_now(); |
71 | 71 | $invoice->module_source = 'takepos'; |
72 | 72 | $invoice->pos_source = $_SESSION["takeposterminal"]; |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | } |
86 | 86 | $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line; |
87 | 87 | $db->query($sql); |
88 | - } elseif ($split==0) { // Unsplit line |
|
88 | + } elseif ($split == 0) { // Unsplit line |
|
89 | 89 | $invoice = new Facture($db); |
90 | - if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
90 | + if ($place == "SPLIT") $place = "0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
91 | 91 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); |
92 | 92 | if ($ret > 0) { |
93 | 93 | $placeid = $invoice->id; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | <script> |
165 | 165 | function Split(selectedline, split) { |
166 | 166 | $.ajax({ |
167 | - url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place;?>", |
|
167 | + url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place; ?>", |
|
168 | 168 | context: document.body |
169 | 169 | }).done(function() { |
170 | 170 | $("#currentplace").load("invoice.php?place="+parent.place+"&invoiceid="+parent.invoiceid, function() { |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | |
203 | 203 | |
204 | - $("#headersplit1").html("<?php echo $langs->trans("Place");?> "+parent.place); |
|
205 | - $("#headersplit2").html("<?php echo $langs->trans("SplitSale");?>"); |
|
204 | + $("#headersplit1").html("<?php echo $langs->trans("Place"); ?> "+parent.place); |
|
205 | + $("#headersplit2").html("<?php echo $langs->trans("SplitSale"); ?>"); |
|
206 | 206 | |
207 | 207 | }); |
208 | 208 | </script> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $arrayofcss = array('/takepos/css/pos.css.php', '/takepos/css/colorbox.css'); |
119 | 119 | |
120 | 120 | if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) { |
121 | - $arrayofcss[] = '/takepos/css/colorful.css'; |
|
121 | + $arrayofcss[] = '/takepos/css/colorful.css'; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | limit = maxproduct-1; |
332 | 332 | } |
333 | 333 | // Only show products for sale (tosell=1) |
334 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
334 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
335 | 335 | console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs"); |
336 | 336 | console.log(data); |
337 | 337 | while (ishow < maxproduct) { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | |
388 | 388 | <?php |
389 | 389 | // Add js from hooks |
390 | - $parameters=array(); |
|
390 | + $parameters = array(); |
|
391 | 391 | $parameters['caller'] = 'loadProducts'; |
392 | 392 | $hookmanager->executeHooks('completeJSProductDisplay', $parameters); |
393 | 393 | print $hookmanager->resPrint; |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | } |
432 | 432 | var offset = <?php echo ($MAXPRODUCT - 2); ?> * pageproducts; |
433 | 433 | // Only show products for sale (tosell=1) |
434 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
434 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
435 | 435 | console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat); |
436 | 436 | |
437 | 437 | if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | if (idproduct=="") return; |
493 | 493 | // Call page invoice.php to generate the section with product lines |
494 | 494 | $("#poslines").load("invoice.php?action=addline&token=<?php echo newToken() ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty, function() { |
495 | - <?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?> |
|
495 | + <?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();"; ?> |
|
496 | 496 | }); |
497 | 497 | } |
498 | 498 | |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | function ChangeThirdparty(idcustomer) { |
503 | 503 | console.log("ChangeThirdparty"); |
504 | 504 | // Call page list.php to change customer |
505 | - $("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken();?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
505 | + $("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken(); ?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
506 | 506 | }); |
507 | 507 | |
508 | 508 | ClearSearch(); |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | |
575 | 575 | console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid); |
576 | 576 | |
577 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id='+invoiceid, function(data) { |
|
577 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id='+invoiceid, function(data) { |
|
578 | 578 | var r; |
579 | 579 | |
580 | 580 | if (parseInt(data['paye']) === 1) { |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | pageproducts = 0; |
645 | 645 | jQuery(".wrapper2 .catwatermark").hide(); |
646 | 646 | var nbsearchresults = 0; |
647 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
647 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken(); ?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
648 | 648 | for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) { |
649 | 649 | if (typeof (data[i]) == "undefined") { |
650 | 650 | $("#prowatermark" + i).html(""); |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | |
689 | 689 | <?php |
690 | 690 | // Add js from hooks |
691 | - $parameters=array(); |
|
691 | + $parameters = array(); |
|
692 | 692 | $parameters['caller'] = 'search2'; |
693 | 693 | $hookmanager->executeHooks('completeJSProductDisplay', $parameters); |
694 | 694 | print $hookmanager->resPrint; |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | } |
727 | 727 | else { |
728 | 728 | $("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show(); |
729 | - var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>)); |
|
729 | + var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>)); |
|
730 | 730 | $("#search_start_less").val(search_start_less); |
731 | 731 | } |
732 | 732 | if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) { |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | } |
735 | 735 | else { |
736 | 736 | $("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show(); |
737 | - var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>); |
|
737 | + var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>); |
|
738 | 738 | $("#search_start_more").val(search_start_more); |
739 | 739 | } |
740 | 740 | }); |
@@ -831,14 +831,14 @@ discard block |
||
831 | 831 | |
832 | 832 | function TakeposPrintingOrder(){ |
833 | 833 | console.log("TakeposPrintingOrder"); |
834 | - $("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place="+place, function() { |
|
834 | + $("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place="+place, function() { |
|
835 | 835 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
836 | 836 | }); |
837 | 837 | } |
838 | 838 | |
839 | 839 | function TakeposPrintingTemp(){ |
840 | 840 | console.log("TakeposPrintingTemp"); |
841 | - $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place="+place, function() { |
|
841 | + $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place="+place, function() { |
|
842 | 842 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
843 | 843 | }); |
844 | 844 | } |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | } |
861 | 861 | |
862 | 862 | function DolibarrOpenDrawer() { |
863 | - console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>"); |
|
863 | + console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>"); |
|
864 | 864 | $.ajax({ |
865 | 865 | type: "GET", |
866 | 866 | data: { token: '<?php echo currentToken(); ?>' }, |
@@ -1200,15 +1200,15 @@ discard block |
||
1200 | 1200 | |
1201 | 1201 | // TakePOS setup check |
1202 | 1202 | if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) { |
1203 | - $sql = "SELECT code, libelle FROM " . MAIN_DB_PREFIX . "c_paiement"; |
|
1204 | - $sql .= " WHERE entity IN (" . getEntity('c_paiement') . ")"; |
|
1203 | + $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement"; |
|
1204 | + $sql .= " WHERE entity IN (".getEntity('c_paiement').")"; |
|
1205 | 1205 | $sql .= " AND active = 1"; |
1206 | 1206 | $sql .= " ORDER BY libelle"; |
1207 | 1207 | |
1208 | 1208 | $resql = $db->query($sql); |
1209 | 1209 | $paiementsModes = array(); |
1210 | 1210 | if ($resql) { |
1211 | - while ( $obj = $db->fetch_object($resql) ) { |
|
1211 | + while ($obj = $db->fetch_object($resql)) { |
|
1212 | 1212 | $paycode = $obj->code; |
1213 | 1213 | if ($paycode == 'LIQ') { |
1214 | 1214 | $paycode = 'CASH'; |
@@ -1217,9 +1217,9 @@ discard block |
||
1217 | 1217 | $paycode = 'CHEQUE'; |
1218 | 1218 | } |
1219 | 1219 | |
1220 | - $constantforkey = "CASHDESK_ID_BANKACCOUNT_" . $paycode . $_SESSION["takeposterminal"]; |
|
1220 | + $constantforkey = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"]; |
|
1221 | 1221 | //var_dump($constantforkey.' '.getDolGlobalInt($constantforkey)); |
1222 | - if ( !empty($conf->global->$constantforkey) && getDolGlobalInt($constantforkey) > 0) { |
|
1222 | + if (!empty($conf->global->$constantforkey) && getDolGlobalInt($constantforkey) > 0) { |
|
1223 | 1223 | array_push($paiementsModes, $obj); |
1224 | 1224 | } |
1225 | 1225 | } |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { |
1256 | 1256 | $menus[$r++] = array('title'=>'<span class="far fa-building paddingrightonly"></span><div class="trunc">'.$langs->trans("Customer").'</div>', 'action'=>'Customer();'); |
1257 | 1257 | } |
1258 | -if ( ! getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
1258 | +if (!getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
1259 | 1259 | $menus[$r++] = array('title'=>'<span class="fa fa-history paddingrightonly"></span><div class="trunc">'.$langs->trans("History").'</div>', 'action'=>'History();'); |
1260 | 1260 | } |
1261 | 1261 | $menus[$r++] = array('title'=>'<span class="fa fa-cube paddingrightonly"></span><div class="trunc">'.$langs->trans("FreeZone").'</div>', 'action'=>'FreeZone();'); |
@@ -1325,7 +1325,7 @@ discard block |
||
1325 | 1325 | $parameters = array('menus'=>$menus); |
1326 | 1326 | $reshook = $hookmanager->executeHooks('ActionButtons', $parameters); |
1327 | 1327 | if ($reshook == 0) { //add buttons |
1328 | - if (is_array($hookmanager->resArray) ) { |
|
1328 | + if (is_array($hookmanager->resArray)) { |
|
1329 | 1329 | foreach ($hookmanager->resArray as $resArray) { |
1330 | 1330 | foreach ($resArray as $butmenu) { |
1331 | 1331 | $menus[$r++] = $butmenu; |
@@ -1333,7 +1333,7 @@ discard block |
||
1333 | 1333 | } |
1334 | 1334 | } elseif ($reshook == 1) { |
1335 | 1335 | $r = 0; //replace buttons |
1336 | - if (is_array($hookmanager->resArray) ) { |
|
1336 | + if (is_array($hookmanager->resArray)) { |
|
1337 | 1337 | foreach ($hookmanager->resArray as $resArray) { |
1338 | 1338 | foreach ($resArray as $butmenu) { |
1339 | 1339 | $menus[$r++] = $butmenu; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $backtopage = GETPOST('backtopage', 'alpha'); |
102 | 102 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
103 | 103 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
104 | -$confirm = GETPOST('confirm', 'alpha'); |
|
104 | +$confirm = GETPOST('confirm', 'alpha'); |
|
105 | 105 | |
106 | 106 | $dol_openinpopup = ''; |
107 | 107 | if (!empty($backtopagejsfields)) { |
@@ -150,12 +150,12 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | // Permissions |
153 | -$permissiontoread = $user->hasRight('societe', 'lire'); |
|
154 | -$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
153 | +$permissiontoread = $user->hasRight('societe', 'lire'); |
|
154 | +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
155 | 155 | $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0); |
156 | -$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
156 | +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
157 | 157 | $permissiondellink = $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php |
158 | -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
158 | +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
159 | 159 | |
160 | 160 | // Security check |
161 | 161 | $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) { |
200 | 200 | $error = 0; |
201 | 201 | $soc_origin_id = GETPOST('soc_origin', 'int'); |
202 | - $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
202 | + $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
203 | 203 | |
204 | 204 | if ($soc_origin_id <= 0) { |
205 | 205 | $langs->load('errors'); |
@@ -449,12 +449,12 @@ discard block |
||
449 | 449 | $error++; |
450 | 450 | } |
451 | 451 | |
452 | - if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
452 | + if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
453 | 453 | $error++; |
454 | 454 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
455 | 455 | } |
456 | 456 | |
457 | - if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
457 | + if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
458 | 458 | $error++; |
459 | 459 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
460 | 460 | } |
@@ -473,19 +473,19 @@ discard block |
||
473 | 473 | $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); |
474 | 474 | $object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int |
475 | 475 | // Add non official properties |
476 | - $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
477 | - $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
476 | + $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
477 | + $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
478 | 478 | } else { |
479 | - $object->name = GETPOST('name', 'alphanohtml'); |
|
479 | + $object->name = GETPOST('name', 'alphanohtml'); |
|
480 | 480 | } |
481 | 481 | $object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity); |
482 | - $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
482 | + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
483 | 483 | $object->parent = GETPOST('parent_company_id', 'int'); |
484 | 484 | $object->address = GETPOST('address', 'alphanohtml'); |
485 | - $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
486 | - $object->town = GETPOST('town', 'alphanohtml'); |
|
487 | - $object->country_id = GETPOST('country_id', 'int'); |
|
488 | - $object->state_id = GETPOST('state_id', 'int'); |
|
485 | + $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
486 | + $object->town = GETPOST('town', 'alphanohtml'); |
|
487 | + $object->country_id = GETPOST('country_id', 'int'); |
|
488 | + $object->state_id = GETPOST('state_id', 'int'); |
|
489 | 489 | |
490 | 490 | $object->socialnetworks = array(); |
491 | 491 | if (isModEnabled('socialnetworks')) { |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $object->phone = GETPOST('phone', 'alpha'); |
500 | 500 | $object->fax = GETPOST('fax', 'alpha'); |
501 | 501 | $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); |
502 | - $object->no_email = GETPOST("no_email", "int"); |
|
502 | + $object->no_email = GETPOST("no_email", "int"); |
|
503 | 503 | $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); |
504 | 504 | $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); |
505 | 505 | $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); |
@@ -509,13 +509,13 @@ discard block |
||
509 | 509 | $object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml')); |
510 | 510 | $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); |
511 | 511 | $object->code_client = GETPOSTISSET('customer_code') ?GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha'); |
512 | - $object->code_fournisseur = GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
512 | + $object->code_fournisseur = GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
513 | 513 | $object->capital = GETPOST('capital', 'alphanohtml'); |
514 | 514 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
515 | 515 | |
516 | 516 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
517 | 517 | $object->tva_assuj = GETPOST('assujtva_value', 'alpha'); |
518 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
518 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
519 | 519 | $object->status = GETPOST('status', 'alpha'); |
520 | 520 | |
521 | 521 | // Local Taxes |
@@ -525,24 +525,24 @@ discard block |
||
525 | 525 | $object->localtax1_value = GETPOST('lt1', 'alpha'); |
526 | 526 | $object->localtax2_value = GETPOST('lt2', 'alpha'); |
527 | 527 | |
528 | - $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
528 | + $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
529 | 529 | $object->effectif_id = GETPOST('effectif_id', 'int'); |
530 | - $object->typent_id = GETPOST('typent_id', 'int'); |
|
530 | + $object->typent_id = GETPOST('typent_id', 'int'); |
|
531 | 531 | |
532 | 532 | $object->typent_code = dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type |
533 | 533 | |
534 | - $object->client = GETPOST('client', 'int'); |
|
534 | + $object->client = GETPOST('client', 'int'); |
|
535 | 535 | $object->fournisseur = GETPOST('fournisseur', 'int'); |
536 | 536 | |
537 | - $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
538 | - $object->default_lang = GETPOST('default_lang'); |
|
537 | + $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
538 | + $object->default_lang = GETPOST('default_lang'); |
|
539 | 539 | |
540 | 540 | // Webservices url/key |
541 | 541 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
542 | 542 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
543 | 543 | |
544 | 544 | if (GETPOSTISSET('accountancy_code_sell')) { |
545 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
545 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
546 | 546 | |
547 | 547 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
548 | 548 | $object->accountancy_code_sell = ''; |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | } |
552 | 552 | } |
553 | 553 | if (GETPOSTISSET('accountancy_code_buy')) { |
554 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
554 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
555 | 555 | |
556 | 556 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
557 | 557 | $object->accountancy_code_buy = ''; |
@@ -998,7 +998,7 @@ discard block |
||
998 | 998 | |
999 | 999 | // Actions to build doc |
1000 | 1000 | $id = $socid; |
1001 | - $upload_dir = !empty($conf->societe->multidir_output[$object->entity])?$conf->societe->multidir_output[$object->entity]:$conf->societe->dir_output; |
|
1001 | + $upload_dir = !empty($conf->societe->multidir_output[$object->entity]) ? $conf->societe->multidir_output[$object->entity] : $conf->societe->dir_output; |
|
1002 | 1002 | $permissiontoadd = $user->hasRight('societe', 'creer'); |
1003 | 1003 | include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
1004 | 1004 | } |
@@ -1159,7 +1159,7 @@ discard block |
||
1159 | 1159 | $object->civility_id = GETPOST('civility_id', 'alpha'); |
1160 | 1160 | |
1161 | 1161 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
1162 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1162 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1163 | 1163 | $object->status = GETPOST('status', 'int'); |
1164 | 1164 | |
1165 | 1165 | //Local Taxes |
@@ -1175,7 +1175,7 @@ discard block |
||
1175 | 1175 | $object->default_lang = GETPOST('default_lang'); |
1176 | 1176 | |
1177 | 1177 | if (GETPOSTISSET('accountancy_code_sell')) { |
1178 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1178 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1179 | 1179 | |
1180 | 1180 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1181 | 1181 | $object->accountancy_code_sell = ''; |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | } |
1185 | 1185 | } |
1186 | 1186 | if (GETPOSTISSET('accountancy_code_buy')) { |
1187 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1187 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1188 | 1188 | |
1189 | 1189 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1190 | 1190 | $object->accountancy_code_buy = ''; |
@@ -1269,7 +1269,7 @@ discard block |
||
1269 | 1269 | document.formsoc.private.value=1; |
1270 | 1270 | }); |
1271 | 1271 | |
1272 | - var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1') . '; |
|
1272 | + var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1').'; |
|
1273 | 1273 | |
1274 | 1274 | init_customer_categ(); |
1275 | 1275 | $("#customerprospect").change(function() { |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX) ? ' colspan="3"' : '').'>'; |
1387 | 1387 | |
1388 | 1388 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; |
1389 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1389 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1390 | 1390 | // This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php |
1391 | 1391 | // on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input. |
1392 | 1392 | /* |
@@ -1644,7 +1644,7 @@ discard block |
||
1644 | 1644 | if ($conf->browser->layout == 'phone') { |
1645 | 1645 | print '</tr><tr>'; |
1646 | 1646 | } |
1647 | - print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1647 | + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1648 | 1648 | print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>'; |
1649 | 1649 | } |
1650 | 1650 | print '</tr>'; |
@@ -1689,7 +1689,7 @@ discard block |
||
1689 | 1689 | $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); |
1690 | 1690 | while ($i <= 6) { |
1691 | 1691 | $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); |
1692 | - if ($idprof != '-') { |
|
1692 | + if ($idprof != '-') { |
|
1693 | 1693 | $key = 'idprof'.$i; |
1694 | 1694 | |
1695 | 1695 | if (($j % $NBCOLS) == 0) { |
@@ -1727,7 +1727,7 @@ discard block |
||
1727 | 1727 | if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { |
1728 | 1728 | $s .= ' '; |
1729 | 1729 | |
1730 | - if (!empty($conf->use_javascript_ajax)) { |
|
1730 | + if (!empty($conf->use_javascript_ajax)) { |
|
1731 | 1731 | $widthpopup = 600; |
1732 | 1732 | if (!empty($conf->dol_use_jmobile)) { |
1733 | 1733 | $widthpopup = 350; |
@@ -1756,7 +1756,7 @@ discard block |
||
1756 | 1756 | |
1757 | 1757 | // VAT reverse charge by default |
1758 | 1758 | if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) { |
1759 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
1759 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
1760 | 1760 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
1761 | 1761 | print '</td></tr>'; |
1762 | 1762 | } |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | } |
1785 | 1785 | |
1786 | 1786 | // Type - Workforce/Staff |
1787 | - print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'."\n"; |
|
1787 | + print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.(($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'."\n"; |
|
1788 | 1788 | $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. |
1789 | 1789 | print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1); |
1790 | 1790 | if ($user->admin) { |
@@ -2020,7 +2020,7 @@ discard block |
||
2020 | 2020 | $object->phone = GETPOST('phone', 'alpha'); |
2021 | 2021 | $object->fax = GETPOST('fax', 'alpha'); |
2022 | 2022 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
2023 | - $object->no_email = GETPOST("no_email", "int"); |
|
2023 | + $object->no_email = GETPOST("no_email", "int"); |
|
2024 | 2024 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
2025 | 2025 | $object->capital = GETPOST('capital', 'alphanohtml'); |
2026 | 2026 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
@@ -2036,16 +2036,16 @@ discard block |
||
2036 | 2036 | $object->default_lang = GETPOST('default_lang', 'alpha'); |
2037 | 2037 | |
2038 | 2038 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
2039 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
2039 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
2040 | 2040 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
2041 | - $object->status = GETPOST('status', 'int'); |
|
2041 | + $object->status = GETPOST('status', 'int'); |
|
2042 | 2042 | |
2043 | 2043 | // Webservices url/key |
2044 | 2044 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
2045 | 2045 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
2046 | 2046 | |
2047 | 2047 | if (GETPOSTISSET('accountancy_code_sell')) { |
2048 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
2048 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
2049 | 2049 | |
2050 | 2050 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
2051 | 2051 | $object->accountancy_code_sell = ''; |
@@ -2054,7 +2054,7 @@ discard block |
||
2054 | 2054 | } |
2055 | 2055 | } |
2056 | 2056 | if (GETPOSTISSET('accountancy_code_buy')) { |
2057 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
2057 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
2058 | 2058 | |
2059 | 2059 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
2060 | 2060 | $object->accountancy_code_buy = ''; |
@@ -2136,7 +2136,7 @@ discard block |
||
2136 | 2136 | } |
2137 | 2137 | }); |
2138 | 2138 | |
2139 | - var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1') . '; |
|
2139 | + var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1').'; |
|
2140 | 2140 | |
2141 | 2141 | init_customer_categ(); |
2142 | 2142 | $("#customerprospect").change(function() { |
@@ -2320,13 +2320,13 @@ discard block |
||
2320 | 2320 | print '</td></tr>'; |
2321 | 2321 | |
2322 | 2322 | // Zip / Town |
2323 | - print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'; |
|
2323 | + print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'; |
|
2324 | 2324 | print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); |
2325 | 2325 | print '</td>'; |
2326 | 2326 | if ($conf->browser->layout == 'phone') { |
2327 | 2327 | print '</tr><tr>'; |
2328 | 2328 | } |
2329 | - print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'; |
|
2329 | + print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'; |
|
2330 | 2330 | print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); |
2331 | 2331 | print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); |
2332 | 2332 | print '</td></tr>'; |
@@ -2355,12 +2355,12 @@ discard block |
||
2355 | 2355 | |
2356 | 2356 | // Phone / Fax |
2357 | 2357 | print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>'; |
2358 | - print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td>'; |
|
2358 | + print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td>'; |
|
2359 | 2359 | if ($conf->browser->layout == 'phone') { |
2360 | 2360 | print '</tr><tr>'; |
2361 | 2361 | } |
2362 | 2362 | print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>'; |
2363 | - print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>'; |
|
2363 | + print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>'; |
|
2364 | 2364 | print '</tr>'; |
2365 | 2365 | |
2366 | 2366 | // Web |
@@ -2490,7 +2490,7 @@ discard block |
||
2490 | 2490 | |
2491 | 2491 | // VAT reverse charge by default |
2492 | 2492 | if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) { |
2493 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
2493 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
2494 | 2494 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
2495 | 2495 | print '</td></tr>'; |
2496 | 2496 | } |
@@ -2531,7 +2531,7 @@ discard block |
||
2531 | 2531 | print '</tr>'; |
2532 | 2532 | |
2533 | 2533 | // Type - Workforce/Staff |
2534 | - print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'; |
|
2534 | + print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.(($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'; |
|
2535 | 2535 | print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); |
2536 | 2536 | if ($user->admin) { |
2537 | 2537 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
@@ -2667,7 +2667,7 @@ discard block |
||
2667 | 2667 | $maxfilesizearray = getMaxFileSizeArray(); |
2668 | 2668 | $maxmin = $maxfilesizearray['maxmin']; |
2669 | 2669 | if ($maxmin > 0) { |
2670 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2670 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2671 | 2671 | } |
2672 | 2672 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
2673 | 2673 | print '</td></tr>'; |
@@ -2882,7 +2882,7 @@ discard block |
||
2882 | 2882 | print '<tr><td>'; |
2883 | 2883 | print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc')); |
2884 | 2884 | print '</td><td>'; |
2885 | - print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>'; |
|
2885 | + print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>'; |
|
2886 | 2886 | print '</td>'; |
2887 | 2887 | print '</tr>'; |
2888 | 2888 | } |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | } |
627 | 627 | |
628 | 628 | |
629 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
629 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
630 | 630 | /** |
631 | 631 | * Update link between vat payment and line in llx_bank generated |
632 | 632 | * |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | */ |
636 | 636 | public function update_fk_bank($id_bank) |
637 | 637 | { |
638 | - // phpcs:enable |
|
638 | + // phpcs:enable |
|
639 | 639 | $sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); |
640 | 640 | |
641 | 641 | dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | return $this->LibStatut($this->statut, $mode); |
661 | 661 | } |
662 | 662 | |
663 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
663 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
664 | 664 | /** |
665 | 665 | * Return the label of a given status |
666 | 666 | * |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | */ |
671 | 671 | public function LibStatut($status, $mode = 0) |
672 | 672 | { |
673 | - // phpcs:enable |
|
673 | + // phpcs:enable |
|
674 | 674 | global $langs; |
675 | 675 | |
676 | 676 | $langs->load('compta'); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'loanlist'; // To manage different context of search |
63 | 63 | $optioncss = GETPOST('optioncss', 'alpha'); |
64 | -$mode = GETPOST('mode', 'alpha'); // mode view result |
|
64 | +$mode = GETPOST('mode', 'alpha'); // mode view result |
|
65 | 65 | |
66 | 66 | $permissiontoadd = $user->hasRight('loan', 'write'); |
67 | 67 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $form = new Form($db); |
106 | 106 | $now = dol_now(); |
107 | 107 | |
108 | -$help_url="EN:Module_Loan|FR:Module_Emprunt"; |
|
108 | +$help_url = "EN:Module_Loan|FR:Module_Emprunt"; |
|
109 | 109 | $help_url = ''; |
110 | 110 | $title = $langs->trans('Loans'); |
111 | 111 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | print '<div class="box-flex-container kanban">'; |
320 | 320 | } |
321 | 321 | // Output Kanban |
322 | - $object->datestart= $obj->datestart; |
|
322 | + $object->datestart = $obj->datestart; |
|
323 | 323 | $object->dateend = $obj->dateend; |
324 | 324 | $object->capital = $obj->capital; |
325 | 325 | $object->totalpaid = $obj->paid; |
@@ -124,14 +124,14 @@ |
||
124 | 124 | return $this->binaryOpManipulator->matchFirstAndSecondConditionNode( |
125 | 125 | $booleanAnd, |
126 | 126 | // $conf->global == $value |
127 | - function (Node $node): bool { |
|
127 | + function(Node $node): bool { |
|
128 | 128 | if (!$node instanceof Equal) { |
129 | 129 | return \false; |
130 | 130 | } |
131 | 131 | return $this->isGlobalVar($node->left); |
132 | 132 | }, |
133 | 133 | // !empty(...) || isset(...) |
134 | - function (Node $node): bool { |
|
134 | + function(Node $node): bool { |
|
135 | 135 | if ($node instanceof BooleanNot && $node->expr instanceof Empty_) { |
136 | 136 | return $this->isGlobalVar($node->expr->expr); |
137 | 137 | } |
@@ -6,16 +6,16 @@ |
||
6 | 6 | use Rector\Core\ValueObject\PhpVersion; |
7 | 7 | use Rector\Set\ValueObject\LevelSetList; |
8 | 8 | |
9 | -return static function (RectorConfig $rectorConfig): void { |
|
9 | +return static function(RectorConfig $rectorConfig): void { |
|
10 | 10 | $rectorConfig->phpVersion(PhpVersion::PHP_71); |
11 | 11 | $rectorConfig->paths([ |
12 | - __DIR__ . '/../../../htdocs/', |
|
13 | - __DIR__ . '/../../../scripts', |
|
14 | - __DIR__ . '/../../../test', |
|
12 | + __DIR__.'/../../../htdocs/', |
|
13 | + __DIR__.'/../../../scripts', |
|
14 | + __DIR__.'/../../../test', |
|
15 | 15 | ]); |
16 | 16 | $rectorConfig->skip([ |
17 | - __DIR__ . '/../../../htdocs/includes/*', |
|
18 | - __DIR__ . '/../../../htdocs/install/doctemplates/*' |
|
17 | + __DIR__.'/../../../htdocs/includes/*', |
|
18 | + __DIR__.'/../../../htdocs/install/doctemplates/*' |
|
19 | 19 | ]); |
20 | 20 | $rectorConfig->parallel(240); |
21 | 21 |