Package org.fenixedu.academic.util

Examples of org.fenixedu.academic.util.Money


    @Override
    protected void addPriceFields() {
        final CertificateRequest certificateRequest = getDocumentRequest();
        final CertificateRequestPR certificateRequestPR = (CertificateRequestPR) getPostingRule();

        final Money amountPerPage = certificateRequestPR.getAmountPerPage();
        final Money baseAmountPlusAmountForUnits =
                certificateRequestPR.getBaseAmount().add(
                        certificateRequestPR.getAmountForUnits(certificateRequest.getNumberOfUnits()));
        final Money urgencyAmount = certificateRequest.getUrgentRequest() ? certificateRequestPR.getBaseAmount() : Money.ZERO;

        addParameter("amountPerPage", amountPerPage);
        addParameter("baseAmountPlusAmountForUnits", baseAmountPlusAmountForUnits);
        addParameter("urgencyAmount", urgencyAmount);
        addParameter("printPriceFields", printPriceParameters(certificateRequest));
View Full Code Here


    @Override
    protected void addPriceFields() {
        final CertificateRequest certificateRequest = getDocumentRequest();
        final CertificateRequestPR certificateRequestPR = (CertificateRequestPR) getPostingRule();

        final Money amountPerPage = certificateRequestPR.getAmountPerPage();
        final Money baseAmountPlusAmountForUnits =
                certificateRequestPR.getBaseAmount().add(
                        certificateRequestPR.getAmountForUnits(certificateRequest.getNumberOfUnits()));
        final Money urgencyAmount = certificateRequest.getUrgentRequest() ? certificateRequestPR.getBaseAmount() : Money.ZERO;

        addParameter("amountPerPage", amountPerPage);
        addParameter("baseAmountPlusAmountForUnits", baseAmountPlusAmountForUnits);
        addParameter("urgencyAmount", urgencyAmount);
        addParameter("printPriceFields", printPriceParameters(certificateRequest));
View Full Code Here

        BigDecimal numberOfEnrolledEctsOneYearAgo = studentLine.getNumberOfEnrolledEctsOneYearAgo();
        BigDecimal numberOfApprovedEctsOneYearAgo = studentLine.getNumberOfApprovedEctsOneYearAgo();
        Integer curricularYearInCurrentYear = studentLine.getCurricularYearInCurrentYear();
        Double numberOfEnrolledECTS = studentLine.getNumberOfEnrolledECTS();
        double numberOfDoneECTS = studentLine.getNumberOfDoneECTS();
        Money gratuityAmount = studentLine.getGratuityAmount();
        Integer numberOfMonthsExecutionYear = studentLine.getNumberOfMonthsExecutionYear();
        String firstMonthOfPayment = studentLine.getFirstMonthOfPayment();
        Boolean ownerOfCETQualification = studentLine.getOwnerOfCETQualification();
        boolean degreeQualificationOwner = studentLine.isDegreeQualificationOwner();
        boolean masterQualificationOwner = studentLine.isMasterQualificationOwner();
View Full Code Here

                Integer curricularYearOneYearAgo = studentLine.getCurricularYearOneYearAgo();
                BigDecimal numberOfEnrolledEctsOneYearAgo = studentLine.getNumberOfEnrolledEctsOneYearAgo();
                BigDecimal numberOfApprovedEctsOneYearAgo = studentLine.getNumberOfApprovedEctsOneYearAgo();
                Integer curricularYearInCurrentYear = studentLine.getCurricularYearInCurrentYear();
                Double numberOfEnrolledECTS = studentLine.getNumberOfEnrolledECTS();
                Money gratuityAmount = studentLine.getGratuityAmount();
                Integer numberOfMonthsExecutionYear = studentLine.getNumberOfMonthsExecutionYear();
                String firstMonthOfPayment = studentLine.getFirstMonthOfPayment();
                Boolean ownerOfCETQualification = studentLine.getOwnerOfCETQualification();
                boolean degreeQualificationOwner = studentLine.isDegreeQualificationOwner();
                boolean masterQualificationOwner = studentLine.isMasterQualificationOwner();
                boolean phdQualificationOwner = studentLine.isPhdQualificationOwner();
                boolean ownerOfCollegeQualification = studentLine.isOwnerOfCollegeQualification();
                String observations = studentLine.getObservations();
                String lastEnrolmentExecutionYear = studentLine.getLastEnrolledExecutionYear();
                String nif = studentLine.getNif();

                HSSFRow row = sheet.createRow(i);
                addCellValue(row, onNullEmptyString(institutionCode), 0);
                addCellValue(row, onNullEmptyString(institutionName), 1);
                addCellValue(row, onNullEmptyString(candidacyNumber), 2);
                addCellValue(row, onNullEmptyString(studentNumberForPrint), 3);
                addCellValue(row, onNullEmptyString(studentName), 4);
                addCellValue(row, onNullEmptyString(documentTypeName), 5);
                addCellValue(row, onNullEmptyString(documentNumber), 6);
                addCellValue(row, onNullEmptyString(degreeCode), 7);
                addCellValue(row, onNullEmptyString(degreeName), 8);
                addCellValue(row, onNullEmptyString(degreeTypeName), 9);
                addCellValue(row, "", 10);
                addCellValue(row, onNullEmptyString(countNumberOfDegreeChanges), 11);
                addCellValue(row, onNullEmptyString(hasMadeDegreeChange), 12);
                addCellValue(row, onNullEmptyString(firstEnrolmentOnCurrentExecutionYear), 13);
                addCellValue(row, onNullEmptyString(regime), 14);
                addCellValue(row, "", 15);
                addCellValue(row, onNullEmptyString(firstRegistrationExecutionYear), 16);
                addCellValue(row, onNullEmptyString(countNumberOfEnrolmentsYearsSinceRegistrationStart), 17);
                addCellValue(row, onNullEmptyString(countNumberOfEnrolmentsYearsInIntegralRegime), 18);
                addCellValue(row, onNullEmptyString(achievedDegreeEcts), 19);
                addCellValue(row, onNullEmptyString(numberOfDegreeCurricularYears), 20);
                addCellValue(row, onNullEmptyString(curricularYearOneYearAgo), 21);
                addCellValue(row, onNullEmptyString(numberOfEnrolledEctsOneYearAgo != null ? numberOfEnrolledEctsOneYearAgo
                        .toString().replace('.', ',') : ""), 22);
                addCellValue(row, onNullEmptyString(numberOfApprovedEctsOneYearAgo != null ? numberOfApprovedEctsOneYearAgo
                        .toString().replace('.', ',') : ""), 23);
                addCellValue(row, onNullEmptyString(curricularYearInCurrentYear), 24);
                addCellValue(row,
                        onNullEmptyString(numberOfEnrolledECTS != null ? numberOfEnrolledECTS.toString().replace('.', ',') : ""),
                        25);
                addCellValue(row,
                        onNullEmptyString(gratuityAmount != null ? gratuityAmount.toPlainString().replace('.', ',') : ""), 26);
                addCellValue(row, onNullEmptyString(numberOfMonthsExecutionYear), 27);
                addCellValue(row, onNullEmptyString(firstMonthOfPayment), 28);
                addCellValue(row, onNullEmptyString(ownerOfCETQualification), 29);
                addCellValue(row, onNullEmptyString(degreeQualificationOwner), 30);
                addCellValue(row, onNullEmptyString(masterQualificationOwner), 31);
View Full Code Here

        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();
            }
        }

        return firstInstallment.getEndDate().toLocalDate();
View Full Code Here

    public Set<Entry> getPayments() {
        return getPayments(AcademicEvent.class);
    }

    public Money getTotalPaymentsAmountWithAdjustment() {
        Money total = new Money(0);
        for (final Entry entry : getPayments(AcademicEvent.class)) {
            total = total.add(entry.getAmountWithAdjustment());
        }
        return total;
    }
View Full Code Here

        return result;
    }

    public Money getMaxDeductableAmountForLegalTaxes(final EventType eventType, final int civilYear) {
        Money result = Money.ZERO;
        for (final Event event : (Set<Event>) getEventsByEventType(eventType)) {
            result = result.add(event.getMaxDeductableAmountForLegalTaxes(civilYear));
        }

        return result;
    }
View Full Code Here

                String regime = studentLine.getRegime();
                Integer countNumberOfEnrolmentsYearsSinceRegistrationStart =
                        studentLine.getCountNumberOfEnrolmentsYearsSinceRegistrationStart();
                Integer numberOfDegreeCurricularYears = studentLine.getNumberOfDegreeCurricularYears();
                Double numberOfEnrolledECTS = studentLine.getNumberOfEnrolledECTS();
                Money gratuityAmount = studentLine.getGratuityAmount();
                Integer numberOfMonthsExecutionYear = studentLine.getNumberOfMonthsExecutionYear();
                String firstMonthOfPayment = studentLine.getFirstMonthOfPayment();
                Boolean ownerOfCETQualification = studentLine.getOwnerOfCETQualification();
                boolean degreeQualificationOwner = studentLine.isDegreeQualificationOwner();
                boolean masterQualificationOwner = studentLine.isMasterQualificationOwner();
                boolean phdQualificationOwner = studentLine.isPhdQualificationOwner();
                boolean ownerOfCollegeQualification = studentLine.isOwnerOfCollegeQualification();
                String observations = studentLine.getObservations();
                String nif = studentLine.getNif();
                LocalDate firstEnrolmentOnCurrentExecutionYear = studentLine.getFirstEnrolmentOnCurrentExecutionYear();

                HSSFRow row = sheet.createRow(i);
                addCellValue(row, onNullEmptyString(institutionCode), 0);
                addCellValue(row, onNullEmptyString(institutionName), 1);
                addCellValue(row, onNullEmptyString(candidacyNumber), 2);
                addCellValue(row, onNullEmptyString(studentNumberForPrint), 3);
                addCellValue(row, onNullEmptyString(studentName), 4);
                addCellValue(row, onNullEmptyString(documentTypeName), 5);
                addCellValue(row, onNullEmptyString(documentNumber), 6);
                addCellValue(row, onNullEmptyString(degreeCode), 7);
                addCellValue(row, onNullEmptyString(degreeName), 8);
                addCellValue(row, onNullEmptyString(degreeTypeName), 9);
                addCellValue(row, onNullEmptyString(firstEnrolmentOnCurrentExecutionYear), 10);
                addCellValue(row,
                        onNullEmptyString(gratuityAmount != null ? gratuityAmount.toPlainString().replace('.', ',') : ""), 11);
                addCellValue(row, onNullEmptyString(numberOfMonthsExecutionYear), 12);
                addCellValue(row, onNullEmptyString(firstMonthOfPayment), 13);
                addCellValue(row, onNullEmptyString(ownerOfCETQualification), 14);
                addCellValue(row, onNullEmptyString(degreeQualificationOwner), 15);
                addCellValue(row, onNullEmptyString(masterQualificationOwner), 16);
View Full Code Here

                String regime = studentLine.getRegime();
                Integer countNumberOfEnrolmentsYearsSinceRegistrationStart =
                        studentLine.getCountNumberOfEnrolmentsYearsSinceRegistrationStart();
                Integer numberOfDegreeCurricularYears = studentLine.getNumberOfDegreeCurricularYears();
                Double numberOfEnrolledECTS = studentLine.getNumberOfEnrolledECTS();
                Money gratuityAmount = studentLine.getGratuityAmount();
                Integer numberOfMonthsExecutionYear = studentLine.getNumberOfMonthsExecutionYear();
                String firstMonthOfPayment = studentLine.getFirstMonthOfPayment();
                Boolean ownerOfCETQualification = studentLine.getOwnerOfCETQualification();
                boolean degreeQualificationOwner = studentLine.isDegreeQualificationOwner();
                boolean masterQualificationOwner = studentLine.isMasterQualificationOwner();
                boolean phdQualificationOwner = studentLine.isPhdQualificationOwner();
                boolean ownerOfCollegeQualification = studentLine.isOwnerOfCollegeQualification();
                String observations = studentLine.getObservations();
                String nif = studentLine.getNif();
                LocalDate firstEnrolmentOnCurrentExecutionYear = studentLine.getFirstEnrolmentOnCurrentExecutionYear();

                HSSFRow row = sheet.createRow(i);
                addCellValue(row, onNullEmptyString(institutionCode), 0);
                addCellValue(row, onNullEmptyString(institutionName), 1);
                addCellValue(row, onNullEmptyString(candidacyNumber), 2);
                addCellValue(row, onNullEmptyString(studentNumberForPrint), 3);
                addCellValue(row, onNullEmptyString(studentName), 4);
                addCellValue(row, onNullEmptyString(documentTypeName), 5);
                addCellValue(row, onNullEmptyString(documentNumber), 6);
                addCellValue(row, onNullEmptyString(degreeCode), 7);
                addCellValue(row, onNullEmptyString(degreeName), 8);
                addCellValue(row, onNullEmptyString(degreeTypeName), 9);
                addCellValue(row, "", 10);
                addCellValue(row, onNullEmptyString(firstEnrolmentOnCurrentExecutionYear), 11);
                addCellValue(row,
                        onNullEmptyString(gratuityAmount != null ? gratuityAmount.toPlainString().replace('.', ',') : ""), 12);
                addCellValue(row, onNullEmptyString(numberOfMonthsExecutionYear), 13);
                addCellValue(row, onNullEmptyString(firstMonthOfPayment), 14);
                addCellValue(row, onNullEmptyString(ownerOfCETQualification), 15);
                addCellValue(row, onNullEmptyString(degreeQualificationOwner), 16);
                addCellValue(row, onNullEmptyString(masterQualificationOwner), 17);
View Full Code Here

        return new MoneyConverter();
    }

    @Override
    public HtmlComponent render(Object targetObject, Class type) {
        final Money money = ((Money) targetObject);
        return super.render(money != null ? money.getAmount() : null, type);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.util.Money

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.