Examples of PaymentsManagementDTO


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

    @Override
    public ActionForward preparePrintGuide(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {

        final PaymentsManagementDTO managementDTO =
                (PaymentsManagementDTO) RenderUtils.getViewState("paymentsManagementDTO").getMetaObject().getObject();
        request.setAttribute("paymentsManagementDTO", managementDTO);

        if (managementDTO.getSelectedEntries().isEmpty()) {
            addActionMessage("context", request, "error.payments.guide.entries.selection.is.required");
            request.setAttribute("personId", managementDTO.getPerson().getExternalId());
            return mapping.findForward("showEvents");
        } else {
            return mapping.findForward("showGuide");
        }
    }
View Full Code Here

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

    }

    public ActionForward printGuide(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws IOException {

        PaymentsManagementDTO managementDTO =
                (PaymentsManagementDTO) RenderUtils.getViewState("paymentsManagementDTO").getMetaObject().getObject();

        final GuideDocument document = new GuideDocument(managementDTO, getMessageResourceProvider(request));
        final byte[] data = ReportsUtils.exportToProcessedPdfAsByteArray(document);
View Full Code Here

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

        @Forward(name = "showPaymentCodesForEvent", path = "/academicAdminOffice/payments/showPaymentCodesForEvent.jsp") })
public class PaymentsManagementDispatchAction extends FenixDispatchAction {

    protected PaymentsManagementDTO searchNotPayedEventsForPerson(HttpServletRequest request, Person person) {

        final PaymentsManagementDTO paymentsManagementDTO = new PaymentsManagementDTO(person);
        for (final Event event : person.getNotPayedEvents()) {
            paymentsManagementDTO.addEntryDTOs(event.calculateEntries());
        }

        return paymentsManagementDTO;
    }
View Full Code Here

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

    }

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

        final PaymentsManagementDTO paymentsManagementDTO =
                (PaymentsManagementDTO) RenderUtils.getViewState("paymentsManagementDTO").getMetaObject().getObject();

        paymentsManagementDTO.setPaymentDate(new DateTime());

        request.setAttribute("paymentsManagementDTO", paymentsManagementDTO);

        if (paymentsManagementDTO.getSelectedEntries().isEmpty()) {
            addActionMessage("context", request, "error.payments.payment.entries.selection.is.required");
            return mapping.findForward("showEvents");

        } else {
            return mapping.findForward("preparePayment");
View Full Code Here

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

        }
    }

    public ActionForward preparePaymentUsingContributorPartyPostback(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        final PaymentsManagementDTO paymentsManagementDTO =
                (PaymentsManagementDTO) getObjectFromViewState("paymentsManagementDTO-edit");

        RenderUtils.invalidateViewState("paymentsManagementDTO-edit");

        paymentsManagementDTO.setContributorParty(null);
        paymentsManagementDTO.setContributorNumber(null);
        paymentsManagementDTO.setContributorName(null);

        request.setAttribute("paymentsManagementDTO", paymentsManagementDTO);

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

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

    }

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

        final PaymentsManagementDTO paymentsManagementDTO =
                (PaymentsManagementDTO) RenderUtils.getViewState("paymentsManagementDTO-edit").getMetaObject().getObject();

        if (paymentsManagementDTO.getSelectedEntries().isEmpty()) {

            addActionMessage("context", request, "error.payments.payment.entries.selection.is.required");
            request.setAttribute("paymentsManagementDTO", paymentsManagementDTO);

            return mapping.findForward("preparePayment");
        }

        //This is here to force the load of the relation to debug a possible bug in FenixFramework
        paymentsManagementDTO.getPerson().getReceiptsSet().size();
        try {
            final Receipt receipt =
                    CreatePaymentsForEvents.run(getUserView(request).getPerson().getUser(),
                            paymentsManagementDTO.getSelectedEntries(), PaymentMode.CASH,
                            paymentsManagementDTO.isDifferedPayment(), paymentsManagementDTO.getPaymentDate(),
                            paymentsManagementDTO.getPerson(), paymentsManagementDTO.getContributorName(),
                            paymentsManagementDTO.getContributorNumber(), paymentsManagementDTO.getContributorAddress());

            request.setAttribute("personId", paymentsManagementDTO.getPerson().getExternalId());
            request.setAttribute("receiptID", receipt.getExternalId());

            return mapping.findForward("showReceipt");

        } catch (DomainExceptionWithLabelFormatter ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.