When you create a Purchase Order of any type in HQ, and the stores have different cost and quantities the ordering guidance in the available, show any information, incorrect because this is not the real and total stock. If you have same Cost in all stores information showed correct.
This is the query from RMS HQ with error, this is because a Group by cost is used instead a avg and when cost are different in stores, return more than one row. order guidance in HQ can't used as a valid guide. this is a HQ BUG.
Select a.ILC,a.Description, Sum(a.Available) as Available, Sum(a.Committed) as Committed, a.OnOrder as OnOrder,Sum(a.RestockLevel),Sum (a.ReorderPoint), a.Cost, a.LastCost, a.Price From ( select Item.ItemLookupCode as [ILC], Item.Description as [Description], isnull(ItemDynamic.Quantity-ItemDynamic.QuantityCommitted,0)as [Available], isnull(ItemDynamic.QuantityCommitted,0) as [Committed], isnull((SELECT SUM(QuantityOrdered - QuantityReceivedToDate) FROM PurchaseOrderEntry INNER JOIN PurchaseOrder ON PurchaseOrderEntry.PurchaseOrderID = PurchaseOrder.ID AND PurchaseOrderEntry.StoreID = PurchaseOrder.StoreID Left join ItemDynamic on PurchaseOrderEntry.ItemID = ItemDynamic.ItemID and PurchaseOrderEntry.StoreId = ItemDynamic.StoreId Where PurchaseOrder.Status <> 2 And (PurchaseOrder.POType <> 3 And PurchaseOrder.POType <> 5) And ItemDynamic.ItemID = 58874 AND purchaseorderentry.storeid in (select StoreID from worksheet_POLaterDisburse where worksheetID = 44633) ),0) As [OnOrder], Isnull(ItemDynamic.RestockLevel,0) as [RestockLevel], Isnull(ItemDynamic.ReorderPoint,0) as [ReorderPoint], ItemDynamic.SnapShotCost as Cost, ItemDynamic.SnapShotLastCost as LastCost, ItemDynamic.SnapShotPrice as Price From ItemDynamic inner join Item on Item.ID=ItemDynamic.ItemID Where ItemID =58874 And StoreID in (Select Storeid from worksheet_POLaterDisburse where worksheetID= 44633))a group by a.ILc,a.description,a.Cost,a.LastCost,a.Price,a.OnOrder
*This post is locked for comments
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,302 Most Valuable Professional
nmaenpaa 101,156