Examples of CreateGratuityPostingRuleBean


Examples of org.fenixedu.academic.dto.accounting.postingRule.CreateGratuityPostingRuleBean

    }

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

        request.setAttribute("createPostingRuleBean", new CreateGratuityPostingRuleBean());

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

Examples of org.fenixedu.academic.dto.accounting.postingRule.CreateGratuityPostingRuleBean

    }

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

        final CreateGratuityPostingRuleBean bean = getRenderedObject("createPostingRuleBean");

        try {
            PostingRulesManager.createGraduationGratuityPostingRule(bean);
        } catch (DomainException e) {
            addActionMessage(request, e.getKey(), e.getArgs());
View Full Code Here

Examples of org.fenixedu.academic.dto.accounting.postingRule.CreateGratuityPostingRuleBean

    }

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

        final CreateGratuityPostingRuleBean bean = new CreateStandaloneEnrolmentGratuityPRBean();
        bean.setRule(StandaloneEnrolmentGratuityPR.class);

        request.setAttribute("createPostingRuleBean", bean);

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

Examples of org.fenixedu.academic.dto.accounting.postingRule.CreateGratuityPostingRuleBean

    }

    @Atomic
    public static void createDEAGratuityPostingRule(PaymentPlanBean paymentPlanBean) {
        check(AcademicPredicates.MANAGE_PAYMENTS);
        CreateGratuityPostingRuleBean createGratuityPostingRuleBean = new CreateGratuityPostingRuleBean();
        createGratuityPostingRuleBean.setExecutionYear(paymentPlanBean.getExecutionYear());
        createGratuityPostingRuleBean.setDegreeCurricularPlans(paymentPlanBean.getDegreeCurricularPlans());

        DateTime minStartDate = null;
        for (InstallmentBean installmentBean : paymentPlanBean.getInstallments()) {
            if (minStartDate == null) {
                minStartDate = installmentBean.getStartDate().toDateMidnight().toDateTime();
                continue;
            }

            if (installmentBean.getStartDate().toDateMidnight().toDateTime().isBefore(minStartDate)) {
                minStartDate = installmentBean.getStartDate().toDateMidnight().toDateTime();
            }
        }

        createGratuityPostingRuleBean.setStartDate(minStartDate);
        createGratuityPostingRuleBean.setRule(GratuityWithPaymentPlanPR.class);

        createGraduationGratuityPostingRule(createGratuityPostingRuleBean);
        GratuityPaymentPlanManager.create(paymentPlanBean);
    }
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.