Search in sources :

Example 1 with AccountsReceivableDocumentHeaderService

use of org.kuali.kfs.module.ar.document.service.AccountsReceivableDocumentHeaderService 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

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