@@ -55,7 +55,7 @@ |
||
55 | 55 | // Load object |
56 | 56 | include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
57 | 57 | |
58 | -$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice |
|
58 | +$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice |
|
59 | 59 | |
60 | 60 | // Security check |
61 | 61 | if ($user->socid) { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $search_date_endday = GETPOSTINT('search_date_endday'); |
63 | 63 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
64 | 64 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
65 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
65 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
66 | 66 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
67 | 67 | $search_company = GETPOST('search_company', 'alpha'); |
68 | 68 | $search_payment_type = GETPOST('search_payment_type', 'alpha'); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'p.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70), |
111 | 111 | ); |
112 | 112 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
113 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
113 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
114 | 114 | |
115 | 115 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
116 | 116 | $hookmanager->initHooks(array('paymentsupplierlist')); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture_fourn AS f ON f.rowid = pf.fk_facturefourn'; |
208 | 208 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON s.rowid = f.fk_soc'; |
209 | 209 | |
210 | -$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')'; // TODO We should use p.entity that does not exists yet in this table |
|
210 | +$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')'; // TODO We should use p.entity that does not exists yet in this table |
|
211 | 211 | if ($socid > 0) { |
212 | 212 | $sql .= " AND EXISTS (SELECT f.fk_soc FROM " . MAIN_DB_PREFIX . "facture_fourn as f, " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as pf"; |
213 | 213 | $sql .= " WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = " . ((int) $socid) . ")"; |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $idprod = GETPOSTINT('idprod'); |
447 | 447 | } |
448 | 448 | |
449 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
449 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
450 | 450 | |
451 | 451 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
452 | 452 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1250 | 1250 | $object->fk_account = GETPOSTINT('fk_account'); |
1251 | 1251 | $object->note_private = GETPOST('note_private', 'restricthtml'); |
1252 | - $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
1252 | + $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
1253 | 1253 | $object->delivery_date = $datelivraison; |
1254 | 1254 | $object->fk_incoterms = GETPOSTINT('incoterm_id'); |
1255 | 1255 | $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); |
@@ -1685,7 +1685,7 @@ discard block |
||
1685 | 1685 | $demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0)); |
1686 | 1686 | //$remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_supplier_percent) ? $soc->remise_supplier_percent : 0)); |
1687 | 1687 | //$remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); |
1688 | - $dateinvoice = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : ''; |
|
1688 | + $dateinvoice = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : ''; |
|
1689 | 1689 | |
1690 | 1690 | $datedelivery = (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : ''); |
1691 | 1691 | |
@@ -1801,7 +1801,7 @@ discard block |
||
1801 | 1801 | // Payment term |
1802 | 1802 | print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>'; |
1803 | 1803 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
1804 | - print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
1804 | + print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
1805 | 1805 | print '</td></tr>'; |
1806 | 1806 | |
1807 | 1807 | // Payment mode |
@@ -2051,7 +2051,7 @@ discard block |
||
2051 | 2051 | 'morecss' => 'minwidth300' |
2052 | 2052 | ) |
2053 | 2053 | ); |
2054 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . "?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
2054 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . "?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
2055 | 2055 | } |
2056 | 2056 | |
2057 | 2057 | // Confirmation of cancellation |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | accessforbidden(); |
103 | 103 | } |
104 | 104 | |
105 | -$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
106 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
105 | +$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
106 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
107 | 107 | |
108 | 108 | |
109 | 109 | /* |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { |
630 | 630 | $disabled = 0; |
631 | 631 | }*/ |
632 | - $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
632 | + $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
633 | 633 | |
634 | 634 | // Line of orders |
635 | 635 | if ($object->statut <= CommandeFournisseur::STATUS_ACCEPTED || $object->statut >= CommandeFournisseur::STATUS_CANCELED) { |
@@ -85,8 +85,8 @@ |
||
85 | 85 | // Init Hooks |
86 | 86 | $hookmanager->initHooks(array('ordersuppliercardinfo')); |
87 | 87 | |
88 | -$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
89 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
88 | +$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
89 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
90 | 90 | |
91 | 91 | |
92 | 92 | /* |
@@ -52,8 +52,8 @@ |
||
52 | 52 | |
53 | 53 | $object = new CommandeFournisseur($db); |
54 | 54 | |
55 | -$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
56 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
55 | +$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
56 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
57 | 57 | |
58 | 58 | /* |
59 | 59 | * Actions |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $search_date_order_endday = GETPOSTINT('search_date_order_endday'); |
68 | 68 | $search_date_order_endmonth = GETPOSTINT('search_date_order_endmonth'); |
69 | 69 | $search_date_order_endyear = GETPOSTINT('search_date_order_endyear'); |
70 | -$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
70 | +$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
71 | 71 | $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear); |
72 | 72 | |
73 | 73 | $search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday'); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday'); |
77 | 77 | $search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth'); |
78 | 78 | $search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear'); |
79 | -$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
79 | +$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
80 | 80 | $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); |
81 | 81 | |
82 | 82 | $search_date_valid_startday = GETPOSTINT('search_date_valid_startday'); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $search_date_valid_endday = GETPOSTINT('search_date_valid_endday'); |
86 | 86 | $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth'); |
87 | 87 | $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear'); |
88 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
88 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
89 | 89 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
90 | 90 | |
91 | 91 | $search_date_approve_startday = GETPOSTINT('search_date_approve_startday'); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $search_date_approve_endday = GETPOSTINT('search_date_approve_endday'); |
95 | 95 | $search_date_approve_endmonth = GETPOSTINT('search_date_approve_endmonth'); |
96 | 96 | $search_date_approve_endyear = GETPOSTINT('search_date_approve_endyear'); |
97 | -$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
97 | +$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
98 | 98 | $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear); |
99 | 99 | |
100 | 100 | $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | $object->fields = dol_sort_array($object->fields, 'position'); |
215 | 215 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
216 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
216 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
217 | 217 | |
218 | 218 | $error = 0; |
219 | 219 | |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | } else { |
734 | 734 | $db->rollback(); |
735 | 735 | $action = 'create'; |
736 | - $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
736 | + $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
737 | 737 | $_GET["originid"] = $_POST["originid"]; // Keep this ? |
738 | 738 | setEventMessages("Error", null, 'errors'); |
739 | 739 | $error++; |
@@ -1240,7 +1240,7 @@ discard block |
||
1240 | 1240 | |
1241 | 1241 | $topicmail = "SendOrderRef"; |
1242 | 1242 | $modelmail = "order_supplier_send"; |
1243 | - $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
1243 | + $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
1244 | 1244 | $trackid = 'sord' . $object->id; |
1245 | 1245 | include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php'; |
1246 | 1246 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | // Permissions |
58 | 58 | $permissionnote = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); // Used by the include of actions_setnotes.inc.php |
59 | 59 | $usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
60 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
60 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
61 | 61 | |
62 | 62 | |
63 | 63 | /* |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $previoushash = ''; |
158 | 158 | $firstid = ''; |
159 | 159 | |
160 | - if (! (GETPOSTINT('yeartoexport') > 0)) { |
|
160 | + if (!(GETPOSTINT('yeartoexport') > 0)) { |
|
161 | 161 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Year")), null, "errors"); |
162 | 162 | $error++; |
163 | 163 | } else { |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | |
582 | 582 | // Link to source object |
583 | 583 | print '<td class="tdoverflowmax150"' . (preg_match('/<a/', $object_link) ? '' : 'title="' . dol_escape_htmltag(dol_string_nohtmltag($object_link . ' - ' . $object_link_title)) . '"') . '>'; |
584 | - print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text |
|
584 | + print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text |
|
585 | 585 | print $object_link; |
586 | 586 | print '</td>'; |
587 | 587 |