receivables — aging and the allowance for credit losses
A receivables aging report and the resulting provision, priced from invoices in /r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/invoices — never from amounts supplied here.
A report covers the invoices the issuer named, and nothing else.
/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/invoicesexports no per-issuer enumerator, so this realm cannot find an invoice that was left out. Every report therefore publishes a coverage line, andOmittedOpenis the one number that says whether the provision is complete. A provision read without it is being read wrongly.
State
- reports published: 0
- source:
/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/invoices - chain height: 804563
There is deliberately no way to enumerate issuers or to aggregate a provision across them: such a total would sum every stranger's self-reported receivable.
Ages are in BLOCKS
An invoice's dueHeight is a block height, so an age is a count of blocks and every schedule edge is a count of blocks. A "30/60/90 day" schedule is a conversion the issuer owns; nothing here knows the block time, and compiling a guess in would make every published rate wrong by whatever the guess was off by.
This realm posts no entry
A provision is a double entry, and ProposedEntry returns it as a string the ledger's PostMulti accepts — for the issuer to post from their own account. A ledger derives a book's owner from its caller, so a posting made from here would land in this realm's book and not the issuer's. The realm stays keyless with respect to every ledger: it cannot write a wrong entry because it cannot write.
Usage
SetSchedule("216000,432000,648000", "0,1000,2500,5000")
seq := Publish("1,2,3,7") // the caller's own invoice ids
Totals(issuer, seq) // unpaid, provision, aged
Coverage(issuer, seq) // read this one
OmittedOpen(issuer, seq) // 0 means complete
ProposedEntry(issuer, seq, "E-BADDEBT", "A-ALLOW")
At most 64 ids per call, which is the source realm's own per-issuer record cap, so an aging never has to be chunked.
An issuer's reports are at /r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/receivables:<address>, and one report at /r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/receivables:<address>/<seq>.