Merge pull request #23000 from ibuiv/patch-2

Fix #20533 Dispatch Tab Quantity
This commit is contained in:
Laurent Destailleur
2022-11-26 16:54:11 +01:00
committed by GitHub

View File

@@ -178,7 +178,10 @@ function ordersupplier_prepare_head(CommandeFournisseur $object)
$sumQtyAllreadyDispatched = $sumQtyAllreadyDispatched + $dispachedLines[$line]['qty'];
}
for ($line = 0 ; $line < $nbLinesOrdered; $line++) {
$sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty;
//If line is a product of conf to manage stocks for services
if ($object->lines[$line]->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty;
}
}
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.price2num($sumQtyAllreadyDispatched, 'MS').' / '.price2num($sumQtyOrdered, 'MS').'</span>';
}