sales_receivables
Who owes you, by client: each client's unpaid balance aged by days past its due date — current (not yet due), 1-30, 31-60, 61-90 and over 90 days — counted in the business's own days (the sales_settings time zone), so an invoice due today is still current. Only issued invoices with a balance left count: drafts, cancelled, paid, written-off and fully credited invoices never do. Money is integer CENTS in each invoice's own currency: one row per client per currency, and totals has one row per currency, never converted or added across currencies; read the figures as given, never multiply or divide them yourself. Clients come oldest past-due first. Optional client_id ages one client; an id that is not one of your clients is refused NOT_FOUND (find it with invoice_client_search or invoice_client_list). A limit outside 1-200 is refused VALIDATION_ERROR (leave it out for 50; totals always cover every client). NEXT: invoice_list with state 'overdue' lists the past-due invoices themselves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most client rows to return, 1-200 (default 50). totals always cover every client; truncated says whether rows were left out. | |
| client_id | No | One client's id, from invoice_client_search or invoice_client_list. Leave out to age every client. |