Subversion Repositories SmartDukaan

Rev

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

Rev 32731 Rev 32736
Line 894... Line 894...
894
		RetailerBrandsLimit retailerBrands = retailerBrandsLimitRepository.selectLimitByBrandAndFofoId(fofoId, brand);
894
		RetailerBrandsLimit retailerBrands = retailerBrandsLimitRepository.selectLimitByBrandAndFofoId(fofoId, brand);
895
 
895
 
896
		if (retailerBrands == null) {
896
		if (retailerBrands == null) {
897
			retailerBrands = new RetailerBrandsLimit();
897
			retailerBrands = new RetailerBrandsLimit();
898
 
898
 
899
			if (minStockLimit != 0) {
899
//			if (minStockLimit != 0) {
900
 
900
//
901
				retailerBrands.setMinStockLimit(minStockLimit);
901
//				retailerBrands.setMinStockLimit(minStockLimit);
902
			} else {
902
//			} else {
903
				retailerBrands.setMinStockLimit(preStockLimit);
903
//				retailerBrands.setMinStockLimit(preStockLimit);
904
			}
904
//			}
905
			if (limit != 0) {
905
//			if (limit != 0) {
906
				retailerBrands.setBrandLimit(limit);
906
//				retailerBrands.setBrandLimit(limit);
907
			} else {
907
//			} else {
908
				retailerBrands.setBrandLimit(preLimit);
908
//				retailerBrands.setBrandLimit(preLimit);
909
			}
909
//			}
-
 
910
			retailerBrands.setMinStockLimit(minStockLimit);
-
 
911
			retailerBrands.setBrandLimit(limit);
910
 
912
 
911
			retailerBrands.setIsUpdate(1);
913
			retailerBrands.setIsUpdate(1);
912
			retailerBrands.setCreatedTimestamp(LocalDateTime.now());
914
			retailerBrands.setCreatedTimestamp(LocalDateTime.now());
913
			retailerBrands.setPartnerId(fofoId);
915
			retailerBrands.setPartnerId(fofoId);
914
			retailerBrands.setBrandName(brand);
916
			retailerBrands.setBrandName(brand);
915
			retailerBrands.setUpdatedTimestamp(LocalDateTime.now());
917
			retailerBrands.setUpdatedTimestamp(LocalDateTime.now());
916
			retailerBrandsLimitRepository.persist(retailerBrands);
918
			retailerBrandsLimitRepository.persist(retailerBrands);
917
		} else {
919
		} else {
918
			if (minStockLimit != 0) {
920
//			if (minStockLimit != 0) {
919
				retailerBrands.setMinStockLimit(minStockLimit);
921
//				retailerBrands.setMinStockLimit(minStockLimit);
920
			} else {
922
//			} else {
921
				retailerBrands.setMinStockLimit(preStockLimit);
923
//				retailerBrands.setMinStockLimit(preStockLimit);
922
			}
924
//			}
923
 
925
//
924
			if (limit != 0) {
926
//			if (limit != 0) {
925
				retailerBrands.setBrandLimit(limit);
927
//				retailerBrands.setBrandLimit(limit);
926
			} else {
928
//			} else {
927
				retailerBrands.setBrandLimit(preLimit);
929
//				retailerBrands.setBrandLimit(preLimit);
928
			}
930
//			}
-
 
931
			retailerBrands.setMinStockLimit(minStockLimit);
-
 
932
			retailerBrands.setBrandLimit(limit);
929
			retailerBrands.setIsUpdate(1);
933
			retailerBrands.setIsUpdate(1);
930
			retailerBrands.setUpdatedTimestamp(LocalDateTime.now());
934
			retailerBrands.setUpdatedTimestamp(LocalDateTime.now());
931
			retailerBrandsLimitRepository.persist(retailerBrands);
935
			retailerBrandsLimitRepository.persist(retailerBrands);
932
 
936
 
933
		}
937
		}