Hello ,
I managed to make this custom report to show me the inventory transactions by date … but i got a little bit stuck …
I have some products that have different VAT for example some products have 9% VAT … some 19% and some 25% … i want my report to calculate the correct VAT for every inventory product … is there any way to define the inventory item VAT and how i can implement that in my sql … a tutorial will be perfect or at least some info on how i can do that …
Thank you for your help
My following report is only made for 24% VAT
[Nota de receptie:1,1,1,1,1,1,1]
Denumire|Unitate|[N]Cantitate|[N]Pret fara T.V.A.|[N]T.V.A.|[N]Pret cu T.V.A.|[N]Pret total cu T.V.A.
@@inv
Total
@@tinv
SELECT /* MIN(CONVERT(nvarchar,InventoryTransactions.Date,105)) AS DATE, */ InventoryItems.Name, InventoryTransactions.Unit, InventoryTransactions.Quantity, convert(decimal(5,3),round((InventoryTransactions.TotalPrice)/(InventoryTransactions.Quantity)/100,3)) as PretUnitar, convert(decimal(5,3),round(((InventoryTransactions.TotalPrice)/(InventoryTransactions.Quantity)*0.24)/100,3)) as TVA, convert(decimal(5,3),round(((InventoryTransactions.TotalPrice)/(InventoryTransactions.Quantity)/100)+((InventoryTransactions.TotalPrice)/(InventoryTransactions.Quantity)*0.24)/100,3)) as PretTVA, convert(decimal(20,2),round(((InventoryTransactions.TotalPrice)+(InventoryTransactions.TotalPrice*0.24))/100,3)) as Total FROM InventoryItems INNER JOIN InventoryTransactions ON InventoryItems.Id=InventoryTransactions.InventoryItem_Id WHERE InventoryTransactions.Date > '{Start}' AND InventoryTransactions.Date < '{End}' /* GROUP BY InventoryItems.Name,InventoryTransactions.Unit,InventoryTransactions.Quantity,InventoryTransactions.TotalPrice */ ORDER BY InventoryTransactions.Date