Package oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2

Examples of oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.AddressType


        pdfInvoice.add(table);
    }

    private InvoiceLineTable createTotalRows(InvoiceLineTable table) {

        MonetaryTotalType monetaryTotalType = pdfInvoice.getInvoiceType().getLegalMonetaryTotal();

        CurrencyDecimal total = createGrandTotal(monetaryTotalType);
        CurrencyDecimal subtotal = createSubTotal(monetaryTotalType);
        CurrencyDecimal totalTax = total.subtract(subtotal);
View Full Code Here


    public String getPartyTaxSchemeCompanyID() {
        List<PartyTaxSchemeType> partyTaxSchemes = partyType.getPartyTaxScheme();
        String companyIDValue = null;
        if (partyTaxSchemes != null && partyTaxSchemes.size() > 0) {
            PartyTaxSchemeType partyTaxScheme = partyTaxSchemes.get(0);
            if (partyTaxScheme != null) {
                IdentifierType companyID = partyTaxScheme.getCompanyID();
                if (companyID != null) {
                    companyIDValue = companyID.getValue();
                }
            }
        }
View Full Code Here

        this.ubl4JConfigurationBean = ubl4JConfigurationBean;
        initLocaleFromSupplierOrDefaultConfig();
    }

    private void initLocaleFromSupplierOrDefaultConfig() {
        PartyType supplier = invoiceType.getAccountingSupplierParty().getParty();
        if (supplier != null) {
            Locale supplierLocale = InvoiceTypeParser.parsePartyLocale(supplier);
            this.locale = (supplierLocale != null)? supplierLocale: ubl4JConfigurationBean.getDefaultLocale();
        }
    }
View Full Code Here

        render();
    }

    private void render() {
        if (supplierPartyTable.getPdfInvoice().getInvoiceType().getPaymentMeans().size() > 0) {
            PaymentMeansType paymentMeansType =
                    supplierPartyTable.getPdfInvoice().getInvoiceType().getPaymentMeans().get(0);
            String supplierBankName =
                    InvoiceTypeParser.parseFinancialInstitutionName(paymentMeansType.getPayeeFinancialAccount());
            String supplierBankAcc =
                    InvoiceTypeParser.parseFinancialAccountID(paymentMeansType.getPayeeFinancialAccount());
            String supplierBankBic =
                    InvoiceTypeParser.parseFinancialInstitutionID(paymentMeansType.getPayeeFinancialAccount());

            if (supplierPartyTable.toBeRendered(org.openinvoice.ubl4j.core.common.text.TextLabel.SUPPLIER_BANK_NAME)) {
                addCell(org.openinvoice.ubl4j.core.common.text.TextLabel.SUPPLIER_BANK_NAME_LABEL, supplierBankName);
            }
            if (supplierPartyTable.toBeRendered(org.openinvoice.ubl4j.core.common.text.TextLabel.SUPPLIER_BANK_ACCOUNT)) {
View Full Code Here

        }

        // Check to see tax currencies are all the same as the ref. currency
        List<TaxCategoryType> taxCategoryTypes = lineItemType.getItem().getClassifiedTaxCategory();
        for (TaxCategoryType taxCategoryType : taxCategoryTypes) {
            TaxSchemeType taxSchemeType = taxCategoryType.getTaxScheme();
            if (taxSchemeType != null) {
                if (!this.referenceCurrency.value().equals(taxSchemeType.getCurrencyCode().getValue())) {
                    this.errorCurrency = CurrencyCodeContentType.valueOf(taxSchemeType.getCurrencyCode().getValue());
                    return false;
                }
            }
        }
        return true;
View Full Code Here

TOP

Related Classes of oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.AddressType

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.