nx_ledes_lib.nx
buildroot/runtime/nx_ledes_lib.nx
about
nx_ledes_lib.nx -- LEGAL SPEND: UTBMS coding + LEDES 1998B validation + outside-counsel guidelines.
The legal-ops category we had at zero. An invoice is not a document to read, it is a contract to
enforce: outside counsel guidelines say what may be billed, at what rate, in what increments, by whom.
u2605BLOCK BILLING is the single largest source of disputed legal spend: several distinct tasks lumped
into one narrative with one time figure, so no line can be assessed on its own. It is detectable
structurally -- more than one UTBMS task code implicated by a single entry -- and it is rejected here
rather than merely flagged, because a flagged-but-payable line gets paid.
u2605THE INCREMENT TOOTH: guidelines almost universally require tenth-of-an-hour billing. An entry in
quarter hours (0.25) silently inflates every short task by up to 50%. Encoded as an exact divisibility
check in HUNDREDTHS of an hour, so 0.1 is 10 and anything not a multiple of 10 fails.
u2605FAIL-CLOSED: an entry with an UNRECOGNISED task or activity code is INVALID, never "assume billable".
A code nobody recognises is a line nobody reviewed.
UTBMS ranges encoded as data-driven bounds (rule 11): litigation task codes L100-L700, counselling
C100-C500, activity codes A101-A114, expense codes E101-E124.
STRUCTURE: pure decision core, zero I/O. license_tier: ORIGINAL LIB.
dependencies 1 imports · 2 importers
imports: nx_matter_lib.nx
imported by: nx_ledes_gate.nxnx_legal_svc.nx
structs
| none |
consts
| 23 | const LED_OK: i64 = 0 |
| 24 | const LED_BAD_TASK: i64 = 1 |
| 25 | const LED_BAD_ACTIVITY: i64 = 2 |
| 26 | const LED_BLOCK_BILLED: i64 = 3 |
| 27 | const LED_BAD_INCREMENT: i64 = 4 |
| 28 | const LED_RATE_EXCEEDED: i64 = 5 |
| 29 | const LED_NOT_BILLABLE: i64 = 6 |
| 31 | const LED_TASK_LIT_LO: i64 = 100 |
| 32 | const LED_TASK_LIT_HI: i64 = 700 |
| 33 | const LED_ACT_LO: i64 = 101 |
| 34 | const LED_ACT_HI: i64 = 114 |
| 35 | const LED_EXP_LO: i64 = 101 |
| 36 | const LED_EXP_HI: i64 = 124 |
| 37 | const LED_INCREMENT_HUNDREDTHS: i64 = 10 |
functions
| 39 | func led_is1(v: i64) -> i64 called by 1: led_entry_check_pure |
| 45 | func led_task_ok_pure(task: i64) -> i64 |
| 51 | func led_activity_ok_pure(act: i64) -> i64 |
| 57 | func led_expense_ok_pure(exp: i64) -> i64 called by 1: main |
| 64 | func led_block_billed_pure(task_count: i64) -> i64 |
| 70 | func led_increment_ok_pure(hours_hundredths: i64) -> i64 |
| 78 | func led_rate_ok_pure(rate_cents: i64, cap_cents: i64) -> i64 |
| 86 | func led_entry_check_pure(task: i64, act: i64, task_count: i64, hours_hundredths: i64, rate_cents: i64, cap_cents: i64, billable: i64) -> i64 |
| 96 | func led_entry_payable_pure(verdict: i64) -> i64 |
| 102 | func led_line_amount_pure(verdict: i64, hours_hundredths: i64, rate_cents: i64) -> i64 |
| 108 | func led_invoice_clean_pure(total_lines: i64, rejected_lines: i64) -> i64 called by 1: main |
| 114 | func led_verdict_label(v: i64, out: *u8) -> i64 |