diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 9b2ad20dd28..6f626e40244 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -677,17 +677,15 @@ class FormProduct * Return select list of productbatch status * * @param string $selected Id or Code of preselected incoterm - * @param string $page Defined the form action * @param string $htmlname Name of html select object * @param string $htmloption Options html on select object - * @param int $forcecombo Force to load all values and output a standard combobox (with no beautification) * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return string HTML string with select and input */ - public function select_productbatch_qcstatus($selected = '', $page = '', $htmlname = 'fk_qcstatus', $htmloption = '', $forcecombo = 1, $events = array()) + public function selectProductbatchQcstatus($selected = '', $htmlname = 'fk_qcstatus', $htmloption = '', $forcecombo = 0, $events = array()) { // phpcs:enable - global $conf, $langs; + global $conf, $langs, $user; $langs->load("dict"); @@ -707,11 +705,11 @@ class FormProduct $out .= ajax_combobox($htmlname, $events); } - if (!empty($page)) { + /* if (!empty($page)) { $out .= '
'; $out .= ''; $out .= ''; - } + } */ $out .= ''; - // if ($user->admin) { + if ($user->admin) { $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - // } + } - if (!empty($page)) { + /* if (!empty($page)) { $out .= '
'; - } + } */ } else { dol_print_error($this->db); } diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index e19d2f7b9e6..5dacea42801 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -512,7 +512,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''; print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'string').''; print ''; - print ''; + /* print ''; print ''; print $form->editfieldkey("Status", 'fk_qcstatus', $object->fk_qcstatus, $object, $user->rights->stock->creer); print ''; @@ -526,7 +526,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } print $formproduct->select_productbatch_qcstatus($fk_qcstatus,'?id='.$object->id); } - print ''; + print ''; */ } // Other attributes diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index dcd19be4ad6..42a6f992fb8 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -89,8 +89,21 @@ if ($object->element == 'stock') { print ''.$langs->trans("WarehouseTarget").''; print img_picto('', 'stock').$formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); print ''; -print ''.$langs->trans("NumberOfUnit").''; -print ''; +print ''.$langs->trans("NumberOfUnit").''; +// print ''; +// print ''; +print ''.$langs->trans("StatusChangeIfNeeded").''; +print ''; +// if ($action != 'editfk_qcstatus') { + $formproduct->load_cache_productbatch_qcstatus(); + // print $formproduct->cache_productbatch_qcstatus[$object->fk_qcstatus]; +/* } else { +if (empty($fk_qcstatus)) { + $fk_qcstatus = $object->fk_qcstatus; +} */ +print $formproduct->selectProductbatchQcstatus('-1','fk_qcstatus'); +// } +print ''; // Serial / Eat-by date if (!empty($conf->productbatch->enabled) &&