Clean content of column "Already shipped into other shipment"

This commit is contained in:
Laurent Destailleur 2023-04-10 18:56:33 +02:00
parent 2958635f14
commit 18b78d28ab

View File

@ -2285,6 +2285,8 @@ if ($action == 'create') {
// Qty in other shipments (with shipment and warehouse used) // Qty in other shipments (with shipment and warehouse used)
if ($origin && $origin_id > 0) { if ($origin && $origin_id > 0) {
print '<td class="linecolqtyinothershipments center nowrap">'; print '<td class="linecolqtyinothershipments center nowrap">';
$htmltooltip = '';
$qtyalreadysent = 0;
foreach ($alreadysent as $key => $val) { foreach ($alreadysent as $key => $val) {
if ($lines[$i]->fk_origin_line == $key) { if ($lines[$i]->fk_origin_line == $key) {
$j = 0; $j = 0;
@ -2295,20 +2297,23 @@ if ($action == 'create') {
$j++; $j++;
if ($j > 1) { if ($j > 1) {
print '<br>'; $htmltooltip .= '<br>';
} }
$shipment_static->fetch($shipmentline_var['shipment_id']); $shipment_static->fetch($shipmentline_var['shipment_id']);
print $shipment_static->getNomUrl(1); $htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1);
print ' - '.$shipmentline_var['qty_shipped']; $htmltooltip .= ' - '.$shipmentline_var['qty_shipped'];
$htmltext = $langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); $htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour'));
if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) { /*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) {
$warehousestatic->fetch($shipmentline_var['warehouse']); $warehousestatic->fetch($shipmentline_var['warehouse']);
$htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); $htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1);
} }*/
print ' '.$form->textwithpicto('', $htmltext, 1); //print ' '.$form->textwithpicto('', $htmltext, 1);
$qtyalreadysent += $shipmentline_var['qty_shipped'];
} }
} }
} }
print $form->textwithpicto($qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id);
print '</td>'; print '</td>';
} }