Skip to content

dbo.primeWorkOrders ​

Info Generated by scripts/Generate-DataDictionary.ps1 - do not edit by hand. Edit descriptions in schemas/tables/dbo.primeWorkOrders.json and regenerate.

Columns ​

#ColumnTypeNullableFlagsDescription
1iduniqueidentifiernoPrimary key / unique identifier for this record
2jobiduniqueidentifiernoForeign key to primeJobs
3allocationiduniqueidentifieryesForeign key to primeAllocations
4attachmentiduniqueidentifieryesForeign key to primeAttachment
5labelnvarchar(255)yesDisplay label
6descriptionnvarchar(MAX)yesFree-text description
7work_order_statusnvarchar(50)yesStatus of the work order
8work_order_typenvarchar(100)yesType/category of work order
9assignediduniqueidentifieryesForeign key to primeUsers - the user this record is assigned to
10startdatetimeyesStart timestamp
11enddatetimeyesEnd timestamp
12start_timetime(7)yesStart time of the appointment/slot
13end_timetime(7)yesEnd time of the appointment/slot
14retentionintyesRetention amount/percentage withheld from payment
15retention_percentagedecimal(10,6)yesPercentage of the amount withheld as retention
16retention_datedateyesDate retention is due to be released
17includes_taxbityesFlag indicating whether the amount includes tax
18taxdecimal(5,2)yesTax amount
19sell_tax_totaldecimal(10,2)yesTotal tax amount on the sell (billed) price
20cost_tax_totaldecimal(10,2)yesTotal tax amount on the cost
21remaining_valuedecimal(10,2)yesRemaining value after deductions
22material_cost_totaldecimal(10,2)yesTotal cost of materials
23labour_cost_totaldecimal(10,2)yesTotal cost of labour
24material_sell_totaldecimal(10,2)yesTotal sell (billed) price for materials
25labour_sell_totaldecimal(10,2)yesTotal sell (billed) price for labour
26sell_totaldecimal(10,2)yesTotal sell (billed) amount
27cost_totaldecimal(10,2)yesTotal cost amount
28created_atdatetimeyesTimestamp the record was created
29created_bynvarchar(100)yesUser/system that created the record
30updated_atdatetimeyesTimestamp the record was last updated
31updated_bynvarchar(100)yesUser/system that last updated the record
32versionbigintyesOptimistic-concurrency row version number
33filterTagsnvarchar(MAX)yesComma-separated display list of filter tags applied to this record
34filterTagIdsnvarchar(MAX)yesComma-separated list of primeFilterTags identifiers applied to this record

Indexes ​

NameTypeUniquePKKey columnsIncludedFilter
PK_primeWorkOrdersCLUSTEREDyesyesid
IX_primeWorkOrders_JobIdNONCLUSTEREDjobid
IX_primeWorkOrders_JobId_Label_IdentifiersNONCLUSTEREDjobid, label, allocationid, attachmentid, assignedid

Relationships (inferred) ​

FromToConfidence
dbo.optimoRouteOrder.primeJobIDdbo.primeWorkOrders.jobidmedium
dbo.optimoRouteOrder.primeWorkOrderIDdbo.primeWorkOrders.idhigh
dbo.optimoRouteOrder.Versiondbo.primeWorkOrders.versionmedium
dbo.PrimeAccountsPayableInvoices.WorkOrderIddbo.primeWorkOrders.idhigh
dbo.primeScheduleItem.ObjectIddbo.primeWorkOrders.idhigh
dbo.primeWorkOrderItems.workorderiddbo.primeWorkOrders.idmedium
dbo.primeWorkOrders.assignediddbo.primeContacts.idhigh
dbo.primeWorkOrders.created_bydbo.primeUsers.fullNamehigh
dbo.primeWorkOrders.jobiddbo.primeJobs.Idhigh

Referenced by ​

Procedures: dbo.spEthGetQueuedIDs, dbo.spEthQueueMissingJobs, dbo.spEthQueueMissingKpis, dbo.spEthSyncQueueMissingObjects, dbo.spOptimoRouteGetNotScheduledOrders, dbo.spOptimoRouteGetNotScheduledOrdersEmailQueue, dbo.spOptimoRouteGetWorkOrderQueue, dbo.spPrimeGetWIPUpdatesWorksCompleted, dbo.spPrimeGetWIPUpdatesWorksInProgress, dbo.spPrimeGetWIPUpdatesWorksUpcoming, dbo.spPrimeUpsertWorkOrder