Inventory Item Consumption Report Virtual WorkPeriod

How can I generate a consumption report daily for Virtual Work Period?
All figures for inventory consumption report is showing the same no matter the date change.

It will update EODR when you close Work Period.

Its designed so you can end work period in your own internal periods (weekly, monthly etc.) and do stock counts and management.

You must manually end wp for stock updates.

Thank you for your response. I read this somewhere on the forum from an old post. So I have decided to write a SQL script that will show the inventory item sales at runtime or specific dates for closed tickets.

DECLARE @Warehouse NVARCHAR(255) = N'@1';
DECLARE @StartDate NVARCHAR(25) = N'{Start}';
DECLARE @EndDate NVARCHAR(25) = N'{End}';
DECLARE @WarehouseId INT;

SELECT @WarehouseId = Id
    FROM dbo.Warehouses
    WHERE Name = @Warehouse;

IF (@WarehouseId IS NOT NULL)
	  SELECT IC.Name, sum(IC.recipequantity * IC.orderquantity) as AmtSold from (
	  SELECT I.Id, I.Name, RI.Quantity as recipequantity, O.Quantity as orderquantity from dbo.InventoryItems I 
	  INNER JOIN dbo.RecipeItems RI on I.Id = RI.InventoryItem_Id
	  INNER JOIN dbo.Recipes R on RI.RecipeId = R.Id
	  INNER JOIN dbo.MenuItemPortions MP on R.PortionId = MP.Id
	  INNER JOIN dbo.Orders O on MP.MenuItemId = O.MenuItemId and MP.Name = O.PortionName
	  INNER JOIN dbo.Tickets T on O.TicketId =
	  WHERE O.DecreaseInventory = 1 AND O.WarehouseId = @WarehouseId AND O.CreatedDateTime between @StartDate AND @EndDate AND T.IsClosed = 1
	  ) IC group by IC.Name order by IC.Name

Thanks again.

1 Like