mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 16:21:19 +00:00
fix: budget naming series (#48075)
This commit is contained in:
@@ -7,10 +7,10 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
"naming_series",
|
||||||
"budget_against",
|
"budget_against",
|
||||||
"company",
|
"company",
|
||||||
"cost_center",
|
"cost_center",
|
||||||
"naming_series",
|
|
||||||
"project",
|
"project",
|
||||||
"fiscal_year",
|
"fiscal_year",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
@@ -199,12 +199,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "naming_series",
|
"fieldname": "naming_series",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Select",
|
||||||
"hidden": 1,
|
|
||||||
"label": "Series",
|
"label": "Series",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
|
"options": "BUDGET-.YYYY.-",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"reqd": 1,
|
||||||
"set_only_once": 1
|
"set_only_once": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-05-22 13:46:28.510566",
|
"modified": "2025-06-16 15:57:13.114981",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Budget",
|
"name": "Budget",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Budget(Document):
|
|||||||
cost_center: DF.Link | None
|
cost_center: DF.Link | None
|
||||||
fiscal_year: DF.Link
|
fiscal_year: DF.Link
|
||||||
monthly_distribution: DF.Link | None
|
monthly_distribution: DF.Link | None
|
||||||
naming_series: DF.Data | None
|
naming_series: DF.Literal["BUDGET-.YYYY.-"]
|
||||||
project: DF.Link | None
|
project: DF.Link | None
|
||||||
# end: auto-generated types
|
# end: auto-generated types
|
||||||
|
|
||||||
@@ -139,9 +139,6 @@ class Budget(Document):
|
|||||||
):
|
):
|
||||||
self.applicable_on_booking_actual_expenses = 1
|
self.applicable_on_booking_actual_expenses = 1
|
||||||
|
|
||||||
def before_naming(self):
|
|
||||||
self.naming_series = f"{{{frappe.scrub(self.budget_against)}}}./.{self.fiscal_year}/.###"
|
|
||||||
|
|
||||||
|
|
||||||
def validate_expense_against_budget(args, expense_amount=0):
|
def validate_expense_against_budget(args, expense_amount=0):
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user