Files
accounted/lib
Jack Ek 2a1ec5ec2f fix: Make SIE imports atomic (#860)
* fix: Make SIE imports atomic

* fix(import): carry dimensions + harden the atomic SIE RPC

Rebased onto current main. The RPC now:
- carries the per-line dimensions jsonb through the payload + INSERT so
  imported SIE object-list codes are not dropped (dimensions PR5 #866);
- uses the NULL-safe caller_is_company_member guard (drops the banned
  NOT IN (SELECT user_company_ids()) pattern ratcheted since #881);
- verifies the fiscal period belongs to the company;
- enforces per-voucher balance (sum debit = sum credit > 0) since
  SECURITY DEFINER + the direct draft->posted UPDATE bypass the trigger path;
- ships REVOKE ALL FROM PUBLIC, anon / GRANT EXECUTE TO authenticated,
  service_role (house style).
Migration renamed to a current timestamp. Added pg-real coverage for the
dimensions round-trip, unbalanced rejection, and foreign-fiscal-period guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <jakob.wennberg@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 16:00:01 +02:00
..
2026-07-08 20:19:02 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-07 01:14:59 +02:00
2026-07-15 15:53:15 +02:00
2026-07-05 03:05:09 +02:00
2026-03-21 00:47:54 +01:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-12 19:14:12 +02:00
2026-07-13 22:54:33 +02:00
2026-07-15 15:53:15 +02:00
2026-07-12 19:14:12 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-13 22:54:33 +02:00
2026-04-22 18:14:01 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-13 22:54:33 +02:00
2026-07-13 22:54:33 +02:00
2026-07-12 19:14:12 +02:00
2026-05-28 15:43:48 +02:00
2026-07-15 15:53:15 +02:00