Package org.fenixedu.academic.dto.accounting

Examples of org.fenixedu.academic.dto.accounting.EntryDTO


    }

    @Override
    public List<EntryDTO> calculateEntries(Event event, 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


    protected Set<AccountingTransaction> internalProcess(User user, Collection<EntryDTO> entryDTOs, Event event,
            Account fromAccount, Account toAccount, AccountingTransactionDetailDTO transactionDetail) {
        if (entryDTOs.size() != 1) {
            throw new DomainException("error.DegreeTransferIndividualCandidacyPR.invalid.number.of.entryDTOs");
        }
        final EntryDTO entryDTO = entryDTOs.iterator().next();
        checkIfCanAddAmount(entryDTO.getAmountToPay(), event, transactionDetail.getWhenRegistered());

        return Collections.singleton(makeAccountingTransaction(user, event, fromAccount, toAccount, entryDTO.getEntryType(),
                entryDTO.getAmountToPay(), transactionDetail));
    }
View Full Code Here

    }

    @Override
    public List<EntryDTO> calculateEntries(Event event, 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

            Account fromAccount, Account toAccount, AccountingTransactionDetailDTO transactionDetail) {
        if (entryDTOs.size() != 1) {
            throw new DomainException("error.DegreeChangeIndividualCandidacyPR.invalid.number.of.entryDTOs");
        }

        final EntryDTO entryDTO = entryDTOs.iterator().next();
        checkIfCanAddAmount(entryDTO.getAmountToPay(), event, transactionDetail.getWhenRegistered());

        return Collections.singleton(makeAccountingTransaction(user, event, fromAccount, toAccount, entryDTO.getEntryType(),
                entryDTO.getAmountToPay(), transactionDetail));
    }
View Full Code Here

        return amountToPay;
    }

    @Override
    public List<EntryDTO> calculateEntries(Event event, DateTime when) {
        return Collections.singletonList(new EntryDTO(EntryType.EXTERNAL_SCOLARSHIP_PAYMENT, event, calculateTotalAmountToPay(
                event, when), event.getPayedAmount(), event.calculateAmountToPay(when), event
                .getDescriptionForEntryType(EntryType.EXTERNAL_SCOLARSHIP_PAYMENT), event.calculateAmountToPay(when)));
    }
View Full Code Here

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

        return phdGratuityPeriod.fine(getFineRate(), getGratuity(), when);
    }

    @Override
    public List<EntryDTO> calculateEntries(Event event, DateTime when) {
        return Collections.singletonList(new EntryDTO(EntryType.PHD_GRATUITY_FEE, event, calculateTotalAmountToPay(event, when),
                event.getPayedAmount(), event.calculateAmountToPay(when), event
                        .getDescriptionForEntryType(EntryType.PHD_GRATUITY_FEE), event.calculateAmountToPay(when)));
    }
View Full Code Here

        final List<EntryDTO> entryDTOs = calculateEntries();
        final List<AccountingEventPaymentCode> result = new ArrayList<AccountingEventPaymentCode>();

        for (final AccountingEventPaymentCode paymentCode : getNonProcessedPaymentCodes()) {
            final EntryDTO entryDTO = findEntryDTOForPaymentCode(entryDTOs, paymentCode);
            if (entryDTO == null) {
                paymentCode.cancel();
                continue;
            }

            if (paymentCode instanceof InstallmentPaymentCode) {
                final InstallmentPaymentCode installmentPaymentCode = (InstallmentPaymentCode) paymentCode;
                paymentCode.update(new YearMonthDay(),
                        calculateInstallmentPaymentCodeEndDate(installmentPaymentCode.getInstallment()),
                        entryDTO.getAmountToPay(), entryDTO.getAmountToPay());
                result.add(paymentCode);
            } else {
                paymentCode.update(new YearMonthDay(), calculateFullPaymentCodeEndDate(), entryDTO.getAmountToPay(),
                        entryDTO.getAmountToPay());

                result.add(paymentCode);
            }

        }
View Full Code Here

    private EntryDTO buildEntryDTOFrom(final AccountingEventPaymentCode paymentCode, final Money amountToPay) {
        if (paymentCode instanceof InstallmentPaymentCode) {
            return new EntryWithInstallmentDTO(EntryType.GRATUITY_FEE, this, amountToPay,
                    ((InstallmentPaymentCode) paymentCode).getInstallment());
        } else {
            return new EntryDTO(EntryType.GRATUITY_FEE, this, amountToPay);
        }
    }
View Full Code Here

        return result;
    }

    private EntryDTO buildAdministrativeOfficeFeeEntryDTO(Money administrativeOfficeFeeAmountToDiscount) {
        return new EntryDTO(EntryType.ADMINISTRATIVE_OFFICE_FEE, this, administrativeOfficeFeeAmountToDiscount);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.accounting.EntryDTO

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.