feat: add validation for fetching doc status

This commit is contained in:
Mangesh-Khairnar 2019-05-08 16:06:26 +05:30
parent f353f1d805
commit 3ca8976037

View File

@ -978,7 +978,7 @@ def make_payment_order(source_name, target_doc=None):
target_doc.bank_account = source_parent.bank_account
target_doc.amount = source_parent.base_paid_amount
target_doc.account = source_parent.paid_to
target_doc.payment_entry = source_doc.name
target_doc.payment_entry = source_parent.name
target_doc.supplier = source_parent.party
target_doc.mode_of_payment = source_parent.mode_of_payment
@ -986,9 +986,15 @@ def make_payment_order(source_name, target_doc=None):
doclist = get_mapped_doc("Payment Entry", source_name, {
"Payment Entry": {
"doctype": "Payment Order",
"validation": {
"docstatus": ["=", 1]
}
},
"Payment Entry Reference": {
"doctype": "Payment Order Reference",
"validation": {
"docstatus": ["=", 1]
},
"postprocess": update_item
},