Have encountered an annoying SuiteTalk problem: I...
# suitetalkapi
c
Have encountered an annoying SuiteTalk problem: In data returned by SuiteTalk for a transaction, the subsidiary is EUR, currency is EUR and exchangerate is 1, but the values for amount and rate on the lines are the GBP values, not the EUR values. Any ideas how to get it to return EUR values?
m
SOAP or SuiteQL?
c
SOAP
m
-
is your root subsidiary in GBP?
j
do you have multi-book?
c
One World
Here are three transactions: INVGB131195 Subsidiary: GBP Transaction: GBP main line exchangeRate: 1 item lines amount: GBP item lines rate: GBP item lines fxAmount: GBP INVGB111654 Subsidiary: GBP Transaction: EUR main line exchangeRate: 0.90559 item lines amount: GBP item lines rate: GBP item lines fxAmount: EUR INVIE000002 Subsidiary: EUR Transaction: EUR main line exchangeRate: 1 item lines amount: GBP item lines rate: GBP item lines fxAmount: EUR I would expect the last one, INVIE000002, to have item lines amount and rate in EUR, since that is the currency of the subsidiary. Or for its main line exchange rate to be the rate from EUR to GBP.
The parent and grandparent and greatgrandparent (root) subsidiaries are all GBP
m
yeah the SOAP API shows the
amount
field in the currency of the root subsidiary, which is maddening
c
So then would you agree with this: Currency names: Root subsidiary: CRO Transaction subsidiary: CSU Transaction: CTR Values: main line exchangeRate: exchange rate from CTR to CSU item lines amount: in CRO item lines rate: in CRO item lines fxAmount: in CTR ?
m
I would agree with everything there except
item lines rate
I'm not sure I know what you mean by
item lines rate
tbh
c
The rate field on transactions lines where mainLine == false
m
I haven't actually tested that. Do you have one of those transactions in your environment? If so, curious what the SOAP API returns. In general, this is my understanding of the transaction schema found here https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2019_2/schema/search/transactionsearchrowbasic.html?mode=package: 1.
amount
= root subsidiary currency amount 2.
fxAmount
= transaction currency amount 3.
exchangeRate
= the exchange rate to convert the
fxAmount
to the currency of the subsidiary the transaction took place in
c
Thank you - I agree with your 1,2,3
My problem is I need the rate in the transaction currency. If I divide fxAmount by the quantity then I often get a slightly different value to what is shown in the UI, due to rounding