Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency conversion #16

Open
MYABOTHET opened this issue Nov 27, 2024 · 0 comments
Open

Currency conversion #16

MYABOTHET opened this issue Nov 27, 2024 · 0 comments

Comments

@MYABOTHET
Copy link

MYABOTHET commented Nov 27, 2024

image

At the end of the "convertToUSD" and "convertToInvoiceCurrency" method I fixed the code in the image so that any currency other than dollar will be converted to dollars and it won't throw an error, I think it will be useful for the official installation.

$currencyRate = Capsule::table("tblcurrencies")->where("code", $currency)->value("rate"); return round($amount / $currencyRate, 2);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant