Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Purchase order Totel amount wrong?
01-10-2014, 10:58 PM
Post: #1
Purchase order Totel amount wrong?
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!


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
01-10-2014, 11:06 PM
Post: #2
RE: Purchase order Totel amount wrong?
Will probably sound likee a silly question, but what is your language setting for that user?
Visit this user's website Find all posts by this user
Quote this message in a reply
01-11-2014, 05:48 PM (This post was last modified: 01-11-2014 05:49 PM by phil.)
Post: #3
RE: Purchase order Totel amount wrong?
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

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2014, 07:32 PM
Post: #4
RE: Purchase order Totel amount wrong?
Thank You Very much............................
Its Work.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)