Package org.fenixedu.academic.util

Examples of org.fenixedu.academic.util.Money


    public ResidenceEventBean(String userName, String fiscalNumber, String name, Double roomValue, String room) {
        this.userName = userName;
        this.fiscalNumber = fiscalNumber;
        this.name = name;
        this.roomValue = new Money(roomValue);
        this.room = room;
        setStudent(null);
    }
View Full Code Here


    }

    @Override
    protected Money calculatePenaltyAmount(Event event, DateTime when, BigDecimal discountPercentage) {
        if (when.toDateMidnight().compareTo(getWhenStartToApplyPenalty().toDateMidnight()) >= 0) {
            return new Money(calculateMonthPenalty(event, discountPercentage).multiply(
                    new BigDecimal(getNumberOfMonthsToChargePenalty(when))));
        } else {
            return Money.ZERO;
        }
    }
View Full Code Here

    public ResidenceDebtEventBean(String userName, String fiscalNumber, String name, Double roomValue, String room,
            String paidDate, Double roomValuePaid) {
        super(userName, fiscalNumber, name, roomValue, room);
        this.setPaidDate(paidDate);
        this.setRoomValuePaid(new Money(roomValuePaid));
    }
View Full Code Here

    public LocalDate getEndDate(final Event event) {
        return super.getEndDate().toLocalDate();
    }

    public void edit(final InstallmentBean bean) {
        Money amount = bean.getAmount();
        YearMonthDay startDate = bean.getStartDate();
        YearMonthDay endDate = bean.getEndDate();

        checkParameters(amount, startDate, endDate);
View Full Code Here

        }
        return result;
    }

    public Money getTotalAmount() {
        Money result = Money.ZERO;
        for (final Entry entry : getEntriesSet()) {
            result = result.add(entry.getOriginalAmount());
        }
        return result;
    }
View Full Code Here

        throw new DomainException("error.DegreeCandidacyForGraduatedPersonPR.cannot.modify.amountForExternalStudent");
    }

    @Override
    public List<EntryDTO> calculateEntries(final Event event, final DateTime when) {
        final Money amountToPay = calculateTotalAmountToPay(event, when);
        return Collections.singletonList(new EntryDTO(getEntryType(), event, amountToPay, Money.ZERO, amountToPay, event
                .getDescriptionForEntryType(getEntryType()), amountToPay));
    }
View Full Code Here

            // if is in the same month, and a day has passed, at least it
            // counts for one month
            if (monthsOut == 0) {
                monthsOut = 1;
            }
            return new Money(amount.getAmount().multiply(new BigDecimal(fineRate * monthsOut)));
        } else {
            return new Money(0);
        }
    }
View Full Code Here

        return amountToPay;
    }

    @Override
    public List<EntryDTO> calculateEntries(Event event, DateTime when) {
        final Money totalAmountToPay = calculateTotalAmountToPay(event, when);
        return Collections.singletonList(new EntryDTO(getEntryType(), event, totalAmountToPay, Money.ZERO, totalAmountToPay,
                event.getDescriptionForEntryType(getEntryType()), totalAmountToPay));
    }
View Full Code Here

    public boolean isDefault() {
        return getDefaultPlan().booleanValue();
    }

    public Money calculateOriginalTotalAmount() {
        Money result = Money.ZERO;
        for (final Installment installment : getInstallmentsSet()) {
            result = result.add(installment.getAmount());
        }

        return result;
    }
View Full Code Here

        return result;
    }

    public Money calculateBaseAmount(final Event event) {
        Money result = Money.ZERO;
        for (final Installment installment : getInstallmentsSet()) {
            result = result.add(installment.calculateBaseAmount(event));
        }

        return result;
    }
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.