mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX #14088
This commit is contained in:
@@ -928,7 +928,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
</script>';
|
||||
|
||||
// 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 .= " 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";
|
||||
@@ -1005,9 +1005,18 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td>'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
||||
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
print '<td class="dispatch_batch_number">'.$objp->batch.'</td>';
|
||||
print '<td class="dispatch_dluo">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
||||
print '<td class="dispatch_dlc">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
||||
if ($objp->batch) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||
$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
|
||||
|
||||
Reference in New Issue
Block a user