From 4302358a72f66fa1e8c9cba311a6dd56146a6718 Mon Sep 17 00:00:00 2001 From: AGHILES667 Date: Fri, 24 Oct 2025 14:10:41 +0200 Subject: [PATCH 1/2] FEAT: Add Grant Commission field in Quotation Item --- .../quotation_item/quotation_item.json | 19 +++++++++++-------- .../doctype/quotation_item/quotation_item.py | 6 +++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 7cfde79549..326ea13527 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -14,6 +14,7 @@ "is_free_item", "is_alternative", "has_alternative_item", + "grant_commission", "section_break_5", "description", "item_group", @@ -57,7 +58,6 @@ "base_net_amount", "pricing_rules", "stock_uom_rate", - "section_break_43", "valuation_rate", "last_purchase_rate", "column_break_45", @@ -751,12 +751,6 @@ "label": "Additional Costs Amount", "print_hide": 1 }, - { - "fieldname": "costs_section", - "fieldtype": "Section Break", - "hide_border": 1, - "label": "Costs Calculation" - }, { "default": "Valuation Rate", "fieldname": "gross_profit_calculation_rule", @@ -812,17 +806,26 @@ "label": "Product Bundle", "options": "Product Bundle", "read_only": 1 + }, + { + "default": "0", + "fetch_from": "item_code.grant_commission", + "fieldname": "grant_commission", + "fieldtype": "Check", + "label": "Grant Commission", + "read_only": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2025-08-26 20:31:47.775890", + "modified": "2025-10-24 12:21:16.935731", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", "owner": "Administrator", "permissions": [], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index 19a56e9cc7..480d547543 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -38,10 +38,9 @@ class QuotationItem(Document): discount_amount: DF.Currency discount_percentage: DF.Percent distributed_discount_amount: DF.Currency + grant_commission: DF.Check gross_profit: DF.Currency - gross_profit_calculation_rule: DF.Literal[ - "Valuation Rate", "Last Purchase Rate", "Supplier Cost Price" - ] + gross_profit_calculation_rule: DF.Literal["Valuation Rate", "Last Purchase Rate", "Supplier Cost Price"] gross_profit_percentage: DF.Percent has_alternative_item: DF.Check image: DF.Attach | None @@ -85,3 +84,4 @@ class QuotationItem(Document): weight_per_unit: DF.Float weight_uom: DF.Link | None # end: auto-generated types + -- GitLab From e66c405f5843d53db7bc1d8341536275e8f4e591 Mon Sep 17 00:00:00 2001 From: AGHILES667 Date: Fri, 24 Oct 2025 16:11:05 +0200 Subject: [PATCH 2/2] FIX:Added deleted sections in MR --- .../selling/doctype/quotation_item/quotation_item.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 326ea13527..1aa86ae539 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -58,6 +58,7 @@ "base_net_amount", "pricing_rules", "stock_uom_rate", + "section_break_43", "valuation_rate", "last_purchase_rate", "column_break_45", @@ -751,6 +752,12 @@ "label": "Additional Costs Amount", "print_hide": 1 }, + { + "fieldname": "costs_section", + "fieldtype": "Section Break", + "hide_border": 1, + "label": "Costs Calculation" + }, { "default": "Valuation Rate", "fieldname": "gross_profit_calculation_rule", @@ -819,13 +826,12 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2025-10-24 12:21:16.935731", + "modified": "2025-10-24 16:05:10.150394", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", "owner": "Administrator", "permissions": [], - "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], -- GitLab