@ossy/spend
v3.27.1
Published
Inbound invoice and receipt spend — purchase records, deduped totals, fiscal-month charts
Readme
@ossy/spend
Inbound invoices and receipts become purchase records. Spend is read by supplier and by fiscal month without counting the same purchase twice.
Capabilities
| Action | Purpose |
|--------|---------|
| extract-purchase | Read an inbound invoice/receipt and create or merge a purchase |
| get-spend-stats | Spend by supplier and by fiscal month for the overview chart |
Invoke
await sdk.invoke({ id: '@ossy/spend/actions/extract-purchase' }, { resourceId, workspaceId })
await sdk.invoke({ id: '@ossy/spend/actions/get-spend-stats' }, {
workspaceId,
fiscalYearStart: '2025-01-01',
fiscalYearEnd: '2025-12-31',
currency: 'SEK',
})Filing runs automatically when inbound mail is labeled invoice or receipt (see file-inbound-purchase).
Currency chart rule
Document amounts stay in the document currency. The fiscal-month chart includes only purchases whose currency matches the requested chart currency (default SEK). Other currencies remain in purchase records and supplier totals when no currency filter is set.
