File tree Expand file tree Collapse file tree
apps/sim/app/api/billing/invoices Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,13 @@ const logger = createLogger('BillingInvoices')
1717/** Cap the number of invoices returned to the most recent statements; the UI links out to Stripe's portal for the full history. */
1818const MAX_INVOICES = 5
1919
20- /** Stripe page size when scanning for finalized invoices; also bounds the has-more probe. */
21- const STRIPE_PAGE_SIZE = MAX_INVOICES + 1
20+ /**
21+ * Stripe list page size when scanning for finalized invoices. Kept independent of
22+ * (and larger than) `MAX_INVOICES` so lowering the display cap never shrinks the
23+ * draft-scan window — a long tail of interspersed draft invoices could otherwise
24+ * bury finalized statements past the `MAX_STRIPE_PAGES` cap and hide the section.
25+ */
26+ const STRIPE_PAGE_SIZE = 20
2227
2328/** Safety cap on pagination when a customer has many draft invoices interspersed. */
2429const MAX_STRIPE_PAGES = 5
You can’t perform that action at this time.
0 commit comments