diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a99ab7b2bde..bce58b32816 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2861,9 +2861,10 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0 * @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value. * @param string $moretabssuffix A suffix to use when you have several dol_get_fiche_head() in same page * @param int $dragdropfile 0 (default) or 1. 1 enable a drop zone for file to be upload, 0 disable it + * @param string $morecssdiv More CSS on the div * @return string */ -function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '', $dragdropfile = 0) +function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '', $dragdropfile = 0, $morecssdiv = '') { global $conf, $langs, $hookmanager; @@ -3024,6 +3025,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab if (!$notab || $notab == -1 || $notab == -2 || $notab == -3 || $notab == -4) { $out .= "\n".'
'."\n"; } if (!empty($dragdropfile)) { diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 26f8cdeb4f8..f19940d0767 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -899,36 +899,27 @@ if ($order_id > 0 || !empty($ref)) { print ''; print ''; print ''; - //print ''; $langs->load("stocks"); - //print ''; + print '
'; if (isModEnabled('stock')) { - //print '
'; - //print ''; } - //print ''; - - //print "
'; print $langs->trans("WarehouseSource"); - //print ''; - print $formproduct->selectWarehouses(!empty($object->warehouse_id) ? $object->warehouse_id : 'ifone', 'entrepot_id', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200'); + print $formproduct->selectWarehouses(empty($object->warehouse_id) ? 'ifone' : $object->warehouse_id, 'entrepot_id', '', 1, 0, 0, $langs->trans("Any"), 0, 0, array(), 'minwidth200'); if (count($formproduct->cache_warehouses) <= 0) { print '   '.$langs->trans("WarehouseSourceNotDefined").' '.$langs->trans("AddOne").''; } - //print ''; - print ''; + print ''; if ($toBeShippedTotal <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); } - //print '
"; + print '

'; + print '
'; print "\n"; print ''; - - $somethingshown = 1; } else { print '
'; print ''.$langs->trans("CreateShipment").''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 82463205ccd..c66a7bb02de 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1367,3 +1367,4 @@ ClickOnPlusToCreateOne=Click the "Plus" button to add one. Free=Free ShowAsConversation=Show as conversation list MessageListViewType=Show as table list +Any=Any diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 3ba4c52ef0d..63c23c4f77f 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -283,10 +283,10 @@ class FormProduct * 'warehouseopen' = select products from open warehouses, * 'warehouseclosed' = select products from closed warehouses, * 'warehouseinternal' = select products from warehouses for internal correct/transfer only - * @param int<0,1> $empty 1=Can be empty, 0 if not + * @param int<0,1>|string $empty Use 1 or 'label'=Can be empty, 0 if not * @param int<0,1> $disabled 1=Select is disabled * @param int $fk_product Add quantity of stock in label for product with id fk_product. Nothing if 0. - * @param string $empty_label Empty label if needed (only if $empty=1) + * @param string $empty_label Empty label if needed (deprecated, set the label into the field $empty) * @param int<0,1> $showstock 1=Show stock count * @param int<0,1> $forcecombo 1=Force combo iso ajax select2 * @param array}> $events Events to add to select2 @@ -341,7 +341,7 @@ class FormProduct //$out .= ' placeholder="todo"'; // placeholder for select2 must be added by setting the id+placeholder js param when calling select2 $out .= '>'; if ($empty) { - $out .= ''; + $out .= ''; } foreach ($this->cache_warehouses as $id => $arraytypes) { $label = ''; diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index fb4878b5f08..19d23ff7b5d 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -46,7 +46,7 @@ if (empty($conf) || !is_object($conf)) { ?> - + trans("StockCorrection"), '', 'generic'); print '
'."\n"; -print dol_get_fiche_head(); +print dol_get_fiche_head(array(), '', '', 0, '', 0, '', '', 0, '', 0, 'marginbottomonly'); print ''; print ''; @@ -277,6 +277,8 @@ print '     '; print ''; print '
'; +print '
'; + print ''; ?> diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 601e1be3c6f..35bad85a584 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -45,7 +45,7 @@ if (empty($conf) || !is_object($conf)) { ?> - + element == 'product') { @@ -76,7 +76,7 @@ print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); print '
'."\n"; -print dol_get_fiche_head(); +print dol_get_fiche_head(array(), '', '', 0, '', 0, '', '', 0, '', 0, 'marginbottomonly'); print ''; print ''; @@ -168,6 +168,8 @@ print '     '; print ''; print ''; +print '
'; + print '
'; ?>