fix discount , using floor method, change version to 0.0.30
This commit is contained in:
@@ -114,7 +114,7 @@ class Discount extends \yii\db\ActiveRecord
|
||||
* */
|
||||
public static function applyDiscount($money,$discount){
|
||||
$result = $money;
|
||||
$valueOfDiscount = $money * $discount->value / 100;
|
||||
$valueOfDiscount = floor( $money * $discount->value / 100 );
|
||||
$result = $money - $valueOfDiscount;
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user