use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class LoanProcessWithDifferentCurrencyTest method applyPayment.
private void applyPayment(String loanAccountId) {
PaymentParameters paymentParameters = new PaymentParameters();
// interest + principal
paymentParameters.setAmount("1018");
paymentParameters.setTransactionDateDD("17");
paymentParameters.setTransactionDateMM("02");
paymentParameters.setTransactionDateYYYY("2011");
paymentParameters.setPaymentType(PaymentParameters.CASH);
loanTestHelper.applyPayment(loanAccountId, paymentParameters);
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class RemovePenaltiesTest method shouldWaivedPenaltyOverDueOnLoanAccountAfterPayment.
@Test(enabled = true)
public void shouldWaivedPenaltyOverDueOnLoanAccountAfterPayment() throws Exception {
final String accountId = setUpPenaltyAndLoanAccount(true, PenaltyFormParameters.FREQUENCY_WEEKLY);
PaymentParameters param = new PaymentParameters();
param.setAmount("285");
param.setPaymentType(PaymentParameters.CASH);
param.setTransactionDateDD("01");
param.setTransactionDateMM("04");
param.setTransactionDateYYYY("2012");
navigationHelper.navigateToLoanAccountPage(accountId).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(param).submitAndNavigateToLoanAccountDetailsPage();
navigationHelper.navigateToLoanAccountPage(accountId).navigateToViewInstallmentDetails().waiveOverdueInstallmentPenalty();
penaltyHelper.verifyCalculatePenaltyWithPayment(accountId, new String[] { "35", "35", "0" }, new String[][] { { "35", "285" }, null, /* Installments due */
{ "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, null, /* Future Installments */
{ "0", "250" }, { "0", "250" }, { "0", "250" } }, new String[] { "1,750", "05/04/2012", "1,500" });
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class RemovePenaltiesTest method shouldNotWaivedPenaltyOverDueOnLoanAccountAfterFullPayment.
@Test(enabled = true)
public void shouldNotWaivedPenaltyOverDueOnLoanAccountAfterFullPayment() throws Exception {
final String accountId = setUpPenaltyAndLoanAccount(true, PenaltyFormParameters.FREQUENCY_WEEKLY);
PaymentParameters param = new PaymentParameters();
param.setAmount("1,890");
param.setPaymentType(PaymentParameters.CASH);
param.setTransactionDateDD("01");
param.setTransactionDateMM("04");
param.setTransactionDateYYYY("2012");
navigationHelper.navigateToLoanAccountPage(accountId).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(param).submitAndNavigateToLoanAccountDetailsPage();
Assert.assertTrue(!navigationHelper.navigateToLoanAccountPage(accountId).navigateToViewInstallmentDetails().isWaiveOverdueInstallmentPenalty());
penaltyHelper.verifyCalculatePenaltyWithPayment(accountId, new String[] { "140", "140", "0" }, new String[][] { { "35", "285" }, { "30", "280" }, { "25", "275" }, { "20", "270" }, { "15", "265" }, { "10", "260" }, { "5", "255" }, null, /* Future Installments */
{ "0", "250" }, { "0", "250" }, { "0", "250" } }, new String[] { "250", "05/04/2012", "0" });
}
Aggregations