From a857eb6177a114db2e608b6ceda35d475e566614 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Thu, 23 Jul 2026 10:16:47 +0000 Subject: [PATCH] Add PY(TD) sub-label to % of Net Sales summary card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows prior year equivalent % (wages/net sales) as a sub-label under the current period value — labelled PY WTD/MTD for current partial periods, PY for complete past periods. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Monthly.tsx | 3 +++ frontend/src/pages/Weekly.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/frontend/src/pages/Monthly.tsx b/frontend/src/pages/Monthly.tsx index e6b7d64..7961458 100644 --- a/frontend/src/pages/Monthly.tsx +++ b/frontend/src/pages/Monthly.tsx @@ -226,6 +226,9 @@ export default function Monthly() {
% Net Sales
{pctSales != null ? `${pctSales.toFixed(1)}%` : '—'}
+ {pyWages != null && pySales > 0 && ( +
{isCurrentMonth ? 'PY MTD' : 'PY'} {((pyWages / pySales) * 100).toFixed(1)}%
+ )}
diff --git a/frontend/src/pages/Weekly.tsx b/frontend/src/pages/Weekly.tsx index 0ba1211..789867c 100644 --- a/frontend/src/pages/Weekly.tsx +++ b/frontend/src/pages/Weekly.tsx @@ -187,6 +187,9 @@ export default function Weekly() {
% of Net Sales
{pctSales != null ? `${pctSales.toFixed(1)}%` : '—'}
+ {pyWages != null && pySales > 0 && ( +
{isCurrentWeek ? 'PY WTD' : 'PY'} {((pyWages / pySales) * 100).toFixed(1)}%
+ )}