Price must be an int, always.

This commit is contained in:
Sergiotarxz 2024-11-12 23:26:15 +01:00
parent 449b074f53
commit ebb2fd6cff

View File

@ -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;
} }