Skip to main content
Version: Latest

4. Defaults Catalog

4.1 SaaS-side source of truth

One entity, TenantOperationalDefaultItem (Saas schema, Shumoul.Framework.MultiTenancy.Api), seeded from one embedded JSON (TenantOperationalDefaults/TenantOperationalDefaultItems.json) via TenantOperationalDefaultItemSeeder (ICustomSeeder, Priority 40 — runs last, since entitlement checks happen live at apply time, not seed time, so there is no seed-order dependency). Gate-free: insert missing by Code, fill only currently-blank Name/FName/PrintedTitle/FPrintedTitle on an existing row, never touch Kind or any structural field on an already-existing row.

CodeKindName (Ar)FName (En)
DefaultWarehouseWarehouseالمستودع الرئيسيMain Warehouse
DefaultCashAccountCashAccountالصندوق النقدي الرئيسيMain Cash Box
DefaultBankAccountBankAccountالحساب البنكي الرئيسيMain Bank Account
DefaultSalesInvoiceTemplateSalesInvoiceTemplateقالب فاتورة المبيعات الافتراضيDefault Sales Invoice Template

4.2 Per-default detail

DefaultTenant tableRequired fieldsDependenciesEntitlement ruleIdempotency key
Warehousedbo.WarehousesName, FNameNoneFeatures.ProductsManagement OR Features.PointofSalesApp OR Features.InventoryManagementTenant has zero existing Warehouse rows
CashAccountdbo.CashAccountsName, FNameNone (no GL/currency link at creation — see Chapter 5)Features.PointofSalesApp OR Features.AccountManagementTenant has zero existing CashAccount rows
BankAccountdbo.BankAccountsName, FNameNoneFeatures.AccountManagement onlyTenant has zero existing BankAccount rows
SalesInvoiceTemplatedbo.SalesInvoiceTemplatesName, FName, PrintedTitle, FPrintedTitle (every other field uses the entity's own sensible C# defaults)NoneFeatures.PointofSalesApp OR Features.SalesManagementTenant has zero existing SalesInvoiceTemplate rows

The idempotency key is deliberately "does the tenant have any row of this kind at all," not a name/code match — matching the existing SeedWarehousesAsync/SeedDeviceAsync convention. This means an admin who already created their own custom warehouse (different name) is correctly left alone; the default is only ever created into a genuinely empty table.

4.3 What is deliberately never created

Per this phase's explicit scope boundary:

  • No stock quantities, opening balances, inventory transactions, or stock movement documents.
  • No accounting vouchers, journal entries, or GL account rows.
  • No CashAccountCurrency/BankAccountCurrency GL-currency links (see Chapter 5).
  • No supplier/customer balances, market prices, or real barcodes.
  • No IBAN/AccountCode on the created BankAccount — a bare named placeholder only, filled in later by an admin if/when real banking details are known.