# GetClaimLedgerEntries - Advanced Documentation ## Overview Returns all ledger entries (time entries, expenses, costs) for a claim. Requires **ManageInvoices** or **ManagePayments** permission. Enforces private claim security access. ## Billing Rate Redaction Users without the **ViewBillingRates** permission see redacted data on time-based entries: - `HourlyRate` - redacted - `Total` - redacted - Rate-related fields server-controlled The AI agent should be aware that zeroed rates may indicate permission filtering, not actual zero values. ## Return Structure HourlyRate may be redacted (see above). Total may be redacted for time-based entries. ### Payment Sub-Entries Each entry can have multiple `ClaimLedgerEntryPayments`: - `DatePaid` - payment date - `PaidTo` - recipient - `PaidBy` - payer - `Amount` - payment amount - `IsLien` - whether this is a lien payment - `ReferenceNumber` - check/reference number ## Script Example ```javascript async () => { const entries = await SecureApi.GetClaimLedgerEntries(771360); const summary = { totalEntries: entries.length, timeEntries: entries.filter(e => e.EntryType?.IsTimeBased).length, totalBilled: Decimal.sum(...entries.map(e => new Decimal(e.Total || 0))).toNumber(), totalInvoiced: Decimal.sum(...entries.map(e => new Decimal(e.Invoiced || 0))).toNumber(), byType: _.countBy(entries, e => e.EntryType?.Name) }; return summary; } ``` ## Error Conditions - Entry belongs to different firm - throws RadoloException - User lacks ManageInvoices AND ManagePayments - throws RadoloException - Private claim access denied - throws RadoloException