use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.
the class PaymentApplicationAction method loadDocument.
@Override
protected void loadDocument(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException {
super.loadDocument(kualiDocumentFormBase);
PaymentApplicationForm pform = (PaymentApplicationForm) kualiDocumentFormBase;
loadInvoices(pform, pform.getEnteredInvoiceDocumentNumber());
}
use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.
the class PaymentApplicationAction method goToPreviousInvoice.
/**
* This method updates customer invoice details when previous invoice is selected
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward goToPreviousInvoice(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PaymentApplicationForm payAppForm = (PaymentApplicationForm) form;
loadInvoices(payAppForm, payAppForm.getPreviousInvoiceDocumentNumber());
if (!payAppForm.getPaymentApplicationDocument().isFinal()) {
doApplicationOfFunds(payAppForm);
}
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.
the class PaymentApplicationAction method deleteInvoicePaidApplied.
// CU Customization: Added several helper methods for invoice-paid-applied deletion enhancement.
public ActionForward deleteInvoicePaidApplied(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PaymentApplicationForm paymentApplicationForm = (PaymentApplicationForm) form;
paymentApplicationForm.setManualInvoicePaidAppliedDatabaseDeletionRequired(true);
PaymentApplicationDocument paymentApplicationDocument = paymentApplicationForm.getPaymentApplicationDocument();
int deleteIndex = getLineToDelete(request);
adjustBothQuickApplyToInvoiceAndApplyToInvoiceDetailDueToDeleteInvoicePaidApplied(paymentApplicationForm, deleteIndex);
paymentApplicationDocument.getInvoicePaidApplieds().remove(deleteIndex);
GlobalVariables.getMessageMap().clearErrorMessages();
doApplicationOfFunds((PaymentApplicationForm) form);
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.
the class PaymentApplicationAction method goToNextInvoice.
/**
* This method updates customer invoice details when next invoice is selected
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward goToNextInvoice(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PaymentApplicationForm payAppForm = (PaymentApplicationForm) form;
loadInvoices(payAppForm, payAppForm.getNextInvoiceDocumentNumber());
if (!payAppForm.getPaymentApplicationDocument().isFinal()) {
doApplicationOfFunds(payAppForm);
}
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.
the class PaymentApplicationAction method createDocument.
@Override
protected void createDocument(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException {
super.createDocument(kualiDocumentFormBase);
PaymentApplicationForm form = (PaymentApplicationForm) kualiDocumentFormBase;
PaymentApplicationDocument document = form.getPaymentApplicationDocument();
// create new accounts receivable header and set it to the payment application document
AccountsReceivableDocumentHeaderService accountsReceivableDocumentHeaderService = SpringContext.getBean(AccountsReceivableDocumentHeaderService.class);
AccountsReceivableDocumentHeader accountsReceivableDocumentHeader = accountsReceivableDocumentHeaderService.getNewAccountsReceivableDocumentHeaderForCurrentUser();
accountsReceivableDocumentHeader.setDocumentNumber(document.getDocumentNumber());
document.setAccountsReceivableDocumentHeader(accountsReceivableDocumentHeader);
}
Aggregations