Subversion Repositories SmartDukaan

Rev

Rev 37653 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37653 Rev 37654
Line 131... Line 131...
131
        warehouseAddressMapping.setUpdated(null);
131
        warehouseAddressMapping.setUpdated(null);
132
        warehouseAddressMapping.setWarehouseId(warehouse.getId());
132
        warehouseAddressMapping.setWarehouseId(warehouse.getId());
133
        warehouseAddressMapping.setAddressId(address);
133
        warehouseAddressMapping.setAddressId(address);
134
        warehouseAddressMappingRepository.persist(warehouseAddressMapping);
134
        warehouseAddressMappingRepository.persist(warehouseAddressMapping);
135
 
135
 
-
 
136
        // Setting the mapping is what gives a warehouse its address, so the internal stores that bill
-
 
137
        // from it are realigned in the same transaction. A brand new warehouse has none yet and this
-
 
138
        // is a no-op, but anchoring the rule at the write means no later path can set a mapping and
-
 
139
        // leave an internal store on the previous address - which is how the Delhi stores drifted.
-
 
140
        sellerService.syncInternalStoreAddresses(warehouse.getId());
136
 
141
 
137
        return "seller";
142
        return "seller";
138
 
143
 
139
    }
144
    }
140
 
145