paprel-journal-editor
Create a new manual journal or edit an existing draft. Includes line grid with paprel-account-select, debit/credit entry, running totals, client-side balance validation, and a guard when the journal is already posted.
Usage
HTML
<!-- New journal -->
<paprel-journal-editor currency="USD"></paprel-journal-editor>
<!-- Edit existing -->
<paprel-journal-editor journal-id="YOUR_JOURNAL_ID" currency="USD"></paprel-journal-editor>
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
journal-id | string | "" | When set, loads that journal for edit |
mode | string | "create" | create, edit, copy, or reverse |
currency | string | "" | Display currency for amounts and FX field |
Events
| Event | Detail | Description |
|---|---|---|
journal-saved | { journal: … } | Successful create or update |
paprel:operation-success | { version, source, action, message, resource? } | Host-owned success toast or analytics |
Permissions
Requires accounting:journal-add (and accounting:journal-list when editing). Posted journals are read-only in the UI; Core rejects invalid writes regardless.