Appearance
dbo.primeLockedEstimateCategoryItems
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeLockedEstimateCategoryItems.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | ItemID | uniqueidentifier | no | Foreign key to the related line item | |
| 2 | CategoryID | uniqueidentifier | no | Foreign key to the related estimate category | |
| 3 | authorised | bit | yes | Flag indicating whether this line item has been authorised (approved) | |
| 4 | trade | nvarchar(100) | yes | Trade/skill category (e.g. Plumbing, Electrical, Carpentry) | |
| 5 | description | nvarchar(MAX) | yes | Free-text description | |
| 6 | notes | nvarchar(MAX) | yes | Free-text internal notes | |
| 7 | materialUnit | nvarchar(50) | yes | Unit of measure for material quantity | |
| 8 | materialQuantity | decimal(18,2) | yes | Quantity of materials | |
| 9 | materialCost | decimal(18,2) | yes | Cost of materials | |
| 10 | materialTotal | decimal(18,2) | yes | Total material amount | |
| 11 | materialMarkup | decimal(10,6) | yes | Markup percentage applied to material cost | |
| 12 | materialMarkupTotal | decimal(18,2) | yes | Total markup amount applied to materials | |
| 13 | labourUnit | nvarchar(50) | yes | Unit of measure for labour quantity | |
| 14 | labourQuantity | decimal(18,2) | yes | Quantity of labour (hours/units) | |
| 15 | labourCost | decimal(18,2) | yes | Cost of labour | |
| 16 | labourTotal | decimal(18,2) | yes | Total labour amount | |
| 17 | labourMarkup | decimal(10,6) | yes | Markup percentage applied to labour cost | |
| 18 | labourMarkupTotal | decimal(18,2) | yes | Total markup amount applied to labour | |
| 19 | tax | decimal(10,2) | yes | Tax amount | |
| 20 | materialMargin | decimal(10,6) | yes | Margin percentage applied to material cost | |
| 21 | labourMargin | decimal(10,6) | yes | Margin percentage applied to labour cost | |
| 22 | additionalMargin | decimal(18,2) | yes | Additional margin percentage applied on top of standard margin |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__primeLoc__727E83EBC35F7AE1 | CLUSTERED | yes | yes | ItemID | ||
| IX_primeLockedEstimateCategoryItems_CategoryID | NONCLUSTERED | CategoryID | ||||
| IX_primeLockedEstimateCategoryItems_CategoryID2 | NONCLUSTERED | CategoryID | description, labourCost, labourMargin, labourMarkupTotal, labourQuantity, materialCost, materialMargin, materialMarkupTotal, materialQuantity, trade |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeLockedEstimateCategories.CategoryID | dbo.primeLockedEstimateCategoryItems.CategoryID | high |
Referenced by
Procedures: dbo.spEndataEstimateUploads, dbo.spPrimeBuildLockedEstimatesThisYear, dbo.spPrimeUpsertLockedEstimate, dbo.spPrimeUpsertLockedEstimateCategoryItem

