Package org.openinvoice.ubl4j.task.create

Examples of org.openinvoice.ubl4j.task.create.InvoiceCreationInput


     *
     * @throws UBL4JException in case issues while converting the order file
     * @throws IOException in case issues while reading the order file
     */
    public void executeCreateInvoiceBasedOnOrderTask() throws UBL4JException, IOException {
        InvoiceCreationInput input = new CreateInvoiceBasedOnOrderInput();
        input = initOutputOptions(input);
        input.setUbl4jConfigurationBean(UBL4JConfigurationBeanBuilder.getInstance());
        File orderFile = new File(options.convertOrderToInvoice);
        if (!orderFile.exists()) {
            throw new UBL4JException(String.format("order '%s' doesn't exist", orderFile.getAbsolutePath()));
        }
        ((CreateInvoiceBasedOnOrderInput)input).setOrderURI(URI.create(orderFile.toURI().getPath()));
View Full Code Here


        if (!invoiceFile.exists()) {
            throw new FailedToRenderException(String.format("The specified invoice file '%s' doesn't exist",
                    invoiceFile.getAbsolutePath()));
        }
        InvoiceType invoiceType = InvoiceTypeUnMarshaller.unMarshal(new FileInputStream(invoiceFile));
        InvoiceCreationInput input = new InvoiceRenderingInput(invoiceType);
        input = initOutputOptions(input);
        InvoiceRenderingTask task = new InvoiceRenderingTask();
        task.execute(input);
        print(task);
    }
View Full Code Here

TOP

Related Classes of org.openinvoice.ubl4j.task.create.InvoiceCreationInput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.