mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
Merge pull request #22303 from P-Froggy/fix-payment-entry-wrong-bank-account-fetch-v12
fix: Set Value of wrong Bank Account Field in Payment Entry
This commit is contained in:
@@ -25,7 +25,7 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
});
|
});
|
||||||
frm.set_query("party_type", function() {
|
frm.set_query("party_type", function() {
|
||||||
return{
|
return{
|
||||||
"filters": {
|
filters: {
|
||||||
"name": ["in", Object.keys(frappe.boot.party_account_types)],
|
"name": ["in", Object.keys(frappe.boot.party_account_types)],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,14 +33,16 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frm.set_query("party_bank_account", function() {
|
frm.set_query("party_bank_account", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"is_company_account":0
|
is_company_account: 0,
|
||||||
|
party_type: frm.doc.party_type,
|
||||||
|
party: frm.doc.party
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
frm.set_query("bank_account", function() {
|
frm.set_query("bank_account", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"is_company_account":1
|
is_company_account: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -326,7 +328,7 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
() => {
|
() => {
|
||||||
frm.set_party_account_based_on_party = false;
|
frm.set_party_account_based_on_party = false;
|
||||||
if (r.message.bank_account) {
|
if (r.message.bank_account) {
|
||||||
frm.set_value("party_bank_account", r.message.bank_account);
|
frm.set_value("bank_account", r.message.bank_account);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "default_bank_account",
|
"fieldname": "default_bank_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Default Bank Account",
|
"label": "Default Company Bank Account",
|
||||||
"options": "Bank Account"
|
"options": "Bank Account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
"idx": 370,
|
"idx": 370,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-03-17 09:48:30.578242",
|
"modified": "2020-06-17 23:28:30",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Supplier",
|
"name": "Supplier",
|
||||||
|
|||||||
Reference in New Issue
Block a user