use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class PenaltyTest method verifyRepaymentSchelude.
private void verifyRepaymentSchelude(LoanAccountPage loanAccountPage, String penalty, String payment, String diff) {
DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
disburseLoanParameters.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
ViewRepaymentSchedulePage repaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
ApplyPaymentPage paymentPage = repaymentSchedulePage.navigateToApplyPaymentPage();
PaymentParameters paymentParameters = new PaymentParameters();
paymentParameters.setTransactionDateDD("28");
paymentParameters.setTransactionDateMM("02");
paymentParameters.setTransactionDateYYYY("2011");
paymentParameters.setAmount(payment);
paymentParameters.setPaymentType(PaymentParameters.CASH);
paymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParameters).submitAndNavigateToLoanAccountDetailsPage().navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 6, payment);
repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 8, payment);
repaymentSchedulePage.verifyRepaymentScheduleTableRow(5, 6, diff);
repaymentSchedulePage.verifyRunningBalanceTableRow(3, 3, diff);
ApplyAdjustmentPage adjustmentPage = repaymentSchedulePage.navigateToApplyAdjustment();
adjustmentPage.fillAdjustmentFieldsAndSubmit(payment).navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class LoanTestHelper method setPaymentParams.
public PaymentParameters setPaymentParams(String amount, ReadableInstant paymentDate) {
String dd = DateTimeFormat.forPattern("dd").print(paymentDate);
String mm = DateTimeFormat.forPattern("MM").print(paymentDate);
String yyyy = DateTimeFormat.forPattern("yyyy").print(paymentDate);
PaymentParameters paymentParameters = new PaymentParameters();
paymentParameters.setAmount(amount);
paymentParameters.setTransactionDateDD(dd);
paymentParameters.setTransactionDateMM(mm);
paymentParameters.setTransactionDateYYYY(yyyy);
paymentParameters.setPaymentType(PaymentParameters.CASH);
return paymentParameters;
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class LoanTestHelper method createActivateDisburstAndApplyPaymentForDefaultLoanAccount.
public LoanAccountPage createActivateDisburstAndApplyPaymentForDefaultLoanAccount(String clientName, String dd, String mm, String yy) {
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString(clientName);
searchParams.setLoanProduct("WeeklyClientFlatLoanWithNoFee");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD(dd);
disburseParams.setDisbursalDateMM(mm);
disburseParams.setDisbursalDateYYYY(yy);
disburseParams.setPaymentType(PaymentParameters.CASH);
disburseParams.setAmount("10,000");
LoanAccountPage loanAccountPage = createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
String accountID = loanAccountPage.getAccountId();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setTransactionDateDD(dd);
paymentParams.setTransactionDateMM(mm);
paymentParams.setTransactionDateYYYY(yy);
paymentParams.setPaymentType(PaymentParameters.CASH);
paymentParams.setAmount("1");
paymentParams.setReceiptId("");
paymentParams.setReceiptDateDD("");
paymentParams.setReceiptDateMM("");
paymentParams.setReceiptDateYYYY("");
return applyPayment(accountID, paymentParams);
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class CreateGLIMLoanAccountWithOneTimeFeeTest method clientRepayLoan.
private LoanAccountPage clientRepayLoan(LoanAccountPage loanAccountPage, int clientIndex) {
LoanAccountPage individualLoanAccountPage = loanAccountPage.navigateToIndividualLoanAccountPage(clientIndex);
String loanId = individualLoanAccountPage.getAccountId();
String totalBalance = individualLoanAccountPage.getTotalBalance();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setPaymentType(PaymentParameters.CASH);
paymentParams.setTransactionDateDD("04");
paymentParams.setTransactionDateMM("03");
paymentParams.setTransactionDateYYYY("2011");
paymentParams.setAmount(totalBalance);
loanAccountPage = loanTestHelper.applyGroupIndividualClientPayment(loanId, paymentParams);
loanAccountPage.verifyLoanStatus(LoanAccountPage.CLOSED);
return loanAccountPage.navigateToGroupLoanPageFromIndividualLoanPage();
}
use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.
the class BatchJobPenaltyTest method createWeeklyLoanAccountWithPenalty.
private String createWeeklyLoanAccountWithPenalty(final String penaltyName) throws Exception {
final SubmitFormParameters formParameters = FormParametersHelper.getWeeklyLoanProductParameters();
formParameters.addPenalty(penaltyName);
formParameters.setDefaultLoanAmount("4500");
formParameters.setInterestTypes(SubmitFormParameters.FLAT);
formParameters.setMinInterestRate("0");
formParameters.setMaxInterestRate("0");
formParameters.setDefaultInterestRate("0");
formParameters.setMaxInstallments("10");
formParameters.setDefInstallments("10");
LoanAccountPage loanAccountPage = penaltyHelper.createWeeklyLoanAccountWithPenalty(formParameters, "Client - Veronica Abisya", true);
PaymentParameters formPayment = new PaymentParameters();
formPayment.setTransactionDateDD("15");
formPayment.setTransactionDateMM("2");
formPayment.setTransactionDateYYYY("2012");
formPayment.setAmount("450");
formPayment.setPaymentType(PaymentParameters.CASH);
loanAccountPage.navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(formPayment).submitAndNavigateToLoanAccountDetailsPage();
penaltyHelper.verifyCalculatePenaltyWithPayment(loanAccountPage.getAccountId(), new String[] { "0", "0", "0" }, new String[][] { { "0", "450" }, null, /* Future Installments */
{ "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" }, { "0", "450" } }, new String[] { "0", "16/02/2012", "0" });
return loanAccountPage.getAccountId();
}
Aggregations