Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
37822 5 d 1 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).
 
37652 20 d 6 h amit /trunk/profitmandi-dao/src/main/ Internal store buyer address: always read user.address

An INTERNAL store is the buying identity of a warehouse, so order creation
resolved its address from transaction.warehouseaddressmaster while every
screen read transaction.addId -> user.address. The Delhi warehouses moved to
warehouseaddressmaster 26 in Sept 2024 and nothing carried that across, so
user.address still held the 2021 L-222 premises: same buyer, two addresses.

user.address for active internal stores is now aligned with the mapped
warehouse address (sql/20260916_sync_internal_store_addresses.sql), split
exactly as getCustomAddress() does so the next invoice is unchanged. With
that true, createTransactionForWarehouse no longer special-cases internal.

SellerService.syncInternalStoreAddresses carries a warehouse address remap
through to its internal stores - the mapping has no edit screen and is
repointed directly in the database, which is why nothing propagated before.
 
32383 1133 d 5 h amit.gupta /trunk/ Fixed front end related issues with add/remove row  
31007 1461 d 1 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fixed commit