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

3 Decimal Places in Perfex CRM, really important #137

Open
AirAkshar opened this issue Jun 5, 2023 · 2 comments
Open

3 Decimal Places in Perfex CRM, really important #137

AirAkshar opened this issue Jun 5, 2023 · 2 comments

Comments

@AirAkshar
Copy link

I need help with Enabling 3 Decimal Places in Perfex CRM, really important. By default it doesn't support customizing decimal places.

@techam9
Copy link

techam9 commented Feb 7, 2024

Hello do you have the solutions ?

@alexgauvin
Copy link
Contributor

Here is a reply from devs on this topic :


You will need to change the whole system decimal places to achieve this.

Login as admin.
In the browser URL area enter the following: http://yourcrminstallation/admin/misc/change_decimal_places/3
Change the URL to fit with your CRM installation base URL. Like it's on the demo eq http://www.perfexcrm.com/demo/

The number 3 in the URL is the total decimal places to update in the database, you can adjust this too to fit your needs eq 2 or 3 or 4.

In application/helpers create a file (if it's not created and you don't already have this code) my_functions_helper.php and add the following code:

<?php

hooks()->add_filter('app_decimal_places','my_change_app_decimal_places');

function my_change_app_decimal_places($decimals){
// This number must be the same like you enter in the url in step 2.
return 3;
}

Make sure you do database backup before doing anything.

Keep in mind that this will update all columns in the database where the decimal is accepted, if you don't need some of them to be changed after you access the URL in step 2 you can manually adjust the columns to eq 2 decimals via phpmyadmin.

Hope this helps. Let me know if I can assist you with anything else.

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

3 participants