Use correct picto for lot
This commit is contained in:
parent
720bb76a8f
commit
710e12420f
@ -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.
|
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
|
ProductDoesNotUseBatchSerial=This product does not use lot/serial number
|
||||||
ProductLotSetup=Setup of module lot/serial
|
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';
|
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="";
|
$sall="";
|
||||||
$sref="";
|
$sref="";
|
||||||
|
|||||||
@ -73,18 +73,6 @@ if (! empty($canvas))
|
|||||||
$objcanvas->getCanvas('product','list',$canvas);
|
$objcanvas->getCanvas('product','list',$canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($_POST["button_removefilter_x"]))
|
|
||||||
{
|
|
||||||
$sref="";
|
|
||||||
$snom="";
|
|
||||||
$sall="";
|
|
||||||
$search_sale="";
|
|
||||||
$search_categ="";
|
|
||||||
$type="";
|
|
||||||
$catid='';
|
|
||||||
$toolowstock='';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define virtualdiffersfromphysical
|
// Define virtualdiffersfromphysical
|
||||||
$virtualdiffersfromphysical=0;
|
$virtualdiffersfromphysical=0;
|
||||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER))
|
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
|
* 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;
|
$i = 0;
|
||||||
|
|
||||||
if ($num == 1 && ($sall or $snom or $sref))
|
if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall || $snom || $sref))
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
header("Location: card.php?id=$objp->rowid");
|
header("Location: card.php?id=$objp->rowid");
|
||||||
|
|||||||
@ -77,7 +77,13 @@ if (! empty($canvas))
|
|||||||
$objcanvas->getCanvas('product','list',$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="";
|
$sref="";
|
||||||
$snom="";
|
$snom="";
|
||||||
@ -92,14 +98,6 @@ if (! empty($_POST["button_removefilter_x"]))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
// None
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -174,7 +172,7 @@ if ($resql)
|
|||||||
|
|
||||||
$i = 0;
|
$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);
|
$objp = $db->fetch_object($resql);
|
||||||
header("Location: card.php?id=$objp->rowid");
|
header("Location: card.php?id=$objp->rowid");
|
||||||
|
|||||||
@ -44,6 +44,8 @@ class Productlot extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $table_element = 'product_lot';
|
public $table_element = 'product_lot';
|
||||||
|
|
||||||
|
public $picto='barcode';
|
||||||
|
|
||||||
public $isnolinkedbythird = 1;
|
public $isnolinkedbythird = 1;
|
||||||
public $ismultientitymanaged = 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
|
* 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)
|
* @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 = '';
|
$result = '';
|
||||||
$companylink = '';
|
|
||||||
|
|
||||||
$label = '<u>' . $langs->trans("Batch") . '</u>';
|
$label = '<u>' . $langs->trans("Batch") . '</u>';
|
||||||
$label.= '<div width="100%">';
|
$label.= '<div width="100%">';
|
||||||
@ -554,7 +555,7 @@ class Productlot extends CommonObject
|
|||||||
|
|
||||||
if ($withpicto)
|
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.=' ';
|
if ($withpicto != 2) $result.=' ';
|
||||||
}
|
}
|
||||||
$result.= $link . $this->batch . $linkend;
|
$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);
|
$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);
|
$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') {
|
if ($action == 'delete') {
|
||||||
@ -399,6 +399,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
print '</div>'."\n";
|
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>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -343,11 +343,11 @@ if ($resql)
|
|||||||
|
|
||||||
// Fields title
|
// Fields title
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (! empty($arrayfields['t.entity']['checked'])) print_liste_field_titre($arrayfields['t.entity']['label'],$_SERVER['PHP_SELF'],'t.entity','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.entity']['checked'])) print_liste_field_titre($arrayfields['t.entity']['label'],$_SERVER['PHP_SELF'],'t.entity','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.batch']['checked'])) print_liste_field_titre($arrayfields['t.batch']['label'],$_SERVER['PHP_SELF'],'t.batch','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.batch']['checked'])) print_liste_field_titre($arrayfields['t.batch']['label'],$_SERVER['PHP_SELF'],'t.batch','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.fk_product']['checked'])) print_liste_field_titre($arrayfields['t.fk_product']['label'],$_SERVER['PHP_SELF'],'t.fk_product','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.fk_product']['checked'])) print_liste_field_titre($arrayfields['t.fk_product']['label'],$_SERVER['PHP_SELF'],'t.fk_product','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.eatby']['checked'])) print_liste_field_titre($arrayfields['t.eatby']['label'],$_SERVER['PHP_SELF'],'t.eatby','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.eatby']['checked'])) print_liste_field_titre($arrayfields['t.eatby']['label'],$_SERVER['PHP_SELF'],'t.eatby','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.sellby']['checked'])) print_liste_field_titre($arrayfields['t.sellby']['label'],$_SERVER['PHP_SELF'],'t.sellby','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.sellby']['checked'])) print_liste_field_titre($arrayfields['t.sellby']['label'],$_SERVER['PHP_SELF'],'t.sellby','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.fk_user_creat']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_creat']['label'],$_SERVER['PHP_SELF'],'t.fk_user_creat','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.fk_user_creat']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_creat']['label'],$_SERVER['PHP_SELF'],'t.fk_user_creat','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.fk_user_modif']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_modif']['label'],$_SERVER['PHP_SELF'],'t.fk_user_modif','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.fk_user_modif']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_modif']['label'],$_SERVER['PHP_SELF'],'t.fk_user_modif','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.import_key']['checked'])) print_liste_field_titre($arrayfields['t.import_key']['label'],$_SERVER['PHP_SELF'],'t.import_key','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.import_key']['checked'])) print_liste_field_titre($arrayfields['t.import_key']['label'],$_SERVER['PHP_SELF'],'t.import_key','',$param,'',$sortfield,$sortorder);
|
||||||
@ -460,7 +460,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
if (! empty($arrayfields['t.batch']['checked']))
|
if (! empty($arrayfields['t.batch']['checked']))
|
||||||
{
|
{
|
||||||
print '<td>'.$productlot->getNomUrl().'</td>';
|
print '<td>'.$productlot->getNomUrl(1).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['t.fk_product']['checked']))
|
if (! empty($arrayfields['t.fk_product']['checked']))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user