skip to Main Content

Laravel reduce amount of decimal places

I have an API endpoint that points to /api/invoices and it returns a list of invoices. Some invoices return something like this: { "id": 2555, "entity_id": 88, "net_total": 7.5, "total_vat": 1.725000000000000088817841970012523233890533447265625, "grand_total": 9.2249999999999996447286321199499070644378662109375, } As you can see, there's too…

VIEW QUESTION
Back To Top
Search