% Surcharge includes tax

WPPizza – A Restaurant Plugin for WordPress Support Add-Ons Gateways Stripe % Surcharge includes tax

Viewing 20 posts - 1 through 20 (of 21 total)
  • Author
    Posts
  • #28182
    srw9660
    Participant

      It has come to my attention the % surcharge includes tax in it’s calculation, is there a way to remove tax from the figure?

      #28190
      Olly
      Admin & Mod

        just lower the handling charge accordingly taken the tax rate you set into account i would have thought

        example, if your tax is 10% and you want to have 2% handling charge but without applying it to the tax, set the handling charge to 1.81818%

        i.e (2/110)+(2-10%)

        #28211
        srw9660
        Participant

          Should it not be (2/110) MINUS (2-10%)? I get 1.92 if I do the equation with adding the two ()… So for my case it’s 15% surcharge with 6% sales tax, (15/106)-(15-.06)= 14.8% or if I add I get 15.08%

          I just want to be super clear, cause accounting will murder us, and I have no head for math! Thank you!

          #28221
          Olly
          Admin & Mod

            > I get 1.92 if I do the equation with adding the two

            then you need to buy yourself a new calculator
            2/110 = 0.018181818…
            2-10% = 1.8

            which clearly sums up to 1.81818….

            #28222
            srw9660
            Participant

              got it, thanks!

              #28223
              Olly
              Admin & Mod

                strangely, that calculation – with your numbers (6% / 15%) is not accurate
                it returns 14.241509433…
                when it should be 14.150943 (you’ll still get some rounding errors if a sale is over 1,000,000 but i’m sure that’s good enough for this excercise)

                just enter this (i.e 14.150943) into the surcharges percentage field while i figure out why this is different (kind of for my own entertainment and future reference)

                #28224
                srw9660
                Participant

                  Awesome, thanks Olly!

                  #28225
                  Olly
                  Admin & Mod

                    ok, calculation should actually be like this (just so happens that using 2% and 10% in my initial example produces the same result …..lol)

                    x = vat/sales tax
                    y = handling charge
                    calculation should be

                    y – (y/10x*x)

                    so – in your case:
                    15 – (15/106*6) = 14.1509433…

                    #28226
                    Olly
                    Admin & Mod
                      This reply has been marked as private.
                      #28227
                      Olly
                      Admin & Mod

                        PS: in case someone else reads this.
                        percentages should be entered with either upto 2 or 4 (or more) decimals otherwise you will end up with a number in the thousands (i.e 14.123% would be saved as 14123%) that’s because of formatting sanitisation and the fact that there are actually some currencies that use 3 decimals (for reasons i do not know)

                        #28230
                        srw9660
                        Participant
                          This reply has been marked as private.
                          #28231
                          Olly
                          Admin & Mod
                            This reply has been marked as private.
                            #28232
                            srw9660
                            Participant
                              This reply has been marked as private.
                              #28234
                              Olly
                              Admin & Mod
                                This reply has been marked as private.
                                #28235
                                Olly
                                Admin & Mod
                                  This reply has been marked as private.
                                  #28236
                                  Olly
                                  Admin & Mod
                                    This reply has been marked as private.
                                    #28237
                                    srw9660
                                    Participant
                                      This reply has been marked as private.
                                      #28238
                                      Olly
                                      Admin & Mod
                                        This reply has been marked as private.
                                        #28239
                                        srw9660
                                        Participant
                                          This reply has been marked as private.
                                          #28240
                                          Olly
                                          Admin & Mod
                                            This reply has been marked as private.
                                          Viewing 20 posts - 1 through 20 (of 21 total)
                                          • The topic ‘% Surcharge includes tax’ is closed to new replies.