From bb5d4d8682fce72670a0cfe99b2877720cb9f403 Mon Sep 17 00:00:00 2001 From: Pugazhendhi Velu Date: Sat, 21 Mar 2026 07:25:53 +0000 Subject: [PATCH] feat(company): add Stock Delivered But Not Billed account configuration --- .../verified/in_standard_chart_of_accounts.json | 4 ++++ erpnext/setup/doctype/company/company.js | 4 ++++ erpnext/setup/doctype/company/company.json | 17 +++++++++++++++++ erpnext/setup/doctype/company/company.py | 4 ++++ erpnext/setup/doctype/company/test_company.py | 1 + 5 files changed, 30 insertions(+) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json index 496cf4599b3..4a2584ae1b9 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json @@ -223,6 +223,10 @@ "Stock Received But Not Billed": { "account_type": "Stock Received But Not Billed", "account_category": "Trade Payables" + }, + "Stock Delivered But Not Billed": { + "account_type": "Stock Delivered But Not Billed", + "account_category": "Trade Payables" } }, "Duties and Taxes": { diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index bc700044f63..66acff63c0d 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -336,6 +336,10 @@ erpnext.company.setup_queries = function (frm) { "stock_received_but_not_billed", { root_type: "Liability", account_type: "Stock Received But Not Billed" }, ], + [ + "stock_delivered_but_not_billed", + { root_type: "Liability", account_type: "Stock Delivered But Not Billed" }, + ], [ "service_received_but_not_billed", { root_type: "Liability", account_type: "Service Received But Not Billed" }, diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index d8c3c227f64..49f61238839 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -130,6 +130,8 @@ "column_break_32", "stock_adjustment_account", "stock_received_but_not_billed", + "stock_delivered_but_not_billed", + "disable_sdbnb_in_sr", "default_provisional_account", "default_in_transit_warehouse", "manufacturing_section", @@ -979,6 +981,21 @@ { "fieldname": "column_break_zqmp", "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disable_sdbnb_in_sr", + "fieldtype": "Check", + "label": "Disable Stock Delivered But Not Billed in Sales Return", + "no_copy": 1 + }, + { + "fieldname": "stock_delivered_but_not_billed", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Stock Delivered But Not Billed", + "no_copy": 1, + "options": "Account" } ], "grid_page_length": 50, diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 44c87099e82..8e4071de24b 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -88,6 +88,7 @@ class Company(NestedSet): default_wip_warehouse: DF.Link | None depreciation_cost_center: DF.Link | None depreciation_expense_account: DF.Link | None + disable_sdbnb_in_sr: DF.Check disposal_account: DF.Link | None domain: DF.Data | None email: DF.Data | None @@ -122,6 +123,7 @@ class Company(NestedSet): series_for_depreciation_entry: DF.Data | None service_expense_account: DF.Link | None stock_adjustment_account: DF.Link | None + stock_delivered_but_not_billed: DF.Link | None stock_received_but_not_billed: DF.Link | None submit_err_jv: DF.Check tax_id: DF.Data | None @@ -251,6 +253,7 @@ class Company(NestedSet): ["Default Expense Account", "default_expense_account"], ["Default Income Account", "default_income_account"], ["Stock Received But Not Billed Account", "stock_received_but_not_billed"], + ["Stock Delivered But Not Billed Account", "stock_delivered_but_not_billed"], ["Stock Adjustment Account", "stock_adjustment_account"], ["Write Off Account", "write_off_account"], ["Default Payment Discount Account", "default_discount_account"], @@ -632,6 +635,7 @@ class Company(NestedSet): default_accounts.update( { "stock_received_but_not_billed": "Stock Received But Not Billed", + "stock_delivered_but_not_billed": "Stock Delivered But Not Billed", "default_inventory_account": "Stock", "stock_adjustment_account": "Stock Adjustment", } diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index db4e8c07482..566a976afd1 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -79,6 +79,7 @@ class TestCompany(ERPNextTestSuite): "Receivable", "Stock Adjustment", "Stock Received But Not Billed", + "Stock Delivered But Not Billed", "Bank", "Cash", "Stock",