From e1b3e4285bc7557ae3f30bae39d421572e8990e8 Mon Sep 17 00:00:00 2001 From: av-dev2 Date: Tue, 23 May 2023 07:03:17 +0300 Subject: [PATCH] fix: AttributeError: 'Nonetype' object has no attribute 'mode_of_payment' --- propms/issue_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/propms/issue_hook.py b/propms/issue_hook.py index a15eff4..eb52e9a 100644 --- a/propms/issue_hook.py +++ b/propms/issue_hook.py @@ -128,7 +128,7 @@ def getTax(sales_invoice): def make_sales_pos_payment(invoice_doc, pos_profile_name): default_mode_of_payment = frappe.db.get_value( "Sales Invoice Payment", - {"parent": pos_profile_name, "default": 1}, + {"parent": invoice_doc.name, "default": 1}, ["mode_of_payment", "type", "account"], as_dict=1, )