webERP Forum
Work Order Not accepted more than 100 Quantity - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Work Order Not accepted more than 100 Quantity (/showthread.php?tid=2337)



Work Order Not accepted more than 100 Quantity - Rajkamal - 11-16-2014

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




RE: Work Order Not accepted more than 100 Quantity - opto - 11-17-2014

>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.



RE: Work Order Not accepted more than 100 Quantity - Rajkamal - 11-17-2014

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



RE: Work Order Not accepted more than 100 Quantity - opto - 11-17-2014

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


RE: Work Order Not accepted more than 100 Quantity - phil - 11-19-2014

I think you might be using the indian number formats which need to be debugged and fixed.... should work ok for other formats.


RE: Work Order Not accepted more than 100 Quantity - Rajkamal - 11-19-2014

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


RE: Work Order Not accepted more than 100 Quantity - phil - 11-19-2014

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?