Add STATUS_OPEN_INTERNAL to stock change/move pages
This commit is contained in:
parent
c911f906c8
commit
fbdc0c25e3
@ -21,6 +21,7 @@
|
||||
* \brief Fichier de la classe des fonctions predefinie de composants html
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
|
||||
/**
|
||||
* Class with static methods for building HTML components related to products
|
||||
@ -168,7 +169,7 @@ class FormProduct
|
||||
*
|
||||
* @param int $selected Id of preselected warehouse ('' for no value, 'ifone'=select value if one value otherwise no value)
|
||||
* @param string $htmlname Name of html select html
|
||||
* @param string $filtertype For filter, additional filter on status other then 1
|
||||
* @param string $filterstatus For filter, additional filter on status other then 1 (open_all). No filter when empty
|
||||
* @param int $empty 1=Can be empty, 0 if not
|
||||
* @param int $disabled 1=Select is disabled
|
||||
* @param int $fk_product Add quantity of stock in label for product with id fk_product. Nothing if 0.
|
||||
@ -181,15 +182,15 @@ class FormProduct
|
||||
* @param int $showfullpath 1=Show full path of name (parent ref into label), 0=Show only ref of current warehouse
|
||||
* @return string HTML select
|
||||
*/
|
||||
function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='minwidth200', $exclude='', $showfullpath=1)
|
||||
function selectWarehouses($selected='',$htmlname='idwarehouse',$filterstatus='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='minwidth200', $exclude='', $showfullpath=1)
|
||||
{
|
||||
global $conf,$langs,$user;
|
||||
|
||||
dol_syslog(get_class($this)."::selectWarehouses $selected, $htmlname, $filtertype, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss",LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::selectWarehouses $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss",LOG_DEBUG);
|
||||
|
||||
$out='';
|
||||
|
||||
$this->loadWarehouses($fk_product, '', + $filtertype, true, $exclude); // filter on numeric status
|
||||
if (empty($conf->global->ENTREPOT_EXTRA_STATUS)) $filterstatus = '';
|
||||
$this->loadWarehouses($fk_product, '', + $filterstatus, true, $exclude); // filter on numeric status
|
||||
$nbofwarehouses=count($this->cache_warehouses);
|
||||
|
||||
if ($conf->use_javascript_ajax && ! $forcecombo)
|
||||
|
||||
@ -383,11 +383,11 @@ if ($conf->productbatch->enabled)
|
||||
}
|
||||
// In warehouse
|
||||
print '<td>';
|
||||
print $formproduct->selectWarehouses($id_sw, 'id_sw', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp');
|
||||
print $formproduct->selectWarehouses($id_sw, 'id_sw', Entrepot::STATUS_OPEN_INTERNAL, 1, 0, 0, '', 0, 0, array(), 'minwidth200imp');
|
||||
print '</td>';
|
||||
// Out warehouse
|
||||
print '<td>';
|
||||
print $formproduct->selectWarehouses($id_tw, 'id_tw', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp');
|
||||
print $formproduct->selectWarehouses($id_tw, 'id_tw', Entrepot::STATUS_OPEN_INTERNAL, 1, 0, 0, '', 0, 0, array(), 'minwidth200imp');
|
||||
print '</td>';
|
||||
// Qty
|
||||
print '<td align="center"><input type="text" size="3" class="flat" name="qty" value="'.$qty.'"></td>';
|
||||
|
||||
@ -791,7 +791,7 @@ if ($resql)
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', Entrepot::STATUS_OPEN_INTERNAL, 1, 0, 0, '', 0, 0, null, 'maxwidth200');
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['m.fk_user_author']['checked']))
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
{
|
||||
print '<td width="20%" class="fieldrequired" colspan="2">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td width="20%">';
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', '', 1, 0, 0, '', 0, 0, null, 'minwidth100');
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', Entrepot::STATUS_OPEN_INTERNAL, 1, 0, 0, '', 0, 0, null, 'minwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
{
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
|
||||
print '<td width="15%">';
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')),'id_entrepot','',1);
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', Entrepot::STATUS_OPEN_INTERNAL, 1);
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td width="15%">';
|
||||
print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'),'id_entrepot_destination','',1);
|
||||
print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', Entrepot::STATUS_OPEN_INTERNAL, 1);
|
||||
print '</td>';
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="15%"><input type="text" class="flat" name="nbpiece" size="10" value="'.dol_escape_htmltag(GETPOST("nbpiece")).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user