Subversion Repositories SmartDukaan

Rev

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

Rev 30894 Rev 30895
Line 1834... Line 1834...
1834
		for (InsurancePolicy insurancePolicy : insurancePolicies) {
1834
		for (InsurancePolicy insurancePolicy : insurancePolicies) {
1835
			FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(insurancePolicy.getInvoiceNumber());
1835
			FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(insurancePolicy.getInvoiceNumber());
1836
			List<UserWalletHistory> userWalletHistories = userWalletHistoryRepository.selectAllByreferenceIdandreferenceType(insurancePolicy.getId(), WalletReferenceType.DAMAGE_PROTECTION);
1836
			List<UserWalletHistory> userWalletHistories = userWalletHistoryRepository.selectAllByreferenceIdandreferenceType(insurancePolicy.getId(), WalletReferenceType.DAMAGE_PROTECTION);
1837
			if (userWalletHistories.size() > 1) {
1837
			if (userWalletHistories.size() > 1) {
1838
				UserWalletHistory userWalletHistory = userWalletHistories.get(0);
1838
				UserWalletHistory userWalletHistory = userWalletHistories.get(0);
1839
				walletService.addAmountToWallet(insurancePolicy.getRetailerId(), userWalletHistory.getReference(), WalletReferenceType.DAMAGE_PROTECTION, "Excess deduction reversal", 198, LocalDateTime.now());
1839
				walletService.addAmountToWallet(insurancePolicy.getRetailerId(), userWalletHistory.getReference(), WalletReferenceType.DAMAGE_PROTECTION, "Excess deduction - settled", 198, LocalDateTime.now());
1840
			}
1840
			}
1841
		}
1841
		}
1842
	}
1842
	}
1843
 
1843
 
1844
 
1844