Subversion Repositories SmartDukaan

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37845 1 d 5 h amit /trunk/profitmandi-dao/src/ feat(warehouse): ACTIVE/SUSPENDED/INACTIVE status + label on sellerwarehouse replace WAREHOUSE_MAP - BillingWarehouseService (active for dashboards, active+suspended for warehouse screens, names in every state, 5 min cache); setup service: guarded status change (no suspend while franchise stores or brand mapping route there, no close while stock/unshipped orders), rename, all-warehouse overview with usage; partner store assignable only to an active warehouse; daily stock alert for suspended/inactive warehouses to logistics/accounts top 2 staffed levels + leadership; dashboard warehouse list = active (replaces r37834 stock-holding loop); migration sellerwarehouse_status_display_name_20261005.sql (applied on hadb1)  
37822 5 d 3 h amit /trunk/profitmandi-dao/src/ feat(warehouse): physical warehouse setup service, supplier mapping PO guard, address active flag

- WarehouseSetupService + WarehouseSetupValidator: create seller (state from GSTIN,
unique label/GSTIN), address master (city stored last, 6-digit pin, contact),
physical warehouse (OURS/BAD vendor 40 + Dummy/G + sellerwarehouse + mapping in
one transaction), activate/deactivate (sellerwarehouse.is_active), remap address
with internal store sync. Limits follow column sizes (sql_mode is empty).
- WarehouseAddressMaster.active: only active addresses are offered for assignment.
Migration sql/20261001_warehouseaddressmaster_active.sql (applied on hadb1).
- PO guard: createPurchaseOrder refuses a supplier with no OURS/GOOD vendor
warehouse at the destination (GRN could never receive it).
InventoryWarehouseRepository.hasGoodSupplierWarehouse / selectSupplierIdsWithGoodWarehouse
use existence checks; 67 pairs carry duplicate OURS/GOOD rows.
- SellerService.syncInternalStoreAddress(store); RetailerServiceImpl syncs an
INTERNAL store's address when it moves warehouse or becomes internal.
- Record of 2026-10-01 HR Gurugram setup SQL (seller 21, warehouses 13368/13370/13372).
- Tests: WarehouseSetupValidatorTest (10), WarehouseSetupServiceImplTest (7).
 
37669 20 d 4 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Reject an invalid or mismatched partner GSTIN before it is saved

The onboarding screen carries the GSTIN in two boxes both labelled GST NUMBER - the retailer
one (dtr.retailer.number) and the store one (fofo_store.gst_number, which billing reads).
Neither was validated, so DLSH1660 was saved with the LOI's pincode in the store box while the
retailer box held the real GSTIN, and its first invoice would have been refused by NIC.

validateGstNumbers runs before any write (covers the fofo portal, the V2 API and the partner
app, which all funnel through updateRetailerDetails): both values are normalised, both must be
valid GSTINs, and when both are present they must agree - across 1,800 partners on record they
already do, bar the one that caused this. Needs common r37668.
 
37648 20 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Retire user.counter / user.privatedealuser write path

Partner GST moved to fofo.fofo_store.gst_number in the Feb-2026 migration; counter.gstin
has had no reader since (Counter.getGstin() had no callers) and privatedealuser is only
read to decide its own insert-vs-update. Both were write-only bookkeeping.

- RetailerServiceImpl: drop createPrivateDealUser/createCounter and their two call sites
- MigrationUtil.migrateUserToRetailer: drop the same legacy block
- Delete Counter / PrivateDealUser / PrivateDealUserAddressMapping entities + repositories

No reader is affected: the 240 Reportico reports on static0 reference neither table
(the 'counter' hits are fofo_store.counter_size). Tables stay in place until this is
deployed, then get renamed out of the way.
 
37168 68 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Simplify onboarding GST guard: same-GST siblings allowed (parallel outlets are normal); block only when a non-internal sibling is in limbo (activation_type REVIVAL, or active=0 with closed=0); drop allowAdditionalOutlet override  
37156 69 d 8 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Partner identity integrity: fork guard + closed-store takeover in updateRetailerDetails (new code only after old store closed, reuse real email/login), idempotent user_accounts upsert replacing blind inserts, selectAllOpenByGstNumber lookup, @Transactional on updateRetailerDetails  
37151 71 d 7 h aman /trunk/ Fix 'Mobile already exist' on retailer save + store code not linking to onboarding panel. (1) RetailerServiceImpl: extract linkStoreCodeToOnboardingPanel and call it for EXISTING stores too, so re-saving Retailer Details heals a panel missing its code (never overwrites, requires verification YES, best-effort). (2) retailer-details form now identifies the partner by the server-rendered loadedUserEmail hidden field instead of the editable email input, so editing email/mobile updates the loaded account instead of tripping the duplicate-mobile check. Bump js version to 384. Case: onboarding 1929 / UKDH1623.  
37102 82 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Remove dead Counter/PrivateDealUser code: drop unused isFofo, bulkShipmentAmountLimit, verifiedOn, documentVerified fields and accessors; remove dead selectByIds repo methods; drop redundant Counter/PrivateDealUser repository injections in OrderServiceImpl and InvoiceService  
36439 158 d 12 h amit /trunk/profitmandi-dao/src/main/ Add outlet_name field to FofoStore entity, set from address.name on store creation

Adds outlet_name (VARCHAR 255) to FofoStore entity so the store's display
name is persisted directly on fofo_store instead of requiring a join through
retailer_registered_address -> address every time it is needed.

Sets fofoStore.setOutletName(retailerAddress.getName()) in both creation
paths: RetailerServiceImpl.createFofoStoreCodeByRetailerId (primary) and
RetailerController.createFofoStore (secondary).

Includes migration SQL script (migration_outlet_name_to_fofo_store.sql) to
ALTER TABLE and backfill existing rows from address.name. Must be run during
low-traffic window - fofo_store is heavily queried and ALTER takes a metadata
lock that blocks all concurrent SELECTs.
 
36064 195 d 4 h aman /trunk/ Fix:FULL_Stock flow , fin service mark unapplicable ,send invoice to whatsapp by default, update contact list ,Training mail issue  
35971 211 d 5 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35956 213 d 11 h amit /trunk/profitmandi-dao/src/main/ Mail outbox pattern: persist mail in transaction, send async after commit. Fixes lock contention between /cancelOrder and /om/addBillingDetailsForGrouppedOrders caused by SMTP calls inside transactions holding DB locks.  
35896 219 d 2 h amit /trunk/profitmandi-dao/src/main/ Simplify partner GST: read/write from fofo_store.gst_number instead of Counter chain

- Set fofo_store.gst_number when store code is created/updated in RetailerServiceImpl
- Replace PrivateDealUser->Counter->gstin reads with FofoStore.getGstNumber() in:
RetailerServiceImpl, OrderServiceImpl, InvoiceService
- Remove unnecessary PrivateDealUser/Counter batch fetches in getFofoRetailers/getFofoRetailerUserId
- Add migration script to backfill existing GST from counter to fofo_store
 
35440 291 d 5 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Optimize getCatalog() and getFofoRetailers() - fix N+1 queries with batch fetching

- getCatalog(): Batch fetch Items and TagListings instead of per-item queries
- getFofoRetailers(): Already optimized with batch fetching for FofoStores, PrivateDealUsers, Counters

🤖 Generated with Claude Code
 
35425 292 d 4 h aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix:Trial Mail For training and activation mail to user  
35418 292 d 12 h aman /trunk/ Fix:Trial Mail For training and activation mail to user  
35394 293 d 23 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Improved performance  
35372 300 d 4 h aman /trunk/ Fix:Store Code Creation for trial user  
35370 300 d 7 h aman /trunk/ DEBUG:add debugger for trialform  
35360 301 d 6 h aman /trunk/ Feat:Approval page for sales team  
35306 320 d 6 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed bug related to trial form  
35289 325 d 15 h amit /trunk/ Added trial franchisee feature  
35203 356 d 8 h amit /trunk/ Added Brands Logic  
34942 398 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Retailer Service  
34936 399 d 6 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Update  
34813 442 d 6 h aman /trunk/ Partner Dashboard Analysis  
34619 496 d 4 h ranu /trunk/ blocked loan settlement remove from scheduletask cron  
34149 623 d 7 h tejus.lohani /trunk/ New panel for partner Brand commitments , add commitment , update commitment and view partner commitments, Now in DMS code panel team only view commitment instead of update mean it read only  
33553 819 d 10 h ranu /trunk/ aria territory added in duedate cross and default partner  
33367 876 d 11 h ranu /trunk/ fix webOffer layout and fix online order change by pincode  
33247 899 d 10 h ranu /trunk/ warehouse billing phase one and added signature exception  
33140 929 d 6 h ranu /trunk/ fix fofo store duplicate mobile number errror  
33131 929 d 10 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ code updated area territory info  
33128 929 d 12 h amit.gupta /trunk/ Fixed AST Related changes  
33124 931 d 9 h ranu /trunk/ area territory for fofo store(phase one)  
33030 950 d 11 h amit.gupta /trunk/ Fixed offers  
33025 951 d 3 h amit.gupta /trunk/ Fixed notifications logic in case of state specific  
32968 965 d 6 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed changes  
32967 965 d 6 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed changes  
32966 965 d 6 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed changes