laravel-square
laravel-square copied to clipboard
Fixes calculation issues when applying taxes with discounts
Tax Calculation Fixes
When discounts are added to individual items or entire orders, it does not match the value that Square expects in order to create a transaction via their APIs. This updates the calculation so that taxes are properly calculated, taking into account both additive and inclusive taxes, applying the discount before the taxes.
It also fixes a bug where the OrderBuilder
was not properly passing in the tax scope when creating the taxes collection.