Skip to content
Snippets Groups Projects
Commit 710e1242 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Use correct picto for lot

parent 720bb76a
No related branches found
No related tags found
No related merge requests found
......@@ -20,3 +20,5 @@ AddDispatchBatchLine=Add a line for Shelf Life dispatching
WhenProductBatchModuleOnOptionAreForced=When module Lot/Serial is on, increase/decrease stock mode is forced to last choice and can't be edited. Other options can be defined as you want.
ProductDoesNotUseBatchSerial=This product does not use lot/serial number
ProductLotSetup=Setup of module lot/serial
ShowCurrentStockOfLot=Show current stock for couple product/lot
ShowLogOfMovementIfLot=Show log of movements for couple product/lot
......@@ -177,7 +177,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$sall="";
$sref="";
......
......@@ -73,18 +73,6 @@ if (! empty($canvas))
$objcanvas->getCanvas('product','list',$canvas);
}
if (! empty($_POST["button_removefilter_x"]))
{
$sref="";
$snom="";
$sall="";
$search_sale="";
$search_categ="";
$type="";
$catid='';
$toolowstock='';
}
// Define virtualdiffersfromphysical
$virtualdiffersfromphysical=0;
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER))
......@@ -98,7 +86,17 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global
* Actions
*/
// None
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$sref="";
$snom="";
$sall="";
$search_sale="";
$search_categ="";
$type="";
$catid='';
$toolowstock='';
}
......@@ -180,7 +178,7 @@ if ($resql)
$i = 0;
if ($num == 1 && ($sall or $snom or $sref))
if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall || $snom || $sref))
{
$objp = $db->fetch_object($resql);
header("Location: card.php?id=$objp->rowid");
......
......@@ -77,7 +77,13 @@ if (! empty($canvas))
$objcanvas->getCanvas('product','list',$canvas);
}
if (! empty($_POST["button_removefilter_x"]))
/*
* Actions
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$sref="";
$snom="";
......@@ -92,14 +98,6 @@ if (! empty($_POST["button_removefilter_x"]))
}
/*
* Actions
*/
// None
/*
* View
*/
......@@ -174,7 +172,7 @@ if ($resql)
$i = 0;
if ($num == 1 && ($sall or $snom or $sref))
if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall or $snom or $sref))
{
$objp = $db->fetch_object($resql);
header("Location: card.php?id=$objp->rowid");
......
......@@ -44,6 +44,8 @@ class Productlot extends CommonObject
*/
public $table_element = 'product_lot';
public $picto='barcode';
public $isnolinkedbythird = 1;
public $ismultientitymanaged = 1;
......@@ -523,7 +525,7 @@ class Productlot extends CommonObject
}
/**
* Return a link to the user card (with optionaly the picto)
* Return a link to the a lot card (with optionaly the picto)
* Use this->id,this->lastname, this->firstname
*
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
......@@ -541,7 +543,6 @@ class Productlot extends CommonObject
$result = '';
$companylink = '';
$label = '<u>' . $langs->trans("Batch") . '</u>';
$label.= '<div width="100%">';
......@@ -554,7 +555,7 @@ class Productlot extends CommonObject
if ($withpicto)
{
$result.=($link.img_object(($notooltip?'':$label), 'label', ($notooltip?'':'class="classfortooltip"')).$linkend);
$result.=($link.img_object(($notooltip?'':$label), 'barcode', ($notooltip?'':'class="classfortooltip"')).$linkend);
if ($withpicto != 2) $result.=' ';
}
$result.= $link . $this->batch . $linkend;
......
......@@ -324,10 +324,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$res = $object->fetch_optionals($object->id, $extralabels);
print load_fiche_titre($langs->trans("Batch"));
//print load_fiche_titre($langs->trans("Batch"));
$head = productlot_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("Batch"), 0, 'stock');
dol_fiche_head($head, 'card', $langs->trans("Batch"), 0, 'barcode');
if ($action == 'delete') {
......@@ -399,6 +399,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '</div>'."\n";
print '<a href="'.DOL_URL_ROOT.'/product/reassortlot.php?sref='.urlencode($producttmp->ref).'&search_batch='.urlencode($object->batch).'">'.$langs->trans("ShowCurrentStockOfLot").'</a><br>';
print '<br>';
print '<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?search_product_ref='.urlencode($producttmp->ref).'&search_batch='.urlencode($object->batch).'">'.$langs->trans("ShowLogOfMovementIfLot").'</a><br>';
}
......
......@@ -460,7 +460,7 @@ if ($resql)
}
if (! empty($arrayfields['t.batch']['checked']))
{
print '<td>'.$productlot->getNomUrl().'</td>';
print '<td>'.$productlot->getNomUrl(1).'</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['t.fk_product']['checked']))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment