Hi All,
I need to search within the InvoiceItemDetail node whether a MonetaryAmount exists within the AllowOrCharge, indicatorcoded is always charge and MethodHandlingCoded is always Other, I need to get the value 0.12 back with a XPath expression, how to build that?
I have something like:
InvoiceItemDetail/InvoicePricingDetail/ItemAllowancesOrCharges/ListOfAllowOrCharge/AllowOrCharge[IndicatorCoded='Charge'][MethodOfHandlingCoded='Other']/TypeOfAllowanceOrCharge/MonetaryValue/MonetaryAmount
But this does not get the value, below a part of the XML document:
TIA,
Bill
I need to search within the InvoiceItemDetail node whether a MonetaryAmount exists within the AllowOrCharge, indicatorcoded is always charge and MethodHandlingCoded is always Other, I need to get the value 0.12 back with a XPath expression, how to build that?
Code:
<AllowOrCharge>
<IndicatorCoded>Charge</IndicatorCoded>
<MethodOfHandlingCoded>Other</MethodOfHandlingCoded>
<TypeOfAllowanceOrCharge>
<MonetaryValue>
<MonetaryAmount>0.12</MonetaryAmount>
I have something like:
InvoiceItemDetail/InvoicePricingDetail/ItemAllowancesOrCharges/ListOfAllowOrCharge/AllowOrCharge[IndicatorCoded='Charge'][MethodOfHandlingCoded='Other']/TypeOfAllowanceOrCharge/MonetaryValue/MonetaryAmount
But this does not get the value, below a part of the XML document:
Code:
- <InvoiceItemDetail>
- <InvoiceBaseItemDetail>
- <LineItemNum>
<BuyerLineItemNum>1</BuyerLineItemNum>
</LineItemNum>
- <ItemIdentifiers>
- <PartNumbers>
- <StandardPartNumber>
- <ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>EAN8-5-5-1</ProductIdentifierQualifierCoded>
<ProductIdentifier>34523454</ProductIdentifier>
</ProductIdentifierCoded>
</StandardPartNumber>
</PartNumbers>
</ItemIdentifiers>
- <TotalQuantity>
- <Quantity>
<QuantityValue>6</QuantityValue>
- <UnitOfMeasurement>
<UOMCoded>1</UOMCoded>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
</InvoiceBaseItemDetail>
- <InvoicePricingDetail>
- <ListOfPrice>
- <Price>
- <UnitPrice>
<UnitPriceValue>7.23</UnitPriceValue>
</UnitPrice>
</Price>
</ListOfPrice>
- <Tax>
<TaxFunctionQualifierCoded>Tax</TaxFunctionQualifierCoded>
<TaxCategoryCoded>StandardRate</TaxCategoryCoded>
<TaxTypeCoded>ValueAddedTax</TaxTypeCoded>
<TaxPercent>19.000</TaxPercent>
<TaxAmount>8.12</TaxAmount>
</Tax>
- <ItemAllowancesOrCharges>
- <ListOfAllowOrCharge>
- <AllowOrCharge>
<IndicatorCoded>Allowance</IndicatorCoded>
<MethodOfHandlingCoded>Other</MethodOfHandlingCoded>
- <AllowanceOrChargeDescription>
- <AllowOrChgDesc>
- <ListOfDescription>
- <Description>
<DescriptionText>ADR</DescriptionText>
- <Language>
<LanguageCoded>en</LanguageCoded>
</Language>
</Description>
</ListOfDescription>
<ServiceCoded>Discount</ServiceCoded>
</AllowOrChgDesc>
</AllowanceOrChargeDescription>
- <TypeOfAllowanceOrCharge>
- <MonetaryValue>
<MonetaryAmount>0.78</MonetaryAmount>
</MonetaryValue>
</TypeOfAllowanceOrCharge>
</AllowOrCharge>
- <AllowOrCharge>
<IndicatorCoded>Charge</IndicatorCoded>
<MethodOfHandlingCoded>Other</MethodOfHandlingCoded>
- <TypeOfAllowanceOrCharge>
- <MonetaryValue>
<MonetaryAmount>0.12</MonetaryAmount>
</MonetaryValue>
</TypeOfAllowanceOrCharge>
</AllowOrCharge>
</ListOfAllowOrCharge>
</ItemAllowancesOrCharges>
- <InvoiceCurrencyTotalValue>
- <MonetaryValue>
<MonetaryAmount>42.72</MonetaryAmount>
</MonetaryValue>
</InvoiceCurrencyTotalValue>
</InvoicePricingDetail>
</InvoiceItemDetail>
TIA,
Bill