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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...