feat: add party bank account field
This commit is contained in:
parent
6175eb2cf9
commit
d9140dc772
@ -30,13 +30,20 @@ frappe.ui.form.on('Payment Entry', {
|
||||
}
|
||||
}
|
||||
});
|
||||
frm.set_query("bank_account", function() {
|
||||
frm.set_query("party_bank_account", function() {
|
||||
return {
|
||||
filters: {
|
||||
"is_company_account":0
|
||||
}
|
||||
}
|
||||
});
|
||||
frm.set_query("bank_account", function() {
|
||||
return {
|
||||
filters: {
|
||||
"is_company_account":1
|
||||
}
|
||||
}
|
||||
});
|
||||
frm.set_query("contact_person", function() {
|
||||
if (frm.doc.party) {
|
||||
return {
|
||||
|
@ -19,6 +19,7 @@
|
||||
"party_name",
|
||||
"column_break_11",
|
||||
"bank_account",
|
||||
"party_bank_account",
|
||||
"contact_person",
|
||||
"contact_email",
|
||||
"payment_accounts_section",
|
||||
@ -532,22 +533,29 @@
|
||||
"label": "Title",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"label": "Status",
|
||||
"options": "Initiated\nCompleted"
|
||||
},
|
||||
{
|
||||
"depends_on": "party",
|
||||
"fieldname": "bank_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Bank Account",
|
||||
"label": "Company Bank Account",
|
||||
"options": "Bank Account"
|
||||
},
|
||||
{
|
||||
"depends_on": "party",
|
||||
"fieldname": "party_bank_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Party Bank Account",
|
||||
"options": "Bank Account"
|
||||
},
|
||||
{
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"label": "Payment Order Status",
|
||||
"options": "Initiated\nCompleted"
|
||||
}
|
||||
],
|
||||
"is_submittable": 1,
|
||||
"modified": "2019-05-08 12:35:05.407422",
|
||||
"modified": "2019-05-14 17:00:48.759155",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Entry",
|
||||
|
@ -975,7 +975,7 @@ def make_payment_order(source_name, target_doc=None):
|
||||
target.payment_order_type = "Payment Entry"
|
||||
|
||||
def update_item(source_doc, target_doc, source_parent):
|
||||
target_doc.bank_account = source_parent.bank_account
|
||||
target_doc.bank_account = source_parent.party_bank_account
|
||||
target_doc.amount = source_parent.base_paid_amount
|
||||
target_doc.account = source_parent.paid_to
|
||||
target_doc.payment_entry = source_parent.name
|
||||
|
Loading…
Reference in New Issue
Block a user