mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-02 14:24:27 -04:00
The round_number() method signature declares $amount as string, but the HALF_FIVE case and other rounding operations pass string values to round() and other arithmetic operations which expect numeric types. This causes type errors when strict type checking is enabled. Fix by casting $amount to float before arithmetic operations in both migration files: - 20170502221506_sales_tax_data.php (line 268) - 20200202000000_taxamount.php (line 244) Also cast sale_tax_amount to float in round_sales_taxes() method before passing to round() operations (lines 381 in sales_tax_data.php and 358 in taxamount.php). Fixes #4324