feat: make account number length configurable (#23845)
This commit is contained in:
parent
4bf09dd02b
commit
8ff0d0cff6
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"autoname": "field:client",
|
"autoname": "field:client",
|
||||||
"creation": "2019-08-13 23:56:34.259906",
|
"creation": "2019-08-13 23:56:34.259906",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -6,6 +7,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",
|
||||||
@ -28,8 +30,8 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Client ID",
|
"label": "Client ID",
|
||||||
"reqd": 1,
|
"length": 5,
|
||||||
"length": 5
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "consultant",
|
"fieldname": "consultant",
|
||||||
@ -43,8 +45,8 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Consultant ID",
|
"label": "Consultant ID",
|
||||||
"reqd": 1,
|
"length": 7,
|
||||||
"length": 7
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_2",
|
"fieldname": "column_break_2",
|
||||||
@ -57,9 +59,17 @@
|
|||||||
{
|
{
|
||||||
"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": "2019-08-14 00:03:26.616460",
|
"links": [],
|
||||||
|
"modified": "2020-11-05 17:52:11.674329",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "DATEV Settings",
|
"name": "DATEV Settings",
|
||||||
|
@ -106,7 +106,7 @@ def get_header(filters, csv_class):
|
|||||||
# 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)
|
||||||
datev_settings.get('account_number_length', '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') if csv_class.DATA_CATEGORY == DataCategory.TRANSACTIONS else '',
|
frappe.utils.formatdate(filters.get('from_date'), 'yyyyMMdd') if csv_class.DATA_CATEGORY == DataCategory.TRANSACTIONS else '',
|
||||||
# P = Transaction batch end date (YYYYMMDD)
|
# P = Transaction batch end date (YYYYMMDD)
|
||||||
|
@ -340,6 +340,8 @@ def download_datev_csv(filters):
|
|||||||
coa = frappe.get_value('Company', company, 'chart_of_accounts')
|
coa = frappe.get_value('Company', company, 'chart_of_accounts')
|
||||||
filters['skr'] = '04' if 'SKR04' in coa else ('03' if 'SKR03' in coa else '')
|
filters['skr'] = '04' if 'SKR04' in coa else ('03' if 'SKR03' in coa else '')
|
||||||
|
|
||||||
|
filters['account_number_length'] = frappe.get_value('DATEV Settings', company, 'account_number_length')
|
||||||
|
|
||||||
transactions = get_transactions(filters)
|
transactions = get_transactions(filters)
|
||||||
account_names = get_account_names(filters)
|
account_names = get_account_names(filters)
|
||||||
customers = get_customers(filters)
|
customers = get_customers(filters)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user