Price must be an int, always.
This commit is contained in:
parent
449b074f53
commit
ebb2fd6cff
@ -48,7 +48,7 @@ sub _get_real_price($self) {
|
|||||||
die
|
die
|
||||||
"Bad price and/or discount format price: $price discount: $discount";
|
"Bad price and/or discount format price: $price discount: $discount";
|
||||||
}
|
}
|
||||||
my $discounted_price = $price - ( ( $price * $discount ) / 100 );
|
my $discounted_price = int($price - ( ( $price * $discount ) / 100 ));
|
||||||
if (!wantarray) {
|
if (!wantarray) {
|
||||||
return $discounted_price;
|
return $discounted_price;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user