Repository navigation
Enforce authoritative prices and tax across order entry - #1064
Merged
Merged
Conversation
sridharkalaibala
marked this pull request as ready for review
October 1, 2026 16:30
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An item added to an existing Captain order could submit its tax-inclusive display price as the base, and POS would apply exclusive tax again. For example, a Rs45 paratha arrived as Rs47.25 before a second tax calculation.
Introduce a shared server-owned pricing authority for catalogue menu quotes, new online orders, order amendments, desktop checkout and kiosk admission. Fixed prices must match the scoped catalogue or configured outlet/customer/venue rules. Unconfigured differences and submitted tax changes fail before persistence. Variable and quick items retain their explicit pricing behavior; accepted lines carry a server-created snapshot so catalogue changes do not silently reprice existing orders.
The change also classifies billing outlets, customer price lists and modifier definitions for desktop synchronization and records deletion tombstones.
docs/AUTHORITATIVE_ORDER_PRICING.mddefines the contract, legacy behavior and rollout sequence.Validation: 11 relevant API suites passed (701 tests); after final review, the five affected suites passed again (195 tests, including three new checkout rejection cases). Additional tax, pricing-rule, settings, modifier, idempotency and sync-classification suites passed. ESLint has zero errors; existing warnings remain. Attribution and diff checks passed.
Ready for development verification; production rollout still requires a packaged desktop/Captain/printed receipt smoke test. No production deployment or historical bill changes are included. Updating only the cloud API leaves an old desktop API unprotected. Offline devices can validate against their synced configuration but cannot know edits made while disconnected.
Companion changes: Captain Posnic/captain#183 and Gateway https://github.com/Posnic/Gateway/pull/33.
Merge preparation: corrected retained transfer-allocation handling, hardened deletion IDs and refreshed the server message inventory. Full local API run passed: 466 suites, 12,254 tests (13 skipped). Translation tests: 51 passed. Local lint: zero errors. Development companion fixes are merged through Captain #184 and Gateway #34; packaged device/receipt verification remains for the development environment.