diff --git a/golden/expected_osv_parse/synthetic/s40_flat_header_account.json b/golden/expected_osv_parse/synthetic/s40_flat_header_account.json index aaa1295..2110597 100644 --- a/golden/expected_osv_parse/synthetic/s40_flat_header_account.json +++ b/golden/expected_osv_parse/synthetic/s40_flat_header_account.json @@ -1,8 +1,170 @@ { - "status": "error", - "error": { - "code": "INVALID_FORMAT", - "message": "лист «Лист_1», шаг «иерархия строк»: иерархия строк не определена" + "schema_version": "2.0", + "service": { + "name": "tabular-parser" }, - "metrics": {} + "status": "done", + "metrics": { + "rows": 3, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Лист_1", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_HEADER_ACCOUNT", + "severity": "info", + "message": "иерархия строк — плоский список под счётом шапки (header_account)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + } + ], + "header": { + "organization_name": "ООО \"Товарное хозяйство\"", + "organization_inn": null, + "account_code_raw": "76.Н.1", + "period_text": "2025 г.", + "period_year": 2025, + "period_quarter": "Q4", + "is_cumulative": true, + "period_start": "2025-01-01", + "period_end": "2025-12-31", + "is_from_year_start": true, + "data_type": null, + "currency": null, + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "name": "Субконто" + }, + { + "type": "COUNTERPARTY", + "name": "Контрагенты" + } + ], + "columns": { + "opening_debit": "B", + "opening_credit": "C", + "turnover_debit": "D", + "turnover_credit": "E", + "closing_debit": "F", + "closing_credit": "G" + }, + "rows": [ + { + "row_number": 11, + "level": 0, + "parent_row_number": null, + "row_value": "Август - Агро ООО", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "76.Н.1", + "counterparty_name": "Август - Агро ООО", + "counterparty_inn": null, + "data_type": null, + "opening_debit": "1000.00", + "opening_credit": null, + "turnover_debit": "500.00", + "turnover_credit": "300.00", + "closing_debit": "1200.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 12, + "level": 0, + "parent_row_number": null, + "row_value": "АВИС ООО", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "76.Н.1", + "counterparty_name": "АВИС ООО", + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": "200.00", + "turnover_debit": "100.00", + "turnover_credit": "400.00", + "closing_debit": null, + "closing_credit": "500.00", + "extra": null + }, + { + "row_number": 13, + "level": 0, + "parent_row_number": null, + "row_value": "Агроаспект ООО", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "76.Н.1", + "counterparty_name": "Агроаспект ООО", + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": null, + "turnover_debit": "50.00", + "turnover_credit": "50.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 14, + "level": 0, + "parent_row_number": null, + "row_value": "Итого развернутое", + "group_type": "TOTAL", + "group_name": null, + "account_code_raw": null, + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "1000.00", + "opening_credit": "200.00", + "turnover_debit": "650.00", + "turnover_credit": "750.00", + "closing_debit": "1200.00", + "closing_credit": "500.00", + "extra": null + }, + { + "row_number": 15, + "level": 0, + "parent_row_number": null, + "row_value": "Итого", + "group_type": "TOTAL", + "group_name": null, + "account_code_raw": null, + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "800.00", + "opening_credit": null, + "turnover_debit": "650.00", + "turnover_credit": "750.00", + "closing_debit": "700.00", + "closing_credit": null, + "extra": null + } + ], + "checks": { + "total_row_matches_root": true, + "balance_identity_violations": [], + "parent_sum_violations": [] + } + } + ] } diff --git a/golden/expected_osv_parse/synthetic/s41_flat_chart_of_accounts.json b/golden/expected_osv_parse/synthetic/s41_flat_chart_of_accounts.json index aaa1295..d8667f5 100644 --- a/golden/expected_osv_parse/synthetic/s41_flat_chart_of_accounts.json +++ b/golden/expected_osv_parse/synthetic/s41_flat_chart_of_accounts.json @@ -1,8 +1,151 @@ { - "status": "error", - "error": { - "code": "INVALID_FORMAT", - "message": "лист «Лист_1», шаг «иерархия строк»: иерархия строк не определена" + "schema_version": "2.0", + "service": { + "name": "tabular-parser" }, - "metrics": {} + "status": "done", + "metrics": { + "rows": 2, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Лист_1", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_HEADER_ACCOUNT", + "severity": "info", + "message": "иерархия строк — плоский список под счётом шапки (header_account)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + } + ], + "header": { + "organization_name": "ООО Хреновская Нива", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "2 Квартал 2026 г.", + "period_year": 2026, + "period_quarter": "Q2", + "is_cumulative": false, + "period_start": "2026-04-01", + "period_end": "2026-06-30", + "is_from_year_start": false, + "data_type": null, + "currency": null, + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "name": "Субконто" + }, + { + "type": "COUNTERPARTY", + "name": "Организации" + } + ], + "columns": { + "opening_debit": "B", + "opening_credit": "C", + "turnover_debit": "D", + "turnover_credit": "E", + "closing_debit": "F", + "closing_credit": "G" + }, + "rows": [ + { + "row_number": 7, + "level": 0, + "parent_row_number": null, + "row_value": "Автодор-Платные Дороги ООО", + "group_type": "COUNTERPARTY", + "group_name": "Организации", + "account_code_raw": "60", + "counterparty_name": "Автодор-Платные Дороги ООО", + "counterparty_inn": null, + "data_type": null, + "opening_debit": "820.21", + "opening_credit": null, + "turnover_debit": "5000.00", + "turnover_credit": "4991.00", + "closing_debit": "829.21", + "closing_credit": null, + "extra": null + }, + { + "row_number": 8, + "level": 0, + "parent_row_number": null, + "row_value": "АГРОПРОФИ ООО", + "group_type": "COUNTERPARTY", + "group_name": "Организации", + "account_code_raw": "60", + "counterparty_name": "АГРОПРОФИ ООО", + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": "2763.79", + "turnover_debit": null, + "turnover_credit": null, + "closing_debit": null, + "closing_credit": "2763.79", + "extra": null + }, + { + "row_number": 9, + "level": 0, + "parent_row_number": null, + "row_value": "Итого развернутое", + "group_type": "TOTAL", + "group_name": null, + "account_code_raw": null, + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "820.21", + "opening_credit": "2763.79", + "turnover_debit": "5000.00", + "turnover_credit": "4991.00", + "closing_debit": "829.21", + "closing_credit": "2763.79", + "extra": null + }, + { + "row_number": 10, + "level": 0, + "parent_row_number": null, + "row_value": "Итого", + "group_type": "TOTAL", + "group_name": null, + "account_code_raw": null, + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": "1943.58", + "turnover_debit": "5000.00", + "turnover_credit": "4991.00", + "closing_debit": null, + "closing_credit": "1934.58", + "extra": null + } + ], + "checks": { + "total_row_matches_root": true, + "balance_identity_violations": [], + "parent_sum_violations": [] + } + } + ] } diff --git a/osv/synthetic/s40_flat_header_account.xlsx b/osv/synthetic/s40_flat_header_account.xlsx index 5f201a3..f16d040 100644 Binary files a/osv/synthetic/s40_flat_header_account.xlsx and b/osv/synthetic/s40_flat_header_account.xlsx differ diff --git a/osv/synthetic/s41_flat_chart_of_accounts.xlsx b/osv/synthetic/s41_flat_chart_of_accounts.xlsx index 258c5f4..2757364 100644 Binary files a/osv/synthetic/s41_flat_chart_of_accounts.xlsx and b/osv/synthetic/s41_flat_chart_of_accounts.xlsx differ