|
@@ -1536,11 +1536,11 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|
|
$format = 'day';
|
|
|
foreach ($dbatch as $detail) {
|
|
|
$dte = array();
|
|
|
- if ($detail->eatby) {
|
|
|
+ if ($detail->sellby) {
|
|
|
// Added by MMI Mathieu Moulin iProspective
|
|
|
// Hack important DDM information
|
|
|
if (!empty($conf->global->SHIPPING_PDF_ANTIGASPI) && !empty($object->commande)) {
|
|
|
- $eatdiff = ($detail->eatby - $object->commande->date_commande);
|
|
|
+ $eatdiff = ($detail->sellby - $object->commande->date_commande);
|
|
|
$eatdiff_days = round($eatdiff/86400);
|
|
|
$days_antigaspi = $conf->global->PRODUCT_ANTIGASPI_DAYS;
|
|
|
$days_daecourte = $conf->global->PRODUCT_DATECOURTE_DAYS;
|
|
@@ -1553,14 +1553,14 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|
|
$antigaspi = '';
|
|
|
//die();
|
|
|
//$antigaspi .= ' - '.$eatdiff_days;
|
|
|
- $dte[] = ($antigaspi ?'<span style="color: red;">' :'').$outputlangs->transnoentitiesnoconv('printEatby', dol_print_date($detail->eatby, $format, false, $outputlangs)).($antigaspi ?$antigaspi.'</span>' :'');
|
|
|
+ $dte[] = ($antigaspi ?'<span style="color: red;">' :'').$outputlangs->transnoentitiesnoconv('printSellby', dol_print_date($detail->sellby, $format, false, $outputlangs)).($antigaspi ?$antigaspi.'</span>' :'');
|
|
|
}
|
|
|
else {
|
|
|
- $dte[] = $outputlangs->transnoentitiesnoconv('printEatby', dol_print_date($detail->eatby, $format, false, $outputlangs));
|
|
|
+ $dte[] = $outputlangs->transnoentitiesnoconv('printSellby', dol_print_date($detail->sellby, $format, false, $outputlangs));
|
|
|
}
|
|
|
}
|
|
|
- if ($detail->sellby) {
|
|
|
- $dte[] = $outputlangs->transnoentitiesnoconv('printSellby', dol_print_date($detail->sellby, $format, false, $outputlangs));
|
|
|
+ if ($detail->eatby) {
|
|
|
+ $dte[] = $outputlangs->transnoentitiesnoconv('printEatby', dol_print_date($detail->eatby, $format, false, $outputlangs));
|
|
|
}
|
|
|
// Added by MMI Mathieu Moulin iProspective
|
|
|
// Hack Hide Batch number (not very useful)
|