Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d1fe6a408c
@ -13,7 +13,7 @@ MenuNewPrivateIndividual=New private individual
|
||||
NewCompany=New company (prospect, customer, supplier)
|
||||
NewThirdParty=New third party (prospect, customer, supplier)
|
||||
CreateDolibarrThirdPartySupplier=Create a third party (supplier)
|
||||
CreateThirdPartyOnly=Create thirdpary
|
||||
CreateThirdPartyOnly=Create third party
|
||||
CreateThirdPartyAndContact=Create a third party + a child contact
|
||||
ProspectionArea=Prospection area
|
||||
IdThirdParty=Id third party
|
||||
|
||||
@ -62,16 +62,19 @@ DeStockOnShipment=Decrease real stocks on shipping validation
|
||||
DeStockOnShipmentOnClosing=Decrease real stocks on shipping classification closed
|
||||
ReStockOnBill=Increase real stocks on suppliers invoices/credit notes validation
|
||||
ReStockOnValidateOrder=Increase real stocks on suppliers orders approbation
|
||||
ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouses, after supplier order receiving
|
||||
ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouses, after supplier order receipt of goods
|
||||
OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses.
|
||||
StockDiffPhysicTeoric=Explanation for difference between physical and theoretical stock
|
||||
StockDiffPhysicTeoric=Explanation for difference between physical and virtual stock
|
||||
NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required.
|
||||
DispatchVerb=Dispatch
|
||||
StockLimitShort=Limit for alert
|
||||
StockLimit=Stock limit for alert
|
||||
PhysicalStock=Physical stock
|
||||
RealStock=Real Stock
|
||||
RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.
|
||||
RealStockWillAutomaticallyWhen=The real stock will automatically change according to this rules (see stock module setup to change this):
|
||||
VirtualStock=Virtual stock
|
||||
VirtualStockDesc=Virtual stock is the stock you will get once all opened pending actions that affect stocks will be closed (supplier order received, customer order shipped, ...)
|
||||
IdWarehouse=Id warehouse
|
||||
DescWareHouse=Description warehouse
|
||||
LieuWareHouse=Localisation warehouse
|
||||
|
||||
@ -126,10 +126,7 @@ $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl on pl.fk_product = p.rowi
|
||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
if ($search_categ) $sql.= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ
|
||||
if ($sall)
|
||||
{
|
||||
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%')";
|
||||
}
|
||||
if ($sall) $sql.=natural_search(array('p.ref','p.label','p.description','p.note'), $sall);
|
||||
// if the type is not 1, we show all products (type = 0,2,3)
|
||||
if (dol_strlen($type))
|
||||
{
|
||||
@ -163,6 +160,12 @@ $sql.= " pb.batch, pb.eatby, pb.sellby,";
|
||||
$sql.= " pl.eatby, pl.sellby";
|
||||
if ($toolowstock) $sql.= " HAVING SUM(".$db->ifsql('ps.reel IS NULL', '0', 'ps.reel').") < p.seuil_stock_alerte"; // Not used yet
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
$sql.= $db->plimit($limit + 1, $offset);
|
||||
$resql = $db->query($sql);
|
||||
|
||||
@ -193,11 +196,11 @@ if ($resql)
|
||||
|
||||
if ($sref || $snom || $sall || GETPOST('search'))
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, 0, 'title_products');
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products');
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, 0, 'title_products');
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products');
|
||||
}
|
||||
|
||||
if (! empty($catid))
|
||||
|
||||
@ -438,6 +438,35 @@ class Productlot extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return label of status of object
|
||||
*
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
return $this->LibStatut(0,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return label of a given status
|
||||
*
|
||||
* @param int $statut Status
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
//$langs->load('stocks');
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a link to the a lot card (with optionaly the picto)
|
||||
* Use this->id,this->lastname, this->firstname
|
||||
|
||||
@ -95,7 +95,7 @@ $arrayfields=array(
|
||||
'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||
'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||
'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||
'm.warehouse'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(! $id > 0)), // If we are on specific warehouse, we hide it
|
||||
'e.label'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(! $id > 0)), // If we are on specific warehouse, we hide it
|
||||
'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0),
|
||||
'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1),
|
||||
'm.label'=>array('label'=>$langs->trans("LabelMovement"), 'checked'=>1),
|
||||
@ -665,6 +665,7 @@ if ($resql)
|
||||
if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode);
|
||||
if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
|
||||
if ($search_product) $param.='&search_product='.urlencode($search_product);
|
||||
if ($search_batch) $param.='&search_batch='.urlencode($search_batch);
|
||||
if ($search_warehouse > 0) $param.='&search_warehouse='.urlencode($search_warehouse);
|
||||
if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
|
||||
if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
|
||||
@ -735,7 +736,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'],$_SERVER["PHP_SELF"],'m.batch','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'],$_SERVER["PHP_SELF"],'pl.eatby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'],$_SERVER["PHP_SELF"],'pl.sellby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.warehouse']['checked'])) print_liste_field_titre($arrayfields['m.warehouse']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||
if (! empty($arrayfields['e.label']['checked'])) print_liste_field_titre($arrayfields['e.label']['label'],$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'],$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'],$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||
@ -799,7 +800,7 @@ if ($resql)
|
||||
// Batch
|
||||
if (! empty($arrayfields['m.batch']['checked']))
|
||||
{
|
||||
print '<td align="center"><input class="flat" type="text" size="5" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
|
||||
print '<td class="liste_titre" align="center"><input class="flat" type="text" size="5" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['pl.eatby']['checked']))
|
||||
{
|
||||
@ -812,7 +813,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Warehouse
|
||||
if (! empty($arrayfields['m.warehouse']['checked']))
|
||||
if (! empty($arrayfields['e.label']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||
@ -974,7 +975,7 @@ if ($resql)
|
||||
print '<td align="center">'. dol_print_date($objp->sellby,'day') .'</td>';
|
||||
}
|
||||
// Warehouse
|
||||
if (! empty($arrayfields['m.warehouse']['checked']))
|
||||
if (! empty($arrayfields['e.label']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print $warehousestatic->getNomUrl(1);
|
||||
|
||||
@ -270,24 +270,6 @@ llxHeader('','ProductLot','');
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
// Put here content of your page
|
||||
|
||||
// Example : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_myfunc()
|
||||
{
|
||||
jQuery("#myid").removeAttr(\'disabled\');
|
||||
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
||||
}
|
||||
init_myfunc();
|
||||
jQuery("#mybutton").click(function() {
|
||||
init_myfunc();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
@ -335,19 +317,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/productlot_list.php' . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">' . $langs->trans('Batch') . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'batch');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'batch');
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
|
||||
// Product
|
||||
print '<tr><td>'.$langs->trans("Product").'</td><td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>';
|
||||
$producttmp = new Product($db);
|
||||
$producttmp->fetch($object->fk_product);
|
||||
print $producttmp->getNomUrl(1, 'stock');
|
||||
@ -356,7 +334,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Eat by
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td><td colspan="5">';
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -364,7 +342,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Sell by
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td><td colspan="5">';
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 326 B |
Binary file not shown.
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 326 B |
Loading…
Reference in New Issue
Block a user