Issue #24111:fix markup pricing and margins with uom conversion

Are you saying that (A / B * C) and (A / (B * C)) have different results?

Gary Hartnett
Senior Developer @xTuple
+1-757-461-3022 x115
gary@xTuple.com
Master your supply chain with xTuple.com – World’s #1 open source ERP
Manufacturing – Distribution – eCommerce


On Jul 15, 2014, at 9:50 AM, Gil Moskowitz <notifications@github.com> wrote:

> In guiclient/salesOrderItem.cpp:
> 
> > @@ -2401,7 +2369,7 @@ void salesOrderItem::sCalculateDiscountPrcnt()
> >      _baseUnitPrice->setLocalValue(_netUnitPrice->localValue() - charTotal);
> >    }
> >  
> > -  _margin->setLocalValue((_netUnitPrice->localValue() - _unitCost->localValue()) * _qtyOrdered->toDouble() * _qtyinvuomratio / _priceinvuomratio);
> > +  _margin->setLocalValue((_netUnitPrice->localValue() - _unitCost->localValue()) * _qtyOrdered->toDouble() / _priceinvuomratio * _qtyinvuomratio);
> Is _qtyinvuomratio supposed to be in the numerator or denominator of the _margin calculation? If the denominator, please add parens to clarify. Same with line 3899 below, which also sets _margin.
> 
> —
> Reply to this email directly or view it on GitHub.
>