mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
fix: make account number length configurable (#23496)
* fix: make account number length configurable * Update datev.py Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"client",
|
"client",
|
||||||
|
"account_number_length",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
"client_number",
|
"client_number",
|
||||||
"section_break_4",
|
"section_break_4",
|
||||||
@@ -57,9 +58,16 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "column_break_6",
|
"fieldname": "column_break_6",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "4",
|
||||||
|
"fieldname": "account_number_length",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "Account Number Length",
|
||||||
|
"reqd": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2020-04-15 12:59:57.786506",
|
"modified": "2020-10-03 16:52:35.903867",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "DATEV Settings",
|
"name": "DATEV Settings",
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ def get_datev_csv(data, filters):
|
|||||||
# M = Start of the fiscal year (Wirtschaftsjahresbeginn)
|
# M = Start of the fiscal year (Wirtschaftsjahresbeginn)
|
||||||
frappe.utils.formatdate(filters.get("fiscal_year_start"), "yyyyMMdd"),
|
frappe.utils.formatdate(filters.get("fiscal_year_start"), "yyyyMMdd"),
|
||||||
# N = Length of account numbers (Sachkontenlänge)
|
# N = Length of account numbers (Sachkontenlänge)
|
||||||
"4",
|
str(filters.get('account_number_length', 4)),
|
||||||
# O = Transaction batch start date (YYYYMMDD)
|
# O = Transaction batch start date (YYYYMMDD)
|
||||||
frappe.utils.formatdate(filters.get('from_date'), "yyyyMMdd"),
|
frappe.utils.formatdate(filters.get('from_date'), "yyyyMMdd"),
|
||||||
# P = Transaction batch end date (YYYYMMDD)
|
# P = Transaction batch end date (YYYYMMDD)
|
||||||
@@ -521,6 +521,9 @@ def download_datev_csv(filters=None):
|
|||||||
filters = json.loads(filters)
|
filters = json.loads(filters)
|
||||||
|
|
||||||
validate(filters)
|
validate(filters)
|
||||||
|
|
||||||
|
filters['account_number_length'] = frappe.get_value('DATEV Settings', filters.get('company'), 'account_number_length')
|
||||||
|
|
||||||
fiscal_year = get_fiscal_year(date=filters.get('from_date'), company=filters.get('company'))
|
fiscal_year = get_fiscal_year(date=filters.get('from_date'), company=filters.get('company'))
|
||||||
filters['fiscal_year_start'] = fiscal_year[1]
|
filters['fiscal_year_start'] = fiscal_year[1]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user