Two defaults both moved price when nobody asked: A qty edit held the dollars, so price absorbed the whole difference -- 10% more cases at the same revenue is a 9% price cut, and nothing in the figure being edited shows it. Dollars now follow qty at the current price: `value = (curValue / curUnits) * unitsIncr`, on the server in resolveIncrs() and mirrored in the ledger's Result line. A slice with no units has no price to hold, so there the dollars stay put and the edit is a pure qty change. `plug` defaulted to 'price' -- volume holds, price moves -- because that is what the API did before the flag existed. It now defaults to 'volume'. The client's stored preference is keyed pf_scale_plug_v2, since a browser carrying the old 'price' choice would otherwise go on moving price silently. The deliberate routes are unchanged and both outrank the above: name the dollars and the qty together and price falls out of the two, or name a target_price, which is the Excel form's Edit Price mode. The ledger labels the column that cannot move `· holds`, which now includes price on a qty edit. One behaviour to know about: holding price is impossible on a slice whose value is zero, so a dollar edit there answers 400 with an explanation where before it quietly moved price. Fail-loud is the point. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| vendor | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.