Fetch data from the doctype sales invoice to payment entry

Hi
I want items table information in print format of payment entry but as that field is not in the the payment entry, so it is not working if I am writing {{ doc.items }}.
Can anyone help me how to fetch data from other doc type(i.e. Sales Invoice) to the print format of payment entry?

Thankyou

Hello…,

First, you have to fetch the data in the payment entry doctype using frappe.call method after this you will get able to access the items child table data on the print format.

1 Like

{{ frappe.db.get_value("Address", doc.shipping_address_name, "address_line1") }}
This is how I fetch address in print format. Tweak it to suit your need.

1 Like

Thankyou

Thanks a lot