SQL to summarise F43121
Hi Stalwarts,
As per client requirement I need to summarise table F43121 using SQL. Fields in focus are Amount Paid to date, Qty Paid to Date, Amount Not Vouchered, Qty Not Vouchered.
We are having both kind of purchase orders(2-way and 3-way). We are only having match type 1 and 2 entries in table.
I can think of picking up latest match type entry show that details but logic gets failed when there are multiple receipts and multiple vouchers for the same.
In addition to in case of 2-way voucher match if we create multiple vouchers then latest match type(2) entry also won't help. Qty Paid to Date and Amount Open are not in sync.