{showAvgCost @@ -182,6 +180,18 @@ export function PdfsProcessedCard({
) : null} > + ) : pendingUnits > 0 ? ( + // docs == 0 but instance-local units have accrued that SaaS hasn't billed yet + // (combined-billing, units-only, no PDF count). Surface the pending figure directly + // instead of a bare "0 PDFs" headline with a count-less summary + no split. Gated on + // pendingUnits (not meterUnits) so the "pending sync" wording is always exact. ++ {t( + "portal.billing.pdfsProcessed.unitsPending", + "{{units}} meter units pending sync from linked instances", + { count: pendingUnits, units: pendingUnits.toLocaleString() }, + )} +
) : ({t( diff --git a/frontend/editor/src/proprietary/billing/types.ts b/frontend/editor/src/proprietary/billing/types.ts index df0caa5e39..46fd228f73 100644 --- a/frontend/editor/src/proprietary/billing/types.ts +++ b/frontend/editor/src/proprietary/billing/types.ts @@ -66,7 +66,13 @@ export interface Wallet { categoryDocs: WalletCategoryBreakdown; /** Total input files processed this period (Σ doc_count). */ docsProcessedThisPeriod: number; - /** Distinct input documents this period — a file hit by N operations counts once. */ + /** + * Distinct input document-sets this period — `COUNT(DISTINCT document_fingerprint)`, where the + * fingerprint is the hash of a charge's whole input set. A file processed repeatedly within one + * run (chain/split) counts once; the same file reused across *different* groupings (e.g. + * standalone, then later in a merge {A,B}) has different fingerprints and so counts per grouping. + * A close approximation of "unique PDFs", exact for the single-input common case. + */ uniquePdfsThisPeriod: number; /** Input files on charges where the size multiplier applied (units billed > input files). */ sizeMultiplierPdfsThisPeriod: number;