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));
Share:
29,789
Bharanikumar
Author by

Bharanikumar

technical link click pannu pa Try pannunga

Updated on October 30, 2020

Comments

  • Bharanikumar
    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
    Bharanikumar over 13 years
    i think formula should be $PRICE_AFTER_DISCOUNT = $ACTUAL_PRICE - ($ACTUAL_PRICE * ($CHK_DISCOUNT_THERE / 100));
  • Kyle Hudson
    Kyle Hudson over 13 years
    selling price = 15 - (15 * (5 / 100)) = $14.25