code wiki / (root) / nx_billing_lib.nx

nx_billing_lib.nx

buildroot/runtime/nx_billing_lib.nx

3961 B92 linesdepth 8pulls 13 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_billing_lib.nx -- Nishi Office: TIME & BILLING (F506-adjacent) core lib. Billable time entries per matter on the immutable CID plane, aggregated into an invoice, then earned fees applied FROM the IOLTA trust under Utah RPC 1.15. Legal-SOTA: (1) integer CENTS, no float (amount = centihours*rate_cents/100, exact); (2) RPC 1.15 fee application -- earned fees move trust->operating ONLY up to the invoice AND never exceeding the trust balance (NO-OVERDRAW, reuses trust_disburse_ok); (3) append-only ledger (history sacred). Composes nx_trust_lib (which pulls nx_matter_lib + registry + canon). LIB (no main). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_trust_lib.nx nx_billing_lib.nx nx_billing.nx nx_billing_gate.nx

imports: nx_trust_lib.nx

imported by: nx_billing.nxnx_billing_gate.nx

structs

none

consts

10const K_MAGIC_1024: i64 = 1024
11const K_MAGIC_1048576: i64 = 1048576

functions

15func bl_time_put(prefix: *u8, matter: *u8, seq: i64, centihours: i64, rate_cents: i64, desc: *u8) -> i64
42func bl_matter_total(prefix: *u8, matter: *u8) -> i64
86func bl_bill_from_trust(prefix: *u8, client: *u8, matter: *u8, trustprefix: *u8, seq: i64) -> i64