| 37822 |
5 d 5 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). |
|
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/warehouse/NewPhysicalWarehouseRequest.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/warehouse/NewSellerRequest.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/warehouse/NewWarehouseAddressRequest.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/warehouse/PhysicalWarehouseView.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/warehouse/WarehouseAddressView.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/WarehouseSetupService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/WarehouseSetupServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/WarehouseSetupValidator.java /trunk/profitmandi-dao/src/main/resources/sql/20261001_delete_hrgn1715_hr_uk_store.sql /trunk/profitmandi-dao/src/main/resources/sql/20261001_hr_gurugram_vendor_warehouses.sql /trunk/profitmandi-dao/src/main/resources/sql/20261001_hr_gurugram_virtual_warehouses.sql /trunk/profitmandi-dao/src/main/resources/sql/20261001_warehouseaddressmaster_active.sql /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/warehouse/WarehouseSetupServiceImplTest.java /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/warehouse/WarehouseSetupValidatorTest.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/WarehouseAddressMaster.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/inventory/InventoryWarehouseRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/inventory/InventoryWarehouseRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/WarehouseAddressMappingRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/WarehouseAddressMappingRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/RetailerServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PurchaseOrderService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PurchaseOrderServiceImpl.java
|
| 37652 |
20 d 10 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. |
|
/trunk/profitmandi-dao/src/main/resources/sql/20260916_sync_internal_store_addresses.sql
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/TransactionServiceImpl.java
|
| 31007 |
1461 d 5 h |
amit.gupta |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Fixed commit |
|
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteLineRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteLineRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/SellerServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/CreditNoteService.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/InventoryMarginModel.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/GenericRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/PriceDropIMEIRepository.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/PriceDropIMEIRepositoryImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceDropServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/CreditNoteServiceImpl.java
|