Merge 42772d46452a

This commit is contained in:
Heng Sin Low 2013-07-04 17:28:06 +08:00
commit c7c0f5f8bb
1 changed files with 2 additions and 2 deletions

View File

@ -1482,9 +1482,9 @@ public class MCost extends X_M_Cost
public void setWeightedAverage (BigDecimal amt, BigDecimal qty)
{
//amount must follow the sign of qty
if (amt.signum() != 0 && amt.signum() != qty.signum())
if (amt.signum() != 0 && qty.signum() != 0 && amt.signum() != qty.signum())
{
amt = amt.multiply(BigDecimal.valueOf(-1.00d));
amt = amt.negate();
}
if (getCurrentQty().add(qty).signum() < 0)