From ebb2fd6cff5687ed81c49097966292aa838b7918 Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Tue, 12 Nov 2024 23:26:15 +0100 Subject: [PATCH] Price must be an int, always. --- lib/MakeThemPay/Controller/Main.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }