Subversion Repositories SmartDukaan

Rev

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

Rev 30897 Rev 30927
Line 1053... Line 1053...
1053
				FofoOrder fofoOrder = fofoOrderRepository.selectByOrderId(orderId);
1053
				FofoOrder fofoOrder = fofoOrderRepository.selectByOrderId(orderId);
1054
				if (scheme.getType().equals(SchemeType.ACTIVATION)) {
1054
				if (scheme.getType().equals(SchemeType.ACTIVATION)) {
1055
					walletService.addAmountToWallet(fofoId, orderId, WalletReferenceType.ACTIVATION_SCHEME,
1055
					walletService.addAmountToWallet(fofoId, orderId, WalletReferenceType.ACTIVATION_SCHEME,
1056
							"Activation margin for " + ii.getItem().getItemDescriptionNoColor() + ", Imei - " + serialNumber, pendingPayout.getAmount(),
1056
							"Activation margin for " + ii.getItem().getItemDescriptionNoColor() + ", Imei - " + serialNumber, pendingPayout.getAmount(),
1057
							fofoOrder.getCreateTimestamp());
1057
							fofoOrder.getCreateTimestamp());
1058
					pendingPayout.setStatusDescription("Activation margin credited");
1058
					pendingPayout.setStatusDescription("Activation margin credited, activated on " + FormattingUtils.formatDate(activatedImei.getActivationTimestamp()));
1059
				} else {
1059
				} else {
1060
					walletService.addAmountToWallet(fofoId, orderId, WalletReferenceType.SPECIAL_SUPPORT,
1060
					walletService.addAmountToWallet(fofoId, orderId, WalletReferenceType.SPECIAL_SUPPORT,
1061
							"Special Support for " + ii.getItem().getItemDescriptionNoColor() + ", Imei - " + serialNumber, pendingPayout.getAmount(),
1061
							"Special Support for " + ii.getItem().getItemDescriptionNoColor() + ", Imei - " + serialNumber, pendingPayout.getAmount(),
1062
							fofoOrder.getCreateTimestamp());
1062
							fofoOrder.getCreateTimestamp());
1063
					pendingPayout.setStatusDescription("Special support credited");
1063
					pendingPayout.setStatusDescription("Special support credited, activated on " + FormattingUtils.formatDate(activatedImei.getActivationTimestamp()));
1064
				}
1064
				}
1065
				pendingPayout.setCreditTimestamp(LocalDateTime.now());
1065
				pendingPayout.setCreditTimestamp(LocalDateTime.now());
1066
				pendingPayout.setStatus(SchemePayoutStatus.CREDITED);
1066
				pendingPayout.setStatus(SchemePayoutStatus.CREDITED);
1067
			} else {
1067
			} else {
1068
				pendingPayout.setStatus(SchemePayoutStatus.REJECTED);
1068
				pendingPayout.setStatus(SchemePayoutStatus.REJECTED);