private ProposalAwardCloseDocument createClose(Date closeCloseOnOrBeforeDate) throws WorkflowException { Document document = DocumentTestUtils.createDocument( SpringContext.getBean(DocumentService.class), ProposalAwardCloseDocument.class); ProposalAwardCloseDocument close = (ProposalAwardCloseDocument) document; // SpringContext.getBean(DocumentService.class).getNewDocument(Close.class); close.setUserInitiatedCloseDate(today); close.setCloseOnOrBeforeDate(closeCloseOnOrBeforeDate); return close; }
/** * This method creates a payment application document based on the passed in fixture array * * @param paymentFixture * @param customerInvoiceDetailFixtures * @return */ public PaymentApplicationDocument createPaymentApplicationDocument() { PaymentApplicationDocument paymentApplicationDocument = null; try { paymentApplicationDocument = (PaymentApplicationDocument) DocumentTestUtils.createDocument( SpringContext.getBean(DocumentService.class), PaymentApplicationDocument.class); } catch (WorkflowException e) { throw new RuntimeException("Document creation failed."); } // set AR doc Header AccountsReceivableDocumentHeader arDocHeader = new AccountsReceivableDocumentHeader(); AccountsReceivableDocumentHeaderService accountsReceivableDocumentHeaderService = SpringContext.getBean(AccountsReceivableDocumentHeaderService.class); arDocHeader.setDocumentNumber(paymentApplicationDocument.getDocumentNumber()); arDocHeader.setCustomerNumber(customerNumber); arDocHeader.setDocumentNumber(paymentApplicationDocument.getDocumentNumber()); paymentApplicationDocument.setAccountsReceivableDocumentHeader(arDocHeader); return paymentApplicationDocument; }