pf_app/ui/src
Paul Trowbridge 546af67639 Ask whether a dollar change is price or volume
A sales figure on its own does not say which of price or volume moved, and
scale was answering silently: it wrote the value increment and left units
alone, so volume stayed flat and price absorbed everything. That is one of
the three behaviours the Excel form offered, picked by default rather than
by the user.

/opt/forecast_api/VBA/fpvt.frm has the semantics. Edit Sales, then plug one
side:

    plug volume:  pchange = fVal/(pVal+bVal); fVol = (pVol+bVol)*pchange
    plug price:   fVol = pVol + bVol

So 'volume' moves units in the same proportion as the dollars, holding
price; 'price' leaves units alone, as now. Checked against those formulas:
+100 on 1000/500 gives units 500 -> 550 with price held at 2.0000, and
-400 on 2000/800 gives 800 -> 640 at 2.5000.

Price still defaults, so nothing changes for an existing caller that does
not send `plug`. The control only appears once the edit is dollars-only --
naming units or price has already settled the question. A price target now
also honours a units target alongside it, which is the form's Edit Price
mode where both are inputs and dollars fall out.

Holding price when the selection has no value is refused rather than
divided by zero, the same case the form guarded with "Zero times any number
is zero".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 23:11:05 -04:00
..
assets Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
components Ask whether a dollar change is price or volume 2026-09-16 23:11:05 -04:00
views Ask whether a dollar change is price or volume 2026-09-16 23:11:05 -04:00
App.css Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
App.jsx Stop loading the whole version twice on every page load 2026-09-16 22:42:38 -04:00
auth.jsx Put the app behind a login 2026-09-14 22:20:25 -04:00
index.css Fix period col dropdown dark mode: custom dropdown with theme-aware colors 2026-06-13 00:48:25 -04:00
main.jsx Re-apply row depth from the observer callback, not from window focus 2026-09-16 22:36:29 -04:00
observerShim.js Retry the depth re-apply, and let the shim see into the shadow root 2026-09-16 22:48:11 -04:00
theme.jsx Add light/dark mode with theme toggle 2026-04-25 23:29:25 -04:00