Jump to content

WHMCS does not allow prices more than 8 digits ?


Reza

Recommended Posts

Hi there,

Today I faced something weird in WHMCS. It does not allow prices more than 8 digits! Some of our prices are more than 8 digits in local currency. 

Has anyone ever faced similar issue? How to fix this?

Edited by Reza
Link to comment
Share on other sites

I suspect the only way you could do it is to alter some of the database table structures, that are currently set to 10 digits (12345678.90), and increase them to 11, 12 or more..

it's technically simple to do, but remember to make a database backup and note that while WHMCS support don't think it will cause any problems, they won't support it if you decide to do this.

in the above thread, I think the question was mainly about configurable options, but the principle would apply to your situation too... you'd just need to change multiple tables, e.g tblpricing..

rsXqWNp.png

e.g in the above example, the monthly value can be 12345678.90  (maximum length of 10 with 2 decimal places)... you'd want to change that to 12,2 to allow for larger prices and then do the same for similar values.... but try it on one table first and on one value, you should then be able to edit the price of the product... if successful, try making a dummy test order with it and seeing if any issues occur... e.g in the cart or invoices.

and always remember to always take backups of the database before making even the slightest change to their structure...

in fact, if you get your license from WHMCS direct, get a free developers license from them, create a new test installation (perhaps using a duplicate of your existing database) and test the above solution on that first before committing to making the changes in your live production site. :idea:

Link to comment
Share on other sites

Thanks Brian,

I have changed the fields to DECIMAL(12,2) and the price has been saved successfully with 10 digits but WHMCS still reduces the price to 8 digits in invoices. How to fix this one?

Should I change any other fields in the database? 

Link to comment
Share on other sites

I raised a support ticket and they said I need to change all fields in the database from DECIMAL(10,2) to DECIMAL(12,2) (including tblinvoices and tblinvoiceitems). Now the problem is fixed.

But as twhiting9275 said they really must do something to fix this in the core. Prices are the most important thing in a billing system. If I can not use my prices in such system, the whole system would be useless to me.

Link to comment
Share on other sites

19 hours ago, Reza said:

I raised a support ticket and they said I need to change all fields in the database from DECIMAL(10,2) to DECIMAL(12,2) (including tblinvoices and tblinvoiceitems). Now the problem is fixed.

I guess if they've told you to do it, it means they now support it.

20 hours ago, twhiting9275 said:

Wait, this is STILL a problem? Someone really should create a feature request to have this fixed.

there's one for increased decimal places which has received 45 votes in 5 years... still nothing.

https://requests.whmcs.com/topic/number-of-possible-decimals-in-the-tax-rate-from-2-to-3

I can't believe that WHMCS Support aren't getting multiple tickets about this... and it's not getting passed up the chain internally... this wouldn't be difficult for them to change.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated