Package org.fenixedu.academic.dto.accounting

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


public class PayResidenceEvent {

    @Atomic
    public static void run(User user, ResidenceEvent event, YearMonthDay date) {
        event.process(user, event.calculateEntries(), new AccountingTransactionDetailDTO(date.toDateTimeAtMidnight(),
                PaymentMode.CASH));
    }
View Full Code Here


                        .getAttribute("externalId") : exemptionId);
        ExternalScholarshipPhdGratuityContribuitionEvent event = exemption.getExternalScholarshipPhdGratuityContribuitionEvent();
        AmountBean bean = getRenderedObject("bean");
        List<EntryDTO> list = new ArrayList<EntryDTO>();
        list.add(new EntryDTO(EntryType.EXTERNAL_SCOLARSHIP_PAYMENT, event, bean.getValue()));
        event.process(Authenticate.getUser(), list, new AccountingTransactionDetailDTO(bean.getPaymentDate(), PaymentMode.CASH));

        PhdGratuityEvent gratuityEvent = (PhdGratuityEvent) exemption.getEvent();
        PhdIndividualProgramProcess process = gratuityEvent.getPhdIndividualProgramProcess();
        request.setAttribute("processId", process.getExternalId());
View Full Code Here

        checkConditionsToTransferPaymentsAndCancel(targetEvent);

        for (final Entry entryToTransfer : getPositiveEntries()) {

            final AccountingTransactionDetailDTO transactionDetail =
                    createAccountingTransactionDetailForTransfer(entryToTransfer.getAccountingTransaction());

            targetEvent.depositAmount(responsible.getUser(), entryToTransfer.getAmountWithAdjustment(), transactionDetail);

            entryToTransfer.getAccountingTransaction().reimburseWithoutRules(responsible.getUser(), PaymentMode.CASH,
View Full Code Here

    private AccountingTransactionDetailDTO createAccountingTransactionDetailForTransfer(final AccountingTransaction transaction) {
        final String comments =
                transaction.getEvent().getClass().getName() + ":" + transaction.getEvent().getExternalId() + ","
                        + transaction.getClass().getName() + ":" + transaction.getExternalId();

        return new AccountingTransactionDetailDTO(transaction.getTransactionDetail().getWhenRegistered(), PaymentMode.CASH,
                comments);

    }
View Full Code Here

    private static boolean isPayed(DocumentRequestCreateBean bean) {
        return bean.getPastPaymentAmount() != null && bean.getPastPaymentAmount().isPositive();
    }

    private static AccountingTransactionDetailDTO createTransactionDetailDTO(DocumentRequestCreateBean bean) {
        return new AccountingTransactionDetailDTO(bean.getPastPaymentDate().toDateTimeAtStartOfDay(), PaymentMode.CASH);
    }
View Full Code Here

        final Map<Event, Collection<EntryDTO>> entryDTOsByEvent = splitEntryDTOsByEvent(entryDTOs);
        final List<Entry> resultingEntries = new ArrayList<Entry>();

        for (final Map.Entry<Event, Collection<EntryDTO>> entry : entryDTOsByEvent.entrySet()) {
            resultingEntries.addAll(entry.getKey().process(responsibleUser, entry.getValue(),
                    new AccountingTransactionDetailDTO(whenRegistered, paymentMode)));

        }

        return resultingEntries;
    }
View Full Code Here

    public static AccountingTransaction run(final DepositAmountBean depositAmountBean) {
        return depositAmountBean.getEvent().depositAmount(
                null,
                depositAmountBean.getAmount(),
                depositAmountBean.getEntryType(),
                new AccountingTransactionDetailDTO(depositAmountBean.getWhenRegistered(), PaymentMode.CASH, depositAmountBean
                        .getReason()));

    }
View Full Code Here

TOP

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

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.