bokio_open_items
Lists unpaid items on a ledger account as of a date, matches payments FIFO by exact amount, and returns open items with age, unmatched payments, and balance.
Instructions
List unpaid items on a ledger account at asOf, matching each payment to the earliest unpaid posting of the same amount (FIFO, exact öre). Returns open items with their age in days, payments that matched nothing, the balance, and the oldest loaded year's opening balance as one unitemised amount. Amounts in ledger sign: debit positive, credit negative.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | Date to evaluate at (YYYY-MM-DD); defaults to today. | |
| account | No | Ledger account; default 1510 (receivables), 2440 for supplier debt. | |
| companyId | No | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. | |
| lookbackYears | No | Calendar years before the year of asOf to load, so older unpaid items are itemised; default 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | Yes | ||
| open | Yes | ||
| account | Yes | ||
| balance | Yes | ||
| openingUnitemised | Yes | ||
| unmatchedPayments | Yes |