hide other eatby sellby dates
This commit is contained in:
parent
a5b4fcedb7
commit
179fc2e70a
@ -2307,8 +2307,12 @@ if ($action == 'create')
|
|||||||
foreach ($lines[$i]->detail_batch as $dbatch) // $dbatch is instance of ExpeditionLineBatch
|
foreach ($lines[$i]->detail_batch as $dbatch) // $dbatch is instance of ExpeditionLineBatch
|
||||||
{
|
{
|
||||||
$detail .= $langs->trans("Batch").': '.$dbatch->batch;
|
$detail .= $langs->trans("Batch").': '.$dbatch->batch;
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
|
$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
|
||||||
|
}
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
|
$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
|
||||||
|
}
|
||||||
$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
|
$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
|
||||||
$detail .= '<br>';
|
$detail .= '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,6 +143,12 @@ $arrayfields = array(
|
|||||||
//'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
//'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
//'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
|
//'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
|
||||||
);
|
);
|
||||||
|
if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
|
unset($arrayfields['pl.eatby']);
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
|
unset($arrayfields['pl.sellby']);
|
||||||
|
}
|
||||||
$objectlist->fields = dol_sort_array($objectlist->fields, 'position');
|
$objectlist->fields = dol_sort_array($objectlist->fields, 'position');
|
||||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||||
|
|
||||||
|
|||||||
@ -159,9 +159,13 @@ if ($resql)
|
|||||||
if (!empty($conf->productbatch->enabled))
|
if (!empty($conf->productbatch->enabled))
|
||||||
{
|
{
|
||||||
print '<th>'.$langs->trans("Batch").'</th>';
|
print '<th>'.$langs->trans("Batch").'</th>';
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
print '<th>'.$langs->trans("SellByDate").'</th>';
|
print '<th>'.$langs->trans("SellByDate").'</th>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
print '<th>'.$langs->trans("EatByDate").'</th>';
|
print '<th>'.$langs->trans("EatByDate").'</th>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print '<th>'.$langs->trans("Warehouse").'</th>';
|
print '<th>'.$langs->trans("Warehouse").'</th>';
|
||||||
print '<th class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/product/stock/movement_list.php">'.$langs->trans("FullList").'</a></th>';
|
print '<th class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/product/stock/movement_list.php">'.$langs->trans("FullList").'</a></th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -191,9 +195,13 @@ if ($resql)
|
|||||||
if (!empty($conf->productbatch->enabled))
|
if (!empty($conf->productbatch->enabled))
|
||||||
{
|
{
|
||||||
print '<td>'.$objp->batch.'</td>';
|
print '<td>'.$objp->batch.'</td>';
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print '<td class="tdoverflowmax200">';
|
print '<td class="tdoverflowmax200">';
|
||||||
print $warehouse->getNomUrl(1);
|
print $warehouse->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|||||||
@ -121,6 +121,12 @@ $arrayfields = array(
|
|||||||
//'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
//'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
//'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
|
//'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
|
||||||
);
|
);
|
||||||
|
if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
|
unset($arrayfields['pl.eatby']);
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
|
unset($arrayfields['pl.sellby']);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->rights->stock->mouvement->lire) {
|
if (!$user->rights->stock->mouvement->lire) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user