Rounding problems on Zoho Books API (JS)

101 Views Asked by At

I am currently working with ZohoBooks API with JavaScript, and I have some problems, when I try to add a bill with a post request.

line_items: [
   {
      account_id: '8057xxxxxxxxxxx',
      rate: 577.09,
      tax_id: '8057xxxxxxxxxxx'
   }
],
taxes: [ { tax_id: '8057xxxxxxxxxxx', tax_amount: 20 } ]

The total including tax is not equal to what I would like to have. I have an amount at 577.09 excluding tax and tax at 20%. I should get 692.50 in total including tax.

577.09*(20/100) = 115.418

577.09+115.418 = 692.508

I would like to round the result to 692.50 and not 692.51 as the tool does. Is there a way to specify on the bill POST, an amount including VAT directly when adding?

This is the result that I obtain. Example

0

There are 0 best solutions below