Announcement

Collapse
No announcement yet.

Discounts rounding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Discounts rounding

    Hi All

    I am a new user to Actinic forum so my appologies if this has been answered before (I did try searching)

    We are a charity and have just setup our actinic online shop http://shop.ncma.org.uk and have discounts for 5%. However when the discount is applied it does not perform as expected. At first I suspected this was a vat issue but after turning VAT off completly the problem remained. This is what I would expect:

    5% of 9.50= 0.475
    9.50-0.475 = 9.025
    Then round to 9.03

    Instead actinic seems to do:

    5% of 9.50 = 0.475
    round to 0.48
    9.50 - 0.48 = 9.02

    I know this doesn't seem like a big issue for 1p but it puts out all of our data entry. Intially I looked at "ActinicDiscounts.pm" file to see if I could alter the way discounts were applied but have had no luck.

    Any help with this would be great.


    Many Thanks
    Martin

    #2
    I think your thinking is wrong Martin, i realise we are only talking about half on one pence, but you are effectively overcharging and thus not giving them at least what you say you are.

    Your customers should always as a bare minimum get what you have told them they will, which (IMO) means Actinic is doing it correctly and you are thinking from a 'you' point of view, where you perhaps should focus on the 'shopper'.

    If you say you will give them a 5% discount, then if 5% does not compute to whole penny, make sure they get for example 5.05%, not 4.95% as you suggest.

    Comment


      #3
      Actinic works to units of 1p so a 5% discount would be 48p as in your 2nd example above.

      As a customer I'd also expect the 47.5p discount to be rounded up to 48p so I'd say Actinic is working correctly.

      Mike
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #4
        Hi Mike

        Thanks for your reply. I agree that actinic is working correctly (as a customer that is what I would expect) in rounding up the discount. However our crm does it diffrenlty (in that it applies the discount to each product) and that cannot be changed. An example being is that we can change it to round the discount up but it applies it to each product.

        9.50 - 48p (5% of 9.50) = 9.02
        9.50 - 48p (5% of 9.50) = 9.02

        total 18.04

        Actinic however applies to the entire order

        19-5% = 18.05

        Again any help or advise in getting actinic to replicate this would be really helpful. (Changing over to actinic from that used to do it in the old way this is the onl
        y problem for our data entry team)

        Comment


          #5
          I hope i am proved wrong for your sake, but i do not think you will manage that, if you do it will be via a Perl expert who will alter scripts and you will need to redo those changes after each upgrade.

          Comment


            #6
            Hi Martin,

            I agree that the 5% discount should probably be applied per product to give a fixed product price rather than per order line which it sounds like it's doing.

            With tax you can define at which level to apply but I don't think this can be done for discounts.

            As Lee says, you could change the perl scripts that do the calculations to get them to apply the discount for a single product and then multiply by the number of products to get the total price.

            It's probably not a major change but would need to be done by someone who knows what they're doing.

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #7
              Rounding discounts: Fix

              Hi All

              I finally found a fix that works in our case so I thought I would post it (in the event someone has a similar situation). We did however decide that a change we applied to our CRM fixed it in 80-90% of cases so we opted to just use that for a month and see where we were.

              If you need to stop rounding taking place on discounts then in ActinicDiscounts.pm you need to change


              Code:
              my $nRound = ($nAdjustment < 0) ? -0.5 : 0.5;
              $nAdjustment = int($nAdjustment + $nRound);
              to

              Code:
              $nAdjustment = int($nAdjustment);
              (commenting out both lines should also work)

              We tested this with about 25 transaction with good results but I cant guarantee it.

              Many Thanks for your posts, its nice to see such an active community using Actinic.

              Martin

              Comment

              Working...
              X