How to reduce line level balance of Credit memo
I had a situation, we had a credit memo and Invoice, requirement is to apply the credit memo with the Invoice at line level to reduce the balance of Invoice.
Ex.
Credit Memo
Qty Amount Value
Line 1 -100 100 - 10000
Line 2 -20 20 -400
Line 3 -30 40 -1200
Line 4 -5 140 -700
Total -12300
Invoice
Qty Amount Value
Line 1 20 100 2000
Line 2 5 20 100
Line 3 15 40 600
Line 4 2 140 280
Total 2980
Required Result of Credit memo at line level
Qty Amount Value
Line 1 -80 100 -8000
Line 2 -15 20 -300
Line 3 -15 40 -600
Line 4 -3 140 -4200
Total -9320
Regards
Sachin