Search in sources :

Example 11 with PaymentParameters

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);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) ApplyAdjustmentPage(org.mifos.test.acceptance.framework.loan.ApplyAdjustmentPage) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 12 with PaymentParameters

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;
}
Also used : PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 13 with 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);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 14 with PaymentParameters

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();
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 15 with PaymentParameters

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();
}
Also used : SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Aggregations

PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)18 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)9 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)7 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)7 Test (org.testng.annotations.Test)6 DateTime (org.joda.time.DateTime)5 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)4 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)4 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)3 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)3 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)3 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)2 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)2 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)2 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)2 LocalDate (org.joda.time.LocalDate)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)1 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)1 ViewCenterChargesDetailPage (org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage)1