Editing rates from the panel
Two operations on a product’s page, and the difference between them matters:
Both save only the rules for the product you are looking at. The rest of the scope is untouched, so
setting
* for promo cannot disturb * for anything else.
The whole-scope editor on the Pricing page still replaces a scope wholesale — which is correct
there, because it shows you all of it.
Two identities, not one
Whether an account’s credit adds up is checked against two equations. Getting this wrong reports a false discrepancy on every account, so it is worth stating precisely.What is excluded, and why
Lifetime, never a period
Credit is a running total. Any shorter window needs an opening balance that nothing records — and a wrong opening figure invents a discrepancy every time it is run.Where the two sides come from
Never both for one day. That is the join that makes reconciliation survive the retention window: once
a day is rolled up and purged, its consumption still counts.
When the numbers do not agree
Work through in this order:1
Are there pending recharges?
A
RECHARGE for an account with no account_balance row credits nothing and stays pending. It is
in the ledger and not in the balance — which is exactly a money-side gap.2
Was there an unclean shutdown?
A
kill -9 strands credit in reserved. balance + reserved is still conserved, so the money
identity holds — but the account has less spendable than it should until
POST /ops/credit/release runs.3
Is the rollup behind?
A day neither rolled up nor still in
cdr_submit is consumption nobody counts. The purge is
supposed to make this impossible; check it has not been bypassed.4
Is the panel reading the same database?
METRICS_DATABASE_URL against the gateway’s FIREFLO_DB_URL. A split here makes every figure
disagree in a way that looks like an accounting bug.Related
How pricing works
Scopes, the
* default, and LCR.Prepaid credit
Blocks, reservations and the ledger.