feat: remove obsolete "debit_to" field

This commit is contained in:
barredterra 2021-10-07 13:44:33 +02:00 committed by marination
parent c142d89952
commit fd7be5da99
2 changed files with 1 additions and 40 deletions

View File

@ -23,15 +23,7 @@ frappe.ui.form.on("Dunning", {
} }
}; };
}); });
frm.set_query("debit_to", () => {
return {
filters: {
"account_type": "Receivable",
"is_group": 0,
"company": frm.doc.company
}
};
});
frm.set_query("contact_person", erpnext.queries.contact_query); frm.set_query("contact_person", erpnext.queries.contact_query);
frm.set_query("customer_address", erpnext.queries.address_query); frm.set_query("customer_address", erpnext.queries.address_query);
frm.set_query("company_address", erpnext.queries.company_address_query); frm.set_query("company_address", erpnext.queries.company_address_query);
@ -113,28 +105,6 @@ frappe.ui.form.on("Dunning", {
} }
} }
} }
frm.trigger("set_debit_to");
},
set_debit_to: function(frm) {
if (frm.doc.customer && frm.doc.company) {
return frappe.call({
method: "erpnext.accounts.party.get_party_account",
args: {
company: frm.doc.company,
party_type: "Customer",
party: frm.doc.customer,
currency: erpnext.get_currency(frm.doc.company)
},
callback: function (r) {
if (!r.exc && r.message) {
frm.set_value("debit_to", r.message);
}
}
});
}
},
customer: function (frm) {
frm.trigger("set_debit_to");
}, },
currency: function (frm) { currency: function (frm) {
// this.set_dynamic_labels(); // this.set_dynamic_labels();

View File

@ -54,7 +54,6 @@
"accounting_details_section", "accounting_details_section",
"cost_center", "cost_center",
"income_account", "income_account",
"debit_to",
"amended_from" "amended_from"
], ],
"fields": [ "fields": [
@ -349,14 +348,6 @@
"options": "Address", "options": "Address",
"print_hide": 1 "print_hide": 1
}, },
{
"fieldname": "debit_to",
"fieldtype": "Link",
"label": "Debit To",
"options": "Account",
"print_hide": 1,
"reqd": 1
},
{ {
"fieldname": "section_break_9", "fieldname": "section_break_9",
"fieldtype": "Section Break", "fieldtype": "Section Break",