Debug v17

This commit is contained in:
Laurent Destailleur 2022-11-14 14:40:11 +01:00
parent 198e477142
commit 69eec07f13

View File

@ -1153,8 +1153,8 @@ if ($id > 0 || !empty($ref)) {
}
// Product
print '<td>'.$langs->trans("Product").'</td>';
print '<td>'.$langs->trans("DateCreation").'</td>';
print '<td>'.$langs->trans("DateDeliveryPlanned").'</td>';
print '<td class="center">'.$langs->trans("DateCreation").'</td>';
print '<td class="center">'.$langs->trans("DateDeliveryPlanned").'</td>';
if (isModEnabled('productbatch')) {
print '<td class="dispatch_batch_number_title">'.$langs->trans("batch_number").'</td>';
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
@ -1195,7 +1195,7 @@ if ($id > 0 || !empty($ref)) {
// Reception ref
if (isModEnabled("reception")) {
print '<td>';
print '<td class="nowraponall">';
if (!empty($objp->fk_reception)) {
$reception = new Reception($db);
$reception->fetch($objp->fk_reception);
@ -1206,7 +1206,7 @@ if ($id > 0 || !empty($ref)) {
}
// Product
print '<td>';
print '<td class="tdoverflowmax150">';
if (empty($conf->cache['product'][$objp->fk_product])) {
$tmpproduct = new Product($db);
$tmpproduct->fetch($objp->fk_product);
@ -1217,9 +1217,14 @@ if ($id > 0 || !empty($ref)) {
print $tmpproduct->getNomUrl(1);
print ' - '.$objp->label;
print "</td>\n";
print '<td>'.dol_print_date($db->jdate($objp->datec), 'day').'</td>';
print '<td>'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
// Date creation
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'day').'</td>';
// Date delivery
print '<td class="center">'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
// Batch / Eat by / Sell by
if (isModEnabled('productbatch')) {
if ($objp->batch) {
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
@ -1254,7 +1259,7 @@ if ($id > 0 || !empty($ref)) {
print '</td>';
// Warehouse
print '<td>';
print '<td class="tdoverflowmax150">';
if ($action == 'editline' && $lineid == $objp->dispatchlineid) {
if (count($listwarehouses) > 1) {
print $formproduct->selectWarehouses(GETPOST("fk_entrepot") ?GETPOST("fk_entrepot") : ($objp->warehouse_id ? $objp->warehouse_id : ''), "fk_entrepot", '', 1, 0, $objp->fk_product, '', 1, 1, null, 'csswarehouse');
@ -1318,6 +1323,8 @@ if ($id > 0 || !empty($ref)) {
}
print '</td>';
}
// Action
if ($action != 'editline' || $lineid != $objp->dispatchlineid) {
if (empty($reception->id) || ($reception->statut == Reception::STATUS_DRAFT)) { // only allow edit on draft reception
print '<td class="linecoledit center">';