The contract lookup is keyed on the estimate link id — the bond between the job and its paperwork. When that id is missing the lookup is abandoned and the estimate snapshot stands, instead of falling back to 'the newest contract in the business'.
Also called: wrong contract price on invoice · someone else's total showed up · cross-project billing error
- 1The estimate link's id is selected explicitly even though nothing renders it, because the contract query filters on it.
- 2If the id is absent the code throws before querying, and the estimate snapshot is used.
- 3The contract query filters on estimate_link_id plus status fully_executed, newest counter-signed first.
A missing identifier vanished out of the request instead of failing, so the contract lookup quietly widened to the newest signed contract anywhere in the business. That put one customer's $180,944.01 onto a different customer's invoice, and would have put the same figure on every other job's invoice too. The lookup now refuses to run without an identifier: a search that cannot be narrowed returns nothing rather than returning somebody else's contract price.
- A dropped query filter silently widening a lookup to every record in the business.
- One customer's contract value appearing on another's invoice.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →