Package org.fenixedu.academic.domain.accounting.paymentCodes

Examples of org.fenixedu.academic.domain.accounting.paymentCodes.MasterDegreeInsurancePaymentCode


    // Events and Posting Rules for payments
    public MasterDegreeInsurancePaymentCode calculateMasterDegreeInsurancePaymentCode(final ExecutionYear executionYear) {
        if (!hasMasterDegreeInsurancePaymentCodeFor(executionYear)) {
            return createMasterDegreeInsurancePaymentCode(executionYear);
        } else {
            final MasterDegreeInsurancePaymentCode masterDegreeInsurancePaymentCode =
                    getMasterDegreeInsurancePaymentCodeFor(executionYear);
            final Money insuranceAmount = new Money(executionYear.getInsuranceValue().getAnnualValueBigDecimal());
            masterDegreeInsurancePaymentCode.update(new YearMonthDay(),
                    calculateMasterDegreeInsurancePaymentCodeEndDate(executionYear), insuranceAmount, insuranceAmount);

            return masterDegreeInsurancePaymentCode;
        }
    }
View Full Code Here


    }

    private MasterDegreeInsurancePaymentCode getMasterDegreeInsurancePaymentCodeFor(final ExecutionYear executionYear) {
        for (final PaymentCode paymentCode : getPerson().getPaymentCodesSet()) {
            if (paymentCode instanceof MasterDegreeInsurancePaymentCode) {
                final MasterDegreeInsurancePaymentCode masterDegreeInsurancePaymentCode =
                        ((MasterDegreeInsurancePaymentCode) paymentCode);
                if (masterDegreeInsurancePaymentCode.getExecutionYear() == executionYear) {
                    return masterDegreeInsurancePaymentCode;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.accounting.paymentCodes.MasterDegreeInsurancePaymentCode

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.