Add Formula Library ratings, Job Profitability report, and Quote Revision History improvements

- Formula Library ratings: thumbs up/down per company per formula; toggle on/off; sorts by net score; own formulas not rateable; FormulaLibraryRating entity + migration AddFormulaLibraryRatings
- Job Profitability report: actual labor cost (logged hours x StandardLaborRate) vs powder cost vs billed price per job; gross margin % color-coded; time-tracked-only filter; totals footer
- Quote Revision History: track Total price changes on every save; log Sent/Resent events with recipient email; replace flat table with grouped timeline UI (icons per event type, total-change badge on header)
- Setup Wizard: cap CompletedCount at TotalSteps so old 10-step data no longer shows 10/5
- Formula Library card: fix badge overflow on long titles; add Rate: label to make voting buttons discoverable
- Help docs and AI knowledge base updated for all three features

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 09:02:07 -04:00
parent 81119035c7
commit ed35362c7a
24 changed files with 12273 additions and 75 deletions
@@ -168,6 +168,34 @@
stage may need more capacity.
</p>
<h3 class="h6 fw-semibold mt-3 mb-2">Job Profitability Report</h3>
<p>
Compares each job&rsquo;s billed price against its direct costs so you can see your gross margin per job.
Access it from <strong>Reports &rarr; Job Profitability</strong>.
</p>
<ul class="mb-3">
<li class="mb-1"><strong>Billed</strong> &mdash; the job&rsquo;s final price as quoted.</li>
<li class="mb-1"><strong>Collected</strong> &mdash; how much has actually been paid on the linked invoice.</li>
<li class="mb-1"><strong>Hours</strong> &mdash; actual hours logged via the job&rsquo;s Time Log entries.</li>
<li class="mb-1"><strong>Labor Cost</strong> &mdash; logged hours &times; your Standard Labor Rate (set in Company Settings).</li>
<li class="mb-1"><strong>Powder Cost</strong> &mdash; estimated from pounds-to-order &times; cost-per-lb on each coat. Uses <em>actual pounds used</em> when recorded.</li>
<li class="mb-1"><strong>Gross Margin</strong> &mdash; Billed minus estimated total cost. Color-coded: green &ge;40%, yellow &ge;20%, red below 20%.</li>
</ul>
<p>
Use the <strong>Time-tracked jobs only</strong> toggle to filter out jobs with no time entries &mdash; jobs
without time entries show $0 labor cost, which skews the average margin downward. Log time entries on any
job via <strong>Job Details &rarr; Time Log</strong>.
</p>
<div class="alert alert-permanent alert-info d-flex gap-2 mb-3" role="alert">
<i class="bi bi-info-circle flex-shrink-0 mt-1"></i>
<div>
This report covers <strong>direct costs only</strong> (labor + powder). Overhead, equipment time,
and prep costs are factored into your quoted price via operating cost rates but are not broken out
separately here. Use it as a relative indicator &mdash; which jobs are thin vs. comfortable &mdash;
rather than an absolute profitability figure.
</div>
</div>
<h3 class="h6 fw-semibold mt-3 mb-2">Powder Usage Report</h3>
<p>
Tracks powder consumption by inventory item and by job. Useful for verifying that actual