Subversion Repositories SmartDukaan

Rev

Rev 26151 | Rev 26264 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26151 Rev 26209
Line 735... Line 735...
735
		}
735
		}
736
 
736
 
737
		if (fofoStore != null) {
737
		if (fofoStore != null) {
738
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
738
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
739
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
739
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
-
 
740
			fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
740
			fofoStoreRepository.persist(fofoStore);
741
			fofoStoreRepository.persist(fofoStore);
741
 
742
 
742
		} else {
743
		} else {
743
			int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
744
			int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
744
			Address retailerAddress = addressRepository.selectById(retailerAddressId);
745
			Address retailerAddress = addressRepository.selectById(retailerAddressId);
Line 756... Line 757...
756
 
757
 
757
			fofoStore = new FofoStore();
758
			fofoStore = new FofoStore();
758
			fofoStore.setId(retailerId);
759
			fofoStore.setId(retailerId);
759
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
760
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
760
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
761
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
-
 
762
			fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
761
			String latestStoreCode = fofoStoreRepository.selectLatestStore().getCode();
763
			String latestStoreCode = fofoStoreRepository.selectLatestStore().getCode();
762
			int latestCodeCounter = Integer.parseInt(latestStoreCode.replaceAll("[A-Z]", ""));
764
			int latestCodeCounter = Integer.parseInt(latestStoreCode.replaceAll("[A-Z]", ""));
763
			String fofoStoreCode = StringUtils.generateFofoStoreSequence(
765
			String fofoStoreCode = StringUtils.generateFofoStoreSequence(
764
					districtMaster.getStateShortName() + districtMaster.getShortName(), latestCodeCounter + 1);
766
					districtMaster.getStateShortName() + districtMaster.getShortName(), latestCodeCounter + 1);
765
			fofoStore.setCode(fofoStoreCode);
767
			fofoStore.setCode(fofoStoreCode);