Store the invoice amount_remaining so local rows can tell what is still owed
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Inizia individuando lo schema delle fatture e la migrazione, quindi segui stripeInvoiceToInvoice, l'aggiornamento della sincronizzazione e CheckOrganizationDelete. Verifica come sono rappresentati gli stati pagabili e individua gli altri controlli che chiedono se una fattura richiede ancora un pagamento. Il lavoro è completato quando amount_remaining viene reso persistente e sincronizzato, le righe esistenti vengono aggiornate retroattivamente e l'eliminazione non considera più dovute le fatture completamente coperte.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The local invoice rows store only the Stripe total. "Total" and "still owed" differ when the customer's credit balance covers an invoice: the total is positive, the amount remaining is zero, and nothing needs paying.
Today that mismatch has one visible effect: CheckOrganizationDelete judges local rows by total, so the org delete button can grey out over an invoice with nothing due, telling the user to pay something unpayable. It clears when the provider marks the invoice paid and the sync picks it up — minutes in practice, and in the safe direction (the button under-promises; the real delete judges live provider data by amount_remaining and is correct). See the discussion on #1881 and the partial fix in #1906, which unfroze the synced total.
Closing it fully means storing amount_remaining next to amount:
- migration adding the column, backfilled from
amountfor payable states stripeInvoiceToInvoicemapping it, and the sync update writing it- the delete check (and anything else asking "does this invoice still want money") judging on it instead of the total
Worth batching with any other billing-schema change rather than shipping alone.
🤖 Generated with Claude Code
- Lingua principale
- Go
- Stelle
- 344
- Fork
- 47
- Merge medio
- 4g 4h
- PR unite (30g)
- 26
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raystack/frontier
-
enhancement go
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
-
authz bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
-
Add OpenTelemetry tracing Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
Tutte le issue di raystack/frontier
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bazel-contrib/rules_go#4726 · 1 commento ·
-
area/auto-scaling area/monitoring area/ops-productivity kind/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Type/Improvement
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
OpenNSW/nsw-srilanka#522 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100