feat(accounting): invoices force-enable the Accounting master
Invoice VAT config (codes + label) and the hourly rate now live under
Settings → Accounting, so an install with Invoices must have Accounting
available.
- applyDependencyRules (backend adminFeatureFlags.js + frontend
FeatureFlagsContext.tsx): bills on → accounting on, before the
accounting→children rule so the sub-features keep their own state.
- Migration 133 corrects existing installs: set the STORED accounting=true
where bills is on. requireFeatureFlag('accounting') reads the raw row, so
without this an upgraded install (invoices on, accounting off) would show
the tab but 403 its endpoints. Idempotent; only flips on; no down.
- Features tab: the Accounting card shows locked-on (disabled + hint) while
Invoices is enabled.
Also includes the i18n keys (en/de) for the VAT/financial settings move.
This commit is contained in:
@@ -127,6 +127,11 @@ function applyDependencyRules(flags) {
|
||||
// Sub-features can't outlive their parents.
|
||||
if (out.quotes === false) out.bills = false;
|
||||
if (out.calendar === false) out.calendarBooking = false;
|
||||
// Invoices (Bills) force-enable the Accounting master: invoice VAT config
|
||||
// (codes + label) and the hourly rate live under Settings → Accounting, so
|
||||
// an install with invoices must have Accounting available. Runs BEFORE the
|
||||
// accounting→children rule so the sub-features keep their own stored state.
|
||||
if (out.bills === true) out.accounting = true;
|
||||
// Accounting is a top-level MASTER; its sub-features can't outlive it.
|
||||
// Tax export is now independent of Bills — it relocated permanently
|
||||
// into the Accounting section (its own master gate).
|
||||
|
||||
Reference in New Issue
Block a user