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..51603eb --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s48_other_system_titles.json @@ -0,0 +1,1731 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 63, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:ОВ", + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:ОСВ сокр", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «60» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + } + ], + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Оборотный баланс", + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Навижн", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «60» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + } + ], + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Главная книга", + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Верхний регистр", + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Вторая колонка", + "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/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..8ec3e35 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s49_balance_and_turnover_by_side.json @@ -0,0 +1,410 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 13, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Остатки", + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Остатки по сторонам", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 62.01 приняты за контрагентов по плану счетов — проверьте" + } + ], + "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": "Счет" + } + ], + "columns": { + "opening_debit": "C", + "opening_credit": "D", + "turnover_debit": "E", + "turnover_credit": "F", + "closing_debit": "G", + "closing_credit": "H" + }, + "rows": [ + { + "row_number": 10, + "level": 0, + "parent_row_number": null, + "row_value": "62", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60", + "counterparty_name": "62", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 11, + "level": 1, + "parent_row_number": 10, + "row_value": "62.01", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "62.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 12, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Покупатель-1", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "62.01", + "counterparty_name": "ООО Покупатель-1", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": null, + "turnover_debit": "320000.00", + "turnover_credit": "410000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 13, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Покупатель-2", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "62.01", + "counterparty_name": "ООО Покупатель-2", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": null, + "opening_credit": "20000.00", + "turnover_debit": "75000.00", + "turnover_credit": "55000.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": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.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/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..33c762b --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s50_sap_in_out_glued_side.json @@ -0,0 +1,509 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 18, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:SAP", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.01 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.02 приняты за контрагентов по плану счетов — проверьте" + } + ], + "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": "Счет" + } + ], + "columns": { + "opening_debit": "C", + "opening_credit": "D", + "turnover_debit": "E", + "turnover_credit": "F", + "closing_debit": "G", + "closing_credit": "H" + }, + "rows": [ + { + "row_number": 10, + "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": 11, + "level": 1, + "parent_row_number": 10, + "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": 12, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": null, + "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": 13, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": null, + "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": 14, + "level": 2, + "parent_row_number": 11, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": null, + "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": 15, + "level": 1, + "parent_row_number": 10, + "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": 16, + "level": 2, + "parent_row_number": 15, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": null, + "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": 17, + "level": 2, + "parent_row_number": 15, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": null, + "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": 18, + "level": 2, + "parent_row_number": 15, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": null, + "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": 19, + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:НМЖК", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.01 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.02 приняты за контрагентов по плану счетов — проверьте" + } + ], + "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": "Счет" + } + ], + "columns": { + "opening_debit": "C", + "opening_credit": "D", + "turnover_debit": "E", + "turnover_credit": "F", + "closing_debit": "G", + "closing_credit": "H" + }, + "rows": [ + { + "row_number": 10, + "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": 11, + "level": 1, + "parent_row_number": 10, + "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": 12, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Дтвв-Сервис", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Дтвв-Сервис", + "counterparty_inn": null, + "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": 13, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": null, + "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": 14, + "level": 2, + "parent_row_number": 11, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": null, + "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": 15, + "level": 1, + "parent_row_number": 10, + "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": 16, + "level": 2, + "parent_row_number": 15, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": null, + "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": 17, + "level": 2, + "parent_row_number": 15, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": null, + "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": 18, + "level": 2, + "parent_row_number": 15, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": null, + "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": 19, + "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/s51_untitled_navision.json b/golden/expected_osv_parse/synthetic/s51_untitled_navision.json new file mode 100644 index 0000000..9f053d6 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s51_untitled_navision.json @@ -0,0 +1,291 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 9, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:ОВ", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "наименование организации в шапке не найдено" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "период (после «за» или «Период:») в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «60» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "вид данных в шапке не указан — строки без метки приняты как БУ" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.01 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.02 приняты за контрагентов по плану счетов — проверьте" + } + ], + "header": { + "organization_name": "", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "", + "period_year": null, + "period_quarter": null, + "is_cumulative": null, + "period_start": null, + "period_end": null, + "is_from_year_start": null, + "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": 2, + "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": 3, + "level": 1, + "parent_row_number": 2, + "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": 4, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": null, + "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": 5, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": null, + "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": 6, + "level": 2, + "parent_row_number": 3, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": null, + "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": 7, + "level": 1, + "parent_row_number": 2, + "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": 8, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": null, + "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": 9, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": null, + "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": 10, + "level": 2, + "parent_row_number": 7, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": null, + "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": 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": "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/s52_mixed_book.json b/golden/expected_osv_parse/synthetic/s52_mixed_book.json new file mode 100644 index 0000000..48d6ca2 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s52_mixed_book.json @@ -0,0 +1,448 @@ +{ + "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": "OSV", + "locator": "sheet:ОВ", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_OUTLINE", + "severity": "info", + "message": "иерархия строк — по группировке листа (outline)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "наименование организации в шапке не найдено" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "период (после «за» или «Период:») в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «60» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "вид данных в шапке не указан — строки без метки приняты как БУ" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.01 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.02 приняты за контрагентов по плану счетов — проверьте" + } + ], + "header": { + "organization_name": "", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "", + "period_year": null, + "period_quarter": null, + "is_cumulative": null, + "period_start": null, + "period_end": null, + "is_from_year_start": null, + "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": 2, + "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": 3, + "level": 1, + "parent_row_number": 2, + "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": 4, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": null, + "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": 5, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": null, + "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": 6, + "level": 2, + "parent_row_number": 3, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": null, + "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": 7, + "level": 1, + "parent_row_number": 2, + "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": 8, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": null, + "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": 9, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": null, + "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": 10, + "level": 2, + "parent_row_number": 7, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": null, + "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": 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": "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": [] + } + }, + { + "document_type": "BALANCE", + "locator": "sheet:Бухгалтерский баланс", + "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 + } + ] + } + ], + "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": [] + } + } + ] +} 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..e619032 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s53_balance_by_side.json @@ -0,0 +1,416 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 13, + "warnings": [ + { + "code": "XLS_NO_CODEPAGE", + "severity": "info", + "message": "xls без кодовой страницы — строки прочитаны как cp1251" + } + ] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:Остатки", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_INDENT", + "severity": "info", + "message": "иерархия строк — по отступам (indent)" + } + ], + "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": [] + } + }, + { + "document_type": "OSV", + "locator": "sheet:Остатки по сторонам", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_INDENT", + "severity": "info", + "message": "иерархия строк — по отступам (indent)" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 62.01 приняты за контрагентов по плану счетов — проверьте" + } + ], + "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": "Счет" + } + ], + "columns": { + "opening_debit": "C", + "opening_credit": "D", + "turnover_debit": "E", + "turnover_credit": "F", + "closing_debit": "G", + "closing_credit": "H" + }, + "rows": [ + { + "row_number": 10, + "level": 0, + "parent_row_number": null, + "row_value": "62", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60", + "counterparty_name": "62", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 11, + "level": 1, + "parent_row_number": 10, + "row_value": "62.01", + "group_type": "ACCOUNT", + "group_name": "Счет", + "account_code_raw": "62.01", + "counterparty_name": null, + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 12, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Покупатель-1", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "62.01", + "counterparty_name": "ООО Покупатель-1", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": "500000.00", + "opening_credit": null, + "turnover_debit": "320000.00", + "turnover_credit": "410000.00", + "closing_debit": "410000.00", + "closing_credit": null, + "extra": null + }, + { + "row_number": 13, + "level": 2, + "parent_row_number": 11, + "row_value": "ООО Покупатель-2", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "62.01", + "counterparty_name": "ООО Покупатель-2", + "counterparty_inn": null, + "data_type": "BU", + "opening_debit": null, + "opening_credit": "20000.00", + "turnover_debit": "75000.00", + "turnover_credit": "55000.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": "BU", + "opening_debit": "500000.00", + "opening_credit": "20000.00", + "turnover_debit": "395000.00", + "turnover_credit": "465000.00", + "closing_debit": "410000.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/s54_untitled_navision.json b/golden/expected_osv_parse/synthetic/s54_untitled_navision.json new file mode 100644 index 0000000..b0c08d3 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s54_untitled_navision.json @@ -0,0 +1,296 @@ +{ + "schema_version": "2.0", + "service": { + "name": "tabular-parser" + }, + "status": "done", + "metrics": { + "rows": 9, + "warnings": [] + }, + "documents": [ + { + "document_type": "OSV", + "locator": "sheet:ОВ", + "status": "done", + "warnings": [ + { + "code": "OSV_HIERARCHY_BY_INDENT", + "severity": "info", + "message": "иерархия строк — по отступам (indent)" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "наименование организации в шапке не найдено" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "период (после «за» или «Период:») в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "тип выводимых данных (БУ/НУ/сумма) в шапке не найден" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "валюта в шапке не найдена" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "код счёта «60» взят из первой строки-счёта таблицы: в шапке «по счету …» нет" + }, + { + "code": "OSV_HEADER", + "severity": "info", + "message": "вид данных в шапке не указан — строки без метки приняты как БУ" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.01 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_ROWS", + "severity": "info", + "message": "вид субконто в шапке не назван: строки аналитики счёта 60.02 приняты за контрагентов по плану счетов — проверьте" + }, + { + "code": "OSV_XLSB_NO_OUTLINE", + "severity": "info", + "message": "xlsb: outline level недоступен" + } + ], + "header": { + "organization_name": "", + "organization_inn": null, + "account_code_raw": "60", + "period_text": "", + "period_year": null, + "period_quarter": null, + "is_cumulative": null, + "period_start": null, + "period_end": null, + "is_from_year_start": null, + "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": 2, + "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": 3, + "level": 1, + "parent_row_number": 2, + "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": 4, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Альфа", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Альфа", + "counterparty_inn": null, + "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": 5, + "level": 2, + "parent_row_number": 3, + "row_value": "ООО Бета", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.01", + "counterparty_name": "ООО Бета", + "counterparty_inn": null, + "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": 6, + "level": 2, + "parent_row_number": 3, + "row_value": "Иванов Иван", + "group_type": "COUNTERPARTY", + "group_name": null, + "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": 7, + "level": 1, + "parent_row_number": 2, + "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": 8, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Гамма", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Гамма", + "counterparty_inn": null, + "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": 9, + "level": 2, + "parent_row_number": 7, + "row_value": "ООО Дельта", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ООО Дельта", + "counterparty_inn": null, + "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": 10, + "level": 2, + "parent_row_number": 7, + "row_value": "ИП Сидоров", + "group_type": "COUNTERPARTY", + "group_name": null, + "account_code_raw": "60.02", + "counterparty_name": "ИП Сидоров", + "counterparty_inn": null, + "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": 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": "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/s55_not_osv_titles.json b/golden/expected_osv_parse/synthetic/s55_not_osv_titles.json new file mode 100644 index 0000000..63b8853 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s55_not_osv_titles.json @@ -0,0 +1,319 @@ +{ + "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": [] + } + }, + { + "document_type": "DISCLOSURE", + "locator": "sheet:Входные данные", + "status": "done", + "form_variant": null, + "warnings": [], + "header": { + "form_name": "Расшифровка дебиторской задолженности", + "organization_name": null, + "organization_name_text": null, + "organization_name_confidence": null, + "inn": null, + "inn_text": null, + "inn_confidence": null, + "report_date": null, + "report_date_text": null, + "report_date_confidence": null, + "units": null, + "units_text": null, + "units_confidence": null, + "okud": null, + "okud_text": null, + "okud_confidence": null, + "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": [], + "lines": [] + } + ] +} 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..b741a17 --- /dev/null +++ b/golden/expected_osv_parse/synthetic/s56_almost_osv_tables.json @@ -0,0 +1,288 @@ +{ + "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" + }, + { + "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/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": [] + } + } + ] +} diff --git a/osv/synthetic/README.md b/osv/synthetic/README.md index 062e283..61e290a 100644 --- a/osv/synthetic/README.md +++ b/osv/synthetic/README.md @@ -73,6 +73,16 @@ cd tabular-parser/api `s20`–`s27` — восемь раскладок строки ИНН рядом с контрагентом (issue tabular-parser#35); ИНН с верной контрольной суммой — без подсказки в шапке другие не склеиваются. +`s48`–`s57` — ОСВ других учётных систем (tabular-parser#81, AURORA-1717/1719/1732), контрольный набор. Позитивы +`s48`–`s54`: названия ведомостей («Оборотная ведомость», «ОСВ по сч.», «Оборотный баланс», «Фин. Обороты Листок», +«Отчет по Главной книге»), итог «ВСЕГО», группы «Остаток на начало/конец», «Оборот по дебету», «Остаток по дебету на +начало», SAP «Сальдо вх/исх» и «…ДТВВ», Navision без названия ведомости (запасной признак по заголовку таблицы), книга +«форма + Navision + справка», те же раскладки в xls и xlsb; проверяют точные суммы по сторонам. Негативы `s55`–`s57`: +названия не с начала ячейки, «Оборотный капитал», 1С «Обороты счета» с корр. счетами между «Оборот Дт» и «Оборот Кт», +почти-ОСВ без названия (расшифровка с остатками, без «начала», свёрнутое начало, заголовок ниже 30-й строки), форма ББ +со словами «оборотная ведомость» и слабым продолжением — вид листов не меняется. Подписи взяты из реальных файлов банка +первичных документов (sha256 — в `admin/osv-other-systems-regress/headers.md` workspace). + ## О файле xlsb `s13_no_outline_indent.xlsb` собран **не Excel и не LibreOffice** (их на машине разработки нет), а минимальным diff --git a/osv/synthetic/s48_other_system_titles.xlsx b/osv/synthetic/s48_other_system_titles.xlsx new file mode 100644 index 0000000..3cd8b61 Binary files /dev/null and b/osv/synthetic/s48_other_system_titles.xlsx differ diff --git a/osv/synthetic/s49_balance_and_turnover_by_side.xlsx b/osv/synthetic/s49_balance_and_turnover_by_side.xlsx new file mode 100644 index 0000000..70ed384 Binary files /dev/null and b/osv/synthetic/s49_balance_and_turnover_by_side.xlsx differ diff --git a/osv/synthetic/s50_sap_in_out_glued_side.xlsx b/osv/synthetic/s50_sap_in_out_glued_side.xlsx new file mode 100644 index 0000000..4cc393b Binary files /dev/null and b/osv/synthetic/s50_sap_in_out_glued_side.xlsx differ diff --git a/osv/synthetic/s51_untitled_navision.xlsx b/osv/synthetic/s51_untitled_navision.xlsx new file mode 100644 index 0000000..c1a69fc Binary files /dev/null and b/osv/synthetic/s51_untitled_navision.xlsx differ diff --git a/osv/synthetic/s52_mixed_book.xlsx b/osv/synthetic/s52_mixed_book.xlsx new file mode 100644 index 0000000..8e848b9 Binary files /dev/null and b/osv/synthetic/s52_mixed_book.xlsx differ diff --git a/osv/synthetic/s53_balance_by_side.xls b/osv/synthetic/s53_balance_by_side.xls new file mode 100644 index 0000000..5d36c73 Binary files /dev/null and b/osv/synthetic/s53_balance_by_side.xls differ diff --git a/osv/synthetic/s54_untitled_navision.xlsb b/osv/synthetic/s54_untitled_navision.xlsb new file mode 100644 index 0000000..1d97f6d Binary files /dev/null and b/osv/synthetic/s54_untitled_navision.xlsb differ diff --git a/osv/synthetic/s55_not_osv_titles.xlsx b/osv/synthetic/s55_not_osv_titles.xlsx new file mode 100644 index 0000000..95eba33 Binary files /dev/null and b/osv/synthetic/s55_not_osv_titles.xlsx differ diff --git a/osv/synthetic/s56_almost_osv_tables.xlsx b/osv/synthetic/s56_almost_osv_tables.xlsx new file mode 100644 index 0000000..19fa045 Binary files /dev/null and b/osv/synthetic/s56_almost_osv_tables.xlsx differ diff --git a/osv/synthetic/s57_form_mentions_osv.xlsx b/osv/synthetic/s57_form_mentions_osv.xlsx new file mode 100644 index 0000000..1717262 Binary files /dev/null and b/osv/synthetic/s57_form_mentions_osv.xlsx differ