Files
accounted/lib
Jonas Flodén bbc8063f53 fix(bookkeeping): reverseEntry defaults to original entry_date, not today (#762)
* fix(bookkeeping): reverseEntry defaults to original entry_date, not today

When reverseEntry() is called without an explicit reversalDate, it was
defaulting to getSwedishLocalDate() (today). This caused the storno to land
in the current period rather than the original entry's period — any reversal
of a past verifikation through uncategorize, re-categorize, the dashboard
reverse button, salary correction, or fix-cash-mismatch would produce a
makulering dated today instead of the original booking date.

The entry is already fetched before the date is resolved, so defaulting to
original.entry_date is safe. Callers that intentionally want a different date
(credit notes, mark-paid with payment date, user-provided reverse date) still
pass an explicit reversalDate and are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Jonas Flodén <jonas@floden.nu>

* feat(api): v1 endpoints to stamp invoice inbox items as consumed

Adds inbox_item_id support to POST /api/v1/companies/{companyId}/documents/{id}/link
(best-effort stamp on the originating invoice_inbox_items row) and a new dedicated
POST /api/v1/companies/{companyId}/inbox-items/{id}/stamp endpoint for stamping
independently of the document link — both use documents:write scope and require
Idempotency-Key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Jonas Flodén <jonas@floden.nu>

* Revert "feat(api): v1 endpoints to stamp invoice inbox items as consumed"

This reverts commit f1bf3a86385ec556a49830c9e0966236a10d3164.

Signed-off-by: Jonas Flodén <jonas@floden.nu>

---------

Signed-off-by: Jonas Flodén <jonas@floden.nu>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 12:39:56 +02:00
..
2026-06-16 18:22:09 +02:00
2026-06-18 11:49:33 +02:00
2026-06-10 13:52:24 +02:00
2026-06-18 11:49:33 +02:00
2026-06-16 10:42:37 +02:00
2026-03-21 00:47:54 +01:00
2026-06-16 18:22:09 +02:00
2026-02-24 16:06:36 +01:00
2026-05-26 22:29:41 +02:00
2026-06-18 11:49:33 +02:00
2026-06-12 16:35:30 +02:00
2026-06-12 16:35:30 +02:00
2026-04-22 18:14:01 +02:00
2026-06-18 11:49:33 +02:00
2026-06-18 11:49:33 +02:00
2026-06-18 11:49:33 +02:00
2026-06-18 11:49:33 +02:00
2026-06-18 11:49:33 +02:00
2026-06-10 13:52:24 +02:00
2026-05-28 15:43:48 +02:00
2026-05-26 22:29:41 +02:00
2026-06-16 18:22:09 +02:00
2026-05-13 15:17:32 +02:00
2026-05-06 11:12:02 +02:00
2026-05-28 15:43:48 +02:00
2026-04-29 16:32:26 +02:00