Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
SuiteQL odbc query summing consolidated amounts
I'm trying to sum amounts in two currencies.
This query works
SELECT -- 68,334
tr.ID AS ID,
TransactionAccountingLine.netamount,
TransactionAccountingLine.amount AS amount, -- for sum
BUILTIN.CURRENCY_CONVERT(transactionLine.foreignamount), -- for sum
TO_NUMBER(BUILTIN.CURRENCY_CONVERT(transactionLine.foreignamount)), -- for sum
--TO_BINARY_FLOAT(TO_NUMBER(CURRENCY_CONVERT(TransactionAccountingLine.amount))) as A_EUR, -- for sum
(TO_NUMBER(BUILTIN.CONSOLIDATE(TransactionAccountingLine.netamount, 'LEDGER', 'DEFAULT', 'DEFAULT', 1, 252, 'DEFAULT'))) as A_eur,
tr.trandisplayname AS trandisplayname,
tr.trandate AS trandate,
accountingPeriod.periodname,
accountingPeriod.enddate,
tr.TYPE AS transcation_type,
account.custrecord1400 as account_type_order,
account.accttype as account_type,