Repository navigation
Correct GST state selection for walk-in and named customers - #1372
Merged
Merged
Conversation
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.
A walk-in sale with an empty customer state could be classified as interstate because the sale writer compared the empty string directly with the branch state. Equivalent state names and GST codes could also disagree across calculation and receipt paths.
Use the branch state for walk-ins, the configured default customer, and customers without a state. Named customers with a different state receive IGST; same-state customers receive CGST/SGST. Resolve equivalent GST codes and names consistently in the sale calculation and legacy receipt reconstruction. Persist the resolved customer state and calculated components with the sale; preserve existing recorded components on reprint.
Validation: 314 focused API tests passed across sale service, repository, GST state selection and receipt components. Includes blank states, the configured default customer with a stale different state, state names/codes, interstate and same-state totals. Local pre-push checks are also run before pushing.
Sync: customer_state, legacy GST fields and tax_components remain in the existing branch-scoped sales document, whose lane is configured in POS, Gateway and the realtime sync agent. No new fields, collections, print commands or migration are introduced. Each originating API computes and stores the breakdown; cloud and other tills consume those saved components. Live cross-device/reconnect verification has not been performed. Existing historical records are not rewritten.
Merge develop first, then include in the existing develop-to-main promotion. No public installer release.