commerce
commerce copied to clipboard
[4.7] Fix Paid Status
Description
This fixes the paid status issue by sometimes being overpaid or partially paid by converting the floats to ints, then doing the comparisons or arithmetic, altogether avoiding any float issues.
We just imported several hundred thousand orders from a legacy system into a new Commerce build, and this issue in #1836 was one of the issues we encountered while auditing the data migration. This solution resolves the issues in our sample size.
We were running 4.4.1.1.
Related issues
https://github.com/craftcms/commerce/issues/1836
First Attempt: https://github.com/craftcms/commerce/pull/1837