MIFOSX-1288,MIFOSX-1280,build#699 testcase fixes

This commit is contained in:
Madhukar
2014-06-05 15:10:02 +05:30
parent 7dcb9913a4
commit 43225c38f6
8 changed files with 45 additions and 38 deletions
@@ -231,7 +231,6 @@ public class DepositAccountAssembler {
minRequiredOpeningBalance = product.minRequiredOpeningBalance();
}
@SuppressWarnings("unused")
Integer lockinPeriodFrequency = null;
if (command.parameterExists(lockinPeriodFrequencyParamName)) {
lockinPeriodFrequency = command.integerValueOfParameterNamed(lockinPeriodFrequencyParamName);
@@ -280,7 +279,7 @@ public class DepositAccountAssembler {
FixedDepositAccount fdAccount = FixedDepositAccount.createNewApplicationForSubmittal(client, group, product, fieldOfficer,
accountNo, externalId, accountType, submittedOnDate, submittedBy, interestRate, interestCompoundingPeriodType,
interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance,
lockinPeriodFrequencyTypeValue, lockinPeriodFrequencyType, iswithdrawalFeeApplicableForTransfer, charges,
lockinPeriodFrequency, lockinPeriodFrequencyType, iswithdrawalFeeApplicableForTransfer, charges,
accountTermAndPreClosure, accountChart);
accountTermAndPreClosure.updateAccountReference(fdAccount);
fdAccount.validateDomainRules();
@@ -298,7 +297,7 @@ public class DepositAccountAssembler {
RecurringDepositAccount rdAccount = RecurringDepositAccount.createNewApplicationForSubmittal(client, group, product,
fieldOfficer, accountNo, externalId, accountType, submittedOnDate, submittedBy, interestRate,
interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType,
minRequiredOpeningBalance, lockinPeriodFrequencyTypeValue, lockinPeriodFrequencyType,
minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType,
iswithdrawalFeeApplicableForTransfer, charges, accountTermAndPreClosure, accountRecurringDetail, accountChart);
accountTermAndPreClosure.updateAccountReference(rdAccount);
@@ -33,7 +33,9 @@ import org.mifosplatform.portfolio.account.service.AccountTransfersWritePlatform
import org.mifosplatform.portfolio.client.domain.AccountNumberGenerator;
import org.mifosplatform.portfolio.client.domain.AccountNumberGeneratorFactory;
import org.mifosplatform.portfolio.paymentdetail.domain.PaymentDetail;
import org.mifosplatform.portfolio.savings.DepositAccountOnClosureType;
import org.mifosplatform.portfolio.savings.DepositAccountType;
import org.mifosplatform.portfolio.savings.DepositsApiConstants;
import org.mifosplatform.portfolio.savings.SavingsApiConstants;
import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionDTO;
import org.mifosplatform.useradministration.domain.AppUser;
@@ -272,7 +274,10 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
// post interest
account.postPreMaturityInterest(closedDate);
if (account.isTransferToSavingsOnClosure()) {
final Integer closureTypeValue = command.integerValueOfParameterNamed(DepositsApiConstants.onAccountClosureIdParamName);
DepositAccountOnClosureType closureType = DepositAccountOnClosureType.fromInt(closureTypeValue);
if (closureType.isTransferToSavings()) {
final Long toSavingsId = command.longValueOfParameterNamed(toSavingsAccountIdParamName);
final String transferDescription = command.stringValueOfParameterNamed(transferDescriptionParamName);
@@ -312,7 +317,10 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
// post interest
account.postPreMaturityInterest(closedDate);
if (account.isTransferToSavingsOnClosure()) {
final Integer closureTypeValue = command.integerValueOfParameterNamed(DepositsApiConstants.onAccountClosureIdParamName);
DepositAccountOnClosureType closureType = DepositAccountOnClosureType.fromInt(closureTypeValue);
if (closureType.isTransferToSavings()) {
final Long toSavingsId = command.longValueOfParameterNamed(toSavingsAccountIdParamName);
final String transferDescription = command.stringValueOfParameterNamed(transferDescriptionParamName);
final SavingsAccount toSavingsAccount = this.depositAccountAssembler.assembleFrom(toSavingsId,