diff --git a/golden/expected_osv_parse/synthetic/s40_flat_header_account.json b/golden/expected_osv_parse/synthetic/s40_flat_header_account.json new file mode 100644 index 0000000..aaa1295 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s40_flat_header_account.json @@ -0,0 +1,8 @@ +{ + "status": "error", + "error": { + "code": "INVALID_FORMAT", + "message": "лист «Лист_1», шаг «иерархия строк»: иерархия строк не определена" + }, + "metrics": {} +} 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 new file mode 100644 index 0000000..aaa1295 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s41_flat_chart_of_accounts.json @@ -0,0 +1,8 @@ +{ + "status": "error", + "error": { + "code": "INVALID_FORMAT", + "message": "лист «Лист_1», шаг «иерархия строк»: иерархия строк не определена" + }, + "metrics": {} +} diff --git a/golden/expected_osv_parse/synthetic/s42_subaccounts_totals_reversed.json b/golden/expected_osv_parse/synthetic/s42_subaccounts_totals_reversed.json new file mode 100644 index 0000000..ad11ab2 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s42_subaccounts_totals_reversed.json @@ -0,0 +1,204 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "needs_check", + "metrics": { + "rows": 5, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Лист_1", + "status": "needs_check", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_ACCOUNT_PATTERN", + "severity": "info", + "message": "иерархия строк — по кодам счетов (account_pattern)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «76.2» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + }, + { + "code": "OSV_BALANCE_IDENTITY", + "severity": "info", + "message": "§1.4: сальдо на начало + обороты ≠ сальдо на конец (±0.01): строки 14" + }, + { + "code": "OSV_PARENT_SUM", + "severity": "info", + "message": "§1.4: суммы родителя ≠ сумме детей (±0.01): строки 13" + } + ], + "header": { + "organization_name": "ООО \"Товарное хозяйство\"", + "organization_inn": null, + "account_code_raw": "76.2", + "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": "Субконто" + } + ], + "columns": { + "opening_debit": "B", + "opening_credit": "C", + "turnover_debit": "D", + "turnover_credit": "E", + "closing_debit": "F", + "closing_credit": "G" + }, + "rows": [ + { + "row_number": 10, + "level": 0, + "parent_row_number": null, + "row_value": "76.2", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "76.2", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "1000.00", + "opening_credit": null, + "turnover_debit": null, + "turnover_credit": "1000.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 11, + "level": 0, + "parent_row_number": null, + "row_value": "76.5", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "76.5", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": "300.00", + "turnover_debit": "700.00", + "turnover_credit": "600.00", + "closing_debit": null, + "closing_credit": "200.00", + "extra": null + }, + { + "row_number": 12, + "level": 0, + "parent_row_number": null, + "row_value": "76.Н", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "76.Н", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": null, + "turnover_debit": "5000.00", + "turnover_credit": "5000.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 13, + "level": 1, + "parent_row_number": 12, + "row_value": "76.Н.1", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "76.Н.1", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": null, + "turnover_debit": "5000.00", + "turnover_credit": "5000.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 14, + "level": 2, + "parent_row_number": 13, + "row_value": "Итого развернутое", + "group_type": "OTHER", + "group_name": null, + "account_code_raw": "76.Н.1", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "1000.00", + "opening_credit": "300.00", + "turnover_debit": null, + "turnover_credit": null, + "closing_debit": null, + "closing_credit": "200.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": "700.00", + "opening_credit": null, + "turnover_debit": "5700.00", + "turnover_credit": "6600.00", + "closing_debit": null, + "closing_credit": "200.00", + "extra": null + } + ], + "checks": { + "total_row_matches_root": true, + "balance_identity_violations": [ + 14 + ], + "parent_sum_violations": [ + 13 + ] + } + } + ] +} diff --git a/golden/expected_osv_parse/synthetic/s43_subkonto_unnamed_60.json b/golden/expected_osv_parse/synthetic/s43_subkonto_unnamed_60.json new file mode 100644 index 0000000..1413728 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s43_subkonto_unnamed_60.json @@ -0,0 +1,166 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 3, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Лист_1", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_INDENT", + "severity": "info", + "message": "иерархия строк — по отступам (indent)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + } + ], + "header": { + "organization_name": "ООО \"Октябрьское\"", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "9 месяцев 2024 г.", + "period_year": 2024, + "period_quarter": "Q3", + "is_cumulative": true, + "period_start": "2024-01-01", + "period_end": "2024-09-30", + "is_from_year_start": true, + "data_type": null, + "currency": null, + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "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": "60.01", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "60.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 8, + "level": 1, + "parent_row_number": 7, + "row_value": "ИП Знаменских А.И.", + "group_type": "OTHER", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "34618000.00", + "opening_credit": null, + "turnover_debit": null, + "turnover_credit": "34618000.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 9, + "level": 1, + "parent_row_number": 7, + "row_value": "ООО \"ЭСТЕТ ОМСК\"", + "group_type": "OTHER", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "4236500.00", + "closing_debit": null, + "closing_credit": null, + "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": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 11, + "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": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "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/s44_subkonto_unnamed_10.json b/golden/expected_osv_parse/synthetic/s44_subkonto_unnamed_10.json new file mode 100644 index 0000000..ef89306 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s44_subkonto_unnamed_10.json @@ -0,0 +1,166 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 3, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Лист_1", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_INDENT", + "severity": "info", + "message": "иерархия строк — по отступам (indent)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + } + ], + "header": { + "organization_name": "ООО \"Октябрьское\"", + "organization_inn": null, + "account_code_raw": "10", + "period_text": "9 месяцев 2024 г.", + "period_year": 2024, + "period_quarter": "Q3", + "is_cumulative": true, + "period_start": "2024-01-01", + "period_end": "2024-09-30", + "is_from_year_start": true, + "data_type": null, + "currency": null, + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "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": "10.01", + "group_type": "ACCOUNT", + "group_name": "Субконто", + "account_code_raw": "10.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 8, + "level": 1, + "parent_row_number": 7, + "row_value": "Мука пшеничная", + "group_type": "OTHER", + "group_name": null, + "account_code_raw": "10.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": "34618000.00", + "opening_credit": null, + "turnover_debit": null, + "turnover_credit": "34618000.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 9, + "level": 1, + "parent_row_number": 7, + "row_value": "Сахар-песок", + "group_type": "OTHER", + "group_name": null, + "account_code_raw": "10.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": null, + "opening_debit": null, + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "4236500.00", + "closing_debit": null, + "closing_credit": null, + "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": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 11, + "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": "34618000.00", + "opening_credit": null, + "turnover_debit": "4236500.00", + "turnover_credit": "38854500.00", + "closing_debit": null, + "closing_credit": null, + "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 new file mode 100644 index 0000000..5f201a3 Binary files /dev/null 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 new file mode 100644 index 0000000..258c5f4 Binary files /dev/null and b/osv/synthetic/s41_flat_chart_of_accounts.xlsx differ diff --git a/osv/synthetic/s42_subaccounts_totals_reversed.xlsx b/osv/synthetic/s42_subaccounts_totals_reversed.xlsx new file mode 100644 index 0000000..e6dc7f5 Binary files /dev/null and b/osv/synthetic/s42_subaccounts_totals_reversed.xlsx differ diff --git a/osv/synthetic/s43_subkonto_unnamed_60.xlsx b/osv/synthetic/s43_subkonto_unnamed_60.xlsx new file mode 100644 index 0000000..43114b8 Binary files /dev/null and b/osv/synthetic/s43_subkonto_unnamed_60.xlsx differ diff --git a/osv/synthetic/s44_subkonto_unnamed_10.xlsx b/osv/synthetic/s44_subkonto_unnamed_10.xlsx new file mode 100644 index 0000000..46da380 Binary files /dev/null and b/osv/synthetic/s44_subkonto_unnamed_10.xlsx differ