Martooti
Member
Hi,
I want to make an currency exchange calc inside the list. Exchange rates change monthly.
I have one table with `Date` (yyyy-mm-dd) , `Dolar`, and `Dolar_Equivalent` (in Egyptian Pound)
and another table with `Month` (dropdown: 1,2,3.., 12) , `Year`(dropdown : 2015, 2016,...), `Exchange_rate`
Dolar_Equivalent I wish to be a calc that multiply `Dolar` by `Exchange_rate` when `Date` from first table equals `Month` and `Year` from the second table.
I tried to use:
"return (int)'{ rt_cars_accounting___dolar}' * '{rt_exchange___dolar_equivalent}' WHERE 'substr( {rt_cars_accounting___date}, 5, 2 )'= '{rt_exchange___month}' AND 'substr( {rt_cars_accounting___date}, 0, 4 )' = '{rt_exchange___year}' ;" but I am getting an error.
Any advice?
Thanks in advance
I want to make an currency exchange calc inside the list. Exchange rates change monthly.
I have one table with `Date` (yyyy-mm-dd) , `Dolar`, and `Dolar_Equivalent` (in Egyptian Pound)
and another table with `Month` (dropdown: 1,2,3.., 12) , `Year`(dropdown : 2015, 2016,...), `Exchange_rate`
Dolar_Equivalent I wish to be a calc that multiply `Dolar` by `Exchange_rate` when `Date` from first table equals `Month` and `Year` from the second table.
I tried to use:
"return (int)'{ rt_cars_accounting___dolar}' * '{rt_exchange___dolar_equivalent}' WHERE 'substr( {rt_cars_accounting___date}, 5, 2 )'= '{rt_exchange___month}' AND 'substr( {rt_cars_accounting___date}, 0, 4 )' = '{rt_exchange___year}' ;" but I am getting an error.
Any advice?
Thanks in advance