Examples of LineItemType


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

        if (!orderLineTypes.isEmpty()) {
            for (OrderLineType orderLineType : orderLineTypes) {

                // Initialize the ref. currency based on the price currency of the first line
                if (this.referenceCurrency == null) {
                    LineItemType lineItemType = orderLineType.getLineItem();
                    if (lineItemType != null) {
                        this.referenceCurrency = lineItemType.getPrice().getPriceAmount().getCurrencyID();
                    }
                }

                if (!isOrderLineCurrencyTheSame(orderLineType)) {
                    return false;
View Full Code Here

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

        }
    }

    private boolean isOrderLineCurrencyTheSame(OrderLineType orderLineType) {

        LineItemType lineItemType = orderLineType.getLineItem();
        LineExtensionAmountType lineExtensionAmount = lineItemType.getLineExtensionAmount();

        // Check to see if the line extension prices all have the same value as the referenceCurrency
        if (lineExtensionAmount != null) {
            if (!referenceCurrency.equals(lineExtensionAmount.getCurrencyID())) {
                this.errorCurrency = lineExtensionAmount.getCurrencyID();
                return false;
            }
        }

        // 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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.