PerfexCRM icon indicating copy to clipboard operation
PerfexCRM copied to clipboard

3 Decimal Places in Perfex CRM, really important

Open AirAkshar opened this issue 1 year ago • 2 comments

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

AirAkshar avatar Jun 05 '23 12:06 AirAkshar

Hello do you have the solutions ?

techam9 avatar Feb 07 '24 06:02 techam9

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.

alexgauvin avatar Jun 15 '24 00:06 alexgauvin