From e8bea2e936f0c6799903c24aae809b7e84f8d929 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Mon, 6 May 2019 19:54:11 +0530 Subject: [PATCH] feat: set payment order type on mapping --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- erpnext/accounts/doctype/payment_request/payment_request.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index f73eacdd0c..601813dc3b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -972,7 +972,7 @@ def get_party_and_account_balance(company, date, paid_from=None, paid_to=None, p def make_payment_order(source_name, target_doc=None): from frappe.model.mapper import get_mapped_doc def set_missing_values(source, target): - pass + target.payment_order_type = "Payment Entry" def update_item(source_doc, target_doc, source_parent): target_doc.bank_account = source_parent.bank_account diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 9b0ef42b8e..73758bea85 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -427,6 +427,7 @@ def get_subscription_details(reference_doctype, reference_name): def make_payment_order(source_name, target_doc=None): from frappe.model.mapper import get_mapped_doc def set_missing_values(source, target): + target.payment_order_type = "Payment Request" target.append('references', { 'reference_doctype': source.reference_doctype, 'reference_name': source.reference_name,