Skip to content

Source offers and accepted agreements

Commercial authority comes from an identified agreement and its retained evidence. For a quote-backed project, the accepted quote version authorizes the accepted billing basis. A source-offer link records where the project originated. A project, a sent offer or a published presentation can exist without customer acceptance.

Projects and work orders retain these separate relationships. Publication determines which content an admitted reader sees; it does not establish agreement to that content. Customer and contact roles identify the parties and default recipients without making every contact an approver.

Record or relationship What it establishes Limit
Source offer, projects.fk_source_quote Provenance from the originating offer, including an imported draft or sent version Does not establish acceptance or authorize invoice basis.
Quote thread and quote version One offer family and one concrete set of offered terms A newer working copy is not the customer’s acceptance of revised terms.
Sent version and approval round The offered version, recipients, approval rule and retained contract/terms snapshot A successful send or view is not an acceptance. Provider delivery and recorded publication are separate observations.
quote_acceptances Version-specific acceptance evidence, channel, time and immutable snapshot/digest A historical source acceptance has different identity evidence from native signing.
Accepted billing quote, projects.fk_quote Accepted source for the project’s quote-backed billing basis A foreign-key value or status label alone is insufficient; source guards check accepted evidence and scope.
contracts A separate company-owned customer contract, value, dates and lifecycle; optionally linked to a quote Creating or labelling a contract does not synthesize quote acceptance or accepted quote rows.
project_billing_basis_lines Accepted commercial rows and explicit remaining amounts/hours for invoicing Allocation to work instructions, a booking or a presentation does not consume this basis.
flowchart TD
S[External source offer] -->|provenance| P[Project]
T[Quote thread] --> V[Concrete quote version]
V -->|send and named approval context| O[Offered terms]
O -->|customer response or controlled evidence recording| A[Acceptance evidence]
A --> B[Accepted billing basis]
V -->|accepted billing quote| P
P --> W[Operational work orders]
B -->|explicit allocation| I[Invoice draft]
P --> R[Audience presentation]
Commercial provenance, acceptance and execution remain distinct. The arrows show relationships, not equivalent authority.

The invoice subject owns consumption, numbering, accounting handoff and settlement. Accepted scope is a prerequisite for quote-backed basis; it is not proof that work has been approved, an invoice has been sent or money has been received. The invoicing and settlement workflow follows the records and recovery boundaries between those outcomes.

The enquiry and quote acceptance workflow follows preparation, invitation, individual responses and project handoff, including what remains saved when a step fails.

A quote version has its own identity within a thread. First send promotes the current working copy to a labelled sent version. The current send path retains named approvers and a contract snapshot through an approval round. It validates the recipients against the customer relationship and rejects duplicate approver email addresses. Resending the same version is a delivery operation; it does not create another agreement.

Native responses use the public token flow. The API validates the requested operation and delegates acceptance to a database transaction. The transaction checks the quote, locks relevant state, validates selected optional rows and ROT/RUT inputs, calculates the accepted result and stores immutable evidence. Terms acknowledgement is linked to the acceptance. Named-approver responses retain each person’s decision; the configured approval rule determines when responses produce the quote’s final acceptance. One person’s response is not necessarily the final agreement.

Superseded versions can remain readable through their original URL while new acceptance is refused. Active-version triggers cover public acceptance, named approver responses and manual acceptance. Historical imports have an explicit compatibility path. Readability, current version, link validity and response eligibility are separate facts; see customer portal access for authenticated admission and the quote workflow for the procedural subject.

Idempotent acceptance retries return the recorded result for that request. They do not authorize a new set of selected rows or rewrite the earlier evidence. The native evidence preserves the offered version and accepted selections, recipient/party and deduction context, totals and digest under the owning transaction. Later profile corrections do not retrospectively change who received or accepted that version.

Staff-recorded acceptance is an explicit action on the customer’s behalf. Its API requires staff identity and the write/send capabilities, a represented customer contact, terms acknowledgement, version context and an idempotency key. The transaction retains the represented person, staff actor and proof references. The customer read model preserves staff_recorded as a distinct channel; it does not describe the staff actor as the customer signing in the public flow.

The Bygglet historical bridge records the concrete external version and original acceptance time in a historical snapshot. It explicitly records that signer identity is unverified. It does not invent a Toolora signature, verified signer or original Toolora delivery. The controlled import can suppress automatic project creation when binding existing history. Source metadata saying “accepted” is useful provenance; it is not by itself the native acceptance transaction or permission to attach an unaccepted quote as billing authority.

The project source-evidence service uses reconciliation labels such as accepted_native and accepted_source. Its accepted_native label currently follows accepted_at, including rows populated by the historical bridge. Do not interpret that label as proof of native signing. The acceptance snapshot/channel and import provenance establish which evidence actually exists.

fk_source_quote and fk_quote are intentionally different fields. A source link also requires source_quote_link_method; the current schema accepts the explicit bygglet_project_tender provenance method. A bare source ID without its method is rejected. This records an import relationship, not customer acceptance. The project reference and billing-basis guards check company, customer, accepted source state and snapshot consistency. The accepted-source basis keeps the quote line, accepted description, quantity, value and resolved revenue-account context. Unselected optional rows are not accepted work. Protected source snapshots cannot be edited into a different agreement after allocation.

The customer project’s agreement projection requires both accepted_at and an acceptance row for the same quote and company. A source-only draft/sent offer returns no agreement card. This corrects the older read path, which could show its price and scope under “Detta har vi kommit överens om”. A matching accepted source can still be displayed through the source relationship, but display does not create the project’s stronger billing-quote link or its invoice basis.

A contracts row remains a separate commercial object. Its signed/active status, approved value and approved change orders belong to that lifecycle. The quote-backed project handoff does not require a separate contract row for every accepted quote. This article does not certify a complete independent contract- backed change-order and invoicing workflow.

Sent commercial fields and accepted evidence have database protections. A revised price, scope, commercial party or selected commercial rows belongs to a new reviewed offer/version and the applicable acceptance path. Creating a new quote working copy does not transfer acceptance to it. Correcting a contact profile or resending a usable link does not amend accepted terms.

Operational instructions can add execution detail without rewriting the commercial source: room access, delivery sequence and a worker checklist belong to their owning work records. Additional chargeable work needs its own commercial basis. An internal manual order is not evidence that the customer bought extra work. Editorial wording and inspiration images belong to a presentation version. They cannot change canonical prices or accepted scope.

The work site is also a distinct job fact. First send captures the intended site; accepted project references and release rules preserve that context. A missing historical site can require explicit confirmation. Today’s customer postal address must not be substituted for a previously released historical location. The project concept owns those location rules.

Example Company imports project P with source offer S. S was sent for 12,000 SEK, but no version-level acceptance was imported. P can retain S as provenance and staff can reconcile its source. Its customer agreement card remains absent and S does not authorize accepted quote billing rows. An independently retained invoice or payment does not manufacture the missing acceptance.

For a native offer Q, the customer accepts version 2 with one optional row selected. The evidence identifies that version and selection. The accepted rows form the project’s basis. Staff later drafts version 3 and updates the execution checklist. Neither action changes version 2’s evidence or makes version 3 accepted. A separately published customer presentation can explain the work while prices and agreement remain owned by the commercial records.

The delivery PR records the candidate and executed synthetic, database and shared application checks. The agreement regression exercises the real customer route with substituted authentication/database/storage services: unaccepted offers, missing acceptance, another company’s or another quote’s evidence are excluded; matching customer and staff-recorded acceptances remain visible. Five negative cases failed against the previous implementation.

Source review also follows active acceptance, import, version and basis guards. A source review is not independent customer acceptance or a verification of every concurrent send, version-copy and provider-delivery failure. Preserve the existing access differences and financial-workflow boundaries when using this concept.