From b84fd468411a7ddd79b3bfade9e27760aa212ece Mon Sep 17 00:00:00 2001 From: kavin-114 Date: Fri, 23 Jan 2026 02:09:36 +0530 Subject: [PATCH] feat(credit-note): add checkbox to set valuation rate as zero for expired batch (cherry picked from commit 04cdf887150cf895be269b69de9dc621e73a8bf2) --- .../doctype/selling_settings/selling_settings.json | 10 +++++++++- .../doctype/selling_settings/selling_settings.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.json b/erpnext/selling/doctype/selling_settings/selling_settings.json index 1b88bf79ac4..c98bba45b6d 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.json +++ b/erpnext/selling/doctype/selling_settings/selling_settings.json @@ -39,6 +39,7 @@ "enable_cutoff_date_on_bulk_delivery_note_creation", "allow_zero_qty_in_quotation", "allow_zero_qty_in_sales_order", + "set_zero_rate_for_expired_batch", "experimental_section", "use_legacy_js_reactivity", "subcontracting_inward_tab", @@ -289,6 +290,13 @@ "fieldname": "use_legacy_js_reactivity", "fieldtype": "Check", "label": "Use Legacy (Client side) Reactivity" + }, + { + "default": "0", + "description": "If enabled, system will set incoming rate as zero for stand-alone credit notes with expired batch item.", + "fieldname": "set_zero_rate_for_expired_batch", + "fieldtype": "Check", + "label": "Set Incoming Rate as Zero for Expired Batch" } ], "grid_page_length": 50, @@ -298,7 +306,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2026-01-21 17:28:37.027837", + "modified": "2026-01-23 00:04:33.105916", "modified_by": "Administrator", "module": "Selling", "name": "Selling Settings", diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.py b/erpnext/selling/doctype/selling_settings/selling_settings.py index 9d343b2c21c..9427a514c09 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/selling_settings.py @@ -44,6 +44,7 @@ class SellingSettings(Document): role_to_override_stop_action: DF.Link | None sales_update_frequency: DF.Literal["Monthly", "Each Transaction", "Daily"] selling_price_list: DF.Link | None + set_zero_rate_for_expired: DF.Check so_required: DF.Literal["No", "Yes"] territory: DF.Link | None use_legacy_js_reactivity: DF.Check