@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | return $this->LibStatut(0, $mode); |
1063 | 1063 | } |
1064 | 1064 | |
1065 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1065 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1066 | 1066 | /** |
1067 | 1067 | * Return label of a given status |
1068 | 1068 | * |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | */ |
1073 | 1073 | public function LibStatut($status, $mode = 0) |
1074 | 1074 | { |
1075 | - // phpcs:enable |
|
1075 | + // phpcs:enable |
|
1076 | 1076 | //global $langs; |
1077 | 1077 | |
1078 | 1078 | //$langs->load('stocks'); |
@@ -1030,7 +1030,7 @@ |
||
1030 | 1030 | $obj = $this->db->fetch_object($result); |
1031 | 1031 | $this->stats_mo['customers_' . $role] = $obj->nb_customers ? $obj->nb_customers : 0; |
1032 | 1032 | $this->stats_mo['nb_' . $role] = $obj->nb ? $obj->nb : 0; |
1033 | - $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
1033 | + $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
1034 | 1034 | } else { |
1035 | 1035 | $this->error = $this->db->error(); |
1036 | 1036 | $error++; |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
18 | 18 | */ |
19 | 19 | |
20 | - use Luracast\Restler\RestException; |
|
20 | + use Luracast\Restler\RestException; |
|
21 | 21 | |
22 | - require_once constant('DOL_DOCUMENT_ROOT') . '/product/stock/class/entrepot.class.php'; |
|
23 | - require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/product.class.php'; |
|
22 | + require_once constant('DOL_DOCUMENT_ROOT') . '/product/stock/class/entrepot.class.php'; |
|
23 | + require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/product.class.php'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * API class for warehouses |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | } |
263 | 263 | |
264 | 264 | |
265 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
265 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
266 | 266 | /** |
267 | 267 | * Clean sensible object datas |
268 | 268 | * |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | protected function _cleanObjectDatas($object) |
273 | 273 | { |
274 | - // phpcs:enable |
|
274 | + // phpcs:enable |
|
275 | 275 | $object = parent::_cleanObjectDatas($object); |
276 | 276 | |
277 | 277 | // Remove the subscriptions because they are handled as a subresource. |
@@ -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']++; |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | return $this->LibStatut($this->status, $mode); |
856 | 856 | } |
857 | 857 | |
858 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
858 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
859 | 859 | /** |
860 | 860 | * Return the status |
861 | 861 | * |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | */ |
866 | 866 | public function LibStatut($status, $mode = 0) |
867 | 867 | { |
868 | - // phpcs:enable |
|
868 | + // phpcs:enable |
|
869 | 869 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
870 | 870 | global $langs; |
871 | 871 | //$langs->load("stocktransfer@stocktransfer"); |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | return $this->LibStatut($this->status, $mode); |
856 | 856 | } |
857 | 857 | |
858 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
858 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
859 | 859 | /** |
860 | 860 | * Return the status |
861 | 861 | * |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | */ |
866 | 866 | public function LibStatut($status, $mode = 0) |
867 | 867 | { |
868 | - // phpcs:enable |
|
868 | + // phpcs:enable |
|
869 | 869 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
870 | 870 | global $langs; |
871 | 871 | //$langs->load("stocktransfer@stocktransfer"); |
@@ -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 |