I’m trying to include the invoiced items on the payment item. Currently the Payment Entry has the Invoice number but we would like the customer to see all invoiced items.
Hello @ArundhatiS, Thank you for caring to respond. I discarded my previous script and been looking for it. Meantime I’m looking at the closest method I’ve found and will revert soon as I get somewhere:
Unable to handle success response desk.min.js:1473:4
console.trace(): desk.min.js:1474
frappe.request.call/< http://demo.outsourcenow.us/assets/js/desk.min.js:1474:4
i http://demo.outsourcenow.us/assets/frappe/js/lib/jquery/jquery.min.js:2:27146
fireWith http://demo.outsourcenow.us/assets/frappe/js/lib/jquery/jquery.min.js:2:27914
z http://demo.outsourcenow.us/assets/frappe/js/lib/jquery/jquery.min.js:4:12057
c/< http://demo.outsourcenow.us/assets/frappe/js/lib/jquery/jquery.min.js:4:15619
EDIT
I think my problem is my trigger.
Inability to link the Payment Entry to the related invoice. The invoice number comes through the references table. It would be possible to pick it from there into a trigger field, but It’d still need to relate it to a corresponding field in the invoice, this field is not among the table items of the Invoice DocType. Or is it?
Secondly, I just think there must be a better way to this problem. Perhaps an inbuilt method within Frappe. Need someone with more experience to help out.
This solution will go a long way for many users.
20/09/17
Turns out the problem really is my trigger. Placing console.log(invoice); above the $each loop shows its null.