If a client requests us to switch their currency on their account, that all previous invoicing remain in the old currency and new invoices will be shown in the new currency. From an accounting purpose, this is a huge issue with the archived information not matching what currency they paid in, and this should be retained for perpetuity.
It would also be helpful if the client could set on a product level, not on a client level, what currency they wish to pay in.
Merged Ideas
currency per invoice - add field to database determine the payment currency type
Hello,We have customers that they pay sometimes with eur, sometimes with usd. To set the currency to the invoice, not to the customer will be best update and will finish the currency problemsThank you
60 Comments
Login to post a comment.
That sort of could work, but couldn't you just create some sort of multi currency profile? So invoices can be in € or $, they don't change ever once paid because well that's the book keeping of the invoice paid on April 13th 2021 so if its paid in $ then that's that, but allowing the client to just opt for changing the invoice currency before paying it. Then in the summary page, it would show Account summary in each currency not just EUR?
You would basically be juggling the currencies making the profile MULTI CURRENCY instead of MULTI ACCOUNT?
You can even add something like instead of
Paid 1 ($141.91USD)
Draft 0 ($0.00USD)
Unpaid/Due 0 ($0.00USD)
Cancelled 0 ($0.00USD)
Refunded 0 ($0.00USD)
Collections 0 ($0.00USD)
Income
Gross Revenue $141.91USD
Client Expenses $6.54USD
Net Income $135.37USD
Credit Balance $0.00USD
You split this somehow, be it a popup with breakdown, this could be listing the USD as default because that is what the client opts for, but the moment the client decides on his invoice to "Change currency: USD => EUR" then this becomes maybe a detailed popup? with breakdown in each currency instead of just default currency, or some sort of tooltip popover Gross revenue: $141.91USD (hoverable for breakdown let say 90.50USD then rest is in EUR)
Im just spitballing here, but this way you would just change how the system keeps the books, but post paid invoice, they can never change that invoice currency, except hacking the database which well then it just defeats the system.
I have often thought how this could be achieved, for now we've blocked the Currency change dropdown in our profile to avoid our staff from accidentally messing the book keeping up.
Anyway just my two cents :)
To summarise:
1. We do not have a way to obtain exchange rates programatically for every currency
2. Exchange rates we can obtain programatically often differ from the official rates provided by countries and governments
3. There are technical challenges when it comes to:
i. Credit Balances
ii. Reporting
iii. Monetary promotions/discounts
iv. Affiliate system
In WHMCS 8.0, we introduced the Users and Client Accounts feature which allows one human user to have multiple Client Accounts associated to a single login. This should provide a viable workaround for the scenario of one user desiring multiple client profiles with different currencies. Is there any reason why this cannot work?
Thank you for the continued discussion.
That's could be an okay-ish workaround if you need another set of new services under a new currency, but this issue regards to "changing the currency for an existing set of services". In order to adhere to your proposal in this use case we would need to:
1- Create a new customer profile with the desired currency.
2- Grant the necessary rights for the profile to an user (which now has access to both the new and the old customer profiles).
3- Migrate the services from the old profile to the new (which might require cancelling and creating them, as they already have an invoicing history on the old currency).
Unless there's a way to do 3) properly while having a sane invoicing history I don't think that your current proposal solves the use case of "needing to change" the current currency.
As it is, if you happen to do so, all past invoices will be showing another currency without any kind of conversion, which is undesirable as it WILL bring problems when customers try to get copies of their invoices on a different currency.
I have a client who moved to New Zealand from the US and it's a nightmare trying to get all their past payments into WHMCS from PayPal accurately.
I'm really surprised to see this major invoicing issue being discussed as a "Feature request" since 5 years and some other low priority stuff with less voting get implemented... This problem should have been taken into consideration as soon as WHMCS provided multi currency support.
Let's start by the invoices alone, without thinking about currencies. Once invoices are sent to the client these are legal documents that should not change, especially after being paid. It means that even in 10 years, exporting the invoice should be exactly the same as today no matter what happened on the client configuration (here we only talk about currency but names and addresses should also be frozen). Changing them not only cause problem to us but to our clients as well. You need to edit a paid invoice? Cancel it and create a new one as it should normally be done.
First idea to have a quick workaround without even touching the currency implementation would be to have an option to freeze invoices. It solves the actual reported problem on the invoices side. Here is a quick and basic idea on how I would implement it.
Settings
- Add an option like "Freeze Paid Invoice", disabled by default.
UI
- Use the invoice currency instead of client currency for all invoices
- If option enabled and status = Paid, block editing the invoice (many possibilities: readonly fields, remove the "Save changes" button, etc.).
DB and coding
- Add a field "currency" to tblinvoices. This will contain the currency code and not the id! Reason: if you remove the currency, your invoice changes as currency is not found. [1] [2]
- CreateInvoice: currency_id = current client currency
- UpdateInvoice: if option enabled and status = 'Paid' = frozen invoice = do nothing (throw error?).
Just with this idea, you solve the biggest part of the problem raised by this feature request: invoice won't change in the future (and more as it might help from a legal/audit perspective too).
Same idea for the transactions: keep the currency the transaction was made with.
Now for the currency change, as I said it's something that should have been in mind as soon as the idea of allowing multiple currency at the same time was introduce. Some clients need to change their account currency. It's rare but it happens. Creating new accounts is another workaround but add complexity for the client (multiple accounts to check) and internal staff (more work).
Let's say the client want to switch from USD to EUR.
1. He has to contact us first (I would not advise automation because of potential abuse risks)
2. As someone already gave the idea, we have 2 choices when starting the currency change process:
- convert related orders/services/etc. pricing of this client with the current conversion rate
- keep the same value
3. If convert option is selected, convert everything to the new currency, including credits.
Everything before the switching date will keep the old currency reference. It means that refund for old invoices will be done with the old currency for example. New invoices/orders will be done
That's all for the main/basic idea. I know that it's easier said than done.
[1] This will trigger another problem with currencies: WHMCS allows everything as currency code when adding a currency. Currency code must be ISO 4217 compatible. It's simple to solve this as it "only" requires :
- remplace the text input by a select input with all available ISO 4217 currency codes
- OR let the text input but throw an error if the code is not a ISO 4217 valid one...
[2] I would even go further and adding client name/address and our company address too in the frozen data so invoice are 100% the same any time.
never designed or intended to be used for the purposes of changing an existing clients currency once they have billing and transaction activity
What WHMCS should do is make it so that IF account is empty, this is accessible from Profile view, if account has been used, invoice generated or service added, disable this.. Just make it no longer possible at least since you don't really convert everything in the account. That way people can't make the mistake thinking they can swap out currency since you obviously don't have that feature.
Thanks for explaining, while I do understand your perspective I think you perhaps need to have a dev meeting and consider a different approach and business needs over development complexity.
Your assumption that an exchange rate needs to be stored against every invoice and transaction is not right, you are allowed to attribute gains or losses against exchange rates within your returns as such all you actually need to do is have a table that stores the daily rates for each accepted currency which relativity speaking is tiny, it is 1 table that is updated daily and is available for reference.
Additionally, you are working on the basis that this is an all or nothing change, it is not, hostbill for example will store invoices and transactions in multiple currencies and has included the very basic feature exactly as I described above for years, example: https://imgur.com/a/RjGmCoG as does Blesta and client exec, only WHMCS lacks this feature, all bias for your own product asside, you need to ask yourself why this is, consider the possibility you may be locked in an echo chamber.
Having a bang up to date currency is not a big issue accounting wise.
I hope this provides some further insight and I think you as the dev team need to sit in a meeting with someone from your accountancy department and understand that you are way over thinking it from a code perspective.
This is a bug, not a feature, it needs to be fixed.
As for Blesta they designed it to be that way from day one. If you design the whole core in a software to take into account how it process currencies, invoices, etc, its very different. WHMCS would require a whole software rewrite in order to do that. Its very complex indeed, but there are work arounds that don't require messing with WHMCS accounting features.
It would not require a whole rewrite, because the FACT is that when required I CAN do this manually, on a case by case basis, there fore it is capable, the only thing I bring in to the mix is a reference exchange rate base from the day which is publicly available in about 200 places and already pulled daily in to WHMCS anyway, it needs a table, that is it.
While updating the currency on the account would be the ideal solution, I know from real world experiences (inside and outside of hosting) that a currency generally is hard coded and cannot be changed, and if an error was made when signing up that another account needs to be created. What this then runs in to an issue of course is that because an email address needs to be unique for each account and then this feature request bumps in to this one:
https://requests.whmcs.com/topic/multiple-billing-accounts-using-one-login
So IF WHMCS has no plans to implement this beyond marking it for future consideration when it sounds likely they have no desire to move this forward, the following needs to be addressed:
When there is zero indication or warning that changing this currency will result in further issues, it is VERY easy to see someone may think that this is not going to cause further issues.