@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | if ($productid > 0) { |
| 156 | 156 | $sql .= " AND ps.fk_product = " . ((int) $productid); |
| 157 | 157 | } |
| 158 | - if (! empty($search_fk_warehouse)) { |
|
| 158 | + if (!empty($search_fk_warehouse)) { |
|
| 159 | 159 | $sql .= " AND ps.fk_entrepot IN (" . $db->sanitize(implode(",", $search_fk_warehouse)) . ")"; |
| 160 | 160 | } |
| 161 | 161 | if ($search_ref) { |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | |
| 566 | 566 | if ($mode == 'future') { |
| 567 | 567 | $prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0, $dateendofday); |
| 568 | - $stock = $prod->stock_theorique; // virtual stock at a date |
|
| 568 | + $stock = $prod->stock_theorique; // virtual stock at a date |
|
| 569 | 569 | $prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0); |
| 570 | 570 | $virtualstock = $prod->stock_theorique; // virtual stock in infinite future |
| 571 | 571 | } else { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | // Default sort order (if not yet defined by previous GETPOST) |
| 77 | 77 | if (!$sortfield) { |
| 78 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 78 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 79 | 79 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
| 80 | 80 | } |
| 81 | 81 | if (!$sortorder) { |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | // Output page |
| 346 | 346 | // -------------------------------------------------------------------- |
| 347 | 347 | |
| 348 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 348 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 349 | 349 | |
| 350 | 350 | // Example : Adding jquery code |
| 351 | 351 | // print '<script type="text/javascript"> |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | } 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'])) { |
| 564 | 564 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
| 565 | 565 | } |
| 566 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 566 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 567 | 567 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
| 568 | 568 | 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"; |
| 569 | 569 | $totalarray['nbfield']++; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $confirm = GETPOST('confirm', 'alpha'); |
| 52 | 52 | $cancel = GETPOST('cancel', 'aZ09'); |
| 53 | 53 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
| 54 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 54 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 55 | 55 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
| 56 | 56 | $qty = GETPOSTINT('qty'); |
| 57 | 57 | $fk_product = GETPOSTINT('fk_product'); |
@@ -538,28 +538,28 @@ discard block |
||
| 538 | 538 | $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
| 539 | 539 | } elseif ($action == 'destock') { // Destock confirmation |
| 540 | 540 | // Create an array for form |
| 541 | - $formquestion = array( 'text' => '', |
|
| 541 | + $formquestion = array('text' => '', |
|
| 542 | 542 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40), |
| 543 | 543 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 544 | 544 | ); |
| 545 | 545 | $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1); |
| 546 | 546 | } elseif ($action == 'destockcancel') { // Destock confirmation cancel |
| 547 | 547 | // Create an array for form |
| 548 | - $formquestion = array( 'text' => '', |
|
| 548 | + $formquestion = array('text' => '', |
|
| 549 | 549 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40), |
| 550 | 550 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 551 | 551 | ); |
| 552 | 552 | $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1); |
| 553 | 553 | } elseif ($action == 'addstock') { // Addstock confirmation |
| 554 | 554 | // Create an array for form |
| 555 | - $formquestion = array( 'text' => '', |
|
| 555 | + $formquestion = array('text' => '', |
|
| 556 | 556 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40), |
| 557 | 557 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 558 | 558 | ); |
| 559 | 559 | $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1); |
| 560 | 560 | } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel |
| 561 | 561 | // Create an array for form |
| 562 | - $formquestion = array( 'text' => '', |
|
| 562 | + $formquestion = array('text' => '', |
|
| 563 | 563 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40), |
| 564 | 564 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 565 | 565 | ); |
@@ -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++; |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | /** |
| 167 | 167 | * Warehouse open and any operations are allowed, but warehouse is not included into calculation of stock. |
| 168 | 168 | */ |
| 169 | - const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
| 169 | + const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | 'skip_batch' => &$skip_batch, |
| 220 | 220 | 'id_product_batch' => &$id_product_batch |
| 221 | 221 | ); |
| 222 | - $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
| 222 | + $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
| 223 | 223 | |
| 224 | 224 | if ($reshook < 0) { |
| 225 | 225 | if (!empty($hookmanager->resPrint)) { |
@@ -708,8 +708,8 @@ discard block |
||
| 708 | 708 | $this->price = $obj->price; |
| 709 | 709 | $this->fk_user_author = $obj->fk_user_author; |
| 710 | 710 | $this->label = $obj->label; |
| 711 | - $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
| 712 | - $this->origintype = $obj->origin_type; // For backward compatibility |
|
| 711 | + $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
| 712 | + $this->origintype = $obj->origin_type; // For backward compatibility |
|
| 713 | 713 | $this->origin_id = $obj->origin_id; |
| 714 | 714 | $this->origin_type = $obj->origin_type; |
| 715 | 715 | $this->inventorycode = $obj->inventorycode; |
@@ -944,8 +944,8 @@ discard block |
||
| 944 | 944 | } else { // product_batch record not found |
| 945 | 945 | $pdluo->fk_product_stock = $vfk_product_stock; |
| 946 | 946 | $pdluo->qty = $qty; |
| 947 | - $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
| 948 | - $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
| 947 | + $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
| 948 | + $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
| 949 | 949 | $pdluo->batch = $vbatchnumber; |
| 950 | 950 | |
| 951 | 951 | $result = $pdluo->create($user, 1); |
@@ -324,7 +324,7 @@ |
||
| 324 | 324 | $hook = array(); |
| 325 | 325 | foreach ($fields as $field) { |
| 326 | 326 | if (!isset($data[$field])) { |
| 327 | - throw new RestException(400, $field." field missing"); |
|
| 327 | + throw new RestException(400, $field . " field missing"); |
|
| 328 | 328 | } |
| 329 | 329 | $hook[$field] = $data[$field]; |
| 330 | 330 | } |
@@ -202,7 +202,7 @@ |
||
| 202 | 202 | $i++; |
| 203 | 203 | |
| 204 | 204 | if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { |
| 205 | - $keyforprovider = ''; // @BUG This must be set |
|
| 205 | + $keyforprovider = ''; // @BUG This must be set |
|
| 206 | 206 | |
| 207 | 207 | // Token |
| 208 | 208 | print '<tr class="oddeven">'; |
@@ -39,13 +39,13 @@ |
||
| 39 | 39 | // Get parameters |
| 40 | 40 | $id = GETPOSTINT('id'); |
| 41 | 41 | $ref = GETPOST('ref', 'alpha'); |
| 42 | -$lineid = GETPOSTINT('lineid'); |
|
| 42 | +$lineid = GETPOSTINT('lineid'); |
|
| 43 | 43 | |
| 44 | 44 | $action = GETPOST('action', 'aZ09'); |
| 45 | 45 | $confirm = GETPOST('confirm', 'alpha'); |
| 46 | 46 | $cancel = GETPOST('cancel', 'aZ09'); |
| 47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
| 48 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 48 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
| 50 | 50 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 51 | 51 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |