Subversion Repositories SmartDukaan

Rev

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

Rev 30747 Rev 30748
Line 72... Line 72...
72
	@Override
72
	@Override
73
	public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
73
	public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
74
										String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException {
74
										String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException {
75
		if (underMaintainance) {
75
		if (underMaintainance) {
76
			throw pbse;
76
			throw pbse;
77
		} else if (!isActive(retailerId) || WalletReferenceType.RECHARGE.equals(referenceType)) {
77
		} else if (WalletReferenceType.RECHARGE.equals(referenceType) && !isActive(retailerId)) {
78
			throw inactivepbse;
78
			throw inactivepbse;
79
		}
79
		}
80
		if (amount == 0)
80
		if (amount == 0)
81
			return;
81
			return;
82
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
82
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);