feat: add validation for fetching doc status
This commit is contained in:
parent
f353f1d805
commit
3ca8976037
@ -978,7 +978,7 @@ def make_payment_order(source_name, target_doc=None):
|
|||||||
target_doc.bank_account = source_parent.bank_account
|
target_doc.bank_account = source_parent.bank_account
|
||||||
target_doc.amount = source_parent.base_paid_amount
|
target_doc.amount = source_parent.base_paid_amount
|
||||||
target_doc.account = source_parent.paid_to
|
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.supplier = source_parent.party
|
||||||
target_doc.mode_of_payment = source_parent.mode_of_payment
|
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, {
|
doclist = get_mapped_doc("Payment Entry", source_name, {
|
||||||
"Payment Entry": {
|
"Payment Entry": {
|
||||||
"doctype": "Payment Order",
|
"doctype": "Payment Order",
|
||||||
|
"validation": {
|
||||||
|
"docstatus": ["=", 1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Payment Entry Reference": {
|
"Payment Entry Reference": {
|
||||||
"doctype": "Payment Order Reference",
|
"doctype": "Payment Order Reference",
|
||||||
|
"validation": {
|
||||||
|
"docstatus": ["=", 1]
|
||||||
|
},
|
||||||
"postprocess": update_item
|
"postprocess": update_item
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user