webERP Forum

Full Version: Work Order Not accepted more than 100 Quantity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Sir

When I create a work order in Manufacturing> Work Order Entry> (Select Item)> Enter Batch No. And Quantity,If I enter quantity 1,098 for selected work order the Work Order Not accepted it and give a error---

ERROR Message Report : The quantity for the batch must be numeric

But it accepted less than 100 quantity not more than 100 Quantity.

Please solve this issue and suggest me what I should do?

Thanks in advance
>The quantity for the batch must be numeric

can this be a number format problem? Like 1,098 versus 1.098 . On any computer, one of the two will not be recognised as number.
Thank you for reply but its a number format problem that is clear in this Error message

ERROR Message Report : The quantity for the batch must be numeric

What should i do for correct number format.

I want to enter quantity 1098 (One thousand and ninety eight) not 1.098 (one point zero nine eight)
My problem still unsolved. please help
did you try all three variations? Tht is not clear from your post.
1.098 1,098 1098?
I do not expect a thousand separator to work. I don't think I have any software on my computer (Win) that would accept a thousand separator (as 1,098.00 to be 1098). They all would expect 1098 or 1098.00 (or 1098,00 in Germany with , as decimal separattor).

Klaus
I think you might be using the indian number formats which need to be debugged and fixed.... should work ok for other formats.
Sure Sir
I am using Indian number formats. my all other work in Indian Format and its work properly, Only Work Order Not accepted this format.
The WebERP not accepted 1098 1,098 or 1098.0 format. Please help me as soon as possible.

Thank You
suggest you change language or edit
includes/MiscFunctions.php

and change the function

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​);
}

This will format numbers in the European way.
I think the function filter_number_format() is trouble with indian number formats. It is also in that file (MiscFunctions.php) and you may be able to figure it out?
Reference URL's