Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37822 5 d 8 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 8 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 19 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 16 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 12 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 11 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 13 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 16 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 8 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 9 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35956 213 d 16 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 6 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 9 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 9 h aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix:Trial Mail For training and activation mail to user  
35418 292 d 16 h aman /trunk/ Fix:Trial Mail For training and activation mail to user  
35394 294 d 3 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Improved performance  
35372 300 d 9 h aman /trunk/ Fix:Store Code Creation for trial user  
35370 300 d 12 h aman /trunk/ DEBUG:add debugger for trialform  
35360 301 d 10 h aman /trunk/ Feat:Approval page for sales team  
35306 320 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed bug related to trial form  

Show All