jaz-clio 5.20.42 → 5.20.44
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/assets/skills/api/SKILL.md +1 -1
- package/assets/skills/api/references/claims.md +19 -4
- package/assets/skills/api/references/errors.md +16 -0
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/cli.mjs +282 -282
- package/package.json +1 -1
|
@@ -53,6 +53,13 @@ be submitted (current status: APPROVED)"). Don't pre-check — call and surface
|
|
|
53
53
|
`422 CLAIM_REFERENCE_REQUIRED_AT_SUBMIT`. A DRAFT (the default) saves without one — set
|
|
54
54
|
one via `update_claim` before submitting. Don't pre-validate; surface the 422.
|
|
55
55
|
|
|
56
|
+
**Tax under an INCLUSIVE profile.** If the claim's profile has `taxMode: INCLUSIVE`, every
|
|
57
|
+
line must carry a tax profile to **submit**, else `422 CLAIM_SUBMIT_TAX_REQUIRED_INCLUSIVE`
|
|
58
|
+
("the claim must be tax-inclusive and every line item must carry a tax profile"). Lines
|
|
59
|
+
inherit tax from their **claim type's** `taxProfileResourceId` — so under an INCLUSIVE org,
|
|
60
|
+
give claim types a tax profile (e.g. Standard-Rated Purchases) and they just work. DRAFT
|
|
61
|
+
saves without tax; only submit enforces it. A `NO_TAX` profile has no such requirement.
|
|
62
|
+
|
|
56
63
|
### Visibility & approval (server-enforced — don't replicate client-side)
|
|
57
64
|
|
|
58
65
|
- **Manager pending-approval scope**: a manager's pending queue is the claims they
|
|
@@ -118,7 +125,11 @@ Turn APPROVED claims into journal entries, and record books-only employee payout
|
|
|
118
125
|
(gateway direct-debit-backed real-money payout), `REIMBURSEMENT_PAYOUT`, `ADVANCE`.
|
|
119
126
|
`DISBURSEMENT` / `DIRECT_ENTRY` rows originate from the gateway/conversion flows and are
|
|
120
127
|
**read-only here** (this surface never disburses) — `payoutType` is a different axis from
|
|
121
|
-
`record_employee_payout`'s `payoutFor`.
|
|
128
|
+
`record_employee_payout`'s `payoutFor`. **Note the two views of one row:** a payout you
|
|
129
|
+
record echoes `payoutType` `REIMBURSEMENT_PAYOUT` / `ADVANCE` in its create response, but
|
|
130
|
+
`search_employee_payouts` then reports that same row as `DIRECT_ENTRY` (its books-only-DCE
|
|
131
|
+
class) — match payouts by `reference`/`employeeResourceId`, not by expecting the recorded
|
|
132
|
+
type to reappear in search.
|
|
122
133
|
- **`create_claim_from_attachment`** (write, multipart) — OCR a receipt into a DRAFT
|
|
123
134
|
claim from a **file**, a **URL**, or **raw HTML** (an email body). **Wire field is
|
|
124
135
|
`sourceURL` (capital URL)** — unlike the BT create-from-attachment's `sourceUrl`. On the
|
|
@@ -140,9 +151,12 @@ bare list endpoint).
|
|
|
140
151
|
|
|
141
152
|
- **`add_employee`** — `name`, **`userResourceId`, and `claimProfileResourceId` are
|
|
142
153
|
required** (the server rejects a create without a user to bind:
|
|
143
|
-
`422 EMPLOYEE_USER_RESOURCE_ID_MISSING`).
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
`422 EMPLOYEE_USER_RESOURCE_ID_MISSING`). **`userResourceId` is the user's resourceId —
|
|
155
|
+
read it as the `userResourceId` FIELD on an org-user (`search_org_users`), NOT the
|
|
156
|
+
org-user record's own `resourceId`; passing the membership id returns
|
|
157
|
+
`422 EMPLOYEE_USER_NOT_FOUND`.** Each user binds to at most one employee. Binding is
|
|
158
|
+
**PERMANENT** (rotation blocked once set). An **offline employee** (no user bound yet) can
|
|
159
|
+
still arise via import — bind it later with `bind_employee_user`. Dedups by email (per-org unique).
|
|
146
160
|
- **The approver comes from the claim profile, not the employee.** An employee's approver
|
|
147
161
|
is `claimProfile.approverUserResourceId` (set on the Claim Profile) — the employee record
|
|
148
162
|
has no own approver field. To change who approves, edit the profile or move the employee
|
|
@@ -201,6 +215,7 @@ One MCP namespace wraps all three: **`claim_settings`**. CLI: `clio claim-types
|
|
|
201
215
|
6. **`employeeBalanceAccountResourceId` must be a CURRENT_LIABILITY account** and is required before a profile's employees can be reimbursed at conversion. Once an employee on the profile has a non-zero balance, it can't be changed/cleared.
|
|
202
216
|
7. **Profile constraints (server-enforced):** `minClaimAmount ≤ maxClaimAmount`; `maxPerPeriodAmount` requires `perPeriod`.
|
|
203
217
|
8. **Posting Rule templates** are Handlebars-style: `lineDescriptionTemplate` (required, e.g. `"{employeeName} - {claimType}"`) and the optional `journalReferenceTemplate` for the parent journal header.
|
|
218
|
+
9. **Claim type create requires `expenseAccountResourceId`** (`422 CLAIM_TYPE_EXPENSE_ACCOUNT_REQUIRED`) even though the field reads as optional. Find an expense GL via `search_accounts` — `accountType` is a **display label** (`"Operating Expense"`, `"Direct Costs"`), NOT `"EXPENSE"` (which returns zero rows). Under an **INCLUSIVE** profile also set `taxProfileResourceId`, else the type's lines can't submit (see *Tax under an INCLUSIVE profile*, above).
|
|
204
219
|
|
|
205
220
|
## Search
|
|
206
221
|
|
|
@@ -871,6 +871,22 @@ Journals support a top-level `currency` object to create entries in a foreign cu
|
|
|
871
871
|
**Cause**: A lifecycle transition was attempted from an illegal status, e.g. submitting a non-DRAFT claim ("Only DRAFT claims can be submitted (current status: APPROVED)").
|
|
872
872
|
**Fix**: Check the current status (`get_claim`) and use the legal transition. Don't pre-check — surface the error.
|
|
873
873
|
|
|
874
|
+
### "CLAIM_SUBMIT_TAX_REQUIRED_INCLUSIVE" (422)
|
|
875
|
+
**Cause**: A claim was submitted under a claim profile whose `taxMode` is `INCLUSIVE`, but a line carries no tax ("The claim profile is INCLUSIVE — the claim must be tax-inclusive and every line item must carry a tax profile"). Lines inherit tax from their **claim type's** `taxProfileResourceId`; a claim type created without one yields tax-less lines that can't submit under an INCLUSIVE profile. (A `NO_TAX` profile has no such requirement.)
|
|
876
|
+
**Fix**: Give the claim type a `taxProfileResourceId` (e.g. a Standard-Rated Purchases profile — find one via `search_tax_profiles`) so its lines inherit tax, or set tax on the line, then resubmit. The draft saves fine without tax — this only fires at submit.
|
|
877
|
+
|
|
878
|
+
### "CLAIM_TYPE_EXPENSE_ACCOUNT_REQUIRED" (422)
|
|
879
|
+
**Cause**: `create_claim_type` was called without `expenseAccountResourceId` ("ClaimType expenseAccountResourceId is required"). The field reads as optional in the schema but the server requires it on create.
|
|
880
|
+
**Fix**: Find an expense GL account via `search_accounts` — `accountType` is a **display label** (`"Operating Expense"`, `"Direct Costs"`), NOT an enum like `"EXPENSE"` (which returns zero rows) — then pass its `resourceId` as `expenseAccountResourceId`.
|
|
881
|
+
|
|
882
|
+
### "EMPLOYEE_USER_NOT_FOUND" (422)
|
|
883
|
+
**Cause**: `add_employee` / `bind_employee_user` was given a `userResourceId` that isn't a user ("User not found for userResourceId …"). The usual mistake: passing an org-user record's own `resourceId` instead of its `userResourceId`.
|
|
884
|
+
**Fix**: Use `search_org_users` and read the member's **`userResourceId`** field (not the org-user record's `resourceId`), then retry. Each user binds to at most one employee, and the binding is permanent once set.
|
|
885
|
+
|
|
886
|
+
### "EMPLOYEE_CLAIM_PROFILE_REQUIRED" (422)
|
|
887
|
+
**Cause**: `add_employee` was called without `claimProfileResourceId` ("A claim profile is required for an employee — it carries the employee balance account used to convert and pay claims"). The claim profile is **server-required** — the org default is NOT auto-applied for employees (unlike claims), even when a default profile exists.
|
|
888
|
+
**Fix**: Pick a profile via `search_claim_profiles` and pass its `resourceId` as `claimProfileResourceId`. The profile is locked while the employee has unsettled claims.
|
|
889
|
+
|
|
874
890
|
---
|
|
875
891
|
|
|
876
892
|
## Repair Suggestions (W1.3)
|