Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Record Matching FIFO to ignore any sale transaction before a buy or no inventory RE: Record Matching FIFO to ignore any sale transaction before a buy or no inventory

  • The dates are not dummy dates. Dummy column indicates that the purchase and sales for a particular purchase has happened.

    The particular format is for calculating taxes. Based on the difference between purchase and sale date the slab of taxation changes. So to submit the transactions to the tax authorities this particular format is essential

    1] Client 2] PurchaseItem 3] Purchase Qty 4] Purchase Amt. 5] Purchase Date 5] Sale Qty 6] Sale Amt 7] Sale Date.

    Where the sale transaction before a purchase date is to be ignored. That is if I have a Sale transaction happening before any actual purchase then that Sale transaction should be ignored from this report.

    If after square off there is no purchase quantity remaining in that case also the Sale transaction should be ignored.

    Thanks for patient hearing