FIX #14088
This commit is contained in:
parent
b7d835eceb
commit
cbd99ea7a2
@ -928,7 +928,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
// List of lines already dispatched
|
// List of lines already dispatched
|
||||||
$sql = "SELECT p.ref, p.label,";
|
$sql = "SELECT p.rowid as pid, p.ref, p.label,";
|
||||||
$sql .= " e.rowid as warehouse_id, e.ref as entrepot,";
|
$sql .= " e.rowid as warehouse_id, e.ref as entrepot,";
|
||||||
$sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status, cfd.datec";
|
$sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status, cfd.datec";
|
||||||
if ($conf->reception->enabled)$sql .= " ,cfd.fk_reception, r.date_delivery";
|
if ($conf->reception->enabled)$sql .= " ,cfd.fk_reception, r.date_delivery";
|
||||||
@ -1005,9 +1005,18 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<td>'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
||||||
|
|
||||||
if (!empty($conf->productbatch->enabled)) {
|
if (!empty($conf->productbatch->enabled)) {
|
||||||
print '<td class="dispatch_batch_number">'.$objp->batch.'</td>';
|
if ($objp->batch) {
|
||||||
print '<td class="dispatch_dluo">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||||
print '<td class="dispatch_dlc">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
$lot=new Productlot($db);
|
||||||
|
$lot->fetch(0, $objp->pid, $objp->batch);
|
||||||
|
print '<td class="dispatch_batch_number">'.$lot->getNomUrl(1).'</td>';
|
||||||
|
print '<td class="dispatch_dluo">'.dol_print_date($lot->eatby, 'day').'</td>';
|
||||||
|
print '<td class="dispatch_dlc">'.dol_print_date($lot->sellby, 'day').'</td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="dispatch_batch_number"></td>';
|
||||||
|
print '<td class="dispatch_dluo"></td>';
|
||||||
|
print '<td class="dispatch_dlc"></td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Qty
|
// Qty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user