@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1); |
155 | 155 | |
156 | - if ($action == 'seteatby' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
156 | + if ($action == 'seteatby' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
157 | 157 | $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('eatbymonth'), GETPOSTINT('eatbyday'), GETPOSTINT('eatbyyear')); |
158 | 158 | |
159 | 159 | // check parameters |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | - if ($action == 'setsellby' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
181 | + if ($action == 'setsellby' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
182 | 182 | $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('sellbymonth'), GETPOSTINT('sellbyday'), GETPOSTINT('sellbyyear')); |
183 | 183 | |
184 | 184 | // check parameters |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
206 | - if ($action == 'seteol_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
206 | + if ($action == 'seteol_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
207 | 207 | $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('eol_datemonth'), GETPOSTINT('eol_dateday'), GETPOSTINT('eol_dateyear')); |
208 | 208 | $result = $object->setValueFrom('eol_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
209 | 209 | if ($result < 0) { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
217 | - if ($action == 'setmanufacturing_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
217 | + if ($action == 'setmanufacturing_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
218 | 218 | $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('manufacturing_datemonth'), GETPOSTINT('manufacturing_dateday'), GETPOSTINT('manufacturing_dateyear')); |
219 | 219 | $result = $object->setValueFrom('manufacturing_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
220 | 220 | if ($result < 0) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | - if ($action == 'setscrapping_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
228 | + if ($action == 'setscrapping_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
229 | 229 | $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('scrapping_datemonth'), GETPOSTINT('scrapping_dateday'), GETPOSTINT('scrapping_dateyear')); |
230 | 230 | $result = $object->setValueFrom('scrapping_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
231 | 231 | if ($result < 0) { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | } */ |
249 | 249 | |
250 | - if ($action == 'setqc_frequency' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) { |
|
250 | + if ($action == 'setqc_frequency' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) { |
|
251 | 251 | $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY'); |
252 | 252 | if ($result < 0) { // Prévoir un test de format de durée |
253 | 253 | setEventMessages($object->error, null, 'errors'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $confirm = GETPOST('confirm', 'alpha'); |
53 | 53 | $cancel = GETPOST('cancel', 'aZ09'); |
54 | 54 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
55 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
55 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
56 | 56 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
57 | 57 | $qty = GETPOSTINT('qty'); |
58 | 58 | $fk_product = GETPOSTINT('fk_product'); |
@@ -556,28 +556,28 @@ discard block |
||
556 | 556 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
557 | 557 | } elseif ($action == 'destock') { // Destock confirmation |
558 | 558 | // Create an array for form |
559 | - $formquestion = array( 'text' => '', |
|
559 | + $formquestion = array('text' => '', |
|
560 | 560 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40), |
561 | 561 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
562 | 562 | ); |
563 | 563 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1); |
564 | 564 | } elseif ($action == 'destockcancel') { // Destock confirmation cancel |
565 | 565 | // Create an array for form |
566 | - $formquestion = array( 'text' => '', |
|
566 | + $formquestion = array('text' => '', |
|
567 | 567 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40), |
568 | 568 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
569 | 569 | ); |
570 | 570 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1); |
571 | 571 | } elseif ($action == 'addstock') { // Addstock confirmation |
572 | 572 | // Create an array for form |
573 | - $formquestion = array( 'text' => '', |
|
573 | + $formquestion = array('text' => '', |
|
574 | 574 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40), |
575 | 575 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
576 | 576 | ); |
577 | 577 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1); |
578 | 578 | } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel |
579 | 579 | // Create an array for form |
580 | - $formquestion = array( 'text' => '', |
|
580 | + $formquestion = array('text' => '', |
|
581 | 581 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40), |
582 | 582 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
583 | 583 | ); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Default sort order (if not yet defined by previous GETPOST) |
79 | 79 | if (!$sortfield) { |
80 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
80 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
81 | 81 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
82 | 82 | } |
83 | 83 | if (!$sortorder) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | // Output page |
348 | 348 | // -------------------------------------------------------------------- |
349 | 349 | |
350 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
350 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
351 | 351 | |
352 | 352 | // Example : Adding jquery code |
353 | 353 | // print '<script type="text/javascript"> |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | } |
476 | 476 | |
477 | 477 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
478 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
478 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
479 | 479 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
480 | 480 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
481 | 481 | |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
567 | 567 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
568 | 568 | } |
569 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
569 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
570 | 570 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
571 | 571 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
572 | 572 | $totalarray['nbfield']++; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $object = new MouvementStock($db); |
121 | 121 | $extrafields = new ExtraFields($db); |
122 | 122 | $diroutputmassaction = $conf->stock->dir_output . '/temp/massgeneration/' . $user->id; |
123 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
123 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
124 | 124 | |
125 | 125 | $formfile = new FormFile($db); |
126 | 126 | |
@@ -1151,7 +1151,7 @@ discard block |
||
1151 | 1151 | } |
1152 | 1152 | |
1153 | 1153 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1154 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1154 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1155 | 1155 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1156 | 1156 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1157 | 1157 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | - $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price() |
|
118 | + $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price() |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | // Add price for costprice (at end) |
@@ -309,7 +309,7 @@ |
||
309 | 309 | include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php'; |
310 | 310 | |
311 | 311 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
312 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
312 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
313 | 313 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
314 | 314 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
315 | 315 |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | // Action clone object |
193 | 193 | if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd) { |
194 | 194 | $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid. |
195 | - '@phan-var-force FactureFournisseur $objectutil'; // Same object type for cloned object |
|
195 | + '@phan-var-force FactureFournisseur $objectutil'; // Same object type for cloned object |
|
196 | 196 | |
197 | 197 | if (GETPOST('newsupplierref', 'alphanohtml')) { |
198 | 198 | $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml'); |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | $db->begin(); |
779 | 779 | |
780 | 780 | $error = 0; |
781 | - $tmpproject = 0; // Ensure a value |
|
781 | + $tmpproject = 0; // Ensure a value |
|
782 | 782 | |
783 | 783 | // Fill array 'array_options' with data from add form |
784 | 784 | $ret = $extrafields->setOptionalsFromPost(null, $object); |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | $error++; |
787 | 787 | } |
788 | 788 | |
789 | - $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 |
|
789 | + $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 |
|
790 | 790 | $datedue = dol_mktime(0, 0, 0, GETPOSTINT('echmonth'), GETPOSTINT('echday'), GETPOSTINT('echyear'), 'tzserver'); |
791 | 791 | //var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour')); |
792 | 792 | //var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour')); |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); |
826 | 826 | $object->socid = GETPOSTINT('socid'); |
827 | 827 | $object->label = GETPOST('label', 'alphanohtml'); |
828 | - $object->libelle = $object->label; // deprecated |
|
828 | + $object->libelle = $object->label; // deprecated |
|
829 | 829 | $object->date = $dateinvoice; |
830 | 830 | $object->date_echeance = $datedue; |
831 | 831 | $object->note_public = GETPOST('note_public', 'restricthtml'); |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | $object->subtype = GETPOST('subtype', 'alphanohtml'); |
900 | 900 | $object->socid = GETPOSTINT('socid'); |
901 | 901 | $object->label = GETPOST('label', 'alphanohtml'); |
902 | - $object->libelle = $object->label; // Deprecated |
|
902 | + $object->libelle = $object->label; // Deprecated |
|
903 | 903 | $object->date = $dateinvoice; |
904 | 904 | $object->date_echeance = $datedue; |
905 | 905 | $object->note_public = GETPOST('note_public', 'restricthtml'); |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
1010 | 1010 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1011 | 1011 | $object->fk_account = GETPOSTINT('fk_account'); |
1012 | - $object->amount = (float) price2num(GETPOST('amount')); // FIXME: FactureFournisseur::$amount is deprecated and not used? |
|
1012 | + $object->amount = (float) price2num(GETPOST('amount')); // FIXME: FactureFournisseur::$amount is deprecated and not used? |
|
1013 | 1013 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
1014 | 1014 | //$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2); |
1015 | 1015 | $object->fk_incoterms = GETPOSTINT('incoterm_id'); |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
1070 | 1070 | $object->socid = GETPOSTINT('socid'); |
1071 | 1071 | $object->label = GETPOST('label', 'alphanohtml'); |
1072 | - $object->libelle = $object->label; // deprecated |
|
1072 | + $object->libelle = $object->label; // deprecated |
|
1073 | 1073 | $object->date = $dateinvoice; |
1074 | 1074 | $object->date_echeance = $datedue; |
1075 | 1075 | $object->note_public = GETPOST('note_public', 'restricthtml'); |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | 0, |
1296 | 1296 | $object->lines[0]->date_start, |
1297 | 1297 | $object->lines[0]->date_end, |
1298 | - array(), // array_options |
|
1298 | + array(), // array_options |
|
1299 | 1299 | 0, |
1300 | 1300 | 0, |
1301 | 1301 | '', |
@@ -1427,7 +1427,7 @@ discard block |
||
1427 | 1427 | // Edit line |
1428 | 1428 | $db->begin(); |
1429 | 1429 | |
1430 | - if (! $object->fetch($id) > 0) { |
|
1430 | + if (!$object->fetch($id) > 0) { |
|
1431 | 1431 | dol_print_error($db); |
1432 | 1432 | } |
1433 | 1433 | $object->fetch_thirdparty(); |
@@ -1580,7 +1580,7 @@ discard block |
||
1580 | 1580 | $idprod = GETPOSTINT('idprod'); |
1581 | 1581 | } |
1582 | 1582 | |
1583 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
1583 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
1584 | 1584 | |
1585 | 1585 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
1586 | 1586 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -2078,7 +2078,7 @@ discard block |
||
2078 | 2078 | // Mode creation |
2079 | 2079 | if ($action == 'create') { |
2080 | 2080 | $facturestatic = new FactureFournisseur($db); |
2081 | - $selectedLines = array(); // Ensure initialised |
|
2081 | + $selectedLines = array(); // Ensure initialised |
|
2082 | 2082 | |
2083 | 2083 | print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice'); |
2084 | 2084 | |
@@ -2273,7 +2273,7 @@ discard block |
||
2273 | 2273 | print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
2274 | 2274 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
2275 | 2275 | print '<input type="hidden" name="action" value="add">'; |
2276 | - 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 |
|
2276 | + 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 |
|
2277 | 2277 | |
2278 | 2278 | if (!empty($societe->id) && $societe->id > 0) { |
2279 | 2279 | print '<input type="hidden" name="socid" value="' . $societe->id . '">' . "\n"; |
@@ -4170,7 +4170,7 @@ discard block |
||
4170 | 4170 | } |
4171 | 4171 | |
4172 | 4172 | // Clone as predefined / Create template |
4173 | - if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->status == 0 && $usercancreate) { |
|
4173 | + if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->status == 0 && $usercancreate) { |
|
4174 | 4174 | if (!$objectidnext && count($object->lines) > 0) { |
4175 | 4175 | print '<a class="butAction" href="' . constant('BASE_URL') . '/fourn/facture/card-rec.php?facid=' . $object->id . '&action=create">' . $langs->trans("ChangeIntoRepeatableInvoice") . '</a>'; |
4176 | 4176 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $socid = $user->socid; |
50 | 50 | } |
51 | 51 | $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); |
52 | -$hookmanager->initHooks(array('invoicesuppliercardcontact','invoicesuppliercontactcard', 'globalcard')); |
|
52 | +$hookmanager->initHooks(array('invoicesuppliercardcontact', 'invoicesuppliercontactcard', 'globalcard')); |
|
53 | 53 | |
54 | 54 | $object = new FactureFournisseur($db); |
55 | 55 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $search_date_endday = GETPOSTINT('search_date_endday'); |
85 | 85 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
86 | 86 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
87 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
87 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
88 | 88 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
89 | 89 | $search_date_when_startday = GETPOSTINT('search_date_when_startday'); |
90 | 90 | $search_date_when_startmonth = GETPOSTINT('search_date_when_startmonth'); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $search_date_when_endday = GETPOSTINT('search_date_when_endday'); |
93 | 93 | $search_date_when_endmonth = GETPOSTINT('search_date_when_endmonth'); |
94 | 94 | $search_date_when_endyear = GETPOSTINT('search_date_when_endyear'); |
95 | -$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver |
|
95 | +$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver |
|
96 | 96 | $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear); |
97 | 97 | $search_recurring = GETPOST('search_recurring', 'intcomma'); |
98 | 98 | $search_frequency = GETPOST('search_frequency', 'alpha'); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $object->fields = dol_sort_array($object->fields, 'position'); |
165 | 165 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
166 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
166 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
167 | 167 | |
168 | 168 | if ($socid > 0) { |
169 | 169 | $tmpthirdparty = new Societe($db); |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | $massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge"))); |
539 | 539 | |
540 | 540 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
541 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
541 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
542 | 542 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
543 | 543 | //$selectedfields.=$form->showCheckAddButtons('checkforselect', 1); |
544 | 544 |