← all projects / flowaccount-sync

FlowAccount backfill — open questions

Source: flowaccount-sync/README.md, verified live against Setpoint prod on Sep 4, decisions log updated Sep 9. Nothing posts to FlowAccount without --commit --i-understand-this-writes-to-accounting.
The stakes:
Q1 · Answered Sep 9
Order discounts go at document level

Verified live: document-level discount makes FlowAccount compute VAT on the discounted figure. --discount-mode document is the default.

Q2 · Decide
Should the 91 post-registration zero-VAT orders really post as NoVat?

First VAT day at Rama IV was Jul 7. These 91 come after it and post with vatType: 3. Conservative default: yes, because inventing 7% output tax the club never charged is a real accounting error. If they should have carried VAT, that's a POS data fix before backfilling.

Default: post as NoVat, flag the 91 for a POS-side check.
Q3 · Decide
FOC items — record or zero out?

Zero FOC lines exist at Rama IV today, so unverified against real data. --foc-mode keep records them at POS value, the only setting that can't break the subtotal identity.

Default: keep.
Q4 · Decide
The 7 orders with no line items — ฿111,872 held back

Two are Stripe payment-link orders (฿4,500 + ฿13,900, June). Five are POS terminal orders from Sep 3, 12:04–12:09 with repeated amounts (฿14,600 ×3, ฿24,836 ×2) that look like test rows. A document can't be reconstructed without lines.

Decide: write off as test data, or post each as a single synthetic line?
Q5 · Guarded
Tips

tip_cents is 0 on every in-scope order, so tip handling is unverifiable. Any order with a non-zero tip is refused rather than guessed.

Default: refuse until a real tip shows up.
Q6 · Decide
Refunds — 10 worth ฿25,095, currently manual

The MCP exposes no credit-note endpoint. They're listed in the report for manual entry.

Decide: automate FlowAccount credit notes in a follow-up?
Q7 · Default set
Walk-in label

19–21 orders with no linked customer post as "Walk-in customer (POS)", overridable via FLOWACCOUNT_WALKIN_LABEL. No tax ID is ever invented.

Default: "Walk-in customer (POS)".
Q8 · Confirm
Which FlowAccount company?

The MCP posts to whichever company its token is bound to (X-Company-Id). Confirm Rama IV's revenue belongs there before any commit. The tool never switches companies.

Needs: your confirmation before the first commit run.
Q9 · Glance
24 orders share an identical (subtotal, total, minute)

Plausible for a padel bar, but worth one glance before posting ~1,000 documents.

Needs: one look.