Problem with compound taxes in expense.create

43 views
Skip to first unread message

Kirill

unread,
May 6, 2012, 9:17:29 AM5/6/12
to FreshBooks API
Hello,

Either I'm doing something wrong or expense.create API has a bug with
recording taxes.

The doc says that I need to include tax?_name, tax?_percent, tax?
_amount. When I supply all this info, it looks like a *separate* tax
is created even if the supplied name matches one of taxes in my
account. You can easily see that in Tax Summary report - GST correctly
appears once, and QST appears twice. It looks like the separate tax is
created as non-compound, which causes another problem with editing the
expense - if I edit the expense by changing the first tax or the
amount, tax amounts are recalculated incorrectly.

So, is there something I can do to avoid separate tax after
expense.create?

If you ask me, I would think that only tax?_name should be required
and the server should calculate the amount. However, since I can edit
the amount via the web interface, I can see how tax?_amount is needed
in the request, but I would prefer the server to calculate it if it's
omitted from the request. As a least-breaking API change,
tax2_compound probably can be added, thus keeping Tax Summary clean.

If there was a previous discussion about the matter here or in
archived dev forum, I apologize for not finding it and would greatly
appreciate a link.

--
Kirill

Nox Dineen (FreshBooks)

unread,
May 10, 2012, 2:24:22 PM5/10/12
to freshbo...@googlegroups.com
Hi Kirill,

I think the solution for you would be to include the following in your invoice.create or expense.create calls: <compound_tax>1</compound_tax>

:)

Cheers,
Nox Dineen | FreshBooks

Kirill

unread,
May 10, 2012, 8:08:55 PM5/10/12
to n...@freshbooks.com, freshbo...@googlegroups.com
Nox,

"Two birds within one day" - perfect!

> I think the solution for you would be to include the following in your
> invoice.create or expense.create calls: <compound_tax>1</compound_tax>
That indeed makes editing the expense and the tax summary report to work.

I guess the next item on your TODO list is to update the API reference, right? ;)

Thank you very much for your help!

--
Kirill

> On Sunday, 6 May 2012 09:17:29 UTC-4, Kirill wrote:
> The doc says that I need to include tax?_name, tax?_percent,
> tax?_amount. When I supply all this info, it looks like a

Nox Dineen (FreshBooks)

unread,
May 17, 2012, 1:58:28 PM5/17/12
to freshbo...@googlegroups.com, n...@freshbooks.com
Hi Kirill,

Actually that option isn't technically public yet. When the product team okays some of the goodies we've been working on we'll make them public asap. (It just didn't seem fair not to tell you that the answer to your problem existed.)  ;)

Cheers,
Fresh Nox
Reply all
Reply to author
Forward
0 new messages