Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Store the invoice amount_remaining so local rows can tell what is still owed

Aperta
#1,907 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

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 amount for payable states
  • stripeInvoiceToInvoice mapping 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raystack/frontier

Tutte le issue di raystack/frontier

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.