At a Glance
Owner: Product Admin (or Sysadmin) · Table:tb_tax_profile· Used by: vendor, product, PR / PO / GRN / pricelist / credit note · Named rate (VAT 7%,Zero-rated) — line tax mode decides how it's applied.

A tax profile is a named definition pairing a label (e.g. VAT 7%, Zero-rated, Service Charge) with a decimal tax_rate. Tax profiles are referenced from vendors, product master data, and most priced document lines (PR, PO, GRN, pricelist, credit note). The decoupling matters: rates change over time and many properties operate under multiple regimes simultaneously.
Document-line tax computation reads three things: the chosen tax profile, the document's tax mode (none / included / add via enum_tax_type), and the line's base amount. The tax profile contributes the rate; the mode decides how it's applied. Maintained by Product Admin; read by every priced-document flow.
| Task | Where | Notes |
|---|---|---|
| Add a profile | Configuration → Master Data → Tax Profile → New | Required: name, tax_rate (decimal — 0.07 = 7%) |
| Deactivate | Toggle is_active |
Hidden from new-document pickers; historical lines unchanged |
| New regulator rate | Create a new profile | E.g. VAT 9% — do NOT edit the old profile's rate |
| Migrate vendors/products | Bulk update reference fields | After creating the new profile, migrate references forward |
| Check rate used on a line | Open the document line | Rate is snapshotted, not resolved from this table |
| Symptom / Message | Cause | Action |
|---|---|---|
| "Name already in use" | Duplicate name on a non-deleted row |
Pick a different name or reactivate the existing row |
| "Rate must be >= 0" | Negative tax_rate |
Enter zero or positive decimal |
| "Cannot delete — referenced by documents/vendors/products" | FK references exist | Inactivate instead |
| Line shows old rate after profile edit | Line snapshotted the original rate | Expected — snapshot is the contract |
tax_rate here does NOT retro-edit posted lines.VAT 9%) and migrate vendors/products forward — do not edit the old profile.0.07 represents 7%; UI must validate and convert.enum_tax_type lives on each document line, not on the profile — see schema note in References.Source: tenant schema.
tb_tax_profile| Field | Prisma Type | Nullable | Description |
|---|---|---|---|
id |
String @db.Uuid |
No | Primary key. |
name |
String @db.VarChar |
No | Display name (e.g. VAT 7%). |
tax_rate |
Decimal? @db.Decimal(15, 5) |
Yes | Rate as decimal (default 0). 0.07 for 7%. |
is_active |
Boolean? |
Yes | Active flag. |
description |
String? @db.VarChar |
Yes | Free text. |
note, info, dimension |
— | Yes | Standard metadata. |
| Audit columns | — | Yes | created_*, updated_*, deleted_*. |
Constraints: @@unique([name, deleted_at]) map taxprofile_name_deletedat_u. Index on name. Wide reverse relations into PR / PO / GRN / pricelist / vendor / product / credit-note / extra-cost-detail.
name unique among non-deleted rows (DB-enforced).tax_rate >= 0; storage is decimal form (0.07 = 7%).../carmen-turborepo-backend-v2/packages/prisma-shared-schema-tenant/prisma/schema.prisma — tb_tax_profile (lines ~1395-1429), enum_tax_type (lines ~96-100) — note that enum_tax_type lives on each document line, not on this entity.../carmen-turborepo-frontend/apps/web/app/(app)/configuration/tax-profile/.