Search in sources :

Example 1 with PaymentApplicationForm

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());
}
Also used : PaymentApplicationForm(org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)

Example 2 with PaymentApplicationForm

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);
}
Also used : PaymentApplicationForm(org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)

Example 3 with PaymentApplicationForm

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);
}
Also used : PaymentApplicationDocument(org.kuali.kfs.module.ar.document.PaymentApplicationDocument) PaymentApplicationForm(org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)

Example 4 with PaymentApplicationForm

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);
}
Also used : PaymentApplicationForm(org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)

Example 5 with PaymentApplicationForm

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);
}
Also used : AccountsReceivableDocumentHeader(org.kuali.kfs.module.ar.businessobject.AccountsReceivableDocumentHeader) AccountsReceivableDocumentHeaderService(org.kuali.kfs.module.ar.document.service.AccountsReceivableDocumentHeaderService) PaymentApplicationDocument(org.kuali.kfs.module.ar.document.PaymentApplicationDocument) PaymentApplicationForm(org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)

Aggregations

PaymentApplicationForm (org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm)8 PaymentApplicationDocument (org.kuali.kfs.module.ar.document.PaymentApplicationDocument)3 AccountsReceivableDocumentHeader (org.kuali.kfs.module.ar.businessobject.AccountsReceivableDocumentHeader)1 NonInvoiced (org.kuali.kfs.module.ar.businessobject.NonInvoiced)1 AccountsReceivableDocumentHeaderService (org.kuali.kfs.module.ar.document.service.AccountsReceivableDocumentHeaderService)1