Mcp/entry bug (#580)

* feat: restore document version supersession on posted entries

* refactor: update VAT handling logic to remove dependency on seller registration status

* feat: update VAT handling to respect seller registration status across invoice processing

* feat: add no-op migration placeholder for document supersession
This commit is contained in:
Mattsson
2026-05-27 17:07:27 +02:00
committed by GitHub
parent 8979f6eda3
commit 627109b5bd
8 changed files with 146 additions and 33 deletions
+2 -2
View File
@@ -2198,7 +2198,7 @@ async function commitCorrectEntry(
// commit-time gate matches the staging-time signal.
const { data: original, error: origErr } = await supabase
.from('journal_entries')
.select('id, status, entry_date, fiscal_period_id, fiscal_periods!inner(is_closed, locked_at)')
.select('id, status, entry_date, fiscal_period_id, fiscal_periods!journal_entries_fiscal_period_id_fkey!inner(is_closed, locked_at)')
.eq('id', entryId)
.eq('company_id', companyId)
.maybeSingle()
@@ -2281,7 +2281,7 @@ async function commitReverseEntry(
// via resolvePeriodStatusForDate, matching the staging-time signal.
const { data: original, error: origErr } = await supabase
.from('journal_entries')
.select('id, status, entry_date, fiscal_period_id, fiscal_periods!inner(is_closed, locked_at)')
.select('id, status, entry_date, fiscal_period_id, fiscal_periods!journal_entries_fiscal_period_id_fkey!inner(is_closed, locked_at)')
.eq('id', entryId)
.eq('company_id', companyId)
.maybeSingle()