Fix dol_banner on card for lot
This commit is contained in:
parent
53238c2b0d
commit
4e6ee4d12c
@ -524,6 +524,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)
|
* 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
|
||||||
|
|||||||
@ -270,24 +270,6 @@ llxHeader('','ProductLot','');
|
|||||||
$form=new Form($db);
|
$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
|
// Part to create
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
@ -335,19 +317,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border centpercent">'."\n";
|
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/productlot_list.php' . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/productlot_list.php' . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
// Ref
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'batch');
|
||||||
print '<tr><td class="titlefield">' . $langs->trans('Batch') . '</td>';
|
|
||||||
print '<td colspan="3">';
|
print '<table class="border centpercent">'."\n";
|
||||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'batch');
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Product
|
// Product
|
||||||
print '<tr><td>'.$langs->trans("Product").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>';
|
||||||
$producttmp = new Product($db);
|
$producttmp = new Product($db);
|
||||||
$producttmp->fetch($object->fk_product);
|
$producttmp->fetch($object->fk_product);
|
||||||
print $producttmp->getNomUrl(1, 'stock');
|
print $producttmp->getNomUrl(1, 'stock');
|
||||||
@ -356,7 +334,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Eat by
|
// Eat by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
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 $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -364,7 +342,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Sell by
|
// Sell by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
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 $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user