Please dont give up or withdraw it. Others will be working towards something similar. My being here is proof.
Here’s my script so far. Still trying to make it work. The fields are selectable in print preview but it isnt appearing at all. I suspect empty values.
//Including sales invoice items on the payment receipt.
frappe.ui.form.on("Payment Entry", onload, function(frm) {
frappe.model.with_doc("Sales Invoice Item", frm.doc.onload, function() {
var tabletransfer= frappe.model.get_doc("Sales Invoice Item", frm.doc.onload)
$.each(qmtable.sales_invoice_items, function(index, row){
d = frm.add_child("Items");
d.item_code = row.item_code;
d.item_name = row.item_name;
d.description = row.description;
d.uom = row.uom;
d.stock_qty = row.stock_qty;
d.item_name = row.item_name;
d.rate = row.rate;
d.amount = row.amount;
frm.refresh_field("Items");
});
})
});