Uploaded image for project: 'Prestashop 1.6'
  1. Prestashop 1.6
  2. PSCSX-9179

Exception when deleting voucher - total_discounts_tax_excl not valid

    Details

      Description

      REOPENING OF PSCSX-8780

      When you try to delete voucher from order in Back-office, you get Prestashop Exception about total_discounts_tax_excl not valid.

      I have 5% discount on whole order for all orders above 2000 CZK with tax, without shipping fee. I have 0 decimal places, 21% VAT, default rounding style and rounding of each line.

      If you try to delete this voucher in back-office, you get the exception nearly everytime. Only sometimes, when the calculation is "lucky", it doesn't happen.

      The problem happens in all OPC modules and in default cart. Happens in all payment modules.

      All the information and an example order is shown in screenshots.
      _________________

      There is some weird rounding, sometimes the resulting tax_excl value is higher that tax_incl, sometimes it is negative etc.

      $order_cart_rule->delete(); gets processed correctly and the voucher is gone

      $order->update(); is not and throws the exception, due to wrong values, so there is a discount left in the order.

        Attachments

        1. coupon 1.JPG
          coupon 1.JPG
          60 kB
        2. coupon 2.JPG
          coupon 2.JPG
          74 kB
        3. coupon 3.JPG
          coupon 3.JPG
          56 kB
        4. order1.png
          order1.png
          663 kB
        5. screenshot.jpg
          screenshot.jpg
          220 kB
        6. setup.JPG
          setup.JPG
          22 kB
        7. UPDATE - cart.JPG
          UPDATE - cart.JPG
          87 kB
        8. UPDATE - cartrule.JPG
          UPDATE - cartrule.JPG
          32 kB
        9. UPDATE - exception.jpg
          UPDATE - exception.jpg
          120 kB
        10. UPDATE - order1.JPG
          UPDATE - order1.JPG
          131 kB
        11. UPDATE - order2.JPG
          UPDATE - order2.JPG
          64 kB
        12. UPDATE - server.JPG
          UPDATE - server.JPG
          88 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Hlavtox Daniel Hlavacek
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: