Package org.fenixedu.academic.domain.accounting

Examples of org.fenixedu.academic.domain.accounting.Event


    }

    public ActionForward showPaymentsForEvent(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final Event event = getEvent(request);
        request.setAttribute("event", event);

        if (!StringUtils.isEmpty(event.getCreatedBy())) {
            User responsible = User.findByUsername(event.getCreatedBy());
            request.setAttribute("responsible", responsible.getPerson());
        }

        if (event.isOpen()) {
            request.setAttribute("entryDTOs", event.calculateEntries());
            request.setAttribute("accountingEventPaymentCodes", event.getNonProcessedPaymentCodes());
        }

        return mapping.findForward("showPaymentsForEvent");
    }
View Full Code Here


    }

    public ActionForward prepareTransferPaymentsToOtherEventAndCancel(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {

        final Event event = getEvent(request);

        final TransferPaymentsToOtherEventAndCancelBean transferPaymentsBean =
                new TransferPaymentsToOtherEventAndCancelBean(event, getLoggedPerson(request));

        request.setAttribute("transferPaymentsBean", transferPaymentsBean);
View Full Code Here

    }

    public ActionForward showExemptions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final Event event = getEvent(request);
        request.setAttribute("person", event.getPerson());
        request.setAttribute("event", event);

        if (event instanceof GratuityEvent) {
            if (event instanceof GratuityEventWithPaymentPlan) {
                request.setAttribute("hasPaymentPlan", true);
View Full Code Here

    }

    public ActionForward showEventDetails(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {

        final Event event = readEvent(request);

        request.setAttribute("person", getUserView(request).getPerson());
        request.setAttribute("event", event);
        request.setAttribute("entryDTOs", event.calculateEntries());
        request.setAttribute("accountingEventPaymentCodes", event.getNonProcessedPaymentCodes());

        return mapping.findForward("showEventDetails");
    }
View Full Code Here

    }

    public ActionForward showPaymentCodesForEvent(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {

        final Event event = getEvent(request);
        request.setAttribute("event", event);
        request.setAttribute("accountingEventPaymentCodes", event.getNonProcessedPaymentCodes());

        return mapping.findForward("showPaymentCodesForEvent");
    }
View Full Code Here

        super.setAccountingEvent(event);
    }

    @Override
    protected void internalProcess(Person person, Money amount, DateTime whenRegistered, String sibsTransactionId, String comments) {
        final Event event = getAccountingEvent();
        if (event.isCancelled()) {
            logger.warn("############################ PROCESSING CODE FOR CANCELLED EVENT ###############################");
            logger.warn("Event " + event.getExternalId() + " for person " + event.getPerson().getExternalId() + " is cancelled");
            logger.warn("Code Number: " + getCode());
            logger.warn("################################################################################################");
        }

        event.process(person.getUser(), this, amount, new SibsTransactionDetailDTO(whenRegistered, sibsTransactionId, getCode(),
                comments));
    }
View Full Code Here

            throw new UnsupportedOperationException("Unknown payment code type");
        }
    }

    private void addAmountForEvent(final SibsIncommingPaymentFileDetailLine detailLine, final PaymentCode paymentCode) {
        final Event event = ((AccountingEventPaymentCode) paymentCode).getAccountingEvent();
        if (event instanceof GratuityEventWithPaymentPlan) {
            addAmountForGratuityEvent(detailLine, (GratuityEventWithPaymentPlan) event);
        } else if (event instanceof AdministrativeOfficeFeeAndInsuranceEvent) {
            addAmountForAdministrativeOfficeAndInsuranceEvent(detailLine, (AdministrativeOfficeFeeAndInsuranceEvent) event);
        } else if (event instanceof DfaGratuityEvent) {
            addDfaGratuityAmount(detailLine.getAmount());
        } else if (event instanceof InsuranceEvent) {
            addAfterGraduationInsuranceAmount(detailLine.getAmount());
        } else if (event instanceof ResidenceEvent) {
            addResidenceAmount(detailLine.getAmount());
        } else if (event instanceof SecondCycleIndividualCandidacyEvent) {
            addSecondCycleIndividualCandidacyAmount(detailLine.getAmount());
        } else if (event instanceof DegreeChangeIndividualCandidacyEvent) {
            addDegreeChangeIndividualCandidacyAmount(detailLine.getAmount());
        } else if (event instanceof DegreeCandidacyForGraduatedPersonEvent) {
            addDegreeCandidacyForGraduatedPersonAmount(detailLine.getAmount());
        } else if (event instanceof DegreeTransferIndividualCandidacyEvent) {
            addDegreeTransferIndividualCandidacyAmount(detailLine.getAmount());
        } else if (event instanceof StandaloneEnrolmentGratuityEvent) {
            addStandaloneEnrolmentGratuityEventAmount(detailLine.getAmount());
        } else if (event instanceof Over23IndividualCandidacyEvent) {
            addOver23IndividualCandidacyEventAmount(detailLine.getAmount());
        } else if (event instanceof PhdProgramCandidacyEvent) {
            addPhdProgramCandidacyEventAmount(detailLine.getAmount());
        } else {
            throw new IllegalArgumentException("Unknown accounting event " + event.getClass().getName());
        }
    }
View Full Code Here

                @Override
                @Atomic(mode = TxMode.READ)
                public void run() {
                    for (String oid : block) {
                        Event event = null;
                        try {
                            event = FenixFramework.getDomainObject(oid);
                            if (!isAccountingEventForReport(event)) {
                                continue;
                            }
View Full Code Here

                @Override
                @Atomic(mode = TxMode.READ)
                public void run() {
                    for (String oid : block) {
                        Event event = FenixFramework.getDomainObject(oid);
                        try {
                            if (!isAccountingEventForReport(event)) {
                                continue;
                            }
                            result.addAll(writeExemptionInformation(event));
View Full Code Here

                @Override
                @Atomic(mode = TxMode.READ)
                public void run() {
                    for (String oid : block) {
                        Event event = FenixFramework.getDomainObject(oid);
                        try {
                            if (!isAccountingEventForReport(event)) {
                                continue;
                            }
                            result.addAll(writeTransactionInformation(event));
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.accounting.Event

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.