XML conversion problem

  • Hello All - I am newer creating XML and this is a For XML Path. When I do a specific query outside of the xml creation I get the number I am looking for which is the column called SellAmount. So the math would basically be like this.

    350 * 0.6382

    SellAmount

    223.37

    but when I run it in the xml it has a messed up conversion. Does anyone have anythoughts on this.

    <CostingItem ID="2" Description="Port Charges" UnitQuantity="2" VendorCurrencyCode="GBP" CustomerPaysVendorDirectFlag="false" CustomerPaysVendorLocallyFlag="false" NetAmountChangeReasonCode="ZZZ" CalcMarginAsMarkupNotCommissionFlag="false" CostingType="Base Fare" PERuleAppliedFlag="true" PEProcessedFlag="true" PointsValue="0" PointsCashEquivalentamount="0.00">

    <Sell TotalAmount="2.233700000000000e+002" AmountsInVendorCurrencyFlag="false" />

    <Net TotalAmount="2.233700000000000e+002" />

    </CostingItem>

    CASE WHEN SUM(cb.currencyrecnocruiseline) = 1 THEN CONVERT(MONEY,SUM(trans.portcharges)) * (SELECT convrate FROM content..currency_rates WHERE currencyrecno = 2 AND enddate = '2099-01-01 00:00:00.000')

    ELSE ROUND(RTRIM(SUM(trans.portcharges)),2) END AS "CostingItem/Sell/@TotalAmount",

  • I surrounded my whole Case statement with a Money convert and it resolved my issue.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply