abhishek cc08f2f6c5 Carry the branch on every offline-sales row instead of picking a store
The upload modal made the admin choose a branch, then generated and
validated the workbook against that choice. A merchant with several
outlets had to repeat the whole cycle per branch, and the picker
defaulted to the first outlet, so an admin who never opened it credited
the wrong store — the file and the selection agreed, so nothing flagged
it.

The sheet now carries tenantid, locationid and the store name as locked
columns on every row, and the row's own locationid routes its sale. One
file covers the whole business: fill in qtysold wherever something sold,
across as many branches as needed, and upload once. The picker is gone
from the admin surface entirely, and the store user's page keeps passing
its locationId, which pins the upload to that branch and rejects rows for
any other before they are even sent.

Bills are keyed on branch first and bill number second. Counter books at
different outlets restart numbering from 1, so a shared number is two
sales rather than a duplicate, and keying on the number alone would have
dropped the second one.

Because a single upload can now move stock at six outlets, one total is
no longer enough to check before committing: the preview gains a store
count, a per-store table of lines, units, amount and problems, and a
Store column on every row, and results name the branch on each bill.

Rows are ordered store then product with an Excel autofilter, so a
branch can isolate its own rows in a file spanning the business.

Verified end to end against a two-branch tenant sharing a product id
across both outlets: one upload deducted each branch independently, a
pinned upload refused the other branch's rows, and re-uploading deducted
nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 12:18:09 +05:30
2026-07-22 17:42:09 +05:30
2026-07-04 17:46:30 +05:30
2026-07-09 15:49:45 +05:30
2026-07-09 15:49:45 +05:30
2026-06-12 14:45:06 +05:30
2026-07-09 15:49:45 +05:30
2026-07-09 15:49:45 +05:30
2026-07-22 17:42:09 +05:30
2026-07-04 17:46:30 +05:30
2026-06-15 19:45:17 +05:30
2026-07-30 17:23:21 +05:30
2026-07-30 17:23:21 +05:30
2026-07-16 17:05:06 +05:30
2026-06-15 19:17:13 +05:30
2026-07-16 17:05:06 +05:30
2026-06-15 19:17:13 +05:30
2026-07-09 15:49:45 +05:30

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/0406e53f-aca4-4047-80a3-dbe279cebc0b

Run Locally

Prerequisites: Node.js

  1. Install dependencies: npm install
  2. Set the GEMINI_API_KEY in .env.local to your Gemini API key
  3. Run the app: npm run dev
Description
No description provided
Readme 4.4 MiB
Languages
TypeScript 79.9%
CSS 19.4%
JavaScript 0.6%