Search in sources :

Example 6 with PaymentApplicationForm

use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.

the class PaymentApplicationAction method deleteNonArLine.

public ActionForward deleteNonArLine(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    PaymentApplicationForm paymentApplicationForm = (PaymentApplicationForm) form;
    PaymentApplicationDocument paymentApplicationDocument = paymentApplicationForm.getPaymentApplicationDocument();
    int deleteIndex = getLineToDelete(request);
    paymentApplicationDocument.getNonInvoiceds().remove(deleteIndex);
    int nonInvoicedItemNumber = 1;
    for (NonInvoiced n : paymentApplicationDocument.getNonInvoiceds()) {
        n.setFinancialDocumentLineNumber(nonInvoicedItemNumber++);
        n.refreshReferenceObject("chartOfAccounts");
        n.refreshReferenceObject("account");
        n.refreshReferenceObject("subAccount");
        n.refreshReferenceObject("financialObject");
        n.refreshReferenceObject("financialSubObject");
        n.refreshReferenceObject("project");
    }
    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) NonInvoiced(org.kuali.kfs.module.ar.businessobject.NonInvoiced)

Example 7 with PaymentApplicationForm

use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.

the class PaymentApplicationAction method goToInvoice.

/**
 * This method updates the customer invoice details when a new invoice is selected
 *
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return
 * @throws Exception
 */
public ActionForward goToInvoice(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    PaymentApplicationForm payAppForm = (PaymentApplicationForm) form;
    loadInvoices(payAppForm, payAppForm.getSelectedInvoiceDocumentNumber());
    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 8 with PaymentApplicationForm

use of org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationForm in project cu-kfs by CU-CommunityApps.

the class PaymentApplicationAction method loadInvoices.

/**
 * Retrieve all invoices for the selected customer.
 *
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return
 * @throws Exception
 */
public ActionForward loadInvoices(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    PaymentApplicationForm pform = (PaymentApplicationForm) form;
    loadInvoices(pform, pform.getEnteredInvoiceDocumentNumber());
    return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
Also used : 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