mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 15:25:19 +00:00
* feat: add Company Contact Person in selling transactions (#44362)
(cherry picked from commit f6776c7d6b)
* chore: resolve conflicts
---------
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
"shipping_address",
|
"shipping_address",
|
||||||
"company_address",
|
"company_address",
|
||||||
"company_address_display",
|
"company_address_display",
|
||||||
|
"company_contact_person",
|
||||||
"currency_and_price_list",
|
"currency_and_price_list",
|
||||||
"currency",
|
"currency",
|
||||||
"conversion_rate",
|
"conversion_rate",
|
||||||
@@ -1557,12 +1558,19 @@
|
|||||||
"fieldname": "update_billed_amount_in_delivery_note",
|
"fieldname": "update_billed_amount_in_delivery_note",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Update Billed Amount in Delivery Note"
|
"label": "Update Billed Amount in Delivery Note"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_contact_person",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Contact Person",
|
||||||
|
"options": "Contact",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-file-text",
|
"icon": "fa fa-file-text",
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-03-20 16:00:34.268756",
|
"modified": "2024-11-26 13:10:50.309570",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Invoice",
|
"name": "POS Invoice",
|
||||||
|
|||||||
@@ -160,8 +160,9 @@
|
|||||||
"dispatch_address",
|
"dispatch_address",
|
||||||
"company_address_section",
|
"company_address_section",
|
||||||
"company_address",
|
"company_address",
|
||||||
"company_addr_col_break",
|
|
||||||
"company_address_display",
|
"company_address_display",
|
||||||
|
"company_addr_col_break",
|
||||||
|
"company_contact_person",
|
||||||
"terms_tab",
|
"terms_tab",
|
||||||
"payment_schedule_section",
|
"payment_schedule_section",
|
||||||
"ignore_default_payment_terms_template",
|
"ignore_default_payment_terms_template",
|
||||||
@@ -2171,6 +2172,13 @@
|
|||||||
"label": "Update Outstanding for Self",
|
"label": "Update Outstanding for Self",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_contact_person",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Contact Person",
|
||||||
|
"options": "Contact",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-file-text",
|
"icon": "fa fa-file-text",
|
||||||
@@ -2183,7 +2191,7 @@
|
|||||||
"link_fieldname": "consolidated_invoice"
|
"link_fieldname": "consolidated_invoice"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2024-07-18 15:30:39.428519",
|
"modified": "2024-11-26 12:34:09.110690",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
|||||||
@@ -64,6 +64,17 @@ $.extend(erpnext.queries, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
company_contact_query: function (doc) {
|
||||||
|
if (!doc.company) {
|
||||||
|
frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
query: "frappe.contacts.doctype.contact.contact.contact_query",
|
||||||
|
filters: { link_doctype: "Company", link_name: doc.company },
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
address_query: function (doc) {
|
address_query: function (doc) {
|
||||||
if (frappe.dynamic_link) {
|
if (frappe.dynamic_link) {
|
||||||
if (!doc[frappe.dynamic_link.fieldname]) {
|
if (!doc[frappe.dynamic_link.fieldname]) {
|
||||||
|
|||||||
@@ -95,8 +95,9 @@
|
|||||||
"shipping_address",
|
"shipping_address",
|
||||||
"company_address_section",
|
"company_address_section",
|
||||||
"company_address",
|
"company_address",
|
||||||
"column_break_87",
|
|
||||||
"company_address_display",
|
"company_address_display",
|
||||||
|
"column_break_87",
|
||||||
|
"company_contact_person",
|
||||||
"terms_tab",
|
"terms_tab",
|
||||||
"payment_schedule_section",
|
"payment_schedule_section",
|
||||||
"payment_terms_template",
|
"payment_terms_template",
|
||||||
@@ -1066,13 +1067,20 @@
|
|||||||
"fieldname": "named_place",
|
"fieldname": "named_place",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Named Place"
|
"label": "Named Place"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_contact_person",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Contact Person",
|
||||||
|
"options": "Contact",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-shopping-cart",
|
"icon": "fa fa-shopping-cart",
|
||||||
"idx": 82,
|
"idx": 82,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-03-20 16:04:21.567847",
|
"modified": "2024-11-26 12:43:29.293637",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
|
|||||||
@@ -112,8 +112,9 @@
|
|||||||
"dispatch_address",
|
"dispatch_address",
|
||||||
"col_break46",
|
"col_break46",
|
||||||
"company_address",
|
"company_address",
|
||||||
"column_break_92",
|
|
||||||
"company_address_display",
|
"company_address_display",
|
||||||
|
"column_break_92",
|
||||||
|
"company_contact_person",
|
||||||
"payment_schedule_section",
|
"payment_schedule_section",
|
||||||
"payment_terms_section",
|
"payment_terms_section",
|
||||||
"payment_terms_template",
|
"payment_terms_template",
|
||||||
@@ -1626,13 +1627,20 @@
|
|||||||
"fieldname": "named_place",
|
"fieldname": "named_place",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Named Place"
|
"label": "Named Place"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_contact_person",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Contact Person",
|
||||||
|
"options": "Contact",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-file-text",
|
"icon": "fa fa-file-text",
|
||||||
"idx": 105,
|
"idx": 105,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-05-23 16:35:54.905804",
|
"modified": "2024-11-26 12:42:06.872527",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
@@ -1711,4 +1719,4 @@
|
|||||||
"title_field": "customer_name",
|
"title_field": "customer_name",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 1
|
"track_seen": 1
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
|
|||||||
me.frm.set_query('shipping_address_name', erpnext.queries.address_query);
|
me.frm.set_query('shipping_address_name', erpnext.queries.address_query);
|
||||||
me.frm.set_query('dispatch_address_name', erpnext.queries.dispatch_address_query);
|
me.frm.set_query('dispatch_address_name', erpnext.queries.dispatch_address_query);
|
||||||
me.frm.set_query('company_address', erpnext.queries.company_address_query);
|
me.frm.set_query('company_address', erpnext.queries.company_address_query);
|
||||||
|
me.frm.set_query('company_contact_person', erpnext.queries.company_contact_query);
|
||||||
|
|
||||||
erpnext.accounts.dimensions.setup_dimension_filters(me.frm, me.frm.doctype);
|
erpnext.accounts.dimensions.setup_dimension_filters(me.frm, me.frm.doctype);
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,9 @@
|
|||||||
"dispatch_address",
|
"dispatch_address",
|
||||||
"company_address_section",
|
"company_address_section",
|
||||||
"company_address",
|
"company_address",
|
||||||
"column_break_101",
|
|
||||||
"company_address_display",
|
"company_address_display",
|
||||||
|
"column_break_101",
|
||||||
|
"company_contact_person",
|
||||||
"terms_tab",
|
"terms_tab",
|
||||||
"tc_name",
|
"tc_name",
|
||||||
"terms",
|
"terms",
|
||||||
@@ -1395,13 +1396,20 @@
|
|||||||
"fieldname": "named_place",
|
"fieldname": "named_place",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Named Place"
|
"label": "Named Place"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_contact_person",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Contact Person",
|
||||||
|
"options": "Contact",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-truck",
|
"icon": "fa fa-truck",
|
||||||
"idx": 146,
|
"idx": 146,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-03-20 16:05:02.854990",
|
"modified": "2024-11-26 12:44:28.258215",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Delivery Note",
|
"name": "Delivery Note",
|
||||||
|
|||||||
Reference in New Issue
Block a user