fix: payment request not able to make against fees

This commit is contained in:
Rohit Waghchaure 2020-04-29 02:27:47 +05:30
parent 57bfd38944
commit 50b4106d1d
3 changed files with 7 additions and 4 deletions

View File

@ -326,7 +326,7 @@ def make_payment_request(**args):
"reference_doctype": args.dt, "reference_doctype": args.dt,
"reference_name": args.dn, "reference_name": args.dn,
"party_type": args.get("party_type") or "Customer", "party_type": args.get("party_type") or "Customer",
"party": args.get("party") or ref_doc.customer, "party": args.get("party") or ref_doc.get("customer"),
"bank_account": bank_account "bank_account": bank_account
}) })

View File

@ -112,6 +112,8 @@ frappe.ui.form.on("Fees", {
args: { args: {
"dt": frm.doc.doctype, "dt": frm.doc.doctype,
"dn": frm.doc.name, "dn": frm.doc.name,
"party_type": "Student",
"party": frm.doc.student,
"recipient_id": frm.doc.student_email "recipient_id": frm.doc.student_email
}, },
callback: function(r) { callback: function(r) {

View File

@ -75,7 +75,8 @@ class Fees(AccountsController):
self.make_gl_entries() self.make_gl_entries()
if self.send_payment_request and self.student_email: if self.send_payment_request and self.student_email:
pr = make_payment_request(dt="Fees", dn=self.name, recipient_id=self.student_email, pr = make_payment_request(party_type="Student", party=self.student, dt="Fees",
dn=self.name, recipient_id=self.student_email,
submit_doc=True, use_dummy_message=True) submit_doc=True, use_dummy_message=True)
frappe.msgprint(_("Payment request {0} created").format(getlink("Payment Request", pr.name))) frappe.msgprint(_("Payment request {0} created").format(getlink("Payment Request", pr.name)))