Log 2073
21/09/2023 2023-09-21 10:44Here is the PHP formula that calculates the total amount minus the discount percentage:
$total = 1000; // Example total amount
$discountPercentage = 20; // Example discount percentage
$result = $total * (1 – ($discountPercentage / 100));
return $result;
This formula calculates the discounted amount by subtracting the discount percentage from 100% and then multiplying it by the total amount. The result is stored in the `$result` variable and then returned.