Quotes
Financial quotes for renovation work — unified lifecycle entity covering pre-win vendor cost quotes and post-win workflow -driven execution. Quotes track line items, funding allocations, and are synced bidirectionally with HubSpot Integration as deals.
Source Files
Layer Path Schema backend/src/db/schema.ts (line ~1678)Routes backend/src/routes/quotes.tsService backend/src/services/quote-service.ts, backend/src/services/quote-finance-service.tsPages frontend/src/pages/Quotes.tsxComponents frontend/src/components/quotes/ (9 files)Queries frontend/src/lib/queries/quoteQueries.ts
Database Tables
Table Purpose quotesMain entity — project, contact, amounts, status, HubSpot sync, workflow columns quote_line_itemsIndividual cost items with quantities, unit prices, component type quote_phasesExecution phases for post-win workflow management quote_phase_tasksTasks within each phase quote_skill_assignmentsSkill/trade assignments for quote execution quote_ab_snapshotsA/B comparison snapshots for quote versioning quote_line_item_funding_measuresLinks line items to Funding Applications measures quote_line_item_funding_loansLinks line items to funding loans component_quote_linksLinks Building Components to quotes funding_quote_allocationsDistributes funding across quotes
Key Fields
Field Type Notes projectIduuid FK Parent project (cascade delete) buildingIduuid FK Parent building contactIduuid FK Vendor/supplier contact statusenum draft, sent, accepted, awarded, in_progress, completed, superseded, etc.totalAmount / netAmount / taxAmountdecimal Financial totals (precision 12,2) taxRatedecimal Default 19% (German VAT) discountPercentage, skontoPercentagedecimal Discount and early-payment terms hubspotIdvarchar Bidirectional sync with HubSpot Integration templateIduuid FK Workflows template for post-win lifecyclereplacesQuoteIduuid FK Self-referential for quote versioning
Relationships
Quote *──1 Project
Quote *──1 Building
Quote *──1 Contact (vendor)
Quote 1──* Quote Line Items
Quote 1──* Quote Phases ──* Quote Phase Tasks
Quote 1──* Quote Skill Assignments
Quote 1──* Quote A/B Snapshots
Quote *──* Building Components (via component_quote_links)
Quote *──* Funding Applications (via funding_quote_allocations)
Quote 1──* Invoices (derived from quote)
Frontend Components
Component Purpose QuoteFormCreate/edit quote with financial details QuoteLineItemsTableManage individual line items QuotesListList view with filtering and sorting BuildingQuotesListQuotes scoped to a building InlineQuotesTable / InlineQuoteRowCompact inline display within other views LinkFundingApplicationsDialogLink quotes to Funding Applications CreateQuoteWithProjectDialogQuick-create quote with project selection
Features
Line items management with quantities, unit prices, and component type mapping
Funding allocation linking line items to Funding Applications measures and loans
Component linking connecting quotes to Building Components via junction table
A/B snapshots for comparing quote versions side-by-side
Skill assignments tracking which trades/skills are needed for execution
Workflow phases for post-award project management via Workflows
Skonto/discount terms with deadlines (German early-payment convention)
HubSpot sync as deals with pipeline/stage tracking
Related Pages
Projects | Buildings | Invoices | Funding Applications | Building Components | Products | Contacts | Workflows | Financial Calculations | HubSpot Integration | Database Architecture