Discussions
Apply open credits to invoice that has installments
Guru,
I'm constantly getting an error in my script while applying open credits to an invoice which has Installments. The error is "Items you have requested in the record have been deleted since you retrieved the form".
Actually, I'm trying to create payments for all the installments whenever any Invoice got created with installments in the system. While creating payments, the script is looking for open credit memo's and trying to apply the same.
Let's say an Invoice ($100 ) has 3 installments with $33.33 and the same customer has a $50 credit memo.
So, the script should first fully apply the first installment $33.33 from the credit memo and it should apply the remaining credit memo due to the next installment, and the process continuos until the credit memo is fully applied.