Query to fetch Transaction (Line level details) when a transaction is unapplied in a receipt
Summary:
I have a requirement involving a receipt that has three transactions applied to it. If one of these transactions is later unapplied, I want to retrieve the details of all three transactions. Additionally, I want to include an attribute called active_flag:
- The active_flag should be 'Y' for the transaction that was most recently unapplied (indicating it's the latest change).
- For the other two transactions, the active_flag should be 'N'.
Now, if the receipt is reversed, I still want to retrieve all three transactions. In this case:
- All transactions should have active_flag ='Y'
- However, if one of the transactions was already unapplied before the reversal, it should still be included, but its active_flag should be 'N'.
Tagged:
0