T
The alMIGHTY N
<store>
<frequent_shopper_discount value="5"/>
<premium_member_discount value="10"/>
<inventory>
<item>
<msrp value="3.99"/>
</item>
<item>
<msrp value="2.78"/>
</item>
<item>
<msrp value="16.24"/>
</item>
<item>
<msrp value="9.66"/>
</item>
<item>
<msrp value="4.53"/>
</item>
</inventory>
</store>
Is there a straightforward way to calculate the sum of these item's
MSRP values rounded at the item level? By this I mean to apply the 15%
discount on each of the individual MSRPs before summing them?
Right now, my report is outputting a row for each of the individual
items in the inventory. I do this in a template that matches the store
element by iterating through inventory/item and applying the round
function as follows:
round(msrp/@value * 100 * (1 -
(number(../../frequent_shopper_discount/@value) div 100)) * (1 -
(number(../../premium_member_discount/@value) div 100)))
I'm looking for a straightforward way to do this without having to
change the XML structure because any changes would require the Java
development staff to invest time that they do not have right now.
Thanks in advance for any help you can give.
Regards,
Nathaniel
<frequent_shopper_discount value="5"/>
<premium_member_discount value="10"/>
<inventory>
<item>
<msrp value="3.99"/>
</item>
<item>
<msrp value="2.78"/>
</item>
<item>
<msrp value="16.24"/>
</item>
<item>
<msrp value="9.66"/>
</item>
<item>
<msrp value="4.53"/>
</item>
</inventory>
</store>
Is there a straightforward way to calculate the sum of these item's
MSRP values rounded at the item level? By this I mean to apply the 15%
discount on each of the individual MSRPs before summing them?
Right now, my report is outputting a row for each of the individual
items in the inventory. I do this in a template that matches the store
element by iterating through inventory/item and applying the round
function as follows:
round(msrp/@value * 100 * (1 -
(number(../../frequent_shopper_discount/@value) div 100)) * (1 -
(number(../../premium_member_discount/@value) div 100)))
I'm looking for a straightforward way to do this without having to
change the XML structure because any changes would require the Java
development staff to invest time that they do not have right now.
Thanks in advance for any help you can give.
Regards,
Nathaniel