Revalue Lightyear USD Pool
book_lightyear_fx_revaluationRevalue a Lightyear USD cash-fund pool at the ECB rate and book the FX difference to the gain/loss account, with an opening checkpoint mode and dry-run review.
Instructions
Lightyear USD cash-fund pool at the ECB rate. mode "opening" (once per pool) replays the statement to as_of (USD cash + ICSUSSDP units at 1.00, from an empty start) and stores the ECB-valued opening checkpoint after approval. The opening books nothing: before approval show the owner the books' USD carrying value (broker account/dimension balance at as_of minus the EUR cash Lightyear shows) next to target_eur and the difference; that one-off difference is shown, not booked, and later revaluations measure from target_eur, so any correction is the owner's separate manual journal. mode "revalue" (default) revalues the pool's USD at the ECB rate of as_of: the replayed USD must equal expected_usd_holding, and the difference to the carrying value is booked on fx_account (default 8500) as journal LY-FX::USD:<as_of>; zero difference records a journal-free checkpoint. DRY RUN by default; anything unproven is a review, never a plug.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "opening" sets the pool's opening checkpoint once; "revalue" (default) revalues at the reporting date. | |
| as_of | Yes | Opening date or reporting date (YYYY-MM-DD, end of day). | |
| dry_run | No | Preview without writing (default true) | |
| file_ref | No | Opaque Lightyear AccountStatement file reference. | |
| file_path | No | AccountStatement path/base64 input covering the interval since the last checkpoint (from the account's start for mode=opening). Provide exactly one of file_path or file_ref. | |
| fx_account | No | FX gain/loss account (default: auto-detect 'Kasum/kahjum valuutakursi muutustest', standard 8500). | |
| plan_handle | No | Execution-plan handle from the reviewed dry run. Required for dry_run=false. | |
| broker_account | Yes | Broker cash account holding the pool (e.g. 1020 / 1120 Lightyear konto) | |
| lightyear_account | No | Lightyear account id (e.g. CHZELUU) when the statement's file name does not carry it. | |
| broker_dimension_id | No | Dimension ID for broker account (accounts_dimensions_id) | |
| expected_usd_holding | No | revalue only (required): USD cash + ICSUSSDP value Lightyear shows for as_of. |