Tax Rates for Individual Transaction Lines - There...
# suiteql
d
Tax Rates for Individual Transaction Lines - There's obviously the overall tax calculation line where taxline='T' but I am wondering how to find per-line rates, since a bill may be a mixture of rates. I looked in various tables with SuiteQL but couldn't spot it, but it shows it on the GUI form so it is there somewhere. Perhaps it's not exposed but if it is, I am wondering which table.field it could be (either the rate or equivalent e.g. value*rate)? Many thanks (sitting here in Cumbria, soothing music playing...)
m
Probably depends on your tax provider. We use Avalara and we can find the line-level tax amount in the custom field
custcol_ava_taxamount
on the
transactionline
table. This field is populated by Avalara scripts.
d
Thanks. Custom fields tend to show with select * table but there's nothing with a value representing what I would expect. Perhaps it is stored in a custom table that needs to be joined in, which would presumably be clumsy if so...
I had no luck finding it. I presume what I'll have to do is where there's just one tax summary line use that for all item lines, and on the odd occasion there are 2, look at all the permutations of applying the codes to the lines to reach the target tax total, bearing in mind the need to optimise the calculation in case there are more than a few items. There would generally only be one permutation that results in the right number, but at least it would resolve most of the cases.