Skip to content
Permalink
Browse files
Merge pull request #28 from markusgeiss/develop
set last transaction date for deposit transactions
  • Loading branch information
markusgeiss committed Oct 22, 2017
2 parents ed25433 + d84f153 commit b67978315835b8c90c8e6dafaea6580d808a1734
Showing 3 changed files with 13 additions and 1 deletion.
@@ -23,6 +23,7 @@
import io.mifos.teller.service.internal.repository.TellerRepository;
import io.mifos.teller.service.internal.service.helper.AccountingService;
import io.mifos.teller.service.internal.service.helper.ChequeService;
import io.mifos.teller.service.internal.service.helper.DepositAccountManagementService;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
@@ -37,16 +38,19 @@ public class ChequeTransactionHandler {
private final ChequeService chequeService;
private final TellerRepository tellerRepository;
private final AccountingService accountingService;
private final DepositAccountManagementService depositAccountManagementService;

@Autowired
public ChequeTransactionHandler(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
final ChequeService chequeService,
final TellerRepository tellerRepository,
final AccountingService accountingService) {
final AccountingService accountingService,
final DepositAccountManagementService depositAccountManagementService) {
super();
this.logger = logger;this.chequeService = chequeService;
this.tellerRepository = tellerRepository;
this.accountingService = accountingService;
this.depositAccountManagementService = depositAccountManagementService;
}

public void processCheque(final String tellerCode, final TellerTransaction tellerTransaction) {
@@ -60,5 +64,6 @@ public void processCheque(final String tellerCode, final TellerTransaction telle
chequeTransaction.setCheque(ChequeMapper.map(tellerTransaction.getCheque()));

this.chequeService.process(chequeTransaction);
this.depositAccountManagementService.transactedProductInstance(tellerTransaction.getCustomerAccountIdentifier());
}
}
@@ -119,6 +119,7 @@ public void processTransfer(final String tellerCode, final TellerTransaction tel
creditors.addAll(this.createChargeCreditors(tellerTransactionCosts));

this.accountingService.postJournalEntry(journalEntry);
this.depositAccountManagementService.transactedProductInstance(resolvedCustomerAccount);
}

public void processCashDeposit(final String tellerCode, final TellerTransaction tellerTransaction,
@@ -159,6 +160,7 @@ public void processCashDeposit(final String tellerCode, final TellerTransaction
creditors.addAll(this.createChargeCreditors(tellerTransactionCosts));

this.accountingService.postJournalEntry(journalEntry);
this.depositAccountManagementService.transactedProductInstance(resolvedCustomerAccount);
}

public void processCashWithdrawal(final String tellerCode, final TellerTransaction tellerTransaction,
@@ -203,6 +205,7 @@ public void processCashWithdrawal(final String tellerCode, final TellerTransacti
creditors.addAll(this.createChargeCreditors(tellerTransactionCosts));

this.accountingService.postJournalEntry(journalEntry);
this.depositAccountManagementService.transactedProductInstance(resolvedCustomerAccount);
}

public void processDepositAccountClosing(final String tellerCode, final TellerTransaction tellerTransaction,
@@ -102,6 +102,10 @@ public void closeProductInstance(final String customerAccountIdentifier) {
this.depositAccountManager.postProductInstanceCommand(customerAccountIdentifier, EventConstants.CLOSE_PRODUCT_INSTANCE_COMMAND);
}

public void transactedProductInstance(final String customerAccountIdentifier) {
this.depositAccountManager.postProductInstanceCommand(customerAccountIdentifier, EventConstants.PRODUCT_INSTANCE_TRANSACTION);
}

public ProductDefinition findProductDefinition(final String productIdentifier) {
return this.depositAccountManager.findProductDefinition(productIdentifier);
}

0 comments on commit b679783

Please sign in to comment.