359508ea9f8a647a332368f250ea3f4d410d29ec
Prime cost is what a restaurant is actually run on: what it sold against what it paid people to sell it. Neither figure means much alone and the ratio only reads as a trend, so this shows eight weeks rather than one range — the same shape as the PCR Detail sheet of the Bi-Weekly workbook it replaces. The two halves come from deliberately different places. Payroll is read from the ledger, because that is where payroll lands once it has been coded to an account; taken from anywhere else it would not tie back to the P&L sitting beside it. Sales are read from the daily sales summaries, which are the reconciled books rather than the raw till feed. That split is why it lives with the ledger reports despite only half of it being ledger data. It has to agree with the P&L, so the payroll bands come from `auto-ap.ledger.reports/groupings` rather than a second list restated here — an earlier draft did restate them and silently dropped the 60000-60999 general payroll band on the floor. Details worth knowing: - Sales are net: credits add, debits subtract, so discounts and returns reduce sales without special casing. Only the 40000 revenue block counts, so tax and tip (liabilities held for someone else) and the tender lines (the money side of the same transaction) are excluded. - Payroll is debits less credits, so a correction posted as a credit reduces the week rather than counting as more labour. - Week windows tile with an exclusive end, so no day is counted twice at a boundary. - Sales categories are driven by what is in the data, so a restaurant that starts selling something new appears without editing this file. - A week with no sales yields no ratio rather than dividing by zero. Gated on the existing :profit-and-loss read permission, since it exposes the same figures. 7 tests, 27 assertions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
Languages
Clojure
91%
CSS
4.2%
Sass
2.3%
HTML
1.2%
HCL
0.4%
Other
0.7%