Merge pull request #12689 from code-chicken/develop
Fix: calculation of virtual stock
This commit is contained in:
commit
65bf2fa285
@ -2097,7 +2097,7 @@ class Form
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$selectFieldsGrouped = ", p.stock";
|
$selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT ";
|
$sql = "SELECT ";
|
||||||
|
|||||||
@ -54,10 +54,10 @@ ActionsOnShipping=Events on shipment
|
|||||||
LinkToTrackYourPackage=Link to track your package
|
LinkToTrackYourPackage=Link to track your package
|
||||||
ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card.
|
ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card.
|
||||||
ShipmentLine=Shipment line
|
ShipmentLine=Shipment line
|
||||||
ProductQtyInCustomersOrdersRunning=Product quantity into open sales orders
|
ProductQtyInCustomersOrdersRunning=Product quantity from open sales orders
|
||||||
ProductQtyInSuppliersOrdersRunning=Product quantity into open purchase orders
|
ProductQtyInSuppliersOrdersRunning=Product quantity from open purchase orders
|
||||||
ProductQtyInShipmentAlreadySent=Product quantity from open sales order already sent
|
ProductQtyInShipmentAlreadySent=Product quantity from open sales order already sent
|
||||||
ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase order already received
|
ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase orders already received
|
||||||
NoProductToShipFoundIntoStock=No product to ship found in warehouse <b>%s</b>. Correct stock or go back to choose another warehouse.
|
NoProductToShipFoundIntoStock=No product to ship found in warehouse <b>%s</b>. Correct stock or go back to choose another warehouse.
|
||||||
WeightVolShort=Weight/Vol.
|
WeightVolShort=Weight/Vol.
|
||||||
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
|
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
|
||||||
|
|||||||
@ -374,7 +374,7 @@ if ($usevirtualstock)
|
|||||||
$sqlExpeditionsCli .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)";
|
$sqlExpeditionsCli .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)";
|
||||||
$sqlExpeditionsCli .= " WHERE e.entity IN (".getEntity('expedition').")";
|
$sqlExpeditionsCli .= " WHERE e.entity IN (".getEntity('expedition').")";
|
||||||
$sqlExpeditionsCli .= " AND cd.fk_product = p.rowid";
|
$sqlExpeditionsCli .= " AND cd.fk_product = p.rowid";
|
||||||
$sqlExpeditionsCli .= " AND c.fk_statut IN (1,2))";
|
$sqlExpeditionsCli .= " AND e.fk_statut IN (1,2))";
|
||||||
|
|
||||||
$sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty";
|
$sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty";
|
||||||
$sqlCommandesFourn .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd";
|
$sqlCommandesFourn .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user