use of org.kuali.kfs.module.ar.document.web.struts.ContractsGrantsInvoiceDocumentForm in project cu-kfs by CU-CommunityApps.
the class CuContractsGrantsInvoiceDocumentAction method validateBillingPeriod.
protected ActionForward validateBillingPeriod(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
ContractsGrantsInvoiceDocument contractsGrantsInvoiceDocument = ((ContractsGrantsInvoiceDocumentForm) form).getContractsGrantsInvoiceDocument();
ActionForward forward = null;
String warningMessage = getContractsGrantsInvoiceDocumentWarningMessage(contractsGrantsInvoiceDocument);
if (StringUtils.isNotEmpty(warningMessage)) {
forward = promptForFinalBillConfirmation(mapping, form, request, response, KFSConstants.ROUTE_METHOD, warningMessage, contractsGrantsInvoiceDocument);
}
return forward;
}
use of org.kuali.kfs.module.ar.document.web.struts.ContractsGrantsInvoiceDocumentForm in project cu-kfs by CU-CommunityApps.
the class CuContractsGrantsInvoiceDocumentAction method prorateBill.
@Override
public ActionForward prorateBill(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
ContractsGrantsInvoiceDocumentForm contractsGrantsInvoiceDocumentForm = (ContractsGrantsInvoiceDocumentForm) form;
KualiDecimal budgetTotalAmount = findAwardBudgetTotal(contractsGrantsInvoiceDocumentForm);
if (budgetTotalAmount == null || budgetTotalAmount.isLessEqual(KualiDecimal.ZERO)) {
String budgetTotalAmountString = budgetTotalAmount != null ? budgetTotalAmount.toString() : "0";
GlobalVariables.getMessageMap().putError(KFSConstants.GLOBAL_ERRORS, CUKFSKeyConstants.ERROR_DOCUMENT_CONTRACT_GRANT_INVOICE_PRORATE_NO_AWARD_BUDGET_TOTAL, budgetTotalAmountString);
LOG.error("prorateBill, Prorate is not valid as the budgetTotalAmount is " + budgetTotalAmount);
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
return super.prorateBill(mapping, form, request, response);
}
Aggregations