Merge pull request #21432 from leninrivas/patch-7

Correct Stock in Shipment
This commit is contained in:
Laurent Destailleur 2022-07-04 01:21:52 +02:00 committed by GitHub
commit bde02ffe77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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='.((int) $product->id).'&action=correction&nbpiece='.urlencode($nbPiece).'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.((int) $object->id)).'">'.$langs->trans("CorrectStock").'</a>';
}
}
print '</td>';
} else {