˸A
Most of e-commerce platforms need to deal with the order management: creating invoices, cancelations, refunds. In every sales document we need the right amounts: shipping, total, price for each item.
Many implementations have rounding issues on calculations and do not give flexibility to cancel promotions.
By introducing the Order model this library covers business cases with promotions cancelation in sales documents.
https://community.shopify.com/c/Shopify-Design/Problem-with-rounding-prices/td-p/416162
https://magento.stackexchange.com/questions/225168/magento1-9-paypal-rounding-amount-issue
https://github.com/woocommerce/woocommerce/issues/14458