Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    309
    Plugin Contributions
    6

    Default Discounts formats on invoice and when stored in orders_total

    Zc157 and zc158, PHP7.4 to 8.2
    I use Group Discounts, Coupons and Payment module Fee all of which show on the invoice as Negative amounts and are correctly deducted when calculating the invoice total.
    When the values are written to the orders_total table the
    ot_paymentmodulefee is correct [text=$-0.88; value=-0.8760]

    ot_coupon is incorrect [ text=-$10.00; value=10.0000]
    ot_group_pricing is incorrect [text=-$0.88; value=0.8800]

    The invoice displayed on checkout is correct and the invoice displayed in the admin is correctly displayed but in admin the details screen does not show the negative for Group Discount or Discount Coupon.

    and in details the dreaded one cent rounding rears its ugly head again.

    This has bugged me for a long time but I'm updating export orders plugin to correctly sum up discounts so thought that it should be posted here.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  2. #2
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    309
    Plugin Contributions
    6

    Default Re: Discounts formats on invoice and when stored in orders_total

    To update my previous post in case anyone reads this.
    Examining the contents of the orders_total table reveals a lot of inconsistencies with discounts and in the 15 years of data it holds

    To report correctly on discounts in export orders I will copy the logic from Sales Report II.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

 

 

Similar Threads

  1. Disable coupons and group discounts when quantity discount applied?
    By abcisme in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 12 Nov 2015, 12:31 PM
  2. v138a Discount coupon applied but not stored in orders_total table
    By rajoo.sharma in forum General Questions
    Replies: 0
    Last Post: 26 Sep 2013, 07:08 AM
  3. Replies: 16
    Last Post: 30 Jun 2011, 07:53 PM
  4. Replies: 2
    Last Post: 14 Nov 2009, 02:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR