formula for discount
29,789
Solution 1
selling price = actual price - (actual price * (discount / 100))
So for example if (actual price) = $15, (discount) = 5%
selling price = 15 - (15 * (5 / 100)) = $14.25
Solution 2
Like Literally you can copy paste this formula:
$total = $total - ($total * ($discount_amount/100));
Comments
-
Bharanikumar over 3 years
What is the formula for discount,
in php is there any default function ,
this is my formula, chk it is correct way ,
$SELLING_PRICE = $ACTUAL_PRICE-$CHK_DISCOUNT_THERE; $PRICE_AFTER_DISCOUNT = $ACTUAL_PRICE-$SELLING_PRICE;
-
Bharanikumar over 13 yearsi think formula should be $PRICE_AFTER_DISCOUNT = $ACTUAL_PRICE - ($ACTUAL_PRICE * ($CHK_DISCOUNT_THERE / 100));
-
Kyle Hudson over 13 yearsselling price = 15 - (15 * (5 / 100)) = $14.25