Package org.fenixedu.academic.domain.accounting.events.gratuity

Examples of org.fenixedu.academic.domain.accounting.events.gratuity.GratuityEventWithPaymentPlan


    @Override
    protected Set<AccountingTransaction> internalProcess(User user, Collection<EntryDTO> entryDTOs, Event event,
            Account fromAccount, Account toAccount, AccountingTransactionDetailDTO transactionDetail) {

        final GratuityEventWithPaymentPlan gratuityEventWithPaymentPlan = (GratuityEventWithPaymentPlan) event;

        if (entryDTOs.size() > 1) {
            final Set<AccountingTransaction> result = new HashSet<AccountingTransaction>();
            for (final EntryDTO each : entryDTOs) {
                if (!(each instanceof EntryWithInstallmentDTO)) {
View Full Code Here


        if (!getRegistration().hasToPayGratuityOrInsurance()) {
            return Money.ZERO;
        }

        GratuityEventWithPaymentPlan event =
                getStudentCurricularPlan().getGratuityEvent(getForExecutionYear(), GratuityEventWithPaymentPlan.class);

        if (event == null) {
            return Money.ZERO;
        }

        return event.getOriginalAmountToPay();
    }
View Full Code Here

    public LocalDate getFirstInstallmentPaymentLocalDate() {
        if (!getRegistration().hasToPayGratuityOrInsurance()) {
            return null;
        }

        GratuityEventWithPaymentPlan gratuityEventWithPaymentPlan =
                getStudentCurricularPlan().getGratuityEvent(getForExecutionYear(), GratuityEventWithPaymentPlan.class);

        Installment firstInstallment = gratuityEventWithPaymentPlan.getInstallments().iterator().next();

        /*
         * iterate the non adjusting accounting transactions until its paid
         */
        Money paidForFirstInstallment = Money.ZERO;
        for (AccountingTransaction accountingTransaction : gratuityEventWithPaymentPlan.getNonAdjustingTransactions()) {
            paidForFirstInstallment = paidForFirstInstallment.add(accountingTransaction.getAmountWithAdjustment());

            if (paidForFirstInstallment.greaterOrEqualThan(firstInstallment.getAmount())) {
                return accountingTransaction.getWhenRegistered().toLocalDate();
            }
View Full Code Here

public class ChangeGratuityEventPaymentPlanProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        final GratuityEventWithPaymentPlan event = (GratuityEventWithPaymentPlan) source;
        return new ArrayList<PaymentPlan>(event.getDegreeCurricularPlanServiceAgreement().getServiceAgreementTemplate()
                .getGratuityPaymentPlansFor(event.getExecutionYear()));
    }
View Full Code Here

                return result;

            }

            new GratuityEventWithPaymentPlan(getAdministrativeOffice(studentCurricularPlan), studentCurricularPlan.getPerson(),
                    studentCurricularPlan, executionYear);
        }

        return result;
    }
View Full Code Here

            return Money.ZERO;
        }

        StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();

        GratuityEventWithPaymentPlan event =
                lastStudentCurricularPlan.getGratuityEvent(readCurrentExecutionYear(), GratuityEventWithPaymentPlan.class);

        return event != null ? event.getOriginalAmountToPay() : Money.ZERO;
    }
View Full Code Here

    public List<InstallmentWrapper> getInstallments() {
        List<InstallmentWrapper> wrappers = new ArrayList<InstallmentWrapper>();

        if (this.event.isGratuityEventWithPaymentPlan()) {
            GratuityEventWithPaymentPlan gratuityEventWithPaymentPlan = (GratuityEventWithPaymentPlan) this.event;
            List<Installment> installments = gratuityEventWithPaymentPlan.getInstallments();

            for (Installment installment : installments) {
                wrappers.add(new GratuityEventInstallmentWrapper(gratuityEventWithPaymentPlan, installment));
            }
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.accounting.events.gratuity.GratuityEventWithPaymentPlan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.