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:
@@ -91,6 +91,10 @@ function applyDependencyRules(flags: FeatureFlags): FeatureFlags {
|
||||
out.galleries = true; // foundation — always on
|
||||
if (out.quotes === false) out.bills = false; // bills depend on quotes
|
||||
if (out.calendar === false) out.calendarBooking = false; // booking depends on calendar
|
||||
// Invoices (Bills) force-enable the Accounting master — invoice VAT config +
|
||||
// hourly rate live under Settings → Accounting. Before the accounting→children
|
||||
// rule so sub-features keep their own state.
|
||||
if (out.bills === true) out.accounting = true;
|
||||
// Accounting sub-features require the Accounting master. Tax export is
|
||||
// independent of Bills now — it relocated permanently into Accounting.
|
||||
if (out.accounting === false) {
|
||||
|
||||
Reference in New Issue
Block a user