I am trying to achieve automating customer payment against credit amount(journal entry,credit memo& unapplied payments).
For example -ABC Customer has unapplied payment of Rs 10000,credit memo of Rs 5000,
and journal entry of Rs 2000. I am creating of invoice 50000 ,Upon saving of invoice ,in a UserEvent trigger i am trying to knock off the invoice amount 50000 with the existing credit amount of Rs
17000.In this scenario i can't apply journal entry amount of Rs 2000.I need to establish a link between Journal and the customer invoice.Please provide the script bundle for
this entire customization.please do the needful asap.