iVend 6.6 integrated with SAPB1
How to check Goods Receipt & Goods Issue against Inventory counting iVend MC
NA
Below SQL Queries can be used to check:
Select A1.InventoryCountKey,A1.Created,TotalRecords, CountedWale,GRCount , GICount, COUNT(1) as [GRCreated], GRCount - COUNT(1) as [GRDifference],
(select COUNT(1) from InvInventoryTransactionDetail Where SourceKey = A1.InventoryCountKey) as [GICreated]
From
(SELECT A.InventoryCountKey,A.Created, COUNT(1) TotalRecords, Sum(case when B.Counted > 0 and counted=1 and b.Status=1 then 1 else 0 end) CountedWale,
Sum(case when B.DifferenceQuantity > 0 then 1 else 0 end) GRCount, sum(case when B.DifferenceQuantity < 0 and counted=1 and b.Status=1 then 1 else 0 end) GICount
FROM InvInventoryCount A, InvInventoryCountDetail B
Where A.InventoryCountKey = B.InventoryCountKey
and A.Created > '2022-01-01 00:00:00.000'
group by A.InventoryCountKey,A.Created
having Sum(case when B.Counted > 0 then 1 else 0 end) > 0) As A1, InvGoodReceiptDetail B
Where A1.InventoryCountKey = B.SourceKey
--and GICount >0
Group by A1.InventoryCountKey,TotalRecords, CountedWale,GRCount, GICount,A1.Created
order by Created desc
-- GR Count should be equal to GR created.
-- GI count should be equal to GI created.
NA