1 Reply Latest reply on Mar 24, 2016 5:13 PM by Mike_Mitchell

    Add Discount

    tokuyama

      Hi, could somebody help me with the discount calculation?

       

       

      I would like to give the discount of 10% off, and 20% off to the credit card transactions.

      The function below works for cash transactions because there is no sales tax 4.5 % added.

      I would like to add the sales tax 4.5 % after the discount.

       

      Here is what I would like to do.

       

      Service $100.00

                   X Discount 10% ($10.00)

                   = $90.00

                   X 1.045

                   = $94.05

       

      Please kindly help me.

      Thank you very much.

       

      If (Payment = "Cash"; Service total -

         Case (

            Promotion="10%"; Round (Service total * .1 ; 0) ;

            Promotion="20%"; Round (Service total * .2 ; 0) ;

            0

         ) + Product Total

      )

        • 1. Re: Add Discount
          Mike_Mitchell

          Try this:

           

          Let ( [

          promotionNumeric = 1 - GetAsNumber ( Promotion ) / 100 ;   // where Promotion = (for example) "10%"

          salesTaxNumeric = 1 + GetAsNumber ( SalesTax ) / 100  // where SalesTax = (for example) "4.5%"

          ] ;

           

          Service * promotionNumeric * salesTaxNumeric

           

          )