How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Updating Client Currency on Account - Invoicing Retained with Old Currency.

  • PretecsChris shared this idea 11 years ago
  • Admin Area
  • 41 Comments


165 Votes
Login to Vote
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.

To understand why this has not been implemented, it is important to consider the full ramifications of such a change to the product.
To start with, the request title fails to encompass all of what it would take to provide the level of functionality that is being requested by many here in this thread.
A clients currency in WHMCS affects far more than just invoices. To implement this feature, the currency would not only need to be stored against every invoice, but also every order, service, addon, domain, invoice and transaction. That introduces a level of complexity many times greater than exists today, both for product design and UI/UX and considerations would have to be made both at a product design and UI level for how to deal with a single client with items in 1, 2 or any number of additional currencies. It would affect how we deal with credit, no longer can you have a single credit balance, it would affect anywhere we display income totals for a client, it would affect how we display outstanding invoice due balances within the client area, it would even affect how we generate invoices, no longer being able to combine items due by the same customer on the same date because currency also needs to be taken into account, billing reports would need to be rewritten, and this is just the start of areas it affects.
To those suggesting that amounts be converted dynamically using the latest exchange rates, the challenge is that we are not always guaranteed to have an up-to-date exchange rate for every currency defined in a WHMCS system - we are restricted both by the currencies that are supported by the exchange rate feeds we support, and admins choosing to disable automatic currency rate updating, along with admins who simply aren't happy with the rates provided by the feeds we support. All of these these make dynamic currency conversion both for display purposes and "on change" of currency far from reliable.
The ability for an admin user to change currency via the clients profile was never designed or intended to be used for the purposes of changing an existing clients currency once they have billing and transaction activity and to change it to work in the way being discussed here would be a significant body of work to undertake. That work would include fundamental backwards breaking changes to design, workflows and APIs which in itself restricts when such a change can be made, as well as affecting almost all areas of the product that deal with billing. That work would take a significant amount of resources and time, and delivering that would mean taking those resources and time away from other features which have more votes and have been demonstrated to have higher demand.
We hope this provides a level of insight into the factors and considerations that affect the decision making for a feature request such as this, and helps to convey the challenges of such a request, both from a technical but also a product design and planning level.
Because WHMCS never was designed from the core to be multi-currency. This is why such a simple change would break everything. We are not asking this either, eventually, you do have to change some things slowly, like the credit system which also makes very fuzzy things when it comes to accounting. But since nobody is asking a complete core rewrite you can still come up with other creative solutions to at least somehow bring this more into the year 2018. Part of being a developer is being creative when it comes to solutions.

Why not do it in the following way?

Since all transactions are related to the currency globally in the account and WHMCS but WHMCS has no problems offering different currencies to different customers (problem seems to be when trying to convert one to another), a currency change could imply a completely different account. Well, do so then.
Changing currency is not something would usually do unless they move out to another country, that includes companies so that most customer would be ok with a hard change into their balances.

Example:

JOE wants to switch from USD to Euro. Instead of asking JOE to create a new account and then manually transferring all his product there, WHMCS could do this from the admin side in a more nicer and transparent way.

User requests currency exchange from this account. The customer is warned about what this involved (warning, disclaimers, etc.).

This is then approved by the admin manually or can be left to be automatically. Most likely manually to avoid messing up things or users abusing the system changing back and forth a currency.
Most likely this involves a 1 change only and the customer is warned he can't go back, just like merging an account can't be reverted either.

Internally, WHMCS could duplicate the existing account to a new one.

Example, the account USD is ID 446. This has all the tickets, products, invoices, credits, transactions, etc. Basically it's the customers account with all the data that involves and related SQL tables.

When a currency exchange is done. WHMCS creates a new account and duplicates all the data to a new account ID 447.

All data, except everything related to the tables that can cause a problem. So it does not transfer any invoice, transactions, etc.

Billing related data is left in the account ID 446. You internally close the account and mark a balance cut, recording the date of the change.

Credits from account 446 are asked on the admin side to input the currency exchange rate to transfer them to account 447. Once done, you mark negative transactions for the credits on account 446 so they are at 0. The new account 447 now has the credits converted with Euros. This are new credits anyway.

This new account 447 also has 0 transactions and invoices. All invoices and purchases from this point are now done in account 447 in Euros. They will not mess anything because they are all new.

The product pricing is not rocket science since they will bill with the new currency from now on on the new account.

Now, here comes the trick that developers have to implement. When the customer goes to his transaction or invoices page on WHMCS, he can still see all the old data from account 446 (in USD) except there is a cut date when the change was done. That data is basically just pulling the records only for historical purposes. This does not influence in anyway the new account. They are just read records. The reason to do this is to avoid the customers having 2 accounts. He can still see all transactions and invoices prior the cut date. You could implement something, even more, more straightforward for the admin, since admin can switch to any account anyway.

Now, you can make all this fancier in the future and even convert some things, like total income, etc. You don't need to convert and exchange everything. Just keep all the financials in the old account. Most customers just want 2 things when they request this:
a) They want to be billed in the new currency
b) They don't want a new account, they don't want to lose the prior data, invoices, etc.
Something like this would solve that because its transparent for the customer. What account ID he has, or where the data is pulled internally from the tables is irrelevant for the customer. For WHMCS core function this would just consider it a new account and the prior one a closed one. No messing with the core accounting functions.
Hi there,
With less than a dozen votes per year, this is not currently on
our radar for implementation. However should this change and this idea
gain popularity we are keeping that possibility open for the future.
John,

This shouldn't be a "feature request" at all, this is proper accounting and bookkeeping practices. If you can edit a client currency, then everything should be archived prior to the currency change.

If there is zero interest in ensuring proper records are maintained in the product by WHMCS, the currency should not be editable at all and force a new account to be created, and manually move all products over to that.
This is very deceiving John. This may have only 12 votes, but I saw more than one request complaining about the same with the currency. If you merge all the requests that talk about this it would have more votes. I agree with PretectsChris here. Don't allow this and then please also don't advertise WHMCS as supporting multi currencies when it clearly does not.
This is pretty silly rational, it is a part of WHMCS that literally breaks accounting, a customer has the right to switch currencies, that does not suddenly mean that because they used to pay in IDR and now want pay in GBP that I made an extra £10,000 over the time they were a customer but according to WHMCS failed logic it does.

Please fix this "BUG" no one asked for a change of new orders design on the admin dashboard, you implemented significant changes to that twice while this was left unanswered for 5 years.

Please reconsider or give us a number of just how many people do need to ask for it in order for it to be on your radar?
Others have been implemented with far less votes with significantly less impact and as 1 user pointed out above this allows for illegal and or none complaint within the EU accounting WHMCS should not be making this possible.
5 years down the line, still so important feature isn't implemented.

Common WHMCS you can do it.
Haha how is this not yet implemented this is such an important FEATURE!, not only when you swap the currency should it not swap the past invoices but it should also make sure to convert any ongoing products or issued invoices to the current currency not just 100 USD becomes 100 EUR everywhere.
I cant belive 4 years later with lots of support this is still not a thing, why is it only under consideration instead of planned?
WHMCS is such a good software but missing currency change feature for clients. This is must have feature for whmcs. Without this feature multi-currency option looks like paralyzed.

I am saying this because think a customer signed up from USA and later he moves to Germany. When he was in USA he was making payments in USD and now as he is in Germany he wants to use EUR as his currency. So what option do we have in such cases? It sounds weird and unprofessional to ask him to just create new account with EUR currency and loose all past data on same domain he used with old account. Suppose he creates a new account and later he moves to UK then do we have to ask him to create one more account for Pounds and loose all data of previous 2 accounts which he created for USD and EUR?

And I also suggest that customers should not be able to change their default currency by themselves because doing so will increase chance of fraud orders and may create mess. So client area currency changing feature should be available only for administrators not for customers. If customers want to change their currency they can request through support ticket and backend staff can change if customer has a good reason for changing it.
I think 2 options would be sufficient.

1) Option in admin area to change currency and WHMCS changes all currency for future invoices (so services/domains should become the amount in new currency, using pricing)

2) Old invoice/revenue record should be kept in old currency for legal accounting reasons.

At this moment if you need to change customer currency (in case of merging 2 whmcs installs)
You need to change currency in Customer profile, payment amount per service.
But changing currency in customer profile means that all already issued (and old) invoices are changed also.
Amounts as Paypal fees can't be changed and will give a strange high of low figure.

Issued invoices shouldn't be able to altered by this. And as suggested above : " [u]Freeze past and old transactions[/u]. [u]Do not change the currency"[/u]
No address change, no amount and no currecny change. If people have a reason to alter old invoices they can use phpMyadmin to do so.
Well, this issue is the main reason why I still didn’t and
can’t use multi currency in WHMCS. Asking a customer to create a new account
and lose all the past transactions, tickets and other data is not reasonable.
And how it works today in WHMCS is an account mess because all it does is
change the currency symbol and leave the same numbering/amounts when it should not be changing any past transactions, only new ones from that point on which is what probably everyone assumes would happen when they switch the currency. Past invoices and
transactions should be freeze and this would solve all the problems. So answer
the questions this is my suggestion:
1. There could be more than one solution here. The first one
is WHMCS gives an error if you try to change the currency if someone has
positive credits in the account. So you should tell the users to use his credits
first or he will lose them. Simple solution.
Better solution: Current credits are converted to the new
currency, if the amount is less, a negative transaction can be recorded with
the description currency conversion exchange. If it’s the opposite, increase the credits
to counter act the balance. I would say that most customers will understand
they will or can lose money with a currency conversion, so they will agree with
this. What should never happen here is for WHMCS to record a negative balance
against the company because the whole accounting balance will then not match with
the past years (if it was reported already).
Credits are tricky to handle, so maybe not even allow currency
conversion if there are positive credits. If the question was about past
transactions, the answer should be the same as with invoices. Do not touch past
transactions. Any transactions, invoices generated, invoice paid, credits used,
all of them should not be touched past the date where the user decided to
switch currency.
2. I think I answered this above. Do not convert accounts if
there are credits, or credits can be converted to the new currency recording.
For example if the user has $50 credits and wants to switch to Euros, you
need to convert $50 to 47 Euros, in such a case, it would be as easy as switching the
currency and then adding a negative transaction to the credits for -3 for the
exchange. Now the user has 47 but euros. He can then see he lost 3 in the currency exchange.
If it’s the opposite. A user that has 50 euros and wants to
switch to USD dollars, which would result in $53 then WHMCS should maybe block
this with a warning and not allow it, or inform the admin he is going to lose
money in the exchange switch. Then a user has a choice to use his credits first or
lose them. In this case just switch the 50 euros to 50 dollars and the user
lost $3. If he does not want that. Then he should have no credits in order
to a currency change first. An account currency change is a big change, so it is not something someone would request unless he is aware of the implications.
3. I don’t understand this question. Past
transactions are not touched. New promotions and orders would work just like they
do today in the new currency for that customer. Do you mean active ones?
4. Same as above. Past transactions are frozen. Nothing is
changed. New currency only applies to transactions past the date where the
conversion was done.
5. [u]I don’t think this is what people asked here at all[/u]. I didn’t
saw anyone here asking to have a customer in 2 currencies at the same time, that would indeed be
a mess. Nobody is asking (and I don’t know why would someone want this) to have
a customer with both USD or Euro invoices at the same time. What most people
want is to switch the currency for that customer. Example, someone moving from
Europe to the America or the other way around. All past transactions are stuck
with the currency they were originally, new transactions are in the new currency.
The customer can’t use the older currency anymore, unless he is switched again
manually by a WHCMS admin.
6. Again, see 5. I don’t think this is what users are asking. I don’t even know a billing system that can do this. What we want is just to be
able to switch currency properly. Today if a customer paid $245 invoices, and
you switch him to Euros, WHCMS just switches the currency symbol on all
transactions, so now suddenly that user paid 245 euros which is wrong. What
people are asking is to fix this. I don’t think people asking to use 2
currencies simultaneously. That would indeed require a major WHMCS change and I
don’t see this as reasonable. What I do see something which can be fixed is the
currency bug I and others mentioned before.
Almost all the problems here can be solved by just doing
what I suggested. [u]Freeze past and old transactions[/u]. [u]Do not change the currency[/u]
on them. Only new transactions are in the new currency. I’m surprised you
mentioned this. Did you read what others have posted here? They are not asking
about having several currencies at the same time for a customer. They are asking not to change the currency on previous transactions.
Great ideas! I hope WHCMS will listen to you and make this happen.
We appreciate the discussion and requests for this feature.
There are however a number of other technical challenges that we must consider and we would be interested in your feedback and thoughts on them:

1. How do you suggest we handle credit balances which are maintained in the customers primary currency?
2. How would credit which is stored in the clients primary currency work for an invoice that is in a different currency? What would the credit balance show and how would the amount be calculated?
3. How would you suggest we handle monetary discount promotion codes that are assigned to a clients products & services?
4. How would you suggest we handle affiliate commissions and withdrawals history which are also stored in the clients currency?
5. How would you suggest we display the customers invoices and income totals when they have invoices & transactions in multiple different currencies?
6. How would you suggest we handle allowing a customer requesting to mass pay invoices in different currencies? Only one currency can be used per transaction.
We really need this option and Toki explaind perfectly how you can make it.
We are having problems with multicurrencies at this moment and you can check this thread https://forums.whmcs.com/showthread.php?126075-Stripe-incomplete-payments&p=505143#post505143
1. convert them when the currency is changed, using the same function as is used to update prices on products.
2. solution for point 1 negates this as an issue.
3. That is irrelevant, once the recurring price is set, it is set, so the recurring price it gets converted as per point 1.

4. The history and pending commissions remains in the original currency, the new commissions are in the new currency, alternatively, they are essentially archived or converted and brought forward in to a new affiliate ID under the correct currency.
5. display a second balance when a base currency has been changed.
6. Do not allow it, I cant see a situation where by this would be possible when common sense is applied i.e. convert existing invoices prior to payment or only switch currency when no invoices are unpaid/open

I appreciate this was 2 years ago however I think you are missing the core point, its not something people want to do daily it is likely to be a 1 time ever thing per account and it would not be customer driven in terms of action, it would be done by administrators.
wating for update
When changing currency for a client, I've not noticed that WHMCS has no updated the correct pricing, so instead of charge 34usd, im charging 34 mexican peso. 20 pesos is 1 dollar, so imagine how this BUG are broken my business.
Is any solution there?

Thanks in advance
You should not change the currency of a client. WHMCS doesn't store currency value for invoices therefore it also doesn't update pricing. It simply changes currency prefix and suffix.

For example let's say that you have a client with an invoice of 100 INR. As soon as you change to EUR, the invoice becomes 100 EUR but in reality 100 INR are equal to 1.41 EUR so it's a disaster.

There are modules in the Marketplace that allow you to freely change the currency of a client without messing up with existing invoices.
Here's what we've been doing - which you could automate with some database queries if you often need to switch currencies. (Perhaps one of those modules does something similar - I never checked.)

* Set the client's profile to Inactive or Closed (or whatever status you don't send e-mails to.)
* Change their e-mail from [email protected] to [email protected]/USD (or whatever currency it is.)
* Create a new profile for the [email protected] using the new currency.
* Move products from the old to the new client.
* Update products pricing to use their new currency.

This way their old invoices remain properly stored in the old currency while new invoices are generated in the new currency. You can switch back and forth whenever you want, without compromising the invoices.

Two shortcomings of this approach: 1) The client cannot access the invoices in the inactive account, unless you teach them to login with /USD to see the old invoices. 2) It only fixes the currency issue. Other changes (like name and address) will still change whenever the customer changes them. (Which is illegal in most places.)
Just store currency per invoice and not per customer and this will fix many issues.
i request this before 3 months, please like my request too, to apply this update urgently.
I think the point here is very clear. This is not a feature request it's a bug WHMCS should consider it urget and fix it
One customer requested me to change the currency today and when I done it WHMCS just changed the PREFIX/SUFFIX of currency and kept all transactions, invoices, payments, etc. with wrong value. What to do in this case? This an extremly serious bug that must be fixed ASAP. I really don't believe that no one reported this before and if reported, why your development team doesn't fixed yet.

This is completely wrong for accounting. When an invoice is created
WHMCS should store the currency, amount, exchange rate (in case of conversion), etc. All invoices/transactions/etc shouldn't suffer changes. This is something that must be rethought urgently.
It's not a bug. This is how WHMCS handles currency change. Basically you should not allow clients to change their currency since this value is crucial and not intended to change. There are 2 possible solution:
  • Create a new account for your client with his/her new currency setting and move all domains/products from the old one. Of course keep the old account still alive as a reference
  • There are modules that allow you to "cache" currency prefix and suffix so that you can freely change this value for every client
Actually I disagree. If you are not supposed to change your customer currency and it's a bug like you mentioned, then it would not be there in the first place. WHMCS would not have this option if what you said is true. The option is there because its something users requested and WHMCS added it. The bug here is that WHMCS changes the currency symbol on all the invoices and transactions. It should only change the new ones, not past ones. This is the bug people complain, they don't complain about the feature that changes the currency in the customer account (as that works) but how its changing it.
I like Linus Torwalds quote here. If enough people are using or rely on a bug then its not a bug anymore, it's a feature. Changing currency is something that people want and request as you can see here for the simple reason that a customer may want to change his currency. A simple example of this is someone moving from Europe to the US and now wants his invoices in USD instead of Euros or the other way around. WHMCS can change currency without issues in the customer account, the bug here is that it also changes them for past transactions and invoices because all it does its update the currency symbol in the SQL database. This is actually amazingly dumb to fix. All they need to check is the time stamp or date and freeze those records so they are not changed when you hit the change currency button. This way the change will apply to new transactions and invoices but not past ones.
I'd forgotten I'd subscribed to this, since the original request was filed in 2013! As others have said, this isn't a feature request, it's a bug....or at the very least a flawed implementation.