diff --git a/golden/expected_osv_parse/synthetic/s48_other_system_titles.json b/golden/expected_osv_parse/synthetic/s48_other_system_titles.json new file mode 100644 index 0000000..af3728d --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s48_other_system_titles.json @@ -0,0 +1,53 @@ +{ + "status": "error", + "error": { + "code": "INVALID_DOCUMENT", + "message": "в книге нет листов ОСВ или форм: листов просмотрено 7" + }, + "metrics": { + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:ОВ" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:ОСВ сокр" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Оборотный баланс" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Навижн" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Главная книга" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Верхний регистр" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Вторая колонка" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s49_balance_and_turnover_by_side.json b/golden/expected_osv_parse/synthetic/s49_balance_and_turnover_by_side.json new file mode 100644 index 0000000..c5c30b9 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s49_balance_and_turnover_by_side.json @@ -0,0 +1,23 @@ +{ + "status": "error", + "error": { + "code": "INVALID_DOCUMENT", + "message": "в книге нет листов ОСВ или форм: листов просмотрено 2" + }, + "metrics": { + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Остатки" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Остатки по сторонам" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s50_sap_in_out_glued_side.json b/golden/expected_osv_parse/synthetic/s50_sap_in_out_glued_side.json new file mode 100644 index 0000000..52b28f1 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s50_sap_in_out_glued_side.json @@ -0,0 +1,17 @@ +{ + "status": "error", + "error": { + "code": "INVALID_FORMAT", + "message": "лист «НМЖК», шаг «заголовок таблицы»: не найден заголовок таблицы ОСВ — нет групп сумм «сальдо на начало», «обороты», «сальдо на конец»" + }, + "metrics": { + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:SAP" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s51_untitled_navision.json b/golden/expected_osv_parse/synthetic/s51_untitled_navision.json new file mode 100644 index 0000000..4e3f44c --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s51_untitled_navision.json @@ -0,0 +1,17 @@ +{ + "status": "error", + "error": { + "code": "INVALID_DOCUMENT", + "message": "в книге нет листов ОСВ или форм: листов просмотрено 1" + }, + "metrics": { + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:ОВ" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s52_mixed_book.json b/golden/expected_osv_parse/synthetic/s52_mixed_book.json new file mode 100644 index 0000000..42bda39 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s52_mixed_book.json @@ -0,0 +1,393 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "needs_check", + "metrics": { + "rows": 11, + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Справка" + } + ] + }, + "documents": [ + { + "document_type": "BALANCE", + "locator": "sheet:Бухгалтерский баланс,ОВ", + "status": "needs_check", + "form_variant": "full", + "warnings": [ + { + "code": "SEGMENT_COLUMNS_MISMATCH", + "severity": "error", + "message": "в сегменте со строки 7 колонок значений 5, в первом сегменте 1; лишние столбцы сегмента: 3, 4, 5, 6" + }, + { + "code": "NO_ORGANIZATION_NO_INN", + "severity": "error", + "message": "В шапке нет ни организации, ни ИНН" + }, + { + "code": "UNITS_NOT_FOUND", + "severity": "info", + "message": "Единицы измерения не найдены", + "field": "units" + } + ], + "header": { + "form_name": "Бухгалтерский баланс", + "organization_name": null, + "organization_name_text": null, + "organization_name_confidence": null, + "inn": null, + "inn_text": null, + "inn_confidence": null, + "report_date": "2025-09-30", + "report_date_text": "на 30 сентября 2025 г.", + "report_date_confidence": 100.0, + "units": null, + "units_text": null, + "units_confidence": null, + "okud": "0710001", + "okud_text": "Форма по ОКУД 0710001", + "okud_confidence": 100.0, + "okpo": null, + "okpo_text": null, + "okpo_confidence": null, + "okopf": null, + "okopf_text": null, + "okopf_confidence": null, + "okfs": null, + "okfs_text": null, + "okfs_confidence": null, + "okei": null, + "okei_text": null, + "okei_confidence": null, + "address": null, + "address_text": null, + "address_confidence": null, + "needs_review_fields": [] + }, + "columns": [ + { + "column_index": 2, + "label": "На 30.09.2025", + "label_confidence": 100.0, + "period_date": "2025-09-30", + "period_kind": "absolute" + } + ], + "lines": [ + { + "row_index": 0, + "ref": "'Бухгалтерский баланс'!B6", + "line_status": "ok", + "line_code": "1150", + "line_code_text": "1150", + "line_code_confidence": 100.0, + "line_name": "Основные средства", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "1200000.00", + "string_value": null, + "text": "1200000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": true + } + ] + }, + { + "row_index": 1, + "ref": "'Бухгалтерский баланс'!B7", + "line_status": "ok", + "line_code": "1210", + "line_code_text": "1210", + "line_code_confidence": 100.0, + "line_name": "Запасы", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "340000.00", + "string_value": null, + "text": "340000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": true + } + ] + }, + { + "row_index": 2, + "ref": "ОВ!B3", + "line_status": "ok", + "line_code": "15000", + "line_code_text": "15000", + "line_code_confidence": 100.0, + "line_name": "60.01", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "253000.50", + "string_value": null, + "text": "253000,5", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 3, + "ref": "ОВ!A4", + "line_status": "detail", + "line_code": null, + "line_code_text": null, + "line_code_confidence": null, + "line_name": "ООО Альфа", + "line_name_confidence": 100.0, + "parent_ref": "ОВ!B3", + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "250000.50", + "string_value": null, + "text": "250000,5", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 4, + "ref": "ОВ!B5", + "line_status": "ok", + "line_code": "15000", + "line_code_text": "15000", + "line_code_confidence": 100.0, + "line_name": "ООО Бета", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": null, + "string_value": null, + "text": null, + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 5, + "ref": "ОВ!A6", + "line_status": "detail", + "line_code": null, + "line_code_text": null, + "line_code_confidence": null, + "line_name": "Иванов Иван", + "line_name_confidence": 100.0, + "parent_ref": "ОВ!B5", + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "3000.00", + "string_value": null, + "text": "3000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 6, + "ref": "ОВ!B7", + "line_status": "unreadable", + "line_code": null, + "line_code_text": "120000", + "line_code_confidence": 100.0, + "line_name": "60.02", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "9500.10", + "string_value": null, + "text": "9500,1", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 7, + "ref": "ОВ!B8", + "line_status": "unreadable", + "line_code": null, + "line_code_text": "120000", + "line_code_confidence": 100.0, + "line_name": "ООО Гамма", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": null, + "string_value": null, + "text": null, + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 8, + "ref": "ОВ!A9", + "line_status": "detail", + "line_code": null, + "line_code_text": null, + "line_code_confidence": null, + "line_name": "ООО Дельта", + "line_name_confidence": 100.0, + "parent_ref": "ОВ!B5", + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "8000.10", + "string_value": null, + "text": "8000,1", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 9, + "ref": "ОВ!A10", + "line_status": "detail", + "line_code": null, + "line_code_text": null, + "line_code_confidence": null, + "line_name": "ИП Сидоров", + "line_name_confidence": 100.0, + "parent_ref": "ОВ!B5", + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "1500.00", + "string_value": null, + "text": "1500", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + }, + { + "row_index": 10, + "ref": "ОВ!B11", + "line_status": "unreadable", + "line_code": null, + "line_code_text": "135000", + "line_code_confidence": 100.0, + "line_name": "Итого", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "262500.60", + "string_value": null, + "text": "262500,6", + "confidence": 100.0, + "is_recognized": true, + "needs_review": false + } + ] + } + ], + "checks": { + "relations_failed": [ + { + "column_index": 2, + "relation": "1100 = 1105 + 1110 + 1120 + 1130 + 1140 + 1150 + 1160 + 1170 + 1180 + 1190", + "codes": [ + "1100", + "1105", + "1110", + "1120", + "1130", + "1140", + "1150", + "1160", + "1170", + "1180", + "1190" + ], + "expected": null, + "actual": "1200000.00" + }, + { + "column_index": 2, + "relation": "1200 = 1210 + 1215 + 1220 + 1230 + 1240 + 1250 + 1260", + "codes": [ + "1200", + "1210", + "1215", + "1220", + "1230", + "1240", + "1250", + "1260" + ], + "expected": null, + "actual": "340000.00" + } + ], + "soft_relations_failed": [ + { + "column_index": 2, + "relation": "1500 = 15000", + "codes": [ + "1500", + "15000" + ], + "expected": null, + "actual": "253000.50" + } + ] + } + } + ] +} diff --git a/golden/expected_osv_parse/synthetic/s53_balance_by_side.json b/golden/expected_osv_parse/synthetic/s53_balance_by_side.json new file mode 100644 index 0000000..1f21c3c --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s53_balance_by_side.json @@ -0,0 +1,28 @@ +{ + "status": "error", + "error": { + "code": "INVALID_DOCUMENT", + "message": "в книге нет листов ОСВ или форм: листов просмотрено 2" + }, + "metrics": { + "warnings": [ + { + "code": "XLS_NO_CODEPAGE", + "severity": "info", + "message": "xls без кодовой страницы — строки прочитаны как cp1251" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Остатки" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Остатки по сторонам" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s54_untitled_navision.json b/golden/expected_osv_parse/synthetic/s54_untitled_navision.json new file mode 100644 index 0000000..4e3f44c --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s54_untitled_navision.json @@ -0,0 +1,17 @@ +{ + "status": "error", + "error": { + "code": "INVALID_DOCUMENT", + "message": "в книге нет листов ОСВ или форм: листов просмотрено 1" + }, + "metrics": { + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:ОВ" + } + ] + } +} diff --git a/golden/expected_osv_parse/synthetic/s55_not_osv_titles.json b/golden/expected_osv_parse/synthetic/s55_not_osv_titles.json new file mode 100644 index 0000000..e771d5a --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s55_not_osv_titles.json @@ -0,0 +1,276 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 9, + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Справка" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Капитал" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Обороты счета" + } + ] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:ОСВ 60", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + } + ], + "header": { + "organization_name": "ООО \"Тестовая организация\"", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "1 квартал 2025 г.", + "period_year": 2025, + "period_quarter": "Q1", + "is_cumulative": true, + "period_start": "2025-01-01", + "period_end": "2025-03-31", + "is_from_year_start": true, + "data_type": "BU", + "currency": "RUB", + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "name": "Счет" + }, + { + "type": "COUNTERPARTY", + "name": "Контрагенты", + "has_inn": true + } + ], + "columns": { + "opening_debit": "G", + "opening_credit": "H", + "turnover_debit": "I", + "turnover_credit": "J", + "closing_debit": "K", + "closing_credit": "L", + "inn": "E" + }, + "rows": [ + { + "row_number": 11, + "level": 0, + "parent_row_number": null, + "row_value": "60", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "135000.00", + "opening_credit": "262500.60", + "turnover_debit": "311000.35", + "turnover_credit": "572000.35", + "closing_debit": "115000.00", + "closing_credit": "503500.60", + "extra": null + }, + { + "row_number": 12, + "level": 1, + "parent_row_number": 11, + "row_value": "60.01", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "15000.00", + "opening_credit": "253000.50", + "turnover_debit": "273000.25", + "turnover_credit": "460000.00", + "closing_debit": "65000.00", + "closing_credit": "490000.25", + "extra": null + }, + { + "row_number": 13, + "level": 2, + "parent_row_number": 12, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": "7701234567", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "250000.50", + "turnover_debit": "180000.25", + "turnover_credit": "420000.00", + "closing_debit": null, + "closing_credit": "490000.25", + "extra": null + }, + { + "row_number": 14, + "level": 2, + "parent_row_number": 12, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": "7707654321", + "data_type": "BU", + "opening_debit": "15000.00", + "opening_credit": null, + "turnover_debit": "90000.00", + "turnover_credit": "40000.00", + "closing_debit": "65000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 15, + "level": 2, + "parent_row_number": 12, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "Иванов Иван", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": null, + "opening_credit": "3000.00", + "turnover_debit": "3000.00", + "turnover_credit": null, + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 16, + "level": 1, + "parent_row_number": 11, + "row_value": "60.02", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60.02", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "120000.00", + "opening_credit": "9500.10", + "turnover_debit": "38000.10", + "turnover_credit": "112000.35", + "closing_debit": "50000.00", + "closing_credit": "13500.35", + "extra": null + }, + { + "row_number": 17, + "level": 2, + "parent_row_number": 16, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": "5001234567", + "data_type": "BU", + "opening_debit": "120000.00", + "opening_credit": null, + "turnover_debit": "30000.00", + "turnover_credit": "100000.00", + "closing_debit": "50000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 18, + "level": 2, + "parent_row_number": 16, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": "7812345678", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "8000.10", + "turnover_debit": "8000.10", + "turnover_credit": "12000.35", + "closing_debit": null, + "closing_credit": "12000.35", + "extra": null + }, + { + "row_number": 19, + "level": 2, + "parent_row_number": 16, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": "500100732259", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "1500.00", + "turnover_debit": null, + "turnover_credit": null, + "closing_debit": null, + "closing_credit": "1500.00", + "extra": null + }, + { + "row_number": 20, + "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": "BU", + "opening_debit": "135000.00", + "opening_credit": "262500.60", + "turnover_debit": "311000.35", + "turnover_credit": "572000.35", + "closing_debit": "115000.00", + "closing_credit": "503500.60", + "extra": null + } + ], + "checks": { + "total_row_matches_root": true, + "balance_identity_violations": [], + "parent_sum_violations": [] + } + } + ] +} diff --git a/golden/expected_osv_parse/synthetic/s56_almost_osv_tables.json b/golden/expected_osv_parse/synthetic/s56_almost_osv_tables.json new file mode 100644 index 0000000..052bdfe --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s56_almost_osv_tables.json @@ -0,0 +1,282 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 9, + "warnings": [ + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Расшифровка" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Без начала" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Свёрнутое начало" + }, + { + "code": "SHEET_OTHER", + "severity": "info", + "message": "лист без признаков ОСВ и формы", + "locator": "sheet:Ниже 30" + } + ] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:ОСВ 60", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + } + ], + "header": { + "organization_name": "ООО \"Тестовая организация\"", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "1 квартал 2025 г.", + "period_year": 2025, + "period_quarter": "Q1", + "is_cumulative": true, + "period_start": "2025-01-01", + "period_end": "2025-03-31", + "is_from_year_start": true, + "data_type": "BU", + "currency": "RUB", + "header_variant": 1 + }, + "group_schema": [ + { + "type": "ACCOUNT", + "name": "Счет" + }, + { + "type": "COUNTERPARTY", + "name": "Контрагенты", + "has_inn": true + } + ], + "columns": { + "opening_debit": "G", + "opening_credit": "H", + "turnover_debit": "I", + "turnover_credit": "J", + "closing_debit": "K", + "closing_credit": "L", + "inn": "E" + }, + "rows": [ + { + "row_number": 11, + "level": 0, + "parent_row_number": null, + "row_value": "60", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "135000.00", + "opening_credit": "262500.60", + "turnover_debit": "311000.35", + "turnover_credit": "572000.35", + "closing_debit": "115000.00", + "closing_credit": "503500.60", + "extra": null + }, + { + "row_number": 12, + "level": 1, + "parent_row_number": 11, + "row_value": "60.01", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "15000.00", + "opening_credit": "253000.50", + "turnover_debit": "273000.25", + "turnover_credit": "460000.00", + "closing_debit": "65000.00", + "closing_credit": "490000.25", + "extra": null + }, + { + "row_number": 13, + "level": 2, + "parent_row_number": 12, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": "7701234567", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "250000.50", + "turnover_debit": "180000.25", + "turnover_credit": "420000.00", + "closing_debit": null, + "closing_credit": "490000.25", + "extra": null + }, + { + "row_number": 14, + "level": 2, + "parent_row_number": 12, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": "7707654321", + "data_type": "BU", + "opening_debit": "15000.00", + "opening_credit": null, + "turnover_debit": "90000.00", + "turnover_credit": "40000.00", + "closing_debit": "65000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 15, + "level": 2, + "parent_row_number": 12, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.01", + "counterparty_name": "Иванов Иван", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": null, + "opening_credit": "3000.00", + "turnover_debit": "3000.00", + "turnover_credit": null, + "closing_debit": null, + "closing_credit": null, + "extra": null + }, + { + "row_number": 16, + "level": 1, + "parent_row_number": 11, + "row_value": "60.02", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "60.02", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "120000.00", + "opening_credit": "9500.10", + "turnover_debit": "38000.10", + "turnover_credit": "112000.35", + "closing_debit": "50000.00", + "closing_credit": "13500.35", + "extra": null + }, + { + "row_number": 17, + "level": 2, + "parent_row_number": 16, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": "5001234567", + "data_type": "BU", + "opening_debit": "120000.00", + "opening_credit": null, + "turnover_debit": "30000.00", + "turnover_credit": "100000.00", + "closing_debit": "50000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 18, + "level": 2, + "parent_row_number": 16, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": "7812345678", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "8000.10", + "turnover_debit": "8000.10", + "turnover_credit": "12000.35", + "closing_debit": null, + "closing_credit": "12000.35", + "extra": null + }, + { + "row_number": 19, + "level": 2, + "parent_row_number": 16, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": "Контрагенты", + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": "500100732259", + "data_type": "BU", + "opening_debit": null, + "opening_credit": "1500.00", + "turnover_debit": null, + "turnover_credit": null, + "closing_debit": null, + "closing_credit": "1500.00", + "extra": null + }, + { + "row_number": 20, + "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": "BU", + "opening_debit": "135000.00", + "opening_credit": "262500.60", + "turnover_debit": "311000.35", + "turnover_credit": "572000.35", + "closing_debit": "115000.00", + "closing_credit": "503500.60", + "extra": null + } + ], + "checks": { + "total_row_matches_root": true, + "balance_identity_violations": [], + "parent_sum_violations": [] + } + } + ] +} diff --git a/golden/expected_osv_parse/synthetic/s57_form_mentions_osv.json b/golden/expected_osv_parse/synthetic/s57_form_mentions_osv.json new file mode 100644 index 0000000..804cd13 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s57_form_mentions_osv.json @@ -0,0 +1,213 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "needs_check", + "metrics": { + "rows": 3, + "warnings": [] + }, + "documents": [ + { + "document_type": "BALANCE", + "locator": "sheet:Бухгалтерский баланс,Баланс (2)", + "status": "needs_check", + "form_variant": "full", + "warnings": [ + { + "code": "NO_ORGANIZATION_NO_INN", + "severity": "error", + "message": "В шапке нет ни организации, ни ИНН" + }, + { + "code": "UNITS_NOT_FOUND", + "severity": "info", + "message": "Единицы измерения не найдены", + "field": "units" + } + ], + "header": { + "form_name": "Бухгалтерский баланс", + "organization_name": null, + "organization_name_text": null, + "organization_name_confidence": null, + "inn": null, + "inn_text": null, + "inn_confidence": null, + "report_date": "2025-09-30", + "report_date_text": "на 30 сентября 2025 г.", + "report_date_confidence": 100.0, + "units": null, + "units_text": null, + "units_confidence": null, + "okud": "0710001", + "okud_text": "Форма по ОКУД 0710001", + "okud_confidence": 100.0, + "okpo": null, + "okpo_text": null, + "okpo_confidence": null, + "okopf": null, + "okopf_text": null, + "okopf_confidence": null, + "okfs": null, + "okfs_text": null, + "okfs_confidence": null, + "okei": null, + "okei_text": null, + "okei_confidence": null, + "address": null, + "address_text": null, + "address_confidence": null, + "needs_review_fields": [] + }, + "columns": [ + { + "column_index": 2, + "label": "На 30.09.2025", + "label_confidence": 100.0, + "period_date": "2025-09-30", + "period_kind": "absolute" + } + ], + "lines": [ + { + "row_index": 0, + "ref": "'Бухгалтерский баланс'!B6", + "line_status": "ok", + "line_code": "1150", + "line_code_text": "1150", + "line_code_confidence": 100.0, + "line_name": "Основные средства", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "1200000.00", + "string_value": null, + "text": "1200000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": true + } + ] + }, + { + "row_index": 1, + "ref": "'Бухгалтерский баланс'!B7", + "line_status": "ok", + "line_code": "1210", + "line_code_text": "1210", + "line_code_confidence": 100.0, + "line_name": "Запасы", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "340000.00", + "string_value": null, + "text": "340000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": true + } + ] + }, + { + "row_index": 2, + "ref": "'Баланс (2)'!B1", + "line_status": "ok", + "line_code": "1300", + "line_code_text": "1300", + "line_code_confidence": 100.0, + "line_name": "Капитал и резервы", + "line_name_confidence": 100.0, + "parent_ref": null, + "needs_review": false, + "values": [ + { + "column_index": 2, + "amount": "500000.00", + "string_value": null, + "text": "500000", + "confidence": 100.0, + "is_recognized": true, + "needs_review": true + } + ] + } + ], + "checks": { + "relations_failed": [ + { + "column_index": 2, + "relation": "1100 = 1105 + 1110 + 1120 + 1130 + 1140 + 1150 + 1160 + 1170 + 1180 + 1190", + "codes": [ + "1100", + "1105", + "1110", + "1120", + "1130", + "1140", + "1150", + "1160", + "1170", + "1180", + "1190" + ], + "expected": null, + "actual": "1200000.00" + }, + { + "column_index": 2, + "relation": "1200 = 1210 + 1215 + 1220 + 1230 + 1240 + 1250 + 1260", + "codes": [ + "1200", + "1210", + "1215", + "1220", + "1230", + "1240", + "1250", + "1260" + ], + "expected": null, + "actual": "340000.00" + }, + { + "column_index": 2, + "relation": "1300 = 1310 + 1320 + 1340 + 1350 + 1360 + 1370", + "codes": [ + "1300", + "1310", + "1320", + "1340", + "1350", + "1360", + "1370" + ], + "expected": "500000.00", + "actual": null + }, + { + "column_index": 2, + "relation": "1700 = 1300 + 1400 + 1500", + "codes": [ + "1700", + "1300", + "1400", + "1500" + ], + "expected": null, + "actual": "500000.00" + } + ], + "soft_relations_failed": [] + } + } + ] +}