fix: commision rate not fetch from sales person

This commit is contained in:
Rohit Waghchaure 2021-11-10 00:00:38 +05:30
parent fb9e72cc8a
commit 4d4bfa2333
2 changed files with 89 additions and 235 deletions

View File

@ -85,7 +85,8 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
if party_type=="Customer": if party_type=="Customer":
party_details["sales_team"] = [{ party_details["sales_team"] = [{
"sales_person": d.sales_person, "sales_person": d.sales_person,
"allocated_percentage": d.allocated_percentage or None "allocated_percentage": d.allocated_percentage or None,
"commission_rate": d.commission_rate
} for d in party.get("sales_team")] } for d in party.get("sales_team")]
# supplier tax withholding category # supplier tax withholding category

View File

@ -1,247 +1,100 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "creation": "2013-04-19 13:30:51",
"allow_import": 0, "doctype": "DocType",
"allow_rename": 0, "document_type": "Setup",
"beta": 0, "editable_grid": 1,
"creation": "2013-04-19 13:30:51", "engine": "InnoDB",
"custom": 0, "field_order": [
"docstatus": 0, "sales_person",
"doctype": "DocType", "contact_no",
"document_type": "Setup", "allocated_percentage",
"editable_grid": 1, "allocated_amount",
"engine": "InnoDB", "commission_rate",
"incentives"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "sales_person",
"allow_on_submit": 1, "fieldtype": "Link",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Sales Person",
"columns": 0, "oldfieldname": "sales_person",
"fieldname": "sales_person", "oldfieldtype": "Link",
"fieldtype": "Link", "options": "Sales Person",
"hidden": 0, "print_width": "200px",
"ignore_user_permissions": 0, "reqd": 1,
"ignore_xss_filter": 0, "search_index": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Sales Person",
"length": 0,
"no_copy": 0,
"oldfieldname": "sales_person",
"oldfieldtype": "Link",
"options": "Sales Person",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "200px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"width": "200px" "width": "200px"
}, },
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "contact_no",
"allow_on_submit": 1, "fieldtype": "Data",
"bold": 0, "hidden": 1,
"collapsible": 0, "in_list_view": 1,
"columns": 0, "label": "Contact No.",
"fieldname": "contact_no", "oldfieldname": "contact_no",
"fieldtype": "Data", "oldfieldtype": "Data",
"hidden": 1, "print_width": "100px",
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Contact No.",
"length": 0,
"no_copy": 0,
"oldfieldname": "contact_no",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "allocated_percentage",
"allow_on_submit": 1, "fieldtype": "Float",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Contribution (%)",
"columns": 0, "oldfieldname": "allocated_percentage",
"fieldname": "allocated_percentage", "oldfieldtype": "Currency",
"fieldtype": "Float", "print_width": "100px",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Contribution (%)",
"length": 0,
"no_copy": 0,
"oldfieldname": "allocated_percentage",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "allocated_amount",
"allow_on_submit": 1, "fieldtype": "Currency",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Contribution to Net Total",
"columns": 0, "oldfieldname": "allocated_amount",
"fieldname": "allocated_amount", "oldfieldtype": "Currency",
"fieldtype": "Currency", "options": "Company:company:default_currency",
"hidden": 0, "print_width": "120px",
"ignore_user_permissions": 0, "read_only": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Contribution to Net Total",
"length": 0,
"no_copy": 0,
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"width": "120px" "width": "120px"
}, },
{ {
"allow_bulk_edit": 0, "fetch_from": "sales_person.commission_rate",
"allow_in_quick_entry": 0, "fetch_if_empty": 1,
"allow_on_submit": 0, "fieldname": "commission_rate",
"bold": 0, "fieldtype": "Data",
"collapsible": 0, "in_list_view": 1,
"columns": 0, "label": "Commission Rate",
"fieldname": "commission_rate", "read_only": 1
"fieldtype": "Data", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Commission Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "incentives",
"allow_on_submit": 1, "fieldtype": "Currency",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Incentives",
"columns": 0, "oldfieldname": "incentives",
"fieldname": "incentives", "oldfieldtype": "Currency",
"fieldtype": "Currency", "options": "Company:company:default_currency"
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Incentives",
"length": 0,
"no_copy": 0,
"oldfieldname": "incentives",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "idx": 1,
"hide_heading": 0, "istable": 1,
"hide_toolbar": 0, "links": [],
"idx": 1, "modified": "2021-11-09 23:55:20.670475",
"image_view": 0, "modified_by": "Administrator",
"in_create": 0, "module": "Selling",
"is_submittable": 0, "name": "Sales Team",
"issingle": 0, "owner": "Administrator",
"istable": 1, "permissions": [],
"max_attachments": 0, "quick_entry": 1,
"modified": "2018-09-17 13:03:14.755974", "sort_field": "modified",
"modified_by": "Administrator", "sort_order": "DESC",
"module": "Selling", "track_changes": 1
"name": "Sales Team", }
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}