mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 23:31:20 +00:00
feat(Company): allow setting default sales contact, fetch into sales transaction (backport #50159) (#50599)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -37,6 +37,13 @@ frappe.ui.form.on("Company", {
|
||||
return { filters: { selling: 1 } };
|
||||
});
|
||||
|
||||
frm.set_query("default_sales_contact", function (doc) {
|
||||
return {
|
||||
query: "frappe.contacts.doctype.contact.contact.contact_query",
|
||||
filters: { link_doctype: "Company", link_name: doc.name },
|
||||
};
|
||||
});
|
||||
|
||||
frm.set_query("default_buying_terms", function () {
|
||||
return { filters: { buying: 1 } };
|
||||
});
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
"total_monthly_sales",
|
||||
"column_break_goals",
|
||||
"default_selling_terms",
|
||||
"default_sales_contact",
|
||||
"default_warehouse_for_sales_return",
|
||||
"credit_limit",
|
||||
"transactions_annual_history",
|
||||
@@ -851,6 +852,12 @@
|
||||
"fieldtype": "Select",
|
||||
"label": "Reconciliation Takes Effect On",
|
||||
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date"
|
||||
},
|
||||
{
|
||||
"fieldname": "default_sales_contact",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Sales Contact",
|
||||
"options": "Contact"
|
||||
}
|
||||
],
|
||||
"icon": "fa fa-building",
|
||||
@@ -858,7 +865,7 @@
|
||||
"image_field": "company_logo",
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"modified": "2025-08-25 18:34:03.602046",
|
||||
"modified": "2025-11-16 16:51:27.624096",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Company",
|
||||
|
||||
@@ -66,6 +66,7 @@ class Company(NestedSet):
|
||||
default_payable_account: DF.Link | None
|
||||
default_provisional_account: DF.Link | None
|
||||
default_receivable_account: DF.Link | None
|
||||
default_sales_contact: DF.Link | None
|
||||
default_selling_terms: DF.Link | None
|
||||
default_warehouse_for_sales_return: DF.Link | None
|
||||
depreciation_cost_center: DF.Link | None
|
||||
|
||||
Reference in New Issue
Block a user