Fetch data from sales invoice doctype to payment entry reference doctype

refer this How does the "Fetch From" in Doctype Custom Field work?