For some reason this invoice shows quantity of 500...
# suitescript
n
For some reason this invoice shows quantity of 500 and rate of 5.94 which equals 2970. But when you query the lines and return rate and quantity you get 0.495 and quantity 6000 which also equals 2970. Why is that and how do I get the rate and quantity shown on the invoice lines.
c
query returns those values in base units, not transaction units. You will need to convert to the transaction units using the conversionrate from unitstypeuom
Are those ordered in 12-packs / dozens?
n
@Clay Roper ahhh yes dozens. So, 6000 divided by 12 = 500 which is good but not sure how to handle figuring out the rate
c
The rate also differs by factor of 12 -- when you divide one, you multiply the other to offset it. Try dividing your quantity by
conversionrate
and multiply your rate by the same.
n
How do I get the conversionrate. Cause im getting this
c
It's on
unitstypeuom
- the id of the units from your transaction is the internalid referenced on that table. You can find it under "uom" in the Units Type Records Catalog entry.
n
@Clay Roper BINGO! Thanks so much
🎉 1
c
You're welcome!