fix discount , using floor method, change version to 0.0.30
This commit is contained in:
parent
7b4fe04229
commit
e9bdcb715d
@ -1,3 +1,5 @@
|
||||
-0.0.30
|
||||
- fix discount to integer ( using floor )
|
||||
-0.0.29
|
||||
- change daily listings to use paid_by instead id_user
|
||||
- add customer cart details
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -527,6 +527,7 @@ function ProductSell(o){
|
||||
|
||||
if ( discount ){
|
||||
result = price * ( discount.value / 100 );
|
||||
result = Math.floor( result );
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user