e-arveldaja-mcp 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/lightyear-booking.md +2 -1
- package/.claude/commands/month-end.md +3 -1
- package/CHANGELOG.md +12 -0
- package/CLAUDE.md +26 -3
- package/README.md +2 -0
- package/dist/accounting-operations.d.ts.map +1 -1
- package/dist/accounting-operations.js +8 -6
- package/dist/accounting-operations.js.map +1 -1
- package/dist/api/transactions.api.d.ts.map +1 -1
- package/dist/api/transactions.api.js +4 -0
- package/dist/api/transactions.api.js.map +1 -1
- package/dist/banking/account-binding-refusal.d.ts +17 -0
- package/dist/banking/account-binding-refusal.d.ts.map +1 -0
- package/dist/banking/account-binding-refusal.js +29 -0
- package/dist/banking/account-binding-refusal.js.map +1 -0
- package/dist/banking/reconciliation/executor.d.ts.map +1 -1
- package/dist/banking/reconciliation/executor.js +7 -0
- package/dist/banking/reconciliation/executor.js.map +1 -1
- package/dist/banking/reconciliation/presenter.d.ts.map +1 -1
- package/dist/banking/reconciliation/presenter.js +13 -0
- package/dist/banking/reconciliation/presenter.js.map +1 -1
- package/dist/banking/reconciliation/types.d.ts +3 -1
- package/dist/banking/reconciliation/types.d.ts.map +1 -1
- package/dist/estonian-tax-rules.js +1 -1
- package/dist/http-client.d.ts +1 -1
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js.map +1 -1
- package/dist/lightyear/usd-pool.d.ts.map +1 -1
- package/dist/lightyear/usd-pool.js +9 -8
- package/dist/lightyear/usd-pool.js.map +1 -1
- package/dist/limited-vat-guidance.js +2 -2
- package/dist/limited-vat-guidance.js.map +1 -1
- package/dist/limited-vat.d.ts +16 -1
- package/dist/limited-vat.d.ts.map +1 -1
- package/dist/limited-vat.js +9 -4
- package/dist/limited-vat.js.map +1 -1
- package/dist/operation-outcome.d.ts +4 -0
- package/dist/operation-outcome.d.ts.map +1 -1
- package/dist/operation-outcome.js.map +1 -1
- package/dist/receipts/classification-operations.d.ts +4 -0
- package/dist/receipts/classification-operations.d.ts.map +1 -1
- package/dist/receipts/classification-operations.js +6 -0
- package/dist/receipts/classification-operations.js.map +1 -1
- package/dist/receipts/classification-presenter.d.ts.map +1 -1
- package/dist/receipts/classification-presenter.js +10 -0
- package/dist/receipts/classification-presenter.js.map +1 -1
- package/dist/reporting/annual-cash-flow.d.ts +4 -0
- package/dist/reporting/annual-cash-flow.d.ts.map +1 -1
- package/dist/reporting/annual-cash-flow.js +15 -1
- package/dist/reporting/annual-cash-flow.js.map +1 -1
- package/dist/tools/accounting-inbox-autopilot-service.d.ts.map +1 -1
- package/dist/tools/accounting-inbox-autopilot-service.js +16 -8
- package/dist/tools/accounting-inbox-autopilot-service.js.map +1 -1
- package/dist/tools/annual-report.d.ts +19 -0
- package/dist/tools/annual-report.d.ts.map +1 -1
- package/dist/tools/annual-report.js +76 -2
- package/dist/tools/annual-report.js.map +1 -1
- package/dist/tools/lightyear-investments.d.ts +7 -0
- package/dist/tools/lightyear-investments.d.ts.map +1 -1
- package/dist/tools/lightyear-investments.js +126 -18
- package/dist/tools/lightyear-investments.js.map +1 -1
- package/dist/tools/limited-vat.d.ts +8 -1
- package/dist/tools/limited-vat.d.ts.map +1 -1
- package/dist/tools/limited-vat.js +44 -6
- package/dist/tools/limited-vat.js.map +1 -1
- package/dist/tools/receipt-extraction.d.ts.map +1 -1
- package/dist/tools/receipt-extraction.js +43 -4
- package/dist/tools/receipt-extraction.js.map +1 -1
- package/dist/wise/executor.d.ts.map +1 -1
- package/dist/wise/executor.js +3 -0
- package/dist/wise/executor.js.map +1 -1
- package/dist/wise/presenter.d.ts.map +1 -1
- package/dist/wise/presenter.js +12 -0
- package/dist/wise/presenter.js.map +1 -1
- package/dist/wise/types.d.ts +1 -0
- package/dist/wise/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/workflows/lightyear-booking.md +2 -1
- package/workflows/month-end.md +3 -1
|
@@ -112,10 +112,11 @@ Earlier drafts for rows this run skipped as duplicates are NOT in that list: the
|
|
|
112
112
|
### Step 7 (optional): USD cash-fund pool opening and period-end revaluation
|
|
113
113
|
|
|
114
114
|
Only when the company keeps USD at Lightyear (cash or ICSUSSDP) and the user asks for it, or a review says `usd_pool_checkpoint_missing`.
|
|
115
|
-
- Opening, once per Lightyear account: `book_lightyear_fx_revaluation` with `mode: "opening"`, `as_of` (the opening date) and a statement from the account's start. Present `usd_amount`, `ecb`, `target_eur` and `replay`, and state that the replay assumes the statement starts from an empty USD position and that the value is the ECB valuation at `as_of`, not the books' historical carrying value.
|
|
115
|
+
- Opening, once per Lightyear account (except a re-opening past a blocked row, below): `book_lightyear_fx_revaluation` with `mode: "opening"`, `as_of` (the opening date) and a statement from the account's start. Present `usd_amount`, `ecb`, `target_eur` and `replay`, and state that the replay assumes the statement starts from an empty USD position and that the value is the ECB valuation at `as_of`, not the books' historical carrying value.
|
|
116
116
|
- Before asking for approval of the opening, compute and show the one-off difference between the books and that valuation. The books' carrying value of the USD is the broker account/dimension balance at `as_of` (`compute_account_balance`, registered journals only) minus the EUR cash Lightyear shows for that date (ask the user for it, never derive it from the books). Show that carrying value, `target_eur` and the difference (carrying value − `target_eur`); if the carrying value cannot be determined, say so instead of showing a figure. State plainly that this difference is shown, not booked: the opening only stores the checkpoint, later revaluations measure from `target_eur`, so the difference stays in the books unless the owner corrects it. Any correction is the owner's decision, made as a separate manual journal (e.g. broker ↔ FX account 8500) that this tool does not propose. Executing the opening (with the `plan_handle`) is the owner's approval of the opening valuation, with the difference shown.
|
|
117
117
|
- Period end, after the period's distributions and trades are booked AND confirmed in e-arveldaja: `book_lightyear_fx_revaluation` (`mode: "revalue"`, default) with `as_of` (the reporting date) and `expected_usd_holding` — the USD cash plus ICSUSSDP value Lightyear shows for that date; ask the user for it, never derive it from the books. Present the proposed journal (`LY-FX:<account>:USD:<as_of>`, D/C broker ↔ 8500) or the journal-free checkpoint, and any review (`usd_pool_quantity_mismatch`, `usd_pool_event_unregistered` → confirm the drafts first, `usd_pool_statement_gap` → use a statement covering the interval). Nothing is booked from a review.
|
|
118
118
|
- Order: opening once → distributions → trades → confirm drafts → period-end revaluation.
|
|
119
|
+
- Re-opening past a blocked row: a statement row the pool cannot book (`usd_pool_unsupported_event` — e.g. a EUR→USD conversion with no trade, a USD deposit or withdrawal — `usd_pool_pairing_ambiguous`, `usd_pool_ambiguous_order`, `usd_pool_source_unbound`, `pool_sell_gains_unmatched`, `usd_pool_sweep_booked`, or `usd_pool_prerequisite_unbooked` with "booked outside the pool log") refuses every later pool booking, and booking that row by hand does not clear it. For `pool_sell_gains_unmatched` first ask for the capital-gains statement that holds the sale's row and re-run the trades; re-opening is the last resort. The way out is the owner's: book the row by hand (`create_journal`, `document_number` `LY:<reference>`), then run `mode: "opening"` again with `as_of` on or after that row's day and a statement from the account's start (for an unmatched sale also pass `capital_gains_file`, which proves it unmatched). The opening is replaced only while such a blocking row lies between the current opening and `as_of`, and only after every record the pool holds; otherwise it is `usd_pool_opening_exists`. Present it like the first opening, with the books-vs-valuation difference, and say plainly that the carrying value restarts at `target_eur` and that pool rows on or before `as_of` not yet booked are no longer booked by these tools.
|
|
119
120
|
- A same-date retry reports `already_booked` only after checking the current pool chain, statement coverage and supplied holding again. A corrected holding or changed prerequisite is a review; check the reported discrepancy without creating a second revaluation for that date.
|
|
120
121
|
|
|
121
122
|
Report:
|
|
@@ -145,7 +145,7 @@ Capability condition for `limited-vat`: inspect the connected MCP server's adver
|
|
|
145
145
|
|
|
146
146
|
## Step 4b: Limited taxpayer VAT (only for status `limited`)
|
|
147
147
|
|
|
148
|
-
Call `limited_vat` with `mode: "status"`. Only when `status` is `limited`: after the month's purchase invoices are confirmed and before the 20th of the next month, call `limited_vat` with `mode: "month"` and `month` (dry run). This is the company's own VAT on foreign services (KMS § 21), not the KMD settlement entries above. Show the owner the proposed journal (`PKM-YYYY-MM`), the KMD figures (rows 1, 4, 6/7 — "verify against the e-MTA KMD instructions") and `payment_deadline`. Offer each `review_items` entry inline (an unclassified supplier: yes/no "counts as a KMS § 10 lg 5 service" → `supplier_classifications`). Only after approval call it again with the same arguments, `execute: true` and the `plan_handle`. `already_booked` needs nothing; a `limited_vat_journal_conflict` needs the owner's review of the named journal. Status `none` with `registration_check` candidates: mention the possible registration duty and offer `mode: "guide"`. Status `unknown` with a `company_vat_status_lookup_*` `reason` (EMTA's KMKR query could not settle the VAT number): show the `explanation` and offer the owner's one-time confirmation inline (`mode: "set_status"`, `status: "full"`, or `"limited"` with `effective_from`; preview, then approval).
|
|
148
|
+
Call `limited_vat` with `mode: "status"`. Only when `status` is `limited`: after the month's purchase invoices are confirmed and before the 20th of the next month, call `limited_vat` with `mode: "month"` and `month` (dry run). This is the company's own VAT on foreign services (KMS § 21), not the KMD settlement entries above. Show the owner the proposed journal (`PKM-YYYY-MM`), the KMD figures (rows 1, 4, 6/7 — "verify against the e-MTA KMD instructions") and `payment_deadline`. Offer each `review_items` entry inline (an unclassified supplier: yes/no "counts as a KMS § 10 lg 5 service" → `supplier_classifications`). Only after approval call it again with the same arguments, `execute: true` and the `plan_handle`. `already_booked` without `adoption` needs nothing. When the payload has `adoption` (status `ready_for_approval`), the month is booked by a hand-made journal this server has not recorded: show the owner the journal (`adoption.journal_id`, `document_number`) and the invoices it would be recorded for (`adoption.invoice_ids`), and only after approval call again with the same arguments, `execute: true` and the `plan_handle` (no journal is written); without adoption, an invoice added to the month later is a conflict instead of a correction. A `limited_vat_journal_conflict` needs the owner's review of the named journal. Status `none` with `registration_check` candidates: mention the possible registration duty and offer `mode: "guide"`. Status `unknown` with a `company_vat_status_lookup_*` `reason` (EMTA's KMKR query could not settle the VAT number): show the `explanation` and offer the owner's one-time confirmation inline (`mode: "set_status"`, `status: "full"`, or `"limited"` with `effective_from`; preview, then approval).
|
|
149
149
|
|
|
150
150
|
Finish any approved VAT booking before Step 5. Read all statements below after that booking, so the summary includes its VAT expense and liability.
|
|
151
151
|
<!-- E_ARVELDAJA_CAPABILITY_CONDITION_END:limited-vat -->
|
|
@@ -217,4 +217,6 @@ Capability condition for `year-end`: inspect the connected MCP server's advertis
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
For December (the last month of a calendar fiscal year), offer the year-end close next: `prepare_year_end_close` with `year` and the proposed reserve/transfer options (RIK method; dry run). Show the proposed journals and review items. After explicit owner approval, pass the returned single-use `plan_handle`, the same year/options and `confirm: true` to `execute_year_end_close`. A `plan_drift` refusal requires a fresh preview and approval; created journals remain drafts for separate review and registration.
|
|
220
|
+
|
|
221
|
+
If the annual report's cash flow lists `cash_flow_account_reviews` (a 24xx debt account), show the owner its `explanation` and journals and ask per account. Short version: **Põhitegevus** — tavaline ärivõlg (grupi-/sidusettevõtte arve, omaniku makstud kulud); võlg tekib arvest või kulust. **Finantseerimine** — laen (ka intressita omanikulaen); raha tuleb ilma arveta ja makstakse tagasi. **Segu** — eralda eri kontodele/dimensioonidele, muidu vali suurem osa ja kirjelda lisas. Then add the rule row from `action` and re-run the report.
|
|
220
222
|
<!-- E_ARVELDAJA_CAPABILITY_CONDITION_END:year-end -->
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.41.0] - 2026-11-07
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **The inbox receipt preview no longer stops when e-arveldaja briefly cannot return your company's own name.** Before, one failed read of your invoice settings made the whole inbox receipt preview fail. Now it behaves like the receipt batch: receipts from suppliers you already have are previewed when your company's registry code can be found from its VAT number, a receipt that would create a new supplier waits for review, and otherwise every receipt waits for review. The inbox list shows the reason. Nothing is written in the preview. Details: `AccountingOperations.prepareReceiptBatch` passes `ownCompanyNameUnavailable: true` to `runBatch` instead of throwing; held rows carry `own_company_identity_unavailable`, and the accounting-inbox follow-up summary and recommendation now include that row's reason.
|
|
10
|
+
- **A Lightyear USD movement the tools cannot book no longer blocks all later USD bookings for good — you can now re-start the USD pool after it.** Before, a EUR→USD conversion without a trade, a USD deposit or withdrawal, same-amount trades and conversions that could not be paired, a row with amounts finer than a cent, a USD sale without its capital-gains row, or a USD pool movement already booked by hand stopped every later USD pool booking, and the messages said it would clear once booked by hand, which was not true. Now the message says what does work: book the movement by hand, then set a new pool opening dated on or after that day; after your approval the later USD bookings go ahead. For a sale without its capital-gains row, first try the capital-gains statement that holds it. A pool that is not blocked keeps its opening. Details: `book_lightyear_fx_revaluation` `mode: "opening"` replaces an existing opening only while a permanent barrier (`usd_pool_unsupported_event`, `usd_pool_pairing_ambiguous`, `usd_pool_ambiguous_order`, `usd_pool_source_unbound`, a pool row booked by hand outside the pool log (`usd_pool_prerequisite_unbooked`), a booked sweep (`usd_pool_sweep_booked`), or `pool_sell_gains_unmatched` proven by the new optional `capital_gains_file` / `capital_gains_file_ref` — opening only, plan-bound, and only when the file covers the sale's day (file-name period, else its row dates)) lies between the current opening and the end of `as_of`, and only when `as_of` orders after every record of the pool (committed events, intents, checkpoints); otherwise `usd_pool_opening_exists` with detail `not_blocked` / `record_after` (message reworded). The barrier (code, reference, time, source digest) is bound in the plan fingerprint. The new opening supersedes the earlier one (`poolRecordsFor` takes the latest; earlier records stay as history); its dry-run note names the replaced opening and the barrier and warns that unbooked pool rows on or before `as_of` are no longer booked by these tools and the carrying value restarts at `target_eur`. The messages of those codes now state that a hand booking alone does not clear them and give the re-opening steps. A hand-booked `LY:<ref>` journal still does not clear the barrier by itself (its EUR effect on the USD pool cannot be proven from the journal); no double-booking check changed.
|
|
11
|
+
- **A refused bank booking now explains how to choose a usable account.** Details: account-distribution confirmations report `account_not_bank_bindable` with the refused account number and guidance to enable bank reconciliation in the chart settings, choose an allowed account or book a separate journal. The original refusal remains sandboxed in `upstream_detail`; no alternative account is tried.
|
|
12
|
+
- **Automatically generated invoice titles avoid repeated supplier names and keep useful wording from earlier invoices.** Details: generated descriptions remove repeated supplier word runs; supplier-history line titles retain their wording after stale period tokens are removed (receipt-batch invoice descriptions are unchanged). Empty or punctuation-only remainders keep the existing fallback; document and operator descriptions are unchanged.
|
|
13
|
+
- **Customer prepayments no longer leave the annual cash-flow statement permanently "needs review".** Before, money received in advance from a customer (account 22xx) and its later offset against a sale invoice never reconciled, so a company with prepayments could not get a complete cash flow. Debts to the parent, group companies or others (24xx) can be ordinary trade debt or a loan, so the report now asks you once per account which it is, with a short Estonian explanation and the exact rule to add. Details: 22xx (e.g. 2210 "Ostjate ettemaksed") is operating working capital in both the per-journal and the balance-sheet bridge, reported as `change_in_customer_prepayments_and_other_operating_liabilities` ("Äritegevusega seotud kohustuste ja ettemaksete muutus"). 24xx (2410/2420/2430) defaults to unclassified (`requires_review`) and enters the bridge only with an explicit `cash_flow_category` rule `operating`; a `financing` rule puts its cash in financing. `generate_annual_report_data` adds `cash_flow_statement.cash_flow_account_reviews` (one entry per rule-less 24xx account with cash movements: cash in/out/net, up to 50 journals with sandboxed titles and the full count, the "Põhitegevus vs Finantseerimine" explanation and the rule row to add); it disappears once the rule exists. No balancing plug is made.
|
|
14
|
+
- **An unreadable invoice date is left for review instead of being guessed from the billing period.** Details: a lost invoice-date value behind a dot leader suppresses the unlabelled first-date fallback. Documents without a lost date value keep the existing fallback, and blank-leader proof checks are unchanged.
|
|
15
|
+
- **A limited taxpayer's monthly VAT journal that you booked by hand can now be taken over, so invoices that arrive later are added as a correction.** Before, a hand-booked (or not fully recorded) month journal equal to the computed month was only shown as already booked; once a late invoice was added to that month, it became a permanent conflict and the month could not be corrected. Details: when the month has exactly one live `PKM-YYYY-MM` journal with no booking record and its postings equal the full proposal, `limited_vat` `mode: "month"` stays `already_booked` but returns `adoption` (`journal_id`, `document_number`, `invoice_ids`, `adopted: false`) and a `plan_handle`; `execute: true` with that handle stores a booking record for the journal (journal id, month, the currently included invoice ids, its posting signature, the month-end date) with no journal write (`status: "adopted"`). The plan fingerprint binds the journal id, postings and invoice ids, so a change between dry run and execute is `plan_drift`. After adoption, later invoices are a `PKM-YYYY-MM-Pn` correction delta. Adoption works only while the hand-booked journal still equals the whole month: if an invoice was added to the month before the journal was adopted, the journal no longer matches and the month is still `limited_vat_journal_conflict` — book the correction by hand or ask your accountant. A lone unrecorded journal that differs from the month is likewise still a conflict.
|
|
16
|
+
|
|
5
17
|
## [0.40.0] - 2026-11-07
|
|
6
18
|
|
|
7
19
|
### Added
|
package/CLAUDE.md
CHANGED
|
@@ -110,6 +110,13 @@ purpose even when the invoice was booked after payment or historical invoice
|
|
|
110
110
|
capacity is unavailable; classification does not certify the invoice's open
|
|
111
111
|
balance. Invoice-capacity safeguards still apply to capital and mixed sources.
|
|
112
112
|
An unrelated customer's clearing cannot veto a proved operating payment.
|
|
113
|
+
Liability working capital is 22xx (customer prepayments), 23xx and 25xx–27xx.
|
|
114
|
+
24xx (group/related/other payables) is trade debt or a loan by nature: it is
|
|
115
|
+
`unclassified` unless a `cash_flow_category` rule says `operating` (then it also
|
|
116
|
+
enters both bridges) or `financing`; `isLiabilityWorkingCapitalAccount` is the
|
|
117
|
+
single decision both bridges use. A rule-less 24xx account with cash movements
|
|
118
|
+
gets a `cash_flow_account_reviews` entry (Estonian when-to-choose guidance and
|
|
119
|
+
the rule row to add).
|
|
113
120
|
Exact invoice plus direct operating-account distributions are supported when
|
|
114
121
|
their signed amounts and account/dimension slices cover the registered cash
|
|
115
122
|
movement completely. Realized FX within an operating payment follows that
|
|
@@ -614,8 +621,16 @@ carrying value inside the broker account/dimension, in the connection-scoped bun
|
|
|
614
621
|
`AccountStatement-LY-<ACCOUNT>-…` or `lightyear_account`) + broker account/dimension; another
|
|
615
622
|
broker target for the same Lightyear account is `usd_pool_target_mismatch`. Records: one
|
|
616
623
|
owner-approved opening checkpoint (`book_lightyear_fx_revaluation` `mode: "opening"`, replayed
|
|
617
|
-
from the statement and valued at the ECB rate;
|
|
618
|
-
|
|
624
|
+
from the statement and valued at the ECB rate; a later opening is accepted only while the pool is blocked — a
|
|
625
|
+
permanent barrier (`firstPoolBarrier`: `usd_pool_unsupported_event`, `usd_pool_pairing_ambiguous`,
|
|
626
|
+
`usd_pool_ambiguous_order`, `usd_pool_source_unbound`, a pool row booked by hand outside the pool log
|
|
627
|
+
(`usd_pool_prerequisite_unbooked`, live `LY:<ref>` or bare-ref journal) or a booked sweep (`usd_pool_sweep_booked`),
|
|
628
|
+
or `pool_sell_gains_unmatched` proven by an optional `capital_gains_file` that covers the sale's day — file-name
|
|
629
|
+
period, else its row-date span; otherwise `not_blocked` with the reason) between the current opening and the end of the new opening's day, owner decision 2026-11-07 —
|
|
630
|
+
and when it orders after every record of the pool (committed events, intents, checkpoints); otherwise
|
|
631
|
+
`usd_pool_opening_exists` (detail `not_blocked` / `record_after`). The barrier (code, ref, ts, source digest) is bound
|
|
632
|
+
in the plan fingerprint. It then supersedes the earlier one: `poolRecordsFor` takes the latest opening, so replay,
|
|
633
|
+
completeness, mixed-second and before-opening checks start from it; earlier records stay as history), `distribution_in` events (retained USD distributions,
|
|
619
634
|
`book_lightyear_distributions` `fx_source: "ecb"`; without a pool key or store they are reviews, never
|
|
620
635
|
booked unlogged; a new one dated on/before the approved opening is held `usd_pool_before_opening`), `sell_in` events (a USD sell with no 1:1
|
|
621
636
|
conversion keeps its net in the pool at the ECB rate; `book_lightyear_trades` needs its capital-gains row matched by
|
|
@@ -661,6 +676,14 @@ Statement roles (`src/lightyear/pool-statement.ts`): every USD row gets exactly
|
|
|
661
676
|
booked, checked at price 1.00 / fee 0 / gross = quantity), `distribution_in`, `sell_in`, `buy_relief`,
|
|
662
677
|
`conversion_out`, `unsupported` (EUR→USD conversion with no trade, USD deposit/withdrawal),
|
|
663
678
|
`pairing_ambiguous` or `unplaceable` (no valid timestamp: blocks the whole pool for that statement).
|
|
679
|
+
An `unsupported` / `pairing_ambiguous` row, an ambiguous second, a `usd_pool_source_unbound` row, an unmatched
|
|
680
|
+
pool sell, a pool row booked outside the pool log and a booked sweep refuse every later pool command, and a hand-booked `LY:<ref>` journal does not clear them (a pool EUR
|
|
681
|
+
effect is not provable from the journal: a EUR→USD conversion nets to ~0 inside the broker account; no
|
|
682
|
+
manual-event route, owner decision). The owner's way out is to book the row by hand and re-open dated on or after
|
|
683
|
+
its day (Fable M2; for an unmatched sell first the matching capital-gains file); the review messages say so. Rows
|
|
684
|
+
on or before the new opening are `usd_pool_before_opening` (an unbooked pre-opening pool trade still stops later
|
|
685
|
+
trade commands, so it must be booked by hand first), and the carrying value restarts at the new opening's ECB
|
|
686
|
+
value (not booked).
|
|
664
687
|
Trade↔conversion pairing is computed over the whole statement before anything is consumed
|
|
665
688
|
(`assignOneToOne`): a same-day same-amount group pairs only when unambiguous (one trade + one
|
|
666
689
|
conversion, or unique ±60 s edges covering the smaller side); otherwise every member is
|
|
@@ -789,7 +812,7 @@ API data remains raw.
|
|
|
789
812
|
- **Third-party payer / receipt client alignment**: e-arveldaja copies a registration journal's `clients_id` from the bank transaction (payer), not from the linked invoice, and postings carry no client — so a payer that differs from the invoice client books the receivable credit into the wrong client sub-ledger (verified live 2026-09). `TransactionsApi.confirm` refuses such a confirm (`linked_invoice_client_mismatch`) unless `reassignClientToInvoice` (tool param `reassign_client_to_invoice`, an explicit approval) is set; a distribution linking invoices of several clients is always refused (`linked_invoice_clients_ambiguous`, no reassignment can fix one journal/one client — split the payment); the registration journal is located by `operation_type = "TRANSACTION"` + `operations_id = tx id` (the register call returns no journal id) and checked after every invoice-linked confirm (`src/banking/receipt-ledger-check.ts`); exact-match reconciliation routes these to `third_party_payer_reviews`; `run_accounting_report` `receipt_client_alignment` audits existing books. Repair is invalidate → reassign → re-confirm; a one-journal reclassification between two clients is not expressible.
|
|
790
813
|
- **Input-VAT deduction restrictions** (`src/estonian-tax-rules.ts`): single date-gated source for the standard VAT-rate timeline (20→22%→24%), the dividend-CIT timeline (20/80→22/78), the 40 000 EUR VAT registration threshold, current reduced rates, and the deduction detectors. `suggest_booking` returns these as `tax_notes` — `KMS § 30` (külaliste vastuvõtt / esinduskulu: input VAT non-deductible; also `TuMS § 49 lg 4` representation limit 50 €/month + 2% of payroll) and `KMS § 30 lg 4` (M1 passenger car: 50% cap). Notes are advisory; `workflows/book-invoice.md` requires surfacing each on the approval card. `validate_invoice_data` also uses the rate timeline to warn when a line's standard rate (20/22/24%) does not match the invoice date. The full dataset is browsable read-only at `earveldaja://tax_rules` — including the `TuMS § 49` representation/donation limits, `TuMS § 48` fringe-benefit pointer, the profit-distribution rules (`ÄS § 157 lg 1–2`, `TuMS § 50`), and the RPS process rules (`§ 10` corrections, `§ 12` 7-year retention, `§ 15` inventory) — plus a `verified_at` stamp (`TAX_RULES_VERIFIED_AT`). `check_tax_free_limits` computes the cumulative `TuMS § 49` representation/donation limits and the 22/78 tax on any excess from caller-supplied year-to-date figures (it does not read the ledger). Update the figures in this module when the law changes — the Estonian-tax tool descriptions render their rates/thresholds from these constants, so they follow automatically (pinned by tests).
|
|
791
814
|
|
|
792
|
-
- **Limited taxpayer (piiratud maksukohustuslane, KMS § 21)**: `/vat_info` only has `vat_number`, so the company VAT status (`none | limited | full`) is decided in one place, `resolveCompanyVatStatus` / `isCompanyVatRegistered` (`src/company-vat-status.ts`), used by every VAT-treatment site (receipts, PDF/document booking, document reading, classification, owner expense, VAT threshold, purchase-invoice CRUD, annual report). The API has no limited/full field (live-verified 2026-11-04: `/vat_info` = `tax_refnumber` + `vat_number` only), and e-arveldaja shows a limited taxpayer's new KMKR in `vat_number` at once, so a number alone never means `full`. Resolution: (1) an owner-approved `limited_vat` `mode: "set_status"` record made for the current `vat_number` wins (plan handle binds the previous stored setting and the VAT number — a number change between preview and execute is `plan_drift`; `effective_from` ≤ today Europe/Tallinn; a record saved before numbers were bound is bound to the current number on first read); (2) otherwise a number is looked up in EMTA's public KMKR query (`src/emta-kmkr.ts`: `GET https://apps.emta.ee/saqu/public/kmkrnr?lang=et` for the CSRF token + cookie, `POST …/kmkrnr/query` with only `personCode=EE…`; 10 s deadline per request including the body, 512 KiB cap while streaming, structural tag-by-tag parse of the one `table.grid` (any quoting; unclosed rows/cells, text outside cells, a nested or second grid table → invalid) and the limited marker count must equal the limited rows (a marker elsewhere is invalid, never `full`); concurrent lookups of one number share one request; a 403/429 or timeout starts a process-wide 60 s cooldown for every number): the one active row of that number (empty deletion date) is `limited` when its code cell carries the `Piiratud käibemaksukohustuslane` span, else `full`, `effective_from` = registration date, source `emta_lookup`; cached per number in `limited-vat.json` (`emta_lookup:<EE…>`) and in-process (public data, survives connection switch), re-checked after 7 days (one `emta_lookup` record per number holds the latest evidence: `success` (registration) or `contradiction` (`not_found` / `deleted` / `ambiguous` / `contradictory_page` = a parser-refused page carrying any registration content: the limited marker, an EE number or a dd.mm.yyyy date — even one deleted row); unavailability is never stored; written with `upsertIf` only when the evidence supersedes the stored record (newer `looked_up_at`, or equal time and more cautious: contradiction > limited > full); after every outcome the store is re-read and the superseding evidence of stored and own decides; a contradiction whose persistence fails still yields to an applicable owner decision — a contradiction is `unknown`, an expired success with an unavailable re-check is `stale`; the in-process cache never reuses an entry older than the stored record; an in-process failure is retried after 60 s); the store is re-read after the lookup so an owner decision saved meanwhile wins (re-read failure → `unknown`); a legacy unbound decision whose binding cannot be persisted is `unknown`; `set_status` and month execute resolve with `freshVatInfo` (`/vat_info` past its 10-minute cache); (3) a failed lookup (network, timeout, HTTP, shape → `company_vat_status_lookup_unavailable`) or an inconclusive one (no row, deleted only, several active → `company_vat_status_lookup_ambiguous`) is `unknown` until EMTA answers or the owner confirms with `set_status`; (4) no number is `none`. The business register does not show limited/full and is not used. Single-file rules mode cannot store a decision or lookup (in-process cache only; `set_status` unavailable). The store is re-read at every decision (another process may have written); an unreadable or invalid store is status `unknown` (`company_vat_status_unknown`). Every VAT decision throws `CompanyVatStatusUnknownError` (message = reason code + fix, with an Estonian owner sentence) on `unknown` (never a derived `full`); read-only displays (`limited_vat` `status`, annual-report flag, point-of-use notes) do not throw. Unit tests: the vitest setup file fakes the EMTA query as an active full registration for any number. Only `full` is VAT-registered: `limited` gets no input-VAT deduction and no reverse-charge input leg (a supplier-history `reversed_vat_id` is dropped). `limited_vat` (standard/full, tax group) modes: `guide` (Estonian guidance, `src/limited-vat-guidance.ts`, also in `earveldaja://tax_rules`), `status` (status, source, `vat_number`, `decision_status` / `decision_vat_number`, `effective_from`, the `emta_lookup` row with `looked_up_at` and `stale`, `reason` / `lookup_error` when unknown; for `none`: read-only foreign-service candidates and monthly would-be VAT), `set_status`, `month` (dry run → approval → `execute: true` + `plan_handle`). `month` (`src/limited-vat.ts`) takes confirmed purchase invoices of foreign (non-EST) suppliers whose KMS § 11 date (earliest of invoice date and linked payment date) is in the month; payments on the earliest prepayment date that do not alone cover its gross (invoice currency, cents, tolerance 0) or whose amount or sign is unproved (negative on an invoice, mixed on a credit note) make it a `limited_vat_partial_prepayment` review in every early-payment month and the invoice month (no split), and the fingerprint binds payment dates and amounts; EX-suffix suppliers are always excluded, financial-service suppliers by default (owner can override); an unclassified supplier, a supplier with an Estonian VAT number (EE…) or Estonian invoice country (even when classified), and an invoice or credit note where the supplier charged VAT (absolute values; OSS, an open point — ask EMTA) are review items, never booked; candidates are all invoices dated from the month start on (no look-ahead cutoff; a later invoice beyond the 300-read budget is a `limited_vat_coverage_incomplete` review); foreign currency at the frozen ECB rate of the § 11 day (failure → review); VAT per line = EUR base × date-gated standard rate, half-up; journal `PKM-YYYY-MM` D cost account/dimension / K output-VAT account (name-resolved "Käibemaks müügil (täismäär)" = standard 2511, else "Käibemaksukohustis" / "Arvestatud käibemaks", else an explicit `liability_account`, never guessed; always an active `Kohustused` account distinct from every cost target; the KMD collection account — name "Käibemaksu võlg"/"km.kogumiskonto", standard 2510 — is refused `limited_vat_liability_account_is_collection`, because e-arveldaja books every filed KMD as "EMTA KMD alusel kanne" D 2511 / C 1510 / remainder 2510 (live-verified Seppo AI 2025–2026; RIK #15766149 confirmed D2511/K2510 for a limited taxpayer), so a 2510 credit would double the debt), created and confirmed through `BookingGuard`; re-runs are `already_booked` (journal registered, not deleted, dated on its approved month-end date and equal to its stored booking record; the same check on a create-time duplicate), changes `limited_vat_journal_conflict`; the plan fingerprint binds every included invoice's calculation, the supplier country/VAT number and the KMD projection, late invoices a `PKM-YYYY-MM-Pn` correction delta. Output carries KMD rows 1/4/6/7 with RIK's e-arveldaja KMD steps (delete the "sh pöördmaksustamisega seotud käive" row and row 5, fill row 12 by hand when asked) and the 20th-of-next-month deadline; the MCP never files the KMD. Point-of-use notes (never holds) on `receipt_batch`, `suggest_booking` / `process_accounting_document` (`tax_notes` code `KMS § 21 lg 1`) and `create_purchase_invoice_from_pdf` (`limited_vat_note`).
|
|
815
|
+
- **Limited taxpayer (piiratud maksukohustuslane, KMS § 21)**: `/vat_info` only has `vat_number`, so the company VAT status (`none | limited | full`) is decided in one place, `resolveCompanyVatStatus` / `isCompanyVatRegistered` (`src/company-vat-status.ts`), used by every VAT-treatment site (receipts, PDF/document booking, document reading, classification, owner expense, VAT threshold, purchase-invoice CRUD, annual report). The API has no limited/full field (live-verified 2026-11-04: `/vat_info` = `tax_refnumber` + `vat_number` only), and e-arveldaja shows a limited taxpayer's new KMKR in `vat_number` at once, so a number alone never means `full`. Resolution: (1) an owner-approved `limited_vat` `mode: "set_status"` record made for the current `vat_number` wins (plan handle binds the previous stored setting and the VAT number — a number change between preview and execute is `plan_drift`; `effective_from` ≤ today Europe/Tallinn; a record saved before numbers were bound is bound to the current number on first read); (2) otherwise a number is looked up in EMTA's public KMKR query (`src/emta-kmkr.ts`: `GET https://apps.emta.ee/saqu/public/kmkrnr?lang=et` for the CSRF token + cookie, `POST …/kmkrnr/query` with only `personCode=EE…`; 10 s deadline per request including the body, 512 KiB cap while streaming, structural tag-by-tag parse of the one `table.grid` (any quoting; unclosed rows/cells, text outside cells, a nested or second grid table → invalid) and the limited marker count must equal the limited rows (a marker elsewhere is invalid, never `full`); concurrent lookups of one number share one request; a 403/429 or timeout starts a process-wide 60 s cooldown for every number): the one active row of that number (empty deletion date) is `limited` when its code cell carries the `Piiratud käibemaksukohustuslane` span, else `full`, `effective_from` = registration date, source `emta_lookup`; cached per number in `limited-vat.json` (`emta_lookup:<EE…>`) and in-process (public data, survives connection switch), re-checked after 7 days (one `emta_lookup` record per number holds the latest evidence: `success` (registration) or `contradiction` (`not_found` / `deleted` / `ambiguous` / `contradictory_page` = a parser-refused page carrying any registration content: the limited marker, an EE number or a dd.mm.yyyy date — even one deleted row); unavailability is never stored; written with `upsertIf` only when the evidence supersedes the stored record (newer `looked_up_at`, or equal time and more cautious: contradiction > limited > full); after every outcome the store is re-read and the superseding evidence of stored and own decides; a contradiction whose persistence fails still yields to an applicable owner decision — a contradiction is `unknown`, an expired success with an unavailable re-check is `stale`; the in-process cache never reuses an entry older than the stored record; an in-process failure is retried after 60 s); the store is re-read after the lookup so an owner decision saved meanwhile wins (re-read failure → `unknown`); a legacy unbound decision whose binding cannot be persisted is `unknown`; `set_status` and month execute resolve with `freshVatInfo` (`/vat_info` past its 10-minute cache); (3) a failed lookup (network, timeout, HTTP, shape → `company_vat_status_lookup_unavailable`) or an inconclusive one (no row, deleted only, several active → `company_vat_status_lookup_ambiguous`) is `unknown` until EMTA answers or the owner confirms with `set_status`; (4) no number is `none`. The business register does not show limited/full and is not used. Single-file rules mode cannot store a decision or lookup (in-process cache only; `set_status` unavailable). The store is re-read at every decision (another process may have written); an unreadable or invalid store is status `unknown` (`company_vat_status_unknown`). Every VAT decision throws `CompanyVatStatusUnknownError` (message = reason code + fix, with an Estonian owner sentence) on `unknown` (never a derived `full`); read-only displays (`limited_vat` `status`, annual-report flag, point-of-use notes) do not throw. Unit tests: the vitest setup file fakes the EMTA query as an active full registration for any number. Only `full` is VAT-registered: `limited` gets no input-VAT deduction and no reverse-charge input leg (a supplier-history `reversed_vat_id` is dropped). `limited_vat` (standard/full, tax group) modes: `guide` (Estonian guidance, `src/limited-vat-guidance.ts`, also in `earveldaja://tax_rules`), `status` (status, source, `vat_number`, `decision_status` / `decision_vat_number`, `effective_from`, the `emta_lookup` row with `looked_up_at` and `stale`, `reason` / `lookup_error` when unknown; for `none`: read-only foreign-service candidates and monthly would-be VAT), `set_status`, `month` (dry run → approval → `execute: true` + `plan_handle`). `month` (`src/limited-vat.ts`) takes confirmed purchase invoices of foreign (non-EST) suppliers whose KMS § 11 date (earliest of invoice date and linked payment date) is in the month; payments on the earliest prepayment date that do not alone cover its gross (invoice currency, cents, tolerance 0) or whose amount or sign is unproved (negative on an invoice, mixed on a credit note) make it a `limited_vat_partial_prepayment` review in every early-payment month and the invoice month (no split), and the fingerprint binds payment dates and amounts; EX-suffix suppliers are always excluded, financial-service suppliers by default (owner can override); an unclassified supplier, a supplier with an Estonian VAT number (EE…) or Estonian invoice country (even when classified), and an invoice or credit note where the supplier charged VAT (absolute values; OSS, an open point — ask EMTA) are review items, never booked; candidates are all invoices dated from the month start on (no look-ahead cutoff; a later invoice beyond the 300-read budget is a `limited_vat_coverage_incomplete` review); foreign currency at the frozen ECB rate of the § 11 day (failure → review); VAT per line = EUR base × date-gated standard rate, half-up; journal `PKM-YYYY-MM` D cost account/dimension / K output-VAT account (name-resolved "Käibemaks müügil (täismäär)" = standard 2511, else "Käibemaksukohustis" / "Arvestatud käibemaks", else an explicit `liability_account`, never guessed; always an active `Kohustused` account distinct from every cost target; the KMD collection account — name "Käibemaksu võlg"/"km.kogumiskonto", standard 2510 — is refused `limited_vat_liability_account_is_collection`, because e-arveldaja books every filed KMD as "EMTA KMD alusel kanne" D 2511 / C 1510 / remainder 2510 (live-verified Seppo AI 2025–2026; RIK #15766149 confirmed D2511/K2510 for a limited taxpayer), so a 2510 credit would double the debt), created and confirmed through `BookingGuard`; re-runs are `already_booked` (journal registered, not deleted, dated on its approved month-end date and equal to its stored booking record; the same check on a create-time duplicate), changes `limited_vat_journal_conflict`; a lone unrecorded `PKM-YYYY-MM` (hand-booked or lost record) equal to the full proposal is `already_booked` with `adoption` — dry run issues a plan handle (fingerprint binds its journal id, posting signature and the included invoice ids → `plan_drift` on change), execute stores its booking record (no journal write, `status: "adopted"`) so later invoices become deltas; one that differs (including a hand journal that no longer equals the month because an invoice was added before adoption) stays a conflict — no adoption; the plan fingerprint binds every included invoice's calculation, the supplier country/VAT number and the KMD projection, late invoices a `PKM-YYYY-MM-Pn` correction delta. Output carries KMD rows 1/4/6/7 with RIK's e-arveldaja KMD steps (delete the "sh pöördmaksustamisega seotud käive" row and row 5, fill row 12 by hand when asked) and the 20th-of-next-month deadline; the MCP never files the KMD. Point-of-use notes (never holds) on `receipt_batch`, `suggest_booking` / `process_accounting_document` (`tax_notes` code `KMS § 21 lg 1`) and `create_purchase_invoice_from_pdf` (`limited_vat_note`).
|
|
793
816
|
|
|
794
817
|
**Non-goals — do NOT reimplement in MCP (e-arveldaja does these natively; reimplementing risks double-booking):**
|
|
795
818
|
- **No KMD/VAT return (käibedeklaratsioon)** — e-arveldaja generates it from the confirmed ledger and files it to EMTA. The tax-rules layer is advisory only.
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
MCP server for the Estonian e-arveldaja (RIK e-Financials) REST API. 128 tools on the standard profile, 16 workflow prompts, 15 resources. Works with any MCP client — Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf, Cline, and others.
|
|
6
6
|
|
|
7
|
+
> **Cash-flow 24xx accounts, USD pool recovery, limited-VAT journal takeover (0.41.0, behaviour change).** The annual cash-flow statement now bridges customer prepayments (22xx) as operating working capital, while a 24xx account (group, related-party or other short-term debt) with cash movements needs one owner decision — operating or financing — shown in a per-account review with an explanation and the rule to add. A blocked Lightyear USD pool now says truthfully how to recover, and the pool opening can be replaced, with approval, only while the pool is blocked. `limited_vat` can take over a monthly VAT journal you booked by hand, so later invoices become corrections. The inbox receipt preview no longer stops when your company name cannot be read. See the [changelog](CHANGELOG.md) for details.
|
|
8
|
+
|
|
7
9
|
> **Limited VAT taxpayers, KMD row 7 and plan-bound dividends (0.40.0, behaviour change).** The server now tells a limited VAT registration (piiratud maksukohustuslane, KMS § 21) from a full one via EMTA's public VAT-number query, never deducts input VAT for a limited or unknown status, and `limited_vat` books the monthly self-assessed VAT (D cost / C 2511) after approval and gives the KMD rows. Reverse-charge purchases from non-EU suppliers now use the KMD row 7 option (RIK-confirmed); an EU VAT number on the invoice or supplier keeps row 6. `prepare_dividend_package` now starts from the approved annual report figures you supply, and dividend and year-end close execution require the preview's `plan_handle`. See the CHANGELOG for details.
|
|
8
10
|
|
|
9
11
|
> **Safer bank confirmations and stricter owner expenses (0.38.0, behaviour change).** A payment whose text names exactly one invoice or order number can now be confirmed through the guided approval flow, and payments that match several invoices are reported instead of silently skipped. The guided Wise import picks an account automatically only when it is recognisably the Wise account, otherwise it asks. An owner-paid expense is refused before anything is written when its expense or owner-debt account has dimensions and none is given (pass `expense_account_dimension_id` / `payable_account_dimension_id`). Duplicate transfer rows are deleted only through a fresh reconciliation plan, and earlier Lightyear drafts are no longer offered for confirmation unseen. See the [changelog](CHANGELOG.md) for full details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-operations.d.ts","sourceRoot":"","sources":["../src/accounting-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAA8B,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK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AAiB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACxF,8EAA8E;IAC9E,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACzF,8EAA8E;IAC9E,mBAAmB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACnG,kFAAkF;IAClF,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACxG;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC;CAC/F;AA4ED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,UAAU,EACf,oBAAoB,EAAE,oBAAoB,GACzC,oBAAoB,CAGtB"}
|
|
@@ -38,12 +38,12 @@ class AccountingOperationsImpl {
|
|
|
38
38
|
// Resolve + revalidate the scanned folder path (realpath, allowed-roots,
|
|
39
39
|
// is-directory) exactly as the receipt tool adapter does for a raw folder_path.
|
|
40
40
|
const resolvedFolderPath = await validateReceiptFolderPath(input.folderPath);
|
|
41
|
-
//
|
|
42
|
-
//
|
|
41
|
+
// The #22 self-match guard needs the active company identity. If the read
|
|
42
|
+
// still fails (after loadOwnCompanyIdentity's own retry), runBatch keeps the
|
|
43
|
+
// guard at full strength per item, as receipt_batch does: existing suppliers
|
|
44
|
+
// proceed only while our registry code derives from our VAT, else every item
|
|
45
|
+
// is held as own_company_identity_unavailable. Dry run only: nothing is written.
|
|
43
46
|
const identity = await loadOwnCompanyIdentity(this.api);
|
|
44
|
-
if (identity.status === "retryable_error") {
|
|
45
|
-
throw new Error(`Receipt batch dry run could not load the active company identity: ${identity.reason}`);
|
|
46
|
-
}
|
|
47
47
|
return this.receipts.runBatch({
|
|
48
48
|
resolvedFolderPath,
|
|
49
49
|
accountsDimensionsId: input.accountsDimensionsId,
|
|
@@ -60,7 +60,9 @@ class AccountingOperationsImpl {
|
|
|
60
60
|
// slots per folder per scan and eventually deny the approval path.
|
|
61
61
|
// Approval handles come from an explicit receipt_batch dry run.
|
|
62
62
|
mintPlanHandles: false,
|
|
63
|
-
...(identity.
|
|
63
|
+
...(identity.status === "available"
|
|
64
|
+
? identity.invoiceCompanyName !== undefined ? { ownCompanyName: identity.invoiceCompanyName } : {}
|
|
65
|
+
: { ownCompanyNameUnavailable: true }),
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
classifyTransactions(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-operations.js","sourceRoot":"","sources":["../src/accounting-operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAA6B,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,oBAAoB,GAIrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAA8C,MAAM,sBAAsB,CAAC;AAExG,OAAO,EAAE,4BAA4B,EAA+B,MAAM,gCAAgC,CAAC;AAE3G,OAAO,EACL,8BAA8B,GAI/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAM5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAkDlE,MAAM,wBAAwB;IAQT,GAAG;IAPL,IAAI,CAAiB;IACrB,IAAI,CAAiB;IACrB,QAAQ,CAAyB;IACjC,cAAc,CAA2B;IACzC,cAAc,CAA+B;IAE9D,YACmB,GAAe,EAChC,oBAA0C;mBADzB,GAAG;QAGpB,IAAI,CAAC,I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,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE;gBAClG,CAAC,CAAC,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC;SACzC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,CAAC,KAA6B;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAED,mBAAmB,CAAC,KAAwB;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACF;AAED,MAAM,UAAU,0BAA0B,CACxC,GAAe,EACf,oBAA0C;IAE1C,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;IACjD,OAAO,IAAI,wBAAwB,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.api.d.ts","sourceRoot":"","sources":["../../src/api/transactions.api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAgC,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACvH,OAAO,KAAK,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAExG,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"transactions.api.d.ts","sourceRoot":"","sources":["../../src/api/transactions.api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,u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AgB,EAAE,MAAM,CAAC;KAC1B,EAYA;CACF;AAED;;;;;;GAMG;AACH,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,QAAQ,CAAC,QAAQ,sCAAsC;IACvD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,WAAW,SAE0F;IAE9G,YAAY,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAAC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAUhH;CACF;AAsBD,qBAAa,eAAgB,SAAQ,YAAY,CAAC,WAAW,CAAC;IAC5D,YAAY,MAAM,EAAE,UAAU,EAE7B;IAEM,2CAA2C,IAAI,IAAI,CAEzD;IAOc,MAAM,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,WAAW,CAAC,CAE9E;IAEc,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,WAAW,CAAC,CAE1F;IAED;;;;OAIG;YACW,2BAA2B;IAiBzC;;;;;;;;;;;;;;;;;OAiBG;IACG,OAAO,CACX,EAAE,EAAE,MAAM,EACV,aAAa,CAAC,EAAE,uBAAuB,EAAE,EACzC,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,WAAW,CAAC,CActB;IAED;;;;OAIG;YACW,mBAAmB;YAqBnB,eAAe;IAyM7B,mFAAmF;YACrE,sBAAsB;IAiEpC,OAAO,CAAC,uBAAuB;IAIzB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAYjD;CAEF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpError } from "../http-client.js";
|
|
2
2
|
import { classifyMutationFailure, isMutationIndeterminate, MutationIndeterminateError } from "../mutation-outcome.js";
|
|
3
3
|
import { BaseResource, cache } from "./base-resource.js";
|
|
4
|
+
import { accountBindingRefusal, AccountNotBankBindableError } from "../banking/account-binding-refusal.js";
|
|
4
5
|
import { compareBankTransactionMaterial, changedLinkedInvoiceFields, TransactionMaterialDriftError, } from "../banking/transaction-material-snapshot.js";
|
|
5
6
|
export { TransactionMaterialDriftError } from "../banking/transaction-material-snapshot.js";
|
|
6
7
|
function isHttpMethod(value) {
|
|
@@ -387,6 +388,9 @@ export class TransactionsApi extends BaseResource {
|
|
|
387
388
|
`Transaction may have incorrect clients_id — manual review required.`);
|
|
388
389
|
}
|
|
389
390
|
}
|
|
391
|
+
const refusal = body.some(row => row.related_table === "accounts") ? accountBindingRefusal(error) : undefined;
|
|
392
|
+
if (refusal && error instanceof HttpError)
|
|
393
|
+
throw new AccountNotBankBindableError(error, refusal);
|
|
390
394
|
throw error;
|
|
391
395
|
}
|
|
392
396
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.api.js","sourceRoot":"","sources":["../../src/api/transactions.api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,8BAA8B,EAAE,0BAA0B,EAAE,6BAA6B,GAE1F,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAU5F,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,KAAK;QAC3D,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,KA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AAE,EACF,cAAc,GAAG,EAAE,EACnB,uBAAuB,EACvB,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAc,iBAAiB,EAAE,aAAa,EAAE,EAAE,CAAC,EAC1E,2BAA2B,GAAG,EAAE;YAC9B,gEAAgE,CACnE,CAAC;IACJ,CAAC;CAEF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HttpError } from "../http-client.js";
|
|
2
|
+
export interface AccountBindingRefusal {
|
|
3
|
+
code: "account_not_bank_bindable";
|
|
4
|
+
account_number: string;
|
|
5
|
+
next_action: string;
|
|
6
|
+
upstream_detail: string;
|
|
7
|
+
}
|
|
8
|
+
/** Only the register endpoint's specific refusal is interpreted; no chart flags are guessed. */
|
|
9
|
+
export declare function accountBindingRefusal(error: unknown): AccountBindingRefusal | undefined;
|
|
10
|
+
export declare class AccountNotBankBindableError extends HttpError implements AccountBindingRefusal {
|
|
11
|
+
readonly code = "account_not_bank_bindable";
|
|
12
|
+
readonly account_number: string;
|
|
13
|
+
readonly next_action: string;
|
|
14
|
+
readonly upstream_detail: string;
|
|
15
|
+
constructor(error: HttpError, refusal: AccountBindingRefusal);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=account-binding-refusal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-binding-refusal.d.ts","sourceRoot":"","sources":["../../src/banking/account-binding-refusal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,2BAA2B,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,gGAAgG;AAChG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,CAavF;AAED,qBAAa,2BAA4B,SAAQ,SAAU,YAAW,qBAAqB;IACzF,QAAQ,CAAC,IAAI,+BAA+B;IAC5C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,SAAiB,eAAe,EAAE,MAAM,CAAC;IAEzC,YAAY,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,qBAAqB,EAK3D;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HttpError } from "../http-client.js";
|
|
2
|
+
import { unwrapUntrustedOcr } from "../mcp-json.js";
|
|
3
|
+
/** Only the register endpoint's specific refusal is interpreted; no chart flags are guessed. */
|
|
4
|
+
export function accountBindingRefusal(error) {
|
|
5
|
+
if (!(error instanceof HttpError) || error.status !== 409 || error.method !== "PATCH"
|
|
6
|
+
|| !/^\/transactions\/\d+\/register$/.test(error.path) || !error.upstream_detail)
|
|
7
|
+
return undefined;
|
|
8
|
+
const match = /^The account (\d+) has not been allowed to be reconciled \(\[[\d,\s]*\]\)!$/.exec(unwrapUntrustedOcr(error.upstream_detail).trim());
|
|
9
|
+
if (!match)
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
code: "account_not_bank_bindable",
|
|
13
|
+
account_number: match[1],
|
|
14
|
+
next_action: `Account ${match[1]} cannot be used on a bank row in e-arveldaja — enable it in the chart settings, choose an allowed account, or book a separate journal.`,
|
|
15
|
+
upstream_detail: error.upstream_detail,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export class AccountNotBankBindableError extends HttpError {
|
|
19
|
+
code = "account_not_bank_bindable";
|
|
20
|
+
account_number;
|
|
21
|
+
next_action;
|
|
22
|
+
constructor(error, refusal) {
|
|
23
|
+
super(refusal.next_action, error.status, error.method, error.path, { upstream_detail: refusal.upstream_detail });
|
|
24
|
+
this.name = "AccountNotBankBindableError";
|
|
25
|
+
this.account_number = refusal.account_number;
|
|
26
|
+
this.next_action = refusal.next_action;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=account-binding-refusal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-binding-refusal.js","sourceRoot":"","sources":["../../src/banking/account-binding-refusal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AASpD,gGAAgG;AAChG,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;WAChF,CAAC,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe;QAAE,OAAO,SAAS,CAAC;IACrG,MAAM,KAAK,GAAG,6EAA6E,CAAC,IAAI,CAC9F,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CACjD,CAAC;IACF,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAE;QACzB,WAAW,EAAE,WAAW,KAAK,CAAC,CAAC,CAAC,wIAAwI;QACxK,eAAe,EAAE,KAAK,CAAC,eAAe;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,2BAA4B,SAAQ,SAAS;IAC/C,IAAI,GAAG,2BAA2B,CAAC;IACnC,cAAc,CAAS;IACvB,WAAW,CAAS;IAG7B,YAAY,KAAgB,EAAE,OAA8B;QAC1D,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;QACjH,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/banking/reconciliation/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/banking/reconciliation/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAuB7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAuE5E,OAAO,KAAK,EAEV,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EAGjB,mBAAmB,EAGnB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EAEvB,mBAAmB,EAInB,yBAAyB,EAOzB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAkBpB,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAUlD,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,eAAe,CAAC,CAAC,IACzB;IAAE,QAAQ,CAAC,EAAE,EAAE,I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B,CAAC,CAAC,CA2SjD"}
|
|
@@ -11,6 +11,7 @@ import { decodeInvoiceStatusCritical } from "../../api/critical-codecs.js";
|
|
|
11
11
|
import { logAudit } from "../../audit-log.js";
|
|
12
12
|
import { reportProgress } from "../../progress.js";
|
|
13
13
|
import { MutationIndeterminateError } from "../../mutation-outcome.js";
|
|
14
|
+
import { accountBindingRefusal } from "../account-binding-refusal.js";
|
|
14
15
|
import { LinkedInvoiceClientMismatchError, LinkedInvoiceClientsAmbiguousError, } from "../../api/transactions.api.js";
|
|
15
16
|
import { PlanStoreError } from "../../plan-store.js";
|
|
16
17
|
import { isRecord } from "../../record-utils.js";
|
|
@@ -1792,6 +1793,12 @@ export async function executeInterAccount(api, runtimeSafetyContext, input) {
|
|
|
1792
1793
|
return { outcome: "completed", known_objects: [{ entity_type: "transaction", entity_id: action.confirmedTxId, outcome: "confirmed" }] };
|
|
1793
1794
|
}
|
|
1794
1795
|
catch (err) {
|
|
1796
|
+
const refusal = accountBindingRefusal(err);
|
|
1797
|
+
if (refusal) {
|
|
1798
|
+
match.errors.push({ transaction_ids: [action.confirmedTxId], code: refusal.code,
|
|
1799
|
+
account_number: refusal.account_number, upstream_detail: refusal.upstream_detail, reason: refusal.next_action });
|
|
1800
|
+
return { outcome: "failed", error_code: refusal.code, mutation_occurred: false };
|
|
1801
|
+
}
|
|
1795
1802
|
if (err instanceof TransactionMaterialDriftError)
|
|
1796
1803
|
return { outcome: "failed", error_code: err.category, mutation_occurred: err.mutation_occurred, known_objects: err.known_objects };
|
|
1797
1804
|
if (err instanceof MutationIndeterminateError)
|