fix(py): coerce VS column to string in payments tx projection #24

Closed
kacerr wants to merge 0 commits from fix/py-payments-vs-string into main
Owner

Summary

  • The Sheets API returns VS (variabilní symbol) cells as float64 when the column is number-formatted (which it usually is, since VS is a numeric payment reference in Czech banking).
  • Python was emitting vs: 0 (a JSON number), while Go's getVal uses fmt.Sprint and always emits vs: "0" (a string), causing a float64(0) vs string("0") parity diff.
  • Add get_str inner helper: converts whole-number floats via int() first (matching Go's %g minimum-digits formatting), then str(). Applied only to the vs field.
  • No Go changes — RawTransaction.VS is already string and fmt.Sprint already produces the correct output.

Test plan

  • make test — 31 tests, all green
  • After merge: restart make web + POST /flush-cache, then make parityvs type diff gone

🤖 Generated with Claude Code

## Summary - The Sheets API returns VS (variabilní symbol) cells as `float64` when the column is number-formatted (which it usually is, since VS is a numeric payment reference in Czech banking). - Python was emitting `vs: 0` (a JSON number), while Go's `getVal` uses `fmt.Sprint` and always emits `vs: "0"` (a string), causing a `float64(0)` vs `string("0")` parity diff. - Add `get_str` inner helper: converts whole-number floats via `int()` first (matching Go's `%g` minimum-digits formatting), then `str()`. Applied only to the `vs` field. - No Go changes — `RawTransaction.VS` is already `string` and `fmt.Sprint` already produces the correct output. ## Test plan - [x] `make test` — 31 tests, all green - [ ] After merge: restart `make web` + `POST /flush-cache`, then `make parity` — `vs` type diff gone 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 1 commit 2026-05-07 23:59:45 +02:00
fix(py): coerce VS column to string in payments tx projection
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
07ca1cd9e1
The Sheets API returns VS (variabilní symbol) cells as float64 when
the column is number-formatted, so Python was emitting vs: 0 (a JSON
number) while Go's getVal uses fmt.Sprint and always emits vs: "0"
(a string). Add get_str helper that converts whole-number floats via
int() first (matching Go's %g formatting), applied to the vs field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kacerr closed this pull request 2026-05-08 10:35:31 +02:00
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#24