15 Commits

Author SHA1 Message Date
Raykov-MS
880fa5811d Stop dropping XML values in the transfer and cash blocks
The customer's ruling of 24.09.2026 is that every value present in the XML
must reach the report, taking into account which block holds it. Two defects
broke that for operation code 5016 with transfer types 4 and 5.

Wrong paths in mapping_table.json. Columns 48-63 spelled the block as
"СведенияПереводыДс" and columns 49-59 spelled the address as
"АдрМестоПриемаВыдача"; the schema uses "СведенияПереводыДС" and
"АдрМестаПриемаВыдача". Those columns carry allow_short_lookup=false, so they
can only match on a fully scoped path and never matched at all: the whole cash
receipt block (AV-BI) and the transfer status (BJ) stayed empty on every file.
The existing test passed only because it fed the same misspellings.

Rules that deleted data instead of filling it:
- Rules 38, 44-45 and 46 wiped the account columns for code 5016. The XML of
  those records carries СчетБанкПолучатель = 00000000000000000000, which is
  exactly the value the customer asked for. The rules now only substitute the
  placeholder into an empty column, and never for 5016.
- Rule 44 also wiped the correspondent accounts for operator types 3 and 5
  even when the XML had them.
- The cashless rule wiped columns 50, 61, 65, 76, 84, 95, 99 and 101 for
  transfer types 1-4, 7 and 10-14, although type 4 is by definition a transfer
  that accepts cash and must carry the receipt block.
- Rule 62 limited the transfer status to types 2, 5 and 8.
- Rule 30 limited the metal name to code C99, while the available exports only
  ever carry code A90.

Verified on the sample exports: all 16 records with code 5016 now carry the
zeros in column 45, the real account in column 46, and no invented
placeholders in columns 38 and 44.
2026-09-24 14:35:37 +03:00
Raykov-MS
d07eedfafb Fix column 99: assemble foreign card address from structured components
The АдрМестаПриемаВыдача block under СведенияКартаИнБанк (code 1009) has no
single АдресСтрока tag, unlike the same-named block under
СведенияВнесениеПолучениеНалДС — column 99 was mapped directly onto that
nonexistent tag and stayed empty. It now assembles the value from the
individual address components (Индекс, КодОКСМ, КодСубъектаПоОКАТО, Район,
Пункт, Улица, Дом, Корп, Оф), the same way column 153 already does for
registration place. Also disabled allow_short_lookup for this column, since
it was previously able to pick up a same-named tag (e.g. Улица) from an
unrelated address elsewhere in the file.

Added regression tests at both the mapping level and a full parse_xml_content
-> build_fixed_row_by_index pipeline level with a synthetic code-1009 XML.
2026-09-18 11:09:31 +03:00
Raykov-MS
ccb92fd85f Fix Errors 2026-09-17 13:05:50 +03:00
Raykov-MS
7beeb710ce fix 2026-08-25 17:17:05 +03:00
Raykov-MS
fb83c8c805 fix 2026-08-25 15:14:32 +03:00
Raykov-MS
2e570fb386 fix errors 2026-08-25 14:56:20 +03:00
Raykov-MS
07056e6266 . 2026-08-24 11:44:32 +03:00
Raykov-MS
510d668ab8 fix 2026-08-11 13:42:46 +03:00
Raykov-MS
bef38dedd8 fix 2026-08-11 13:08:00 +03:00
Raykov-MS
9968d84e3b fix 2026-08-11 01:09:07 +03:00
Raykov-MS
d6b3e73cb7 refactor 2026-08-01 10:00:29 +03:00
Raykov-MS
d1cb2dda71 fix bugs 2026-08-01 08:42:46 +03:00
Raykov-MS
32e83c5b21 Правка отчета 2026-07-09 10:16:44 +03:00
Raykov-MS
27a11ae3ee fix 10% write in report to 95% 2026-07-06 13:27:10 +03:00
Raykov-MS
9cbfbd041f parser 2026-06-22 07:25:27 +03:00