diff --git a/lib/MakeThemPay/Controller/Main.pm b/lib/MakeThemPay/Controller/Main.pm index 60cbb88..70a6370 100644 --- a/lib/MakeThemPay/Controller/Main.pm +++ b/lib/MakeThemPay/Controller/Main.pm @@ -48,7 +48,7 @@ sub _get_real_price($self) { die "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) { return $discounted_price; }