Fix OPL formula in discount calculation #96

This commit is contained in:
Kendrick Chan 2018-04-19 11:00:33 +08:00
parent 7b577ccb43
commit 757ec209ad

View file

@ -166,7 +166,8 @@ class InvoiceCreator
$discount = round($total['sell_price'] * $rate, 2);
break;
case DiscountApply::OPL:
$discount = round($total['sell_price'] * 0.6 / 0.7 * $rate, 2);
// $discount = round($total['sell_price'] * 0.6 / 0.7 * $rate, 2);
$discount = round($total['sell_price'] * (1 - 1.5 / 0.7 * $rate), 2);
break;
}