Subversion Repositories SmartDukaan

Rev

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

Rev 31321 Rev 31521
Line 348... Line 348...
348
			boolean isOk = false;
348
			boolean isOk = false;
349
			if (fofoStore.getGraceDate() != null && fofoStore.getGraceDate().isAfter(LocalDate.now())) {
349
			if (fofoStore.getGraceDate() != null && fofoStore.getGraceDate().isAfter(LocalDate.now())) {
350
				isOk = true;
350
				isOk = true;
351
			} else {
351
			} else {
352
				try {
352
				try {
353
					isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), 10,
353
					isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
354
							ProfitMandiConstants.CUTOFF_INVESTMENT);
354
							ProfitMandiConstants.CUTOFF_INVESTMENT);
355
					if (fofoStore.getGraceCount() > 0) {
355
					if (fofoStore.getGraceCount() > 0) {
356
						fofoStore.setGraceDate(null);
356
						fofoStore.setGraceDate(null);
357
						fofoStore.setGraceCount(0);
357
						fofoStore.setGraceCount(0);
358
						fofoStoreRepository.persist(fofoStore);
358
						fofoStoreRepository.persist(fofoStore);
Line 383... Line 383...
383
			boolean isOk = false;
383
			boolean isOk = false;
384
			if (fofoStore.getGraceDate() != null && fofoStore.getGraceDate().isAfter(LocalDate.now())) {
384
			if (fofoStore.getGraceDate() != null && fofoStore.getGraceDate().isAfter(LocalDate.now())) {
385
				isOk = true;
385
				isOk = true;
386
			} else {
386
			} else {
387
				try {
387
				try {
388
					isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), 10,
388
					isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
389
							ProfitMandiConstants.CUTOFF_INVESTMENT);
389
							ProfitMandiConstants.CUTOFF_INVESTMENT);
390
					if (fofoStore.getGraceCount() > 0) {
390
					if (fofoStore.getGraceCount() > 0) {
391
						fofoStore.setGraceDate(null);
391
						fofoStore.setGraceDate(null);
392
						fofoStore.setGraceCount(0);
392
						fofoStore.setGraceCount(0);
393
						fofoStoreRepository.persist(fofoStore);
393
						fofoStoreRepository.persist(fofoStore);