Jump to content

Recommended Posts

Posted

i have a code that i can convert a currency to another currency , now i want to get the exchange rate

$amount = $this->Currencies->convert($amount, $from_currency, $to_currency, $company_id) ;

now i want to get the exchange rate for this conversion ? is possible from the model it self ?

 

 

          
 

Posted

You want Currencies::get()

 

Note that the exchange_rate is based off of your default currency. So if you want the rate of conversion between two currencies and neither is the default currency, you'll need to pull all 3 currencies and calculate the difference.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...