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
Bookmarks