--INTERNAL DOCUMENT-----
Product version :
6.5 update 6 , 6.6 (General)
Problem statement :
Lost Sales report is not showing the expected data
Proposed solution/workaround:
Replicating the scenario on test/local system:
> Created a new product on MC with no inventory of it.
> Go on POS to sell it
> Negative quantity resolution screen opens up.
> Select the "Record as lost sales" option on far right.
> complete the sale. (do not void it)
> check the report.
Steps if any -
Check if the data in the lost sales report matches to the data in lost sales table :
select * from TrxTransactionLostSaleItem
Run the below query with product ID to get the data of report:
Select CONVERT(VARCHAR, T.BusinessDate, 106) AS BusinessDate,S.Id AS StoreId, S.Description AS StoreDesc, P.Id AS ItemId,
P.Description AS ItemDesc,P1.Id AS ItemGroupId, P1.Description AS ItemGroupDesc, (I.AvailableQuantity) AS StockQty,
SUM(T1.Quantity) AS SaleQty, SUM(T1.BasePrice) AS Price, SUM(T1.TotalBeforeSaleDiscount) AS TotalValue
From TrxTransaction T WITH (NOLOCK)
INNER JOIN TrxTransactionLostSaleItem T1 WITH (NOLOCK) ON T.TransactionKey = T1.TransactionKey
INNER JOIN RtlStore S WITH (NOLOCK) ON S.StoreKey = T.StoreKey
INNER JOIN InvProduct P WITH (NOLOCK) ON P.ProductKey = T1.ProductKey
INNER JOIN InvProductGroup P1 ON P.ProductGroupKey = P1.ProductGroupKey
INNER JOIN InvInventoryItem I WITH (NOLOCK) ON I.ProductKey = P.ProductKey AND S.WarehouseKey = I.WarehouseKey
Where T.IsSuspended = 0 AND T.IsVoided = 0
AND p.id='PUT PRODUCT ID HERE'
Group By S.Id, S.Description, P.Id, P.Description, T1.ProductKey, I.AvailableQuantity,P1.Id, P1.Description,T.BusinessDate
Constraints/scenarios - In case the sale is voided right before the transaction, the data won’t be displayed on the lost sales report.
In case of a dead end, comment the “Where T.IsSuspended = 0 AND T.IsVoided = 0” and run again .