i try to pass the data to this method and i get this error

this is my code
this the first code of it
Uncaught TypeError: erpnext.utils.make_payment_voucher is not a function
i try to pass the data to this method and i get this error

this is my code
@manal_erpnext add this
import json
doc=json.loads(doc)
pv.company=doc.company
thx @Jeel
this code worked with me
data = json.loads(doc)
pv.company = data.get('company')