Change to Line Item calculation -
Submitted by Ben_Charlton on Thu, 21/08/2014 - 17:15
Line items are currently calculated by a derived value of
math:roundAmount(/fixedAmount - /details/discount + /quantity * /unitAmount)"
would it not be more appropriate to use:
math:roundAmount(number(boolean(/quantity))*/fixedAmount - /details/discount + /quantity * /unitAmount)
my xpath makes any value greater than 0 return a 1 for
number(boolean(/quantity))
and a 0 if it is 0.
effectively this means that the fixed price is 0 if the qty is 0 rather than the current which sets the fixed price despite qty being 0.
Of course - I am not sure - but archetype changes like this might affect past finalized transactions - if it recalculates the value on the fly so perhaps it cant be changed.
Ben
Re: Change to Line Item calculation -
Sorry that is incorrect...
it would be
Re: Change to Line Item calculation -
Can you stick this in a JIRA please?
Thanks,
-Tim
Re: Change to Line Item calculation -
https://openvpms.atlassian.net/browse/OVPMS-1521