feat: track purchases in accounting

This commit is contained in:
Rohit Waghchaure
2025-10-01 18:53:49 +05:30
parent a5a3f52c64
commit 05f2b43344
13 changed files with 270 additions and 16 deletions

View File

@@ -278,6 +278,8 @@ erpnext.company.setup_queries = function (frm) {
["depreciation_expense_account", { root_type: "Expense", account_type: "Depreciation" }],
["disposal_account", { report_type: "Profit and Loss" }],
["default_inventory_account", { account_type: "Stock" }],
["purchase_expense_account", { root_type: "Expense" }],
["purchase_expense_contra_account", { root_type: "Expense" }],
["cost_center", {}],
["round_off_cost_center", {}],
["depreciation_cost_center", {}],

View File

@@ -106,6 +106,10 @@
"default_warehouse_for_sales_return",
"credit_limit",
"transactions_annual_history",
"purchase_expense_section",
"purchase_expense_account",
"column_break_ereg",
"purchase_expense_contra_account",
"stock_tab",
"auto_accounting_for_stock_settings",
"enable_perpetual_inventory",
@@ -844,6 +848,27 @@
"options": "Currency",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "purchase_expense_section",
"fieldtype": "Section Break",
"label": "Purchase Expense"
},
{
"fieldname": "column_break_ereg",
"fieldtype": "Column Break"
},
{
"fieldname": "purchase_expense_account",
"fieldtype": "Link",
"label": "Purchase Expense Account",
"options": "Account"
},
{
"fieldname": "purchase_expense_contra_account",
"fieldtype": "Link",
"label": "Purchase Expense Contra Account",
"options": "Account"
}
],
"icon": "fa fa-building",
@@ -851,7 +876,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2025-08-25 18:34:03.602046",
"modified": "2025-10-01 17:34:10.971627",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",

View File

@@ -86,6 +86,8 @@ class Company(NestedSet):
parent_company: DF.Link | None
payment_terms: DF.Link | None
phone_no: DF.Data | None
purchase_expense_account: DF.Link | None
purchase_expense_contra_account: DF.Link | None
reconcile_on_advance_payment_date: DF.Check
reconciliation_takes_effect_on: DF.Literal[
"Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date"