fix discount , using floor method, change version to 0.0.30
This commit is contained in:
@@ -4,7 +4,7 @@ return [
|
||||
'supportEmail' => 'rocho02@gmail.com',
|
||||
'infoEmail' => 'info@rocho-net.hu',
|
||||
'user.passwordResetTokenExpire' => 3600,
|
||||
'version' => 'v0.0.29',
|
||||
'version' => 'v0.0.30',
|
||||
'company' => 'movar',//gyor
|
||||
'company_name' => "Freimann Kft.",
|
||||
'product_visiblity' => 'account',// on reception which products to display. account or global
|
||||
|
||||
@@ -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