webERP Forum

Full Version: Purchase order Totel amount wrong?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I create a Purchase order but its total amount shows wrong. it should be Rs. 102600.00 but it shows Rs. 12600.00 file attached please help us.
thank you!
Will probably sound likee a silly question, but what is your language setting for that user?
My guess is you are using Hindi or British India... the Indian number formatting function has never been debugged ... better to change includes/MiscFunctions.php function locale_number_format which is currently

Code:
function locale_number_format($Number, $DecimalPlaces=0) {
    global $DecimalPoint;
    global $ThousandsSeparator;
    if ($_SESSION['Language']=='hi_IN.utf8' OR $_SESSION['Language']=='en_IN.utf8'){
        return indian_number_format(floatval($Number),$DecimalPlaces);
    } else {
        if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){
            $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number));
            if ($DecimalPlaces > 0){
                $DecimalPlaces--;
            }
        }
        return number_format(floatval($Number),$DecimalPlaces,$DecimalPoint,$ThousandsSeparator);
    }
}

to

Code:
function locale_number_format($Number, $DecimalPlaces=0) {
    global $DecimalPoint;
    global $ThousandsSeparator;
    if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){
        $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number));
        if ($DecimalPlaces > 0){
            $DecimalPlaces--;
        }
    }
    return number_format(floatval($Number),$DecimalPlaces,$DecimalPoint,$ThousandsSeparator);
}

until it is fixed up
Thank You Very much............................
Its Work.