Correct Stock in Shipment

This commit is contained in:
Lenin Rivas
2022-07-02 12:23:46 -05:00
committed by GitHub
parent 1b5eb2de22
commit 3aa41a25b9

View File

@@ -797,6 +797,10 @@ if ($id > 0 || !empty($ref)) {
print $product->stock_reel;
if ($product->stock_reel < $toBeShipped[$objp->fk_product]) {
print ' '.img_warning($langs->trans("StockTooLow"));
if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
$nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
print ' &nbsp; '.$langs->trans("GoTo").' <a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.$product->id.'&action=correction&nbpiece='.$nbPiece.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id.'').'">'.$langs->trans("CorrectStock").'</a>';
}
}
print '</td>';
} else {