Fetch Filed name in another doctype

i have doctpe of purchase invoice…there in one filed name is supplier invoice no…i want fetch that suppier invoice no into Payment entry refrence (doctype)…how can i do

https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master
hope it helps you