From: <dai...@us...> - 2014-10-25 04:54:17
|
Revision: 6937 http://sourceforge.net/p/web-erp/reponame/6937 Author: daintree Date: 2014-10-25 04:54:02 +0000 (Sat, 25 Oct 2014) Log Message: ----------- xmlrpc local version - just the stuff we need Added Paths: ----------- trunk/xmlrpc/ trunk/xmlrpc/lib/ trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpc_wrappers.inc trunk/xmlrpc/lib/xmlrpcs.inc Added: trunk/xmlrpc/lib/xmlrpc.inc =================================================================== --- trunk/xmlrpc/lib/xmlrpc.inc (rev 0) +++ trunk/xmlrpc/lib/xmlrpc.inc 2014-10-25 04:54:02 UTC (rev 6937) @@ -0,0 +1,3776 @@ +<?php +// by Edd Dumbill (C) 1999-2002 +// <ed...@us...> +// $Id: xmlrpc.inc,v 1.174 2009/03/16 19:36:38 ggiunta Exp $ + +// Copyright (c) 1999,2000,2002 Edd Dumbill. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// * Neither the name of the "XML-RPC for PHP" nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +// OF THE POSSIBILITY OF SUCH DAMAGE. + + if(!function_exists('xml_parser_create')) + { + // For PHP 4 onward, XML functionality is always compiled-in on windows: + // no more need to dl-open it. It might have been compiled out on *nix... + if(strtoupper(substr(PHP_OS, 0, 3) != 'WIN')) + { + dl('xml.so'); + } + } + + // G. Giunta 2005/01/29: declare global these variables, + // so that xmlrpc.inc will work even if included from within a function + // Milosch: 2005/08/07 - explicitly request these via $GLOBALS where used. + $GLOBALS['xmlrpcI4']='i4'; + $GLOBALS['xmlrpcInt']='int'; + $GLOBALS['xmlrpcBoolean']='boolean'; + $GLOBALS['xmlrpcDouble']='double'; + $GLOBALS['xmlrpcString']='string'; + $GLOBALS['xmlrpcDateTime']='dateTime.iso8601'; + $GLOBALS['xmlrpcBase64']='base64'; + $GLOBALS['xmlrpcArray']='array'; + $GLOBALS['xmlrpcStruct']='struct'; + $GLOBALS['xmlrpcValue']='undefined'; + + $GLOBALS['xmlrpcTypes']=array( + $GLOBALS['xmlrpcI4'] => 1, + $GLOBALS['xmlrpcInt'] => 1, + $GLOBALS['xmlrpcBoolean'] => 1, + $GLOBALS['xmlrpcString'] => 1, + $GLOBALS['xmlrpcDouble'] => 1, + $GLOBALS['xmlrpcDateTime'] => 1, + $GLOBALS['xmlrpcBase64'] => 1, + $GLOBALS['xmlrpcArray'] => 2, + $GLOBALS['xmlrpcStruct'] => 3 + ); + + $GLOBALS['xmlrpc_valid_parents'] = array( + 'VALUE' => array('MEMBER', 'DATA', 'PARAM', 'FAULT'), + 'BOOLEAN' => array('VALUE'), + 'I4' => array('VALUE'), + 'INT' => array('VALUE'), + 'STRING' => array('VALUE'), + 'DOUBLE' => array('VALUE'), + 'DATETIME.ISO8601' => array('VALUE'), + 'BASE64' => array('VALUE'), + 'MEMBER' => array('STRUCT'), + 'NAME' => array('MEMBER'), + 'DATA' => array('ARRAY'), + 'ARRAY' => array('VALUE'), + 'STRUCT' => array('VALUE'), + 'PARAM' => array('PARAMS'), + 'METHODNAME' => array('METHODCALL'), + 'PARAMS' => array('METHODCALL', 'METHODRESPONSE'), + 'FAULT' => array('METHODRESPONSE'), + 'NIL' => array('VALUE'), // only used when extension activated + 'EX:NIL' => array('VALUE') // only used when extension activated + ); + + // define extra types for supporting NULL (useful for json or <NIL/>) + $GLOBALS['xmlrpcNull']='null'; + $GLOBALS['xmlrpcTypes']['null']=1; + + // Not in use anymore since 2.0. Shall we remove it? + /// @deprecated + $GLOBALS['xmlEntities']=array( + 'amp' => '&', + 'quot' => '"', + 'lt' => '<', + 'gt' => '>', + 'apos' => "'" + ); + + // tables used for transcoding different charsets into us-ascii xml + + $GLOBALS['xml_iso88591_Entities']=array(); + $GLOBALS['xml_iso88591_Entities']['in'] = array(); + $GLOBALS['xml_iso88591_Entities']['out'] = array(); + for ($i = 0; $i < 32; $i++) + { + $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); + $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; + } + for ($i = 160; $i < 256; $i++) + { + $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); + $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; + } + + /// @todo add to iso table the characters from cp_1252 range, i.e. 128 to 159? + /// These will NOT be present in true ISO-8859-1, but will save the unwary + /// windows user from sending junk (though no luck when reciving them...) + /* + $GLOBALS['xml_cp1252_Entities']=array(); + for ($i = 128; $i < 160; $i++) + { + $GLOBALS['xml_cp1252_Entities']['in'][] = chr($i); + } + $GLOBALS['xml_cp1252_Entities']['out'] = array( + '€', '?', '‚', 'ƒ', + '„', '…', '†', '‡', + 'ˆ', '‰', 'Š', '‹', + 'Œ', '?', 'Ž', '?', + '?', '‘', '’', '“', + '”', '•', '–', '—', + '˜', '™', 'š', '›', + 'œ', '?', 'ž', 'Ÿ' + ); + */ + + $GLOBALS['xmlrpcerr'] = array( + 'unknown_method'=>1, + 'invalid_return'=>2, + 'incorrect_params'=>3, + 'introspect_unknown'=>4, + 'http_error'=>5, + 'no_data'=>6, + 'no_ssl'=>7, + 'curl_fail'=>8, + 'invalid_request'=>15, + 'no_curl'=>16, + 'server_error'=>17, + 'multicall_error'=>18, + 'multicall_notstruct'=>9, + 'multicall_nomethod'=>10, + 'multicall_notstring'=>11, + 'multicall_recursion'=>12, + 'multicall_noparams'=>13, + 'multicall_notarray'=>14, + + 'cannot_decompress'=>103, + 'decompress_fail'=>104, + 'dechunk_fail'=>105, + 'server_cannot_decompress'=>106, + 'server_decompress_fail'=>107 + ); + + $GLOBALS['xmlrpcstr'] = array( + 'unknown_method'=>'Unknown method', + 'invalid_return'=>'Invalid return payload: enable debugging to examine incoming payload', + 'incorrect_params'=>'Incorrect parameters passed to method', + 'introspect_unknown'=>"Can't introspect: method unknown", + 'http_error'=>"Didn't receive 200 OK from remote server.", + 'no_data'=>'No data received from server.', + 'no_ssl'=>'No SSL support compiled in.', + 'curl_fail'=>'CURL error', + 'invalid_request'=>'Invalid request payload', + 'no_curl'=>'No CURL support compiled in.', + 'server_error'=>'Internal server error', + 'multicall_error'=>'Received from server invalid multicall response', + 'multicall_notstruct'=>'system.multicall expected struct', + 'multicall_nomethod'=>'missing methodName', + 'multicall_notstring'=>'methodName is not a string', + 'multicall_recursion'=>'recursive system.multicall forbidden', + 'multicall_noparams'=>'missing params', + 'multicall_notarray'=>'params is not an array', + + 'cannot_decompress'=>'Received from server compressed HTTP and cannot decompress', + 'decompress_fail'=>'Received from server invalid compressed HTTP', + 'dechunk_fail'=>'Received from server invalid chunked HTTP', + 'server_cannot_decompress'=>'Received from client compressed HTTP request and cannot decompress', + 'server_decompress_fail'=>'Received from client invalid compressed HTTP request' + ); + + // The charset encoding used by the server for received messages and + // by the client for received responses when received charset cannot be determined + // or is not supported + $GLOBALS['xmlrpc_defencoding']='UTF-8'; + + // The encoding used internally by PHP. + // String values received as xml will be converted to this, and php strings will be converted to xml + // as if having been coded with this + $GLOBALS['xmlrpc_internalencoding']='ISO-8859-1'; + + $GLOBALS['xmlrpcName']='XML-RPC for PHP'; + $GLOBALS['xmlrpcVersion']='3.0.0.beta'; + + // let user errors start at 800 + $GLOBALS['xmlrpcerruser']=800; + // let XML parse errors start at 100 + $GLOBALS['xmlrpcerrxml']=100; + + // formulate backslashes for escaping regexp + // Not in use anymore since 2.0. Shall we remove it? + /// @deprecated + $GLOBALS['xmlrpc_backslash']=chr(92).chr(92); + + // set to TRUE to enable correct decoding of <NIL/> and <EX:NIL/> values + $GLOBALS['xmlrpc_null_extension']=false; + + // set to TRUE to enable encoding of php NULL values to <EX:NIL/> instead of <NIL/> + $GLOBALS['xmlrpc_null_apache_encoding']=false; + + // used to store state during parsing + // quick explanation of components: + // ac - used to accumulate values + // isf - used to indicate a parsing fault (2) or xmlrpcresp fault (1) + // isf_reason - used for storing xmlrpcresp fault string + // lv - used to indicate "looking for a value": implements + // the logic to allow values with no types to be strings + // params - used to store parameters in method calls + // method - used to store method name + // stack - array with genealogy of xml elements names: + // used to validate nesting of xmlrpc elements + $GLOBALS['_xh']=null; + + /** + * Convert a string to the correct XML representation in a target charset + * To help correct communication of non-ascii chars inside strings, regardless + * of the charset used when sending requests, parsing them, sending responses + * and parsing responses, an option is to convert all non-ascii chars present in the message + * into their equivalent 'charset entity'. Charset entities enumerated this way + * are independent of the charset encoding used to transmit them, and all XML + * parsers are bound to understand them. + * Note that in the std case we are not sending a charset encoding mime type + * along with http headers, so we are bound by RFC 3023 to emit strict us-ascii. + * + * @todo do a bit of basic benchmarking (strtr vs. str_replace) + * @todo make usage of iconv() or recode_string() or mb_string() where available + */ + function xmlrpc_encode_entitites($data, $src_encoding='', $dest_encoding='') + { + if ($src_encoding == '') + { + // lame, but we know no better... + $src_encoding = $GLOBALS['xmlrpc_internalencoding']; + } + + switch(strtoupper($src_encoding.'_'.$dest_encoding)) + { + case 'ISO-8859-1_': + case 'ISO-8859-1_US-ASCII': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); + break; + case 'ISO-8859-1_UTF-8': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = utf8_encode($escaped_data); + break; + case 'ISO-8859-1_ISO-8859-1': + case 'US-ASCII_US-ASCII': + case 'US-ASCII_UTF-8': + case 'US-ASCII_': + case 'US-ASCII_ISO-8859-1': + case 'UTF-8_UTF-8': + //case 'CP1252_CP1252': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + break; + case 'UTF-8_': + case 'UTF-8_US-ASCII': + case 'UTF-8_ISO-8859-1': + // NB: this will choke on invalid UTF-8, going most likely beyond EOF + $escaped_data = ''; + // be kind to users creating string xmlrpcvals out of different php types + $data = (string) $data; + $ns = strlen ($data); + for ($nn = 0; $nn < $ns; $nn++) + { + $ch = $data[$nn]; + $ii = ord($ch); + //1 7 0bbbbbbb (127) + if ($ii < 128) + { + /// @todo shall we replace this with a (supposedly) faster str_replace? + switch($ii){ + case 34: + $escaped_data .= '"'; + break; + case 38: + $escaped_data .= '&'; + break; + case 39: + $escaped_data .= '''; + break; + case 60: + $escaped_data .= '<'; + break; + case 62: + $escaped_data .= '>'; + break; + default: + $escaped_data .= $ch; + } // switch + } + //2 11 110bbbbb 10bbbbbb (2047) + else if ($ii>>5 == 6) + { + $b1 = ($ii & 31); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ($b1 * 64) + $b2; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 1; + } + //3 16 1110bbbb 10bbbbbb 10bbbbbb + else if ($ii>>4 == 14) + { + $b1 = ($ii & 15); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ord($data[$nn+2]); + $b3 = ($ii & 63); + $ii = ((($b1 * 64) + $b2) * 64) + $b3; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 2; + } + //4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb + else if ($ii>>3 == 30) + { + $b1 = ($ii & 7); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ord($data[$nn+2]); + $b3 = ($ii & 63); + $ii = ord($data[$nn+3]); + $b4 = ($ii & 63); + $ii = ((((($b1 * 64) + $b2) * 64) + $b3) * 64) + $b4; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 3; + } + } + break; +/* + case 'CP1252_': + case 'CP1252_US-ASCII': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + break; + case 'CP1252_UTF-8': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + /// @todo we could use real UTF8 chars here instead of xml entities... (note that utf_8 encode all allone will NOT convert them) + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + $escaped_data = utf8_encode($escaped_data); + break; + case 'CP1252_ISO-8859-1': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + // we might as well replave all funky chars with a '?' here, but we are kind and leave it to the receiving application layer to decide what to do with these weird entities... + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + break; +*/ + default: + $escaped_data = ''; + error_log("Converting from $src_encoding to $dest_encoding: not supported..."); + } + return $escaped_data; + } + + /// xml parser handler function for opening element tags + function xmlrpc_se($parser, $name, $attrs, $accept_single_vals=false) + { + // if invalid xmlrpc already detected, skip all processing + if ($GLOBALS['_xh']['isf'] < 2) + { + // check for correct element nesting + // top level element can only be of 2 types + /// @todo optimization creep: save this check into a bool variable, instead of using count() every time: + /// there is only a single top level element in xml anyway + if (count($GLOBALS['_xh']['stack']) == 0) + { + if ($name != 'METHODRESPONSE' && $name != 'METHODCALL' && ( + $name != 'VALUE' && !$accept_single_vals)) + { + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = 'missing top level xmlrpc element'; + return; + } + else + { + $GLOBALS['_xh']['rt'] = strtolower($name); + $GLOBALS['_xh']['rt'] = strtolower($name); + } + } + else + { + // not top level element: see if parent is OK + $parent = end($GLOBALS['_xh']['stack']); + if (!array_key_exists($name, $GLOBALS['xmlrpc_valid_parents']) || !in_array($parent, $GLOBALS['xmlrpc_valid_parents'][$name])) + { + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "xmlrpc element $name cannot be child of $parent"; + return; + } + } + + switch($name) + { + // optimize for speed switch cases: most common cases first + case 'VALUE': + /// @todo we could check for 2 VALUE elements inside a MEMBER or PARAM element + $GLOBALS['_xh']['vt']='value'; // indicator: no value found yet + $GLOBALS['_xh']['ac']=''; + $GLOBALS['_xh']['lv']=1; + $GLOBALS['_xh']['php_class']=null; + break; + case 'I4': + case 'INT': + case 'STRING': + case 'BOOLEAN': + case 'DOUBLE': + case 'DATETIME.ISO8601': + case 'BASE64': + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + $GLOBALS['_xh']['ac']=''; // reset the accumulator + break; + case 'STRUCT': + case 'ARRAY': + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + // create an empty array to hold child values, and push it onto appropriate stack + $cur_val = array(); + $cur_val['values'] = array(); + $cur_val['type'] = $name; + // check for out-of-band information to rebuild php objs + // and in case it is found, save it + if (@isset($attrs['PHP_CLASS'])) + { + $cur_val['php_class'] = $attrs['PHP_CLASS']; + } + $GLOBALS['_xh']['valuestack'][] = $cur_val; + $GLOBALS['_xh']['vt']='data'; // be prepared for a data element next + break; + case 'DATA': + if ($GLOBALS['_xh']['vt']!='data') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "found two data elements inside an array element"; + return; + } + case 'METHODCALL': + case 'METHODRESPONSE': + case 'PARAMS': + // valid elements that add little to processing + break; + case 'METHODNAME': + case 'NAME': + /// @todo we could check for 2 NAME elements inside a MEMBER element + $GLOBALS['_xh']['ac']=''; + break; + case 'FAULT': + $GLOBALS['_xh']['isf']=1; + break; + case 'MEMBER': + $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name']=''; // set member name to null, in case we do not find in the xml later on + //$GLOBALS['_xh']['ac']=''; + // Drop trough intentionally + case 'PARAM': + // clear value type, so we can check later if no value has been passed for this param/member + $GLOBALS['_xh']['vt']=null; + break; + case 'NIL': + case 'EX:NIL': + if ($GLOBALS['xmlrpc_null_extension']) + { + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + $GLOBALS['_xh']['ac']=''; // reset the accumulator + break; + } + // we do not support the <NIL/> extension, so + // drop through intentionally + default: + /// INVALID ELEMENT: RAISE ISF so that it is later recognized!!! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "found not-xmlrpc xml element $name"; + break; + } + + // Save current element name to stack, to validate nesting + $GLOBALS['_xh']['stack'][] = $name; + + /// @todo optimization creep: move this inside the big switch() above + if($name!='VALUE') + { + $GLOBALS['_xh']['lv']=0; + } + } + } + + /// Used in decoding xml chunks that might represent single xmlrpc values + function xmlrpc_se_any($parser, $name, $attrs) + { + xmlrpc_se($parser, $name, $attrs, true); + } + + /// xml parser handler function for close element tags + function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true) + { + if ($GLOBALS['_xh']['isf'] < 2) + { + // push this element name from stack + // NB: if XML validates, correct opening/closing is guaranteed and + // we do not have to check for $name == $curr_elem. + // we also checked for proper nesting at start of elements... + $curr_elem = array_pop($GLOBALS['_xh']['stack']); + + switch($name) + { + case 'VALUE': + // This if() detects if no scalar was inside <VALUE></VALUE> + if ($GLOBALS['_xh']['vt']=='value') + { + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcString']; + } + + if ($rebuild_xmlrpcvals) + { + // build the xmlrpc val out of the data received, and substitute it + $temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']); + // in case we got info about underlying php class, save it + // in the object we're rebuilding + if (isset($GLOBALS['_xh']['php_class'])) + $temp->_php_class = $GLOBALS['_xh']['php_class']; + // check if we are inside an array or struct: + // if value just built is inside an array, let's move it into array on the stack + $vscount = count($GLOBALS['_xh']['valuestack']); + if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') + { + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $temp; + } + else + { + $GLOBALS['_xh']['value'] = $temp; + } + } + else + { + /// @todo this needs to treat correctly php-serialized objects, + /// since std deserializing is done by php_xmlrpc_decode, + /// which we will not be calling... + if (isset($GLOBALS['_xh']['php_class'])) + { + } + + // check if we are inside an array or struct: + // if value just built is inside an array, let's move it into array on the stack + $vscount = count($GLOBALS['_xh']['valuestack']); + if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') + { + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $GLOBALS['_xh']['value']; + } + } + break; + case 'BOOLEAN': + case 'I4': + case 'INT': + case 'STRING': + case 'DOUBLE': + case 'DATETIME.ISO8601': + case 'BASE64': + $GLOBALS['_xh']['vt']=strtolower($name); + /// @todo: optimization creep - remove the if/elseif cycle below + /// since the case() in which we are already did that + if ($name=='STRING') + { + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + } + elseif ($name=='DATETIME.ISO8601') + { + if (!preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $GLOBALS['_xh']['ac'])) + { + error_log('XML-RPC: invalid value received in DATETIME: '.$GLOBALS['_xh']['ac']); + } + $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcDateTime']; + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + } + elseif ($name=='BASE64') + { + /// @todo check for failure of base64 decoding / catch warnings + $GLOBALS['_xh']['value']=base64_decode($GLOBALS['_xh']['ac']); + } + elseif ($name=='BOOLEAN') + { + // special case here: we translate boolean 1 or 0 into PHP + // constants true or false. + // Strings 'true' and 'false' are accepted, even though the + // spec never mentions them (see eg. Blogger api docs) + // NB: this simple checks helps a lot sanitizing input, ie no + // security problems around here + if ($GLOBALS['_xh']['ac']=='1' || strcasecmp($GLOBALS['_xh']['ac'], 'true') == 0) + { + $GLOBALS['_xh']['value']=true; + } + else + { + // log if receiveing something strange, even though we set the value to false anyway + if ($GLOBALS['_xh']['ac']!='0' && strcasecmp($GLOBALS['_xh']['ac'], 'false') != 0) + error_log('XML-RPC: invalid value received in BOOLEAN: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']=false; + } + } + elseif ($name=='DOUBLE') + { + // we have a DOUBLE + // we must check that only 0123456789-.<space> are characters here + // NOTE: regexp could be much stricter than this... + if (!preg_match('/^[+-eE0123456789 \t.]+$/', $GLOBALS['_xh']['ac'])) + { + /// @todo: find a better way of throwing an error than this! + error_log('XML-RPC: non numeric value received in DOUBLE: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; + } + else + { + // it's ok, add it on + $GLOBALS['_xh']['value']=(double)$GLOBALS['_xh']['ac']; + } + } + else + { + // we have an I4/INT + // we must check that only 0123456789-<space> are characters here + if (!preg_match('/^[+-]?[0123456789 \t]+$/', $GLOBALS['_xh']['ac'])) + { + /// @todo find a better way of throwing an error than this! + error_log('XML-RPC: non numeric value received in INT: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; + } + else + { + // it's ok, add it on + $GLOBALS['_xh']['value']=(int)$GLOBALS['_xh']['ac']; + } + } + //$GLOBALS['_xh']['ac']=''; // is this necessary? + $GLOBALS['_xh']['lv']=3; // indicate we've found a value + break; + case 'NAME': + $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name'] = $GLOBALS['_xh']['ac']; + break; + case 'MEMBER': + //$GLOBALS['_xh']['ac']=''; // is this necessary? + // add to array in the stack the last element built, + // unless no VALUE was found + if ($GLOBALS['_xh']['vt']) + { + $vscount = count($GLOBALS['_xh']['valuestack']); + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][$GLOBALS['_xh']['valuestack'][$vscount-1]['name']] = $GLOBALS['_xh']['value']; + } else + error_log('XML-RPC: missing VALUE inside STRUCT in received xml'); + break; + case 'DATA': + //$GLOBALS['_xh']['ac']=''; // is this necessary? + $GLOBALS['_xh']['vt']=null; // reset this to check for 2 data elements in a row - even if they're empty + break; + case 'STRUCT': + case 'ARRAY': + // fetch out of stack array of values, and promote it to current value + $curr_val = array_pop($GLOBALS['_xh']['valuestack']); + $GLOBALS['_xh']['value'] = $curr_val['values']; + $GLOBALS['_xh']['vt']=strtolower($name); + if (isset($curr_val['php_class'])) + { + $GLOBALS['_xh']['php_class'] = $curr_val['php_class']; + } + break; + case 'PARAM': + // add to array of params the current value, + // unless no VALUE was found + if ($GLOBALS['_xh']['vt']) + { + $GLOBALS['_xh']['params'][]=$GLOBALS['_xh']['value']; + $GLOBALS['_xh']['pt'][]=$GLOBALS['_xh']['vt']; + } + else + error_log('XML-RPC: missing VALUE inside PARAM in received xml'); + break; + case 'METHODNAME': + $GLOBALS['_xh']['method']=preg_replace('/^[\n\r\t ]+/', '', $GLOBALS['_xh']['ac']); + break; + case 'NIL': + case 'EX:NIL': + if ($GLOBALS['xmlrpc_null_extension']) + { + $GLOBALS['_xh']['vt']='null'; + $GLOBALS['_xh']['value']=null; + $GLOBALS['_xh']['lv']=3; + break; + } + // drop through intentionally if nil extension not enabled + case 'PARAMS': + case 'FAULT': + case 'METHODCALL': + case 'METHORESPONSE': + break; + default: + // End of INVALID ELEMENT! + // shall we add an assert here for unreachable code??? + break; + } + } + } + + /// Used in decoding xmlrpc requests/responses without rebuilding xmlrpc values + function xmlrpc_ee_fast($parser, $name) + { + xmlrpc_ee($parser, $name, false); + } + + /// xml parser handler function for character data + function xmlrpc_cd($parser, $data) + { + // skip processing if xml fault already detected + if ($GLOBALS['_xh']['isf'] < 2) + { + // "lookforvalue==3" means that we've found an entire value + // and should discard any further character data + if($GLOBALS['_xh']['lv']!=3) + { + // G. Giunta 2006-08-23: useless change of 'lv' from 1 to 2 + //if($GLOBALS['_xh']['lv']==1) + //{ + // if we've found text and we're just in a <value> then + // say we've found a value + //$GLOBALS['_xh']['lv']=2; + //} + // we always initialize the accumulator before starting parsing, anyway... + //if(!@isset($GLOBALS['_xh']['ac'])) + //{ + // $GLOBALS['_xh']['ac'] = ''; + //} + $GLOBALS['_xh']['ac'].=$data; + } + } + } + + /// xml parser handler function for 'other stuff', ie. not char data or + /// element start/end tag. In fact it only gets called on unknown entities... + function xmlrpc_dh($parser, $data) + { + // skip processing if xml fault already detected + if ($GLOBALS['_xh']['isf'] < 2) + { + if(substr($data, 0, 1) == '&' && substr($data, -1, 1) == ';') + { + // G. Giunta 2006-08-25: useless change of 'lv' from 1 to 2 + //if($GLOBALS['_xh']['lv']==1) + //{ + // $GLOBALS['_xh']['lv']=2; + //} + $GLOBALS['_xh']['ac'].=$data; + } + } + return true; + } + + class xmlrpc_client + { + var $path; + var $server; + var $port=0; + var $method='http'; + var $errno; + var $errstr; + var $debug=0; + var $username=''; + var $password=''; + var $authtype=1; + var $cert=''; + var $certpass=''; + var $cacert=''; + var $cacertdir=''; + var $key=''; + var $keypass=''; + var $verifypeer=true; + var $verifyhost=1; + var $no_multicall=false; + var $proxy=''; + var $proxyport=0; + var $proxy_user=''; + var $proxy_pass=''; + var $proxy_authtype=1; + var $cookies=array(); + var $extracurlopts=array(); + + /** + * List of http compression methods accepted by the client for responses. + * NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib + * + * NNB: you can set it to any non-empty array for HTTP11 and HTTPS, since + * in those cases it will be up to CURL to decide the compression methods + * it supports. You might check for the presence of 'zlib' in the output of + * curl_version() to determine wheter compression is supported or not + */ + var $accepted_compression = array(); + /** + * Name of compression scheme to be used for sending requests. + * Either null, gzip or deflate + */ + var $request_compression = ''; + /** + * CURL handle: used for keep-alive connections (PHP 4.3.8 up, see: + * http://curl.haxx.se/docs/faq.html#7.3) + */ + var $xmlrpc_curl_handle = null; + /// Wheter to use persistent connections for http 1.1 and https + var $keepalive = false; + /// Charset encodings that can be decoded without problems by the client + var $accepted_charset_encodings = array(); + /// Charset encoding to be used in serializing request. NULL = use ASCII + var $request_charset_encoding = ''; + /** + * Decides the content of xmlrpcresp objects returned by calls to send() + * valid strings are 'xmlrpcvals', 'phpvals' or 'xml' + */ + var $return_type = 'xmlrpcvals'; + /** + * Sent to servers in http headers + */ + var $user_agent; + + /** + * @param string $path either the complete server URL or the PATH part of the xmlrc server URL, e.g. /xmlrpc/server.php + * @param string $server the server name / ip address + * @param integer $port the port the server is listening on, defaults to 80 or 443 depending on protocol used + * @param string $method the http protocol variant: defaults to 'http', 'https' and 'http11' can be used if CURL is installed + */ + function xmlrpc_client($path, $server='', $port='', $method='') + { + // allow user to specify all params in $path + if($server == '' and $port == '' and $method == '') + { + $parts = parse_url($path); + $server = $parts['host']; + $path = isset($parts['path']) ? $parts['path'] : ''; + if(isset($parts['query'])) + { + $path .= '?'.$parts['query']; + } + if(isset($parts['fragment'])) + { + $path .= '#'.$parts['fragment']; + } + if(isset($parts['port'])) + { + $port = $parts['port']; + } + if(isset($parts['scheme'])) + { + $method = $parts['scheme']; + } + if(isset($parts['user'])) + { + $this->username = $parts['user']; + } + if(isset($parts['pass'])) + { + $this->password = $parts['pass']; + } + } + if($path == '' || $path[0] != '/') + { + $this->path='/'.$path; + } + else + { + $this->path=$path; + } + $this->server=$server; + if($port != '') + { + $this->port=$port; + } + if($method != '') + { + $this->method=$method; + } + + // if ZLIB is enabled, let the client by default accept compressed responses + if(function_exists('gzinflate') || ( + function_exists('curl_init') && (($info = curl_version()) && + ((is_string($info) && strpos($info, 'zlib') !== null) || isset($info['libz_version']))) + )) + { + $this->accepted_compression = array('gzip', 'deflate'); + } + + // keepalives: enabled by default + $this->keepalive = true; + + // by default the xml parser can support these 3 charset encodings + $this->accepted_charset_encodings = array('UTF-8', 'ISO-8859-1', 'US-ASCII'); + + // initialize user_agent string + $this->user_agent = $GLOBALS['xmlrpcName'] . ' ' . $GLOBALS['xmlrpcVersion']; + } + + /** + * Enables/disables the echoing to screen of the xmlrpc responses received + * @param integer $debug values 0, 1 and 2 are supported (2 = echo sent msg too, before received response) + * @access public + */ + function setDebug($in) + { + $this->debug=$in; + } + + /** + * Add some http BASIC AUTH credentials, used by the client to authenticate + * @param string $u username + * @param string $p password + * @param integer $t auth type. See curl_setopt man page for supported auth types. Defaults to CURLAUTH_BASIC (basic auth) + * @access public + */ + function setCredentials($u, $p, $t=1) + { + $this->username=$u; + $this->password=$p; + $this->authtype=$t; + } + + /** + * Add a client-side https certificate + * @param string $cert + * @param string $certpass + * @access public + */ + function setCertificate($cert, $certpass) + { + $this->cert = $cert; + $this->certpass = $certpass; + } + + /** + * Add a CA certificate to verify server with (see man page about + * CURLOPT_CAINFO for more details + * @param string $cacert certificate file name (or dir holding certificates) + * @param bool $is_dir set to true to indicate cacert is a dir. defaults to false + * @access public + */ + function setCaCertificate($cacert, $is_dir=false) + { + if ($is_dir) + { + $this->cacertdir = $cacert; + } + else + { + $this->cacert = $cacert; + } + } + + /** + * Set attributes for SSL communication: private SSL key + * NB: does not work in older php/curl installs + * Thanks to Daniel Convissor + * @param string $key The name of a file containing a private SSL key + * @param string $keypass The secret password needed to use the private SSL key + * @access public + */ + function setKey($key, $keypass) + { + $this->key = $key; + $this->keypass = $keypass; + } + + /** + * Set attributes for SSL communication: verify server certificate + * @param bool $i enable/disable verification of peer certificate + * @access public + */ + function setSSLVerifyPeer($i) + { + $this->verifypeer = $i; + } + + /** + * Set attributes for SSL communication: verify match of server cert w. hostname + * @param int $i + * @access public + */ + function setSSLVerifyHost($i) + { + $this->verifyhost = $i; + } + + /** + * Set proxy info + * @param string $proxyhost + * @param string $proxyport Defaults to 8080 for HTTP and 443 for HTTPS + * @param string $proxyusername Leave blank if proxy has public access + * @param string $proxypassword Leave blank if proxy has public access + * @param int $proxyauthtype set to constant CURLAUTH_NTLM to use NTLM auth with proxy + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 1) + { + $this->proxy = $proxyhost; + $this->proxyport = $proxyport; + $this->proxy_user = $proxyusername; + $this->proxy_pass = $proxypassword; + $this->proxy_authtype = $proxyauthtype; + } + + /** + * Enables/disables reception of compressed xmlrpc responses. + * Note that enabling reception of compressed responses merely adds some standard + * http headers to xmlrpc requests. It is up to the xmlrpc server to return + * compressed responses when receiving such requests. + * @param string $compmethod either 'gzip', 'deflate', 'any' or '' + * @access public + */ + function setAcceptedCompression($compmethod) + { + if ($compmethod == 'any') + $this->accepted_compression = array('gzip', 'deflate'); + else + $this->accepted_compression = array($compmethod); + } + + /** + * Enables/disables http compression of xmlrpc request. + * Take care when sending compressed requests: servers might not support them + * (and automatic fallback to uncompressed requests is not yet implemented) + * @param string $compmethod either 'gzip', 'deflate' or '' + * @access public + */ + function setRequestCompression($compmethod) + { + $this->request_compression = $compmethod; + } + + /** + * Adds a cookie to list of cookies that will be sent to server. + * NB: setting any param but name and value will turn the cookie into a 'version 1' cookie: + * do not do it unless you know what you are doing + * @param string $name + * @param string $value + * @param string $path + * @param string $domain + * @param int $port + * @access public + * + * @todo check correctness of urlencoding cookie value (copied from php way of doing it...) + */ + function setCookie($name, $value='', $path='', $domain='', $port=null) + { + $this->cookies[$name]['value'] = urlencode($value); + if ($path || $domain || $port) + { + $this->cookies[$name]['path'] = $path; + $this->cookies[$name]['domain'] = $domain; + $this->cookies[$name]['port'] = $port; + $this->cookies[$name]['version'] = 1; + } + else + { + $this->cookies[$name]['version'] = 0; + } + } + + /** + * Directly set cURL options, for extra flexibility + * It allows eg. to bind client to a specific IP interface / address + * @param $options array + */ + function SetCurlOptions( $options ) + { + $this->extracurlopts = $options; + } + + /** + * Set user-agent string that will be used by this client instance + * in http headers sent to the server + */ + function SetUserAgent( $agentstring ) + { + $this->user_agent = $agentstring; + } + + /** + * Send an xmlrpc request + * @param mixed $msg The message object, or an array of messages for using multicall, or the complete xml representation of a request + * @param integer $timeout Connection timeout, in seconds, If unspecified, a platform specific timeout will apply + * @param string $method if left unspecified, the http protocol chosen during creation of the object will be used + * @return xmlrpcresp + * @access public + */ + function& send($msg, $timeout=0, $method='') + { + // if user deos not specify http protocol, use native method of this client + // (i.e. method set during call to constructor) + if($method == '') + { + $method = $this->method; + } + + if(is_array($msg)) + { + // $msg is an array of xmlrpcmsg's + $r = $this->multicall($msg, $timeout, $method); + return $r; + } + elseif(is_string($msg)) + { + $n = new xmlrpcmsg(''); + $n->payload = $msg; + $msg = $n; + } + + // where msg is an xmlrpcmsg + $msg->debug=$this->debug; + + if($method == 'https') + { + $r =& $this->sendPayloadHTTPS( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + $this->cert, + $this->certpass, + $this->cacert, + $this->cacertdir, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype, + $this->keepalive, + $this->key, + $this->keypass + ); + } + elseif($method == 'http11') + { + $r =& $this->sendPayloadCURL( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + null, + null, + null, + null, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype, + 'http', + $this->keepalive + ); + } + else + { + $r =& $this->sendPayloadHTTP10( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype + ); + } + + return $r; + } + + /** + * @access private + */ + function &sendPayloadHTTP10($msg, $server, $port, $timeout=0, + $username='', $password='', $authtype=1, $proxyhost='', + $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1) + { + if($port==0) + { + $port=80; + } + + // Only create the payload if it was not created previously + if(empty($msg->payload)) + { + $msg->createPayload($this->request_charset_encoding); + } + + $payload = $msg->payload; + // Deflate request body and set appropriate request headers + if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) + { + if($this->request_compression == 'gzip') + { + $a = @gzencode($payload); + if($a) + { + $payload = $a; + $encoding_hdr = "Content-Encoding: gzip\r\n"; + } + } + else + { + $a = @gzcompress($payload); + if($a) + { + $payload = $a; + $encoding_hdr = "Content-Encoding: deflate\r\n"; + } + } + } + else + { + $encoding_hdr = ''; + } + + // thanks to Grant Rauscher <gr...@fi...> for this + $credentials=''; + if($username!='') + { + $credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n"; + if ($authtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0'); + } + } + + $accepted_encoding = ''; + if(is_array($this->accepted_compression) && count($this->accepted_compression)) + { + $accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n"; + } + + $proxy_credentials = ''; + if($proxyhost) + { + if($proxyport == 0) + { + $proxyport = 8080; + } + $connectserver = $proxyhost; + $connectport = $proxyport; + $uri = 'http://'.$server.':'.$port.$this->path; + if($proxyusername != '') + { + if ($proxyauthtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0'); + } + $proxy_credentials = 'Proxy-Authorization: Basic ' . base64_encode($proxyusername.':'.$proxypassword) . "\r\n"; + } + } + else + { + $connectserver = $server; + $connectport = $port; + $uri = $this->path; + } + + // Cookie generation, as per rfc2965 (version 1 cookies) or + // netscape's rules (version 0 cookies) + $cookieheader=''; + if (count($this->cookies)) + { + $version = ''; + foreach ($this->cookies as $name => $cookie) + { + if ($cookie['version']) + { + $version = ' $Version="' . $cookie['version'] . '";'; + $cookieheader .= ' ' . $name . '="' . $cookie['value'] . '";'; + if ($cookie['path']) + $cookieheader .= ' $Path="' . $cookie['path'] . '";'; + if ($cookie['domain']) + $cookieheader .= ' $Domain="' . $cookie['domain'] . '";'; + if ($cookie['port']) + $cookieheader .= ' $Port="' . $cookie['port'] . '";'; + } + else + { + $cookieheader .= ' ' . $name . '=' . $cookie['value'] . ";"; + } + } + $cookieheader = 'Cookie:' . $version . substr($cookieheader, 0, -1) . "\r\n"; + } + + $op= 'POST ' . $uri. " HTTP/1.0\r\n" . + 'User-Agent: ' . $this->user_agent . "\r\n" . + 'Host: '. $server . ':' . $port . "\r\n" . + $credentials . + $proxy_credentials . + $accepted_encoding . + $encoding_hdr . + 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings) . "\r\n" . + $cookieheader . + 'Content-Type: ' . $msg->content_type . "\r\nContent-Length: " . + strlen($payload) . "\r\n\r\n" . + $payload; + + if($this->debug > 1) + { + print "<PRE>\n---SENDING---\n" . htmlentities($op) . "\n---END---\n</PRE>"; + // let the client see this now in case http times out... + flush(); + } + + if($timeout>0) + { + $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout); + } + else + { + $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); + } + if($fp) + { + if($timeout>0 && function_exists('stream_set_timeout')) + { + stream_set_timeout($fp, $timeout); + } + } + else + { + $this->errstr='Connect error: '.$this->errstr; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')'); + return $r; + } + + if(!fputs($fp, $op, strlen($op))) + { + fclose($fp); + $this->errstr='Write error'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr); + return $r; + } + else + { + // reset errno and errstr on succesful socket connection + $this->errstr = ''; + } + // G. Giunta 2005/10/24: close socket before parsing. + // should yeld slightly better execution times, and make easier recursive calls (e.g. to follow http redirects) + $ipd=''; + do + { + // shall we check for $data === FALSE? + // as per the manual, it signals an error + $ipd.=fread($fp, 32768); + } while(!feof($fp)); + fclose($fp); + $r =& $msg->parseResponse($ipd, false, $this->return_type); + return $r; + + } + + /** + * @access private + */ + function &sendPayloadHTTPS($msg, $server, $port, $timeout=0, $username='', + $password='', $authtype=1, $cert='',$certpass='', $cacert='', $cacertdir='', + $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, + $keepalive=false, $key='', $keypass='') + { + $r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username, + $password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport, + $proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass); + return $r; + } + + /** + * Contributed by Justin Miller <ju...@vo...> + * Requires curl to be built into PHP + * NB: CURL versions before 7.11.10 cannot use proxy to talk to https servers! + * @access private + */ + function &sendPayloadCURL($msg, $server, $port, $timeout=0, $username='', + $password='', $authtype=1, $cert='', $certpass='', $cacert='', $cacertdir='', + $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, $method='https', + $keepalive=false, $key='', $keypass='') + { + if(!function_exists('curl_init')) + { + $this->errstr='CURL unavailable on this install'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']); + return $r; + } + if($method == 'https') + { + if(($info = curl_version()) && + ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version'])))) + { + $this->errstr='SSL unavailable on this install'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']); + return $r; + } + } + + if($port == 0) + { + if($method == 'http') + { + $port = 80; + } + else + { + $port = 443; + } + } + + // Only create the payload if it was not created previously + if(empty($msg->payload)) + { + $msg->createPayload($this->request_charset_encoding); + } + + // Deflate request body and set appropriate request headers + $payload = $msg->payload; + if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) + { + if($this->request_compression == 'gzip') + { + $a = @gzencode($payload); + if($a) + { + $payload = $a; + $encoding_hdr = 'Content-Encoding: gzip'; + } + } + else + { + $a = @gzcompress($payload); + if($a) + { + $payload = $a; + $encoding_hdr = 'Content-Encoding: deflate'; + } + } + } + else + { + $encoding_hdr = ''; + } + + if($this->debug > 1) + { + print "<PRE>\n---SENDING---\n" . htmlentities($payload) . "\n---END---\n</PRE>"; + // let the client see this now in case http times out... + flush(); + } + + if(!$keepalive || !$this->xmlrpc_curl_handle) + { + $curl = curl_init($method . '://' . $server . ':' . $port . $this->path); + if($keepalive) + { + $this->xmlrpc_curl_handle = $curl; + } + } + else + { + $curl = $this->xmlrpc_curl_handle; + } + + // results into variable + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + + if($this->debug) + { + curl_setopt($curl, CURLOPT_VERBOSE, 1); + } + curl_setopt($curl, CURLOPT_USERAGENT, $this->user_agent); + // required for XMLRPC: post the data + curl_setopt($curl, CURLOPT_POST, 1); + // the data + curl_setopt($curl, CURLOPT_POSTFIELDS, $payload); + + // return the header too + curl_setopt($curl, CURLOPT_HEADER, 1); + + // will only work with PHP >= 5.0 + // NB: if we set an empty string, CURL will add http header indicating + // ALL methods it is supporting. This is possibly a better option than + // letting the user tell what curl can / cannot do... + if(is_array($this->accepted_compression) && count($this->accepted_compression)) + { + //curl_setopt($curl, CURLOPT_ENCODING, implode(',', $this->accepted_compression)); + // empty string means 'any supported by CURL' (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if (count($this->accepted_compression) == 1) + { + curl_setopt($curl, CURLOPT_ENCODING, $this->accepted_compression[0]); + } + else + curl_setopt($curl, CURLOPT_ENCODING, ''); + } + // extra headers + $headers = array('Content-Type: ' . $msg->content_type , 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings)); + // if no keepalive is wanted, let the server know it in advance + if(!$keepalive) + { + $headers[] = 'Connection: close'; + } + // request compression header + if($encoding_hdr) + { + $headers[] = $encoding_hdr; + } + + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + // timeout is borked + if($timeout) + { + curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1); + } + + if($username && $password) + { + curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password); + if (defined('CURLOPT_HTTPAUTH')) + { + curl_setopt($curl, CURLOPT_HTTPAUTH, $authtype); + } + else if ($authtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install'); + } + } + + if($method == 'https') + { + // set cert file + if($cert) + { + curl_setopt($curl, CURLOPT_SSLCERT, $cert); + } + // set cert password + if($certpass) + { + curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $certpass); + } + // whether to verify remote host's cert + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifypeer); + // set ca certificates file/dir + if($cacert) + { + curl_setopt($curl, CURLOPT_CAINFO, $cacert); + } + if($cacertdir) + { + curl_setopt($curl, CURLOPT_CAPATH, $cacertdir); + } + // set key file (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if($key) + { + curl_setopt($curl, CURLOPT_SSLKEY, $key); + } + // set key password (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if($keypass) + { + curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $keypass); + } + // whether to verify cert's common name (CN); 0 for no, 1 to verify that it exists, and 2 to verify that it matches the hostname used + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $this->verifyhost); + } + + // proxy info + if($proxyhost) + { + if($proxyport == 0) + { + $proxyport = 8080; // NB: even for HTTPS, local connection is on port 8080 + } + curl_setopt($curl, CURLOPT_PROXY, $proxyhost.':'.$proxyport); + //curl_setopt($curl, CURLOPT_PROXYPORT,$proxyport); + if($proxyusername) + { + curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyusername.':'.$proxypassword); + if (defined('CURLOPT_PROXYAUTH')) + { + curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyauthtype); + } + else if ($proxyauthtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); + } + } + } + + // NB: should we build cookie http headers by hand rather than let CURL do it? + // the following code does not honour 'expires', 'path' and 'domain' cookie attributes + // set to client obj the the user... + if (count($this->cookies)) + { + $cookieheader = ''; + foreach ($this->cookies as $name => $cookie) + { + $cookieheader .= $name . '=' . $cookie['value'] . '; '; + } + curl_setopt($curl, CURLOPT_COOKIE, substr($cookieheader, 0, -2)); + } + + foreach ($this->extracurlopts as $opt => $val) + { + curl_setopt($curl, $opt, $val); + } + + $result = curl_exec($curl); + + if ($this->debug > 1) + { + print "<PRE>\n---CURL INFO---\n"; + foreach(curl_getinfo($curl) as $name => $val) + print $name . ': ' . htmlentities($val). "\n"; + print "---END---\n</PRE>"; + } + + if(!$result) /// @todo we should use a better check here - what if we get back '' or '0'? + { + $this->errstr='no response'; + $resp=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl)); + curl_close($curl); + if($keepalive) + { + $this->xmlrpc_curl_handle = null; + } + } + else + { + if(!$keepalive) + { + curl_close($curl); + } + $resp =& $msg->parseResponse($result, true, $this->return_type); + } + return $resp; + } + + /** + * Send an array of request messages and return an array of responses. + * Unless $this->no_multicall has been set to true, it will try first + * to use one single xmlrpc call to server method system.multicall, and + * revert to sending many successive calls in case of failure. + * This failure is also stored in $this->no_multicall for subsequent calls. + * Unfortunately, there is no server error code universally used to denote + * the fact that multicall is unsupported, so there is no way to reliably + * distinguish between that and a temporary failure. + * If you are sure that server supports multicall and do not want to + * fallback to using many single calls, set the fourth parameter to FALSE. + * + * NB: trying to shoehorn extra functionality into existing syntax has resulted + * in pretty much convoluted code... + * + * @param array $msgs an array of xmlrpcmsg objects + * @param integer $timeout connection timeout (in seconds) + * @param string $method the http protocol variant to be used + * @param boolean fallback When true, upon receiveing an error during multicall, multiple single calls will be attempted + * @return array + * @access public + */ + function multicall($msgs, $timeout=0, $method='', $fallback=true) + { + if ($method == '') + { + $method = $this->method; + } + if(!$this->no_multicall) + { + $results = $this->_try_multicall($msgs, $timeout, $method); + if(is_array($results)) + { + // System.multicall succeeded + return $results; + } + else + { + // either system.multicall is unsupported by server, + // or call failed for some other reason. + if ($fallback) + { + // Don't try it next time... + $this->no_multicall = true; + } + else + { + if (is_a($results, 'xmlrpcresp')) + { + $result = $results; + } + else + { + $result = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']); + } + } + } + } + else + { + // override fallback, in case careless user tries to do two + // opposite things at the same time + $fallback = true; + } + + $results = array(); + if ($fallback) + { + // system.multicall is (probably) unsupported by server: + // emulate multicall via multiple requests + foreach($msgs as $msg) + { + $results[] =& $this->send($msg, $timeout, $method); + } + } + else + { + // user does NOT want to fallback on many single calls: + // since we should always return an array of responses, + // return an array with the same error repeated n times + foreach($msgs as $msg) + { + $results[] = $result; + } + } + return $results; + } + + /** + * Attempt to boxcar $msgs via system.multicall. + * Returns either an array of xmlrpcreponses, an xmlrpc error response + * or false (when received response does not respect valid multicall syntax) + * @access private + */ + function _try_multicall($msgs, $timeout, $method) + { + // Construct multicall message + $calls = array(); + foreach($msgs as $msg) + { + $call['methodName'] = new xmlrpcval($msg->method(),'string'); + $numParams = $msg->getNumParams(); + $params = array(); + for($i = 0; $i < $numParams; $i++) + { + $params[$i] = $msg->getParam($i); + } + $call['params'] = new xmlrpcval($params, 'array'); + $calls[] = new xmlrpcval($call, 'struct'); + } + $multicall = new xmlrpcmsg('system.multicall'); + $multicall->addParam(new xmlrpcval($calls, 'array')); + + // Attempt RPC call + $result =& $this->send($multicall, $timeout, $method); + + if($result->faultCode() != 0) + { + // call to system.multicall failed + return $result; + } + + // Unpack responses. + $rets = $result->value(); + + if ($this->return_type == 'xml') + { + return $rets; + } + else if ($this->return_type == 'phpvals') + { + ///@todo test this code branch... + $rets = $result->value(); + if(!is_array($rets)) + { + return false; // bad return type from system.multicall + } + $numRets = count($rets); + if($numRets != count($msgs)) + { + return false; // wrong number of return values. + } + + $response = array(); + for($i = 0; $i < $numRets; $i++) + { + $val = $rets[$i]; + if (!is_array($val)) { + return false; + } + switch(count($val)) + { + case 1: + if(!isset($val[0])) + { + return false; // Bad value + } + // Normal return value + $response[$i] = new xmlrpcresp($val[0], 0, '', 'phpvals'); + break; + case 2: + /// @todo remove usage of @: it is apparently quite slow + $code = @$val['faultCode']; + if(!is_int($code)) + { + return false; + } + $str = @$val['faultString']; + if(!is_string($str)) + { + return false; + } + $response[$i] = new xmlrpcresp(0, $code, $str); + break; + default: + return false; + } + } + return $response; + } + else // return type == 'xmlrpcvals' + { + $rets = $result->value();... [truncated message content] |
From: <rc...@us...> - 2014-10-25 19:25:20
|
Revision: 6940 http://sourceforge.net/p/web-erp/reponame/6940 Author: rchacon Date: 2014-10-25 19:25:12 +0000 (Sat, 25 Oct 2014) Log Message: ----------- Minor changes (script Id, cleans */). Modified Paths: -------------- trunk/AccountGroups.php trunk/index.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2014-10-25 07:08:51 UTC (rev 6939) +++ trunk/AccountGroups.php 2014-10-25 19:25:12 UTC (rev 6940) @@ -2,11 +2,11 @@ /* $Id$*/ include('includes/session.inc'); + $Title = _('Account Groups'); -/* Manual links before header.inc */ $ViewTopic= 'GeneralLedger';// Filename in ManualContents.php's TOC. -$BookMark = 'AccountGroups';// Anchor's id in the manual's html document.*/ -include('includes/header.inc'); +$BookMark = 'AccountGroups';// Anchor's id in the manual's html document. +include('includes/header.inc');// Manual links before header.inc. include('includes/SQL_CommonFunctions.inc'); Modified: trunk/index.php =================================================================== --- trunk/index.php 2014-10-25 07:08:51 UTC (rev 6939) +++ trunk/index.php 2014-10-25 19:25:12 UTC (rev 6940) @@ -1,4 +1,6 @@ <?php +/* $Id$*/ + $PageSecurity=0; include('includes/session.inc'); |
From: <dai...@us...> - 2014-10-26 23:18:16
|
Revision: 6941 http://sourceforge.net/p/web-erp/reponame/6941 Author: daintree Date: 2014-10-26 23:18:08 +0000 (Sun, 26 Oct 2014) Log Message: ----------- remove $db from DB_query calls Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedControlledInventory.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccountUsers.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractCosting.php trunk/Contracts.php trunk/CopyBOM.php trunk/CounterReturns.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustItem.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerPurchases.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/Dashboard.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EDISendInvoices_Reece.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/FTP_RadioBeacon.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLCodesInquiry.php trunk/GLJournal.php trunk/GLJournalInquiry.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GLTrialBalance_csv.php trunk/GeocodeSetup.php trunk/GoodsReceived.php trunk/ImportBankTrans.php trunk/ImportBankTransAnalysis.php trunk/InternalStockCategoriesByRole.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/MailingGroupMaintenance.php trunk/MaintenanceReminders.php trunk/MaintenanceTasks.php trunk/MaintenanceUserSchedule.php trunk/Manufacturers.php trunk/MaterialsNotUsed.php trunk/NoSalesItems.php trunk/OffersReceived.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFFGLabel.php trunk/PDFGLJournal.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQALabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFReceipt.php trunk/PDFRemittanceAdvice.php trunk/PDFSellThroughSupportClaim.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockNegatives.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/PDFTopItems.php trunk/PDFWOPrint.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Chk_ShiptRef_JobRef.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PageSecurity.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/PeriodsInquiry.php trunk/PriceMatrix.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PrintWOItemSlip.php trunk/PurchData.php trunk/PurchaseByPrefSupplier.php trunk/RecurringSalesOrders.php trunk/RecurringSalesOrdersProcess.php trunk/RelatedItemsUpdate.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategories.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTopCustomersInquiry.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectAsset.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SellThroughSupport.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/ShiptsList.php trunk/ShopParameters.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockClone.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQties_csv.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItemResearch.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierPriceList.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/UserSettings.php trunk/WOCanBeProducedNow.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeGLAccountCode.php trunk/Z_ChangeLocationCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_CheckAllocationsFrom.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_ClearPOBackOrders.php trunk/Z_CreateChartDetails.php trunk/Z_CreateCompany.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DataExport.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_DeleteOldPrices.php trunk/Z_DeleteSalesTransActions.php trunk/Z_DescribeTable.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportDebtors.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportGLTransactions.php trunk/Z_ImportPartCodes.php trunk/Z_ImportPriceList.php trunk/Z_ImportStocks.php trunk/Z_ImportSuppliers.php trunk/Z_ItemsWithoutPicture.php trunk/Z_MakeLocUsers.php trunk/Z_MakeNewCompany.php trunk/Z_MakeStockLocns.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_SalesIntegrityCheck.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_UpdateSalesAnalysisWithLatestCustomerData.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.01-3.02.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/api/api_branches.php trunk/api/api_currencies.php trunk/api/api_customers.php trunk/api/api_customertypes.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_holdreasons.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_paymentterms.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_session.inc trunk/api/api_shippers.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_taxgroups.php trunk/api/api_webERPsettings.php trunk/api/api_workorders.php trunk/doc/Change.log trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/geocode.php trunk/geocode_genxml_customers.php trunk/geocode_genxml_suppliers.php trunk/includes/AccountSectionsDef.inc trunk/includes/Add_SerialItems.php trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/ConnectDB_postgres.inc trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/Contract_Readin.php trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/DefineContractClass.php trunk/includes/DefineOfferClass.php trunk/includes/DefineReceiptClass.php trunk/includes/DefineSerialItems.php trunk/includes/DefineShiptClass.php trunk/includes/DefineSuppTransClass.php trunk/includes/DefineTenderClass.php trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/GLPostings.inc trunk/includes/GetConfig.php trunk/includes/GetPaymentMethods.php trunk/includes/GetPrice.inc trunk/includes/GetSalesTransGLCodes.inc trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/MiscFunctions.php trunk/includes/OutputSerialItems.php trunk/includes/PDFAgedDebtorsPageHeader.inc trunk/includes/PDFPaymentRun_PymtFooter.php trunk/includes/PDFTopItemsHeader.inc trunk/includes/PO_PDFOrderPageHeader.inc trunk/includes/PO_ReadInOrder.inc trunk/includes/SQL_CommonFunctions.inc trunk/includes/SelectOrderItems_IntoCart.inc trunk/includes/UserLogin.php trunk/includes/Z_POSDataCreation.php trunk/index.php trunk/locale/zh_CN.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_HK.utf8/Manual/ManualAPIFunctions.php trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/ReportCreator.php trunk/reportwriter/install/ReportListForm.php trunk/reportwriter/install/ReportListLinks.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AccountGroups.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -24,7 +24,7 @@ FROM accountgroups WHERE groupname='" . $GroupName ."'"; - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $myrow = DB_fetch_row($result); if ($ParentGroupName == $myrow[0]){ return true; @@ -48,7 +48,7 @@ $sql="UPDATE chartmaster SET group_='" . $_POST['DestinyAccountGroup'] . "' WHERE group_='" . $_POST['OriginalAccountGroup'] . "'"; $ErrMsg = _('An error occurred in moving the account group'); $DbgMsg = _('The SQL that was used to move the account group was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Account Groups') . '</a></div>'; prnMsg( _('All accounts in the account group:') . ' ' . $_POST['OriginalAccountGroup'] . ' ' . _('have been changed to the account group:') . ' ' . $_POST['DestinyAccountGroup'],'success'); } @@ -72,7 +72,7 @@ $DbgMsg = _('The SQL that was used to retrieve the information was'); $ErrMsg = _('Could not check whether the group exists because'); - $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); $myrow=DB_fetch_row($result); if ($myrow[0] != 0 AND $_POST['SelectedAccountGroup'] == '') { @@ -109,7 +109,7 @@ $DbgMsg = _('The SQL that was used to retrieve the information was'); $ErrMsg = _('Could not check whether the group is recursive because'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $ParentGroupRow = DB_fetch_array($result); $_POST['SequenceInTB'] = $ParentGroupRow['sequenceintb']; @@ -151,13 +151,13 @@ $ErrMsg = _('An error occurred in renaming the account group'); $DbgMsg = _('The SQL that was used to rename the account group was'); - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + $result = DB_query($sql, $ErrMsg, $DbgMsg); $sql = "UPDATE accountgroups SET parentgroupname='" . $_POST['GroupName'] . "' WHERE parentgroupname='" . $_POST['SelectedAccountGroup'] . "'"; - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + $result = DB_query($sql, $ErrMsg, $DbgMsg); DB_ReinstateForeignKeys($db); } @@ -194,7 +194,7 @@ if ($InputError!=1){ //run the SQL from either of the above possibilites - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); prnMsg($msg,'success'); unset ($_POST['SelectedAccountGroup']); unset ($_POST['GroupName']); @@ -208,7 +208,7 @@ $sql= "SELECT COUNT(group_) AS groups FROM chartmaster WHERE chartmaster.group_='" . $_GET['SelectedAccountGroup'] . "'"; $ErrMsg = _('An error occurred in retrieving the group information from chartmaster'); $DbgMsg = _('The SQL that was used to retrieve the information was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); if ($myrow['groups']>0) { prnMsg( _('Cannot delete this account group because general ledger accounts have been created using this group'),'warn'); @@ -223,7 +223,7 @@ <td><select tabindex="2" ' . (in_array('ParentGroupName',$Errors) ? 'class="selecterror"' : '' ) . ' name="DestinyAccountGroup">'; $sql = "SELECT groupname FROM accountgroups"; - $GroupResult = DB_query($sql, $db,$ErrMsg,$DbgMsg); + $GroupResult = DB_query($sql,$ErrMsg,$DbgMsg); while ($GroupRow = DB_fetch_array($GroupResult) ) { if (isset($_POST['ParentGroupName']) AND $_POST['ParentGroupName']==$GroupRow['groupname']) { @@ -243,7 +243,7 @@ $sql = "SELECT COUNT(groupname) groupnames FROM accountgroups WHERE parentgroupname = '" . $_GET['SelectedAccountGroup'] . "'"; $ErrMsg = _('An error occurred in retrieving the parent group information'); $DbgMsg = _('The SQL that was used to retrieve the information was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); if ($myrow['groupnames']>0) { prnMsg( _('Cannot delete this account group because it is a parent account group of other account group(s)'),'warn'); @@ -253,7 +253,7 @@ $sql="DELETE FROM accountgroups WHERE groupname='" . $_GET['SelectedAccountGroup'] . "'"; $ErrMsg = _('An error occurred in deleting the account group'); $DbgMsg = _('The SQL that was used to delete the account group was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); prnMsg( $_GET['SelectedAccountGroup'] . ' ' . _('group has been deleted') . '!','success'); } @@ -281,7 +281,7 @@ $DbgMsg = _('The sql that was used to retrieve the account group information was '); $ErrMsg = _('Could not get account groups because'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" />' . ' ' . $Title . '</p><br />'; echo '<table class="selection"> @@ -353,7 +353,7 @@ $ErrMsg = _('An error occurred in retrieving the account group information'); $DbgMsg = _('The SQL that was used to retrieve the account group and that failed in the process was'); - $result = DB_query($sql, $db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); if (DB_num_rows($result) == 0) { prnMsg( _('The account group name does not exist in the database'),'error'); include('includes/footer.inc'); @@ -408,7 +408,7 @@ <td><select tabindex="2" ' . (in_array('ParentGroupName',$Errors) ? 'class="selecterror"' : '' ) . ' name="ParentGroupName">'; $sql = "SELECT groupname FROM accountgroups"; - $groupresult = DB_query($sql, $db,$ErrMsg,$DbgMsg); + $groupresult = DB_query($sql,$ErrMsg,$DbgMsg); if (!isset($_POST['ParentGroupName'])){ echo '<option selected="selected" value="">' ._('Top Level Group') . '</option>'; } else { @@ -430,7 +430,7 @@ <td><select tabindex="3" ' . (in_array('SectionInAccounts',$Errors) ? 'class="selecterror"' : '' ) . ' name="SectionInAccounts">'; $sql = "SELECT sectionid, sectionname FROM accountsection ORDER BY sectionid"; - $secresult = DB_query($sql, $db,$ErrMsg,$DbgMsg); + $secresult = DB_query($sql,$ErrMsg,$DbgMsg); while( $secrow = DB_fetch_array($secresult) ) { if ($_POST['SectionInAccounts']==$secrow['sectionid']) { echo '<option selected="selected" value="'.$secrow['sectionid'].'">' . $secrow['sectionname'].' ('.$secrow['sectionid'].')</option>'; Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AccountSections.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -10,25 +10,25 @@ // SOME TEST TO ENSURE THAT AT LEAST INCOME AND COST OF SALES ARE THERE $sql= "SELECT sectionid FROM accountsection WHERE sectionid=1"; - $result = DB_query($sql,$db); + $result = DB_query($sql); if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, sectionname) VALUES (1, 'Income')"; - $result = DB_query($sql,$db); + $result = DB_query($sql); } $sql= "SELECT sectionid FROM accountsection WHERE sectionid=2"; - $result = DB_query($sql,$db); + $result = DB_query($sql); if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, sectionname) VALUES (2, 'Cost Of Sales')"; - $result = DB_query($sql,$db); + $result = DB_query($sql); } // DONE WITH MINIMUM TESTS @@ -54,7 +54,7 @@ $sql="SELECT sectionid FROM accountsection WHERE sectionid='".$_POST['SectionID']."'"; - $result=DB_query($sql, $db); + $result=DB_query($sql); if ((DB_num_rows($result)!=0 AND !isset($_POST['SelectedSectionID']))) { $InputError = 1; @@ -110,7 +110,7 @@ if ($InputError!=1){ //run the SQL from either of the above possibilites - $result = DB_query($sql,$db); + $result = DB_query($sql); prnMsg($msg,'success'); unset ($_POST['SelectedSectionID']); unset ($_POST['SectionID']); @@ -122,7 +122,7 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'accountgroups' $sql= "SELECT COUNT(sectioninaccounts) AS sections FROM accountgroups WHERE sectioninaccounts='" . $_GET['SelectedSectionID'] . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); if ($myrow['sections']>0) { prnMsg( _('Cannot delete this account section because general ledger accounts groups have been created using this section'),'warn'); @@ -133,12 +133,12 @@ } else { //Fetch section name $sql = "SELECT sectionname FROM accountsection WHERE sectionid='".$_GET['SelectedSectionID'] . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); $SectionName = $myrow['sectionname']; $sql="DELETE FROM accountsection WHERE sectionid='" . $_GET['SelectedSectionID'] . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); prnMsg( $SectionName . ' ' . _('section has been deleted') . '!','success'); } //end if account group used in GL accounts @@ -165,7 +165,7 @@ ORDER BY sectionid"; $ErrMsg = _('Could not get account group sections because'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" />' . ' ' . $Title . '</p><br />'; echo '<table class="selection"> @@ -218,7 +218,7 @@ FROM accountsection WHERE sectionid='" . $_GET['SelectedSectionID'] ."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); if ( DB_num_rows($result) == 0 ) { prnMsg( _('Could not retrieve the requested section please try again.'),'warn'); unset($_GET['SelectedSectionID']); Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AddCustomerContacts.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -19,7 +19,7 @@ } echo '<a href="' . $RootPath . '/Customers.php?DebtorNo=' . $DebtorNo . '">' . _('Back to Customers') . '</a><br />'; $SQLname="SELECT name FROM debtorsmaster WHERE debtorno='" . $DebtorNo . "'"; -$Result = DB_query($SQLname,$db); +$Result = DB_query($SQLname); $row = DB_fetch_array($Result); if (!isset($_GET['Id'])) { echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Contacts for Customer') . ': <b>' . htmlspecialchars($row['name'], ENT_QUOTES, 'UTF-8') . '</b></p><br />'; @@ -75,7 +75,7 @@ } if ($InputError !=1) { - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo '<br />' . $sql; echo '<br />'; @@ -97,7 +97,7 @@ $sql="DELETE FROM custcontacts WHERE contid='" . $Id . "' AND debtorno='" . $DebtorNo . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<br />'; prnMsg( _('The contact record has been deleted'), 'success'); @@ -118,7 +118,7 @@ FROM custcontacts WHERE debtorno='".$DebtorNo."' ORDER BY contid"; - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo '<br />' . $sql; echo '<table class="selection">'; @@ -187,7 +187,7 @@ WHERE contid='".$Id."' AND debtorno='".$DebtorNo."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); $_POST['Con_ID'] = $myrow['contid']; Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AddCustomerNotes.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -65,7 +65,7 @@ } if ($InputError !=1) { - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo '<br />' . $sql; echo '<br />'; @@ -85,7 +85,7 @@ $sql="DELETE FROM custnotes WHERE noteid='".$Id."' AND debtorno='".$DebtorNo."'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<br />'; prnMsg( _('The contact note record has been deleted'), 'success'); @@ -96,7 +96,7 @@ if (!isset($Id)) { $SQLname="SELECT * FROM debtorsmaster WHERE debtorno='".$DebtorNo."'"; - $Result = DB_query($SQLname,$db); + $Result = DB_query($SQLname); $row = DB_fetch_array($Result); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Notes for Customer').': <b>' .$row['name'] . '</b></p> <br />'; @@ -110,7 +110,7 @@ FROM custnotes WHERE debtorno='".$DebtorNo."' ORDER BY date DESC"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<table class="selection"> <tr> @@ -178,7 +178,7 @@ WHERE noteid='".$Id."' AND debtorno='".$DebtorNo."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AddCustomerTypeNotes.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -62,7 +62,7 @@ } if ($InputError !=1) { - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<br />'; prnMsg($msg, 'success'); @@ -78,7 +78,7 @@ $sql="DELETE FROM debtortypenotes WHERE noteid='".$Id."' AND typeid='".$DebtorType."'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<br />'; prnMsg( _('The contact group note record has been deleted'), 'success'); @@ -89,7 +89,7 @@ if (!isset($Id)) { $SQLname="SELECT typename from debtortype where typeid='".$DebtorType."'"; - $result = DB_query($SQLname,$db); + $result = DB_query($SQLname); $myrow = DB_fetch_array($result); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/customer.png" title="' . _('Search') . '" alt="" />' . _('Notes for Customer Type').': <b>' .$myrow['typename'] . '</b></p> <br />'; @@ -103,7 +103,7 @@ FROM debtortypenotes WHERE typeid='".$DebtorType."' ORDER BY date DESC"; - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo '<br />' . $sql; echo '<table class="selection">'; @@ -170,7 +170,7 @@ WHERE noteid=".$Id." AND typeid='".$DebtorType."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); //echo '<br />' . $sql; $myrow = DB_fetch_array($result); Modified: trunk/AgedControlledInventory.php =================================================================== --- trunk/AgedControlledInventory.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AgedControlledInventory.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -30,7 +30,7 @@ ORDER BY trandate"; $ErrMsg = _('The stock held could not be retrieved because'); -$LocStockResult = DB_query($sql, $db, $ErrMsg); +$LocStockResult = DB_query($sql, $ErrMsg); $NumRows = DB_num_rows($LocStockResult, $db); $j = 1; Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AgedDebtors.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -261,7 +261,7 @@ debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } - $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ + $CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/ if (DB_error_no($db) !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; @@ -364,7 +364,7 @@ $sql .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; } - $DetailResult = DB_query($sql,$db,'','',False,False); /*Dont trap errors */ + $DetailResult = DB_query($sql,'','',False,False); /*Dont trap errors */ if (DB_error_no($db) !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); @@ -489,7 +489,7 @@ $sql = "SELECT salesmancode, salesmanname FROM salesman"; - $result=DB_query($sql,$db); + $result=DB_query($sql); echo '<option value="">' . _('All Sales people') . '</option>'; while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; @@ -503,7 +503,7 @@ $sql = "SELECT currency, currabrev FROM currencies"; - $result=DB_query($sql,$db); + $result=DB_query($sql); while ($myrow=DB_fetch_array($result)){ if ($myrow['currabrev'] == $_SESSION['CompanyRecord']['currencydefault']){ echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AgedSuppliers.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -102,7 +102,7 @@ } - $SupplierResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors */ + $SupplierResult = DB_query($SQL,'','',False,False); /*dont trap errors */ if (DB_error_no($db) !=0) { $Title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; @@ -190,7 +190,7 @@ AND supptrans.settled = 0 AND supptrans.supplierno = '" . $AgedAnalysis["supplierid"] . "'"; - $DetailResult = DB_query($sql,$db,'','',False,False); /*dont trap errors - trapped below*/ + $DetailResult = DB_query($sql,'','',False,False); /*dont trap errors - trapped below*/ if (DB_error_no($db) !=0) { $Title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); @@ -303,7 +303,7 @@ <td><select tabindex="4" name="Currency">'; $sql = "SELECT currency, currabrev FROM currencies"; - $result=DB_query($sql,$db); + $result=DB_query($sql); while ($myrow=DB_fetch_array($result)){ if ($myrow['currabrev'] == $_SESSION['CompanyRecord']['currencydefault']){ Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/Areas.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -33,7 +33,7 @@ //first off validate inputs sensible $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT areacode FROM areas WHERE areacode='".$_POST['AreaCode']."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); // mod to handle 3 char area codes if (mb_strlen($_POST['AreaCode']) > 3) { $InputError = 1; @@ -92,7 +92,7 @@ if ($InputError !=1) { $ErrMsg = _('The area could not be added or updated because'); $DbgMsg = _('The SQL that failed was'); - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + $result = DB_query($sql, $ErrMsg, $DbgMsg); unset($SelectedArea); unset($_POST['AreaCode']); unset($_POST['AreaDescription']); @@ -107,7 +107,7 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'DebtorsMaster' $sql= "SELECT COUNT(branchcode) AS branches FROM custbranch WHERE custbranch.area='$SelectedArea'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); if ($myrow['branches']>0) { $CancelDelete = 1; @@ -116,7 +116,7 @@ } else { $sql= "SELECT COUNT(area) AS records FROM salesanalysis WHERE salesanalysis.area ='$SelectedArea'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); if ($myrow['records']>0) { $CancelDelete = 1; @@ -127,7 +127,7 @@ if ($CancelDelete==0) { $sql="DELETE FROM areas WHERE areacode='" . $SelectedArea . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); prnMsg(_('Area Code') . ' ' . $SelectedArea . ' ' . _('has been deleted') .' !','success'); } //end if Delete area unset($SelectedArea); @@ -139,7 +139,7 @@ $sql = "SELECT areacode, areadescription FROM areas"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p><br />'; @@ -191,7 +191,7 @@ FROM areas WHERE areacode='" . $SelectedArea . "'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); $_POST['AreaCode'] = $myrow['areacode']; Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/AuditTrail.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -32,7 +32,7 @@ $TableResult = DB_show_tables($db); // Get list of users -$UserResult = DB_query("SELECT userid FROM www_users ORDER BY userid",$db); +$UserResult = DB_query("SELECT userid FROM www_users ORDER BY userid"); echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; echo '<div>'; @@ -168,7 +168,7 @@ WHERE userid='".$_POST['SelectedUser']."' AND transactiondate BETWEEN '".$FromDate."' AND '".$ToDate."'" . $ContainingText; } - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<table border="0" width="98%" class="selection"> <tr> Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMExtendedQty.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -20,15 +20,15 @@ $_POST['Quantity'] = 1; } - $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS tempbom"); + $result = DB_query("DROP TABLE IF EXISTS passbom"); + $result = DB_query("DROP TABLE IF EXISTS passbom2"); $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), extendedqpa double, sortpart text) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to create passbom failed with the message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( parent char(20), @@ -40,7 +40,7 @@ effectiveafter date, effectiveto date, quantity double) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db,_('Create of tempbom failed because')); + $result = DB_query($sql,_('Create of tempbom failed because')); // First, find first level of components below requested assembly // Put those first level parts in passbom, use COMPONENT in passbom // to link to PARENT in bom to find next lower level and accumulate @@ -55,7 +55,7 @@ WHERE bom.parent ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $LevelCounter = 2; // $LevelCounter is the level counter @@ -82,7 +82,7 @@ WHERE bom.parent ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as @@ -114,16 +114,16 @@ WHERE bom.parent = passbom.part AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); - $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); - $result = DB_query("ALTER TABLE passbom RENAME AS passbom2",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2"); + $result = DB_query("ALTER TABLE passbom RENAME AS passbom2"); + $result = DB_query("DROP TABLE IF EXISTS passbom"); $sql = "CREATE TEMPORARY TABLE passbom (part char(20), extendedqpa decimal(10,3), sortpart text) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "INSERT INTO passbom (part, extendedqpa, @@ -136,14 +136,14 @@ ON bom.parent = passbom2.part WHERE bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "SELECT COUNT(bom.parent) AS components FROM bom INNER JOIN passbom ON bom.parent = passbom.part GROUP BY passbom.part"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); $ComponentCounter = $myrow['components']; @@ -200,7 +200,7 @@ stockmaster.description, stockmaster.decimalplaces, stockmaster.mbflag"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $ListCount = DB_num_rows($result); while ($myrow = DB_fetch_array($result,$db)){ Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMIndented.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -16,16 +16,16 @@ $line_height=12; $sql = "DROP TABLE IF EXISTS tempbom"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "DROP TABLE IF EXISTS passbom"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "DROP TABLE IF EXISTS passbom2"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), sortpart text) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to create passbom failed with the message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( parent char(20), @@ -37,7 +37,7 @@ effectiveafter date, effectiveto date, quantity double) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db,_('Create of tempbom failed because')); + $result = DB_query($sql,_('Create of tempbom failed because')); // First, find first level of components below requested assembly // Put those first level parts in passbom, use COMPONENT in passbom // to link to PARENT in bom to find next lower level and accumulate @@ -51,7 +51,7 @@ WHERE bom.parent ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $LevelCounter = 2; // $LevelCounter is the level counter @@ -79,7 +79,7 @@ WHERE bom.parent ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter - finds there are more components that are used as @@ -112,21 +112,21 @@ INNER JOIN locationusers ON locationusers.loccode=loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 WHERE bom.parent = passbom.part AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "DROP TABLE IF EXISTS passbom2"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "ALTER TABLE passbom RENAME AS passbom2"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "DROP TABLE IF EXISTS passbom"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "INSERT INTO passbom (part, sortpart) @@ -136,11 +136,11 @@ WHERE bom.parent = passbom2.part AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "SELECT COUNT(*) FROM bom,passbom WHERE bom.parent = passbom.part"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_row($result); $ComponentCounter = $myrow[0]; @@ -165,7 +165,7 @@ stockmaster.description FROM stockmaster WHERE stockid = " . "'" . $_POST['Part'] . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result,$db); $assembly = $_POST['Part']; $assemblydesc = $myrow['description']; @@ -180,7 +180,7 @@ FROM tempbom,stockmaster WHERE tempbom.component = stockmaster.stockid ORDER BY sortpart"; - $result = DB_query($sql,$db); + $result = DB_query($sql); // $fill is used to alternate between lines with transparent and painted background $fill = false; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMIndentedReverse.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -16,15 +16,15 @@ $PageNumber=1; $line_height=12; - $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS tempbom"); + $result = DB_query("DROP TABLE IF EXISTS passbom"); + $result = DB_query("DROP TABLE IF EXISTS passbom2"); $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), sortpart text) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to create passbom failed with the message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( parent char(20), @@ -36,7 +36,7 @@ effectiveafter date, effectiveto date, quantity double) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db,_('Create of tempbom failed because')); + $result = DB_query($sql,_('Create of tempbom failed because')); // First, find first level of components below requested assembly // Put those first level parts in passbom, use COMPONENT in passbom // to link to PARENT in bom to find next lower level and accumulate @@ -50,7 +50,7 @@ WHERE bom.component ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $LevelCounter = 2; // $LevelCounter is the level counter @@ -77,7 +77,7 @@ WHERE bom.component ='" . $_POST['Part'] . "' AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as @@ -108,17 +108,17 @@ WHERE bom.component = passbom.part AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); - $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2"); - $result = DB_query("ALTER TABLE passbom RENAME AS passbom2",$db); - $result = DB_query("DROP TABLE IF EXISTS passbom",$db); + $result = DB_query("ALTER TABLE passbom RENAME AS passbom2"); + $result = DB_query("DROP TABLE IF EXISTS passbom"); $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $sql = "INSERT INTO passbom (part, sortpart) @@ -128,8 +128,8 @@ WHERE bom.component = passbom2.part AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; - $result = DB_query($sql,$db); - $result = DB_query("SELECT COUNT(*) FROM bom,passbom WHERE bom.component = passbom.part",$db); + $result = DB_query($sql); + $result = DB_query("SELECT COUNT(*) FROM bom,passbom WHERE bom.component = passbom.part"); $myrow = DB_fetch_row($result); $ComponentCounter = $myrow[0]; @@ -154,7 +154,7 @@ stockmaster.description FROM stockmaster WHERE stockid = '" . $_POST['Part'] . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result,$db); $Assembly = $_POST['Part']; $AssemblyDesc = $myrow['description']; @@ -171,7 +171,7 @@ ON tempbom.parent = stockmaster.stockid INNER JOIN locationusers ON locationusers.loccode=tempbom.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 ORDER BY sortpart"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $ListCount = DB_num_rows($result); Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMInquiry.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -93,7 +93,7 @@ } $ErrMsg = _('The SQL to find the parts selected failed with the message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); } //one of keywords or StockCode was more than a zero length string } //end of if search @@ -178,7 +178,7 @@ OR bom.effectiveto='0000-00-00')"; $ErrMsg = _('The bill of material could not be retrieved because'); - $BOMResult = DB_query ($sql,$db,$ErrMsg); + $BOMResult = DB_query ($sql,$ErrMsg); if (DB_num_rows($BOMResult)==0){ prnMsg(_('The bill of material for this part is not set up') . ' - ' . _('there are no components defined for it'),'warn'); Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMListing.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -36,7 +36,7 @@ ORDER BY bom.parent, bom.component"; - $BOMResult = DB_query($SQL,$db,'','',false,false); //dont do error trapping inside DB_query + $BOMResult = DB_query($SQL,'','',false,false); //dont do error trapping inside DB_query if (DB_error_no($db) !=0) { $Title = _('Bill of Materials Listing') . ' - ' . _('Problem Report'); @@ -73,7 +73,7 @@ $YPos -=$line_height; } $SQL = "SELECT description FROM stockmaster WHERE stockmaster.stockid = '" . $BOMList['parent'] . "'"; - $ParentResult = DB_query($SQL,$db); + $ParentResult = DB_query($SQL); $ParentRow = DB_fetch_row($ParentResult); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,400-$Left_Margin,$FontSize,$BOMList['parent'] . ' - ' . $ParentRow[0],'left'); $ParentPart = $BOMList['parent']; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BOMs.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -49,7 +49,7 @@ $sql = "SELECT component FROM bom WHERE parent='".$ComponentToCheck."'"; $ErrMsg = _('An error occurred in retrieving the components of the BOM during the check for recursion'); $DbgMsg = _('The SQL that was used to retrieve the components of the BOM and that failed in the process was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); if (DB_num_rows($result)!=0) { while ($myrow=DB_fetch_array($result)){ @@ -100,7 +100,7 @@ $ErrMsg = _('Could not retrieve the BOM components because'); $DbgMsg = _('The SQL used to retrieve the components was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); //echo $TableHeader; $RowCounter =0; @@ -277,7 +277,7 @@ } if($_POST['AutoIssue']==1 AND isset($_POST['Component'])){ $sql = "SELECT controlled FROM stockmaster WHERE stockid='" . $_POST['Component'] . "'"; - $CheckControlledResult = DB_query($sql,$db); + $CheckControlledResult = DB_query($sql); $CheckControlledRow = DB_fetch_row($CheckControlledResult); if ($CheckControlledRow[0]==1){ prnMsg(_('Only non-serialised or non-lot controlled items can be set to auto issue. These items require the lot/serial numbers of items issued to the works orders to be specified so autoissue is not an option. Auto issue has been automatically set to off for this component'),'warn'); @@ -308,7 +308,7 @@ $ErrMsg = _('Could not update this BOM component because'); $DbgMsg = _('The SQL used to update the component was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $msg = _('Details for') . ' - ' . $SelectedComponent . ' ' . _('have been updated') . '.'; UpdateCost($db, $SelectedComponent); @@ -331,7 +331,7 @@ $ErrMsg = _('An error occurred in checking the component is not already on the BOM'); $DbgMsg = _('The SQL that was used to check the component was not already on the BOM and that failed in the process was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); if (DB_num_rows($result)==0) { @@ -357,7 +357,7 @@ $ErrMsg = _('Could not insert the BOM component because'); $DbgMsg = _('The SQL used to insert the component was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); UpdateCost($db, $_POST['Component']); $msg = _('A new component part') . ' ' . $_POST['Component'] . ' ' . _('has been added to the bill of material for part') . ' - ' . $SelectedParent . '.'; @@ -389,12 +389,12 @@ $ErrMsg = _('Could not delete this BOM components because'); $DbgMsg = _('The SQL used to delete the BOM was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); $ComponentSQL = "SELECT component FROM bom WHERE parent='" . $SelectedParent ."'"; - $ComponentResult = DB_query($ComponentSQL,$db); + $ComponentResult = DB_query($ComponentSQL); $ComponentArray = DB_fetch_row($ComponentResult); UpdateCost($db, $ComponentArray[0]); @@ -423,7 +423,7 @@ $ErrMsg = _('Could not retrieve the description of the parent part because'); $DbgMsg = _('The SQL used to retrieve description of the parent part was'); - $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); $myrow=DB_fetch_row($result); @@ -459,7 +459,7 @@ $ErrMsg = _('Could not retrieve the description of the parent part because'); $DbgMsg = _('The SQL used to retrieve description of the parent part was'); - $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); $ix = 0; if( DB_num_rows($result) > 0 ) { echo '<table class="selection">'; @@ -483,7 +483,7 @@ $ErrMsg = _('Could not retrieve the description of the parent part because'); $DbgMsg = _('The SQL used to retrieve description of the parent part was'); - $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { echo '<table class="selection">'; echo '<tr><td><div class="centre">' . _('Assembly parent items').' : '; @@ -508,7 +508,7 @@ $ErrMsg = _('Could not retrieve the description of the parent part because'); $DbgMsg = _('The SQL used to retrieve description of the parent part was'); - $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { echo '<table class="selection">'; echo '<tr><td><div class="centre">' . _('Kit sets').' : '; @@ -532,7 +532,7 @@ $ErrMsg = _('Could not retrieve the description of the parent part because'); $DbgMsg = _('The SQL used to retrieve description of the parent part was'); - $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result=DB_query($sql,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { echo '<table class="selection"> <tr> @@ -619,7 +619,7 @@ WHERE parent='".$SelectedParent."' AND component='".$SelectedComponent."'"; - $result = DB_query($sql, $db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); $_POST['Sequence'] = $myrow['sequence']; @@ -686,7 +686,7 @@ $ErrMsg = _('Could not retrieve the list of potential components because'); $DbgMsg = _('The SQL used to retrieve the list of potential components part was'); - $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + $result = DB_query($sql,$ErrMsg, $DbgMsg); while ($myrow = DB_fetch_array($result)) { @@ -714,7 +714,7 @@ AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 WHERE locations.usedforwo = 1"; - $result = DB_query($sql,$db); + $result = DB_query($sql); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['LocCode']) AND $myrow['loccode']==$_POST['LocCode']) { @@ -734,7 +734,7 @@ <td>' . _('Work Centre Added') . ': </td><td>'; $sql = "SELECT code, description FROM workcentres INNER JOIN locationusers ON locationusers.loccode=workcentres.location AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1"; - $result = DB_query($sql,$db); + $result = DB_query($sql); if (DB_num_rows($result)==0){ prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres') . '.','warn'); @@ -878,7 +878,7 @@ } $ErrMsg = _('The SQL to find the parts selected failed with the message'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); } //one of keywords or StockCode was more than a zero length string } //end of if search Modified: trunk/BankAccountUsers.php =================================================================== --- trunk/BankAccountUsers.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BankAccountUsers.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -55,7 +55,7 @@ WHERE accountcode= '" . $_POST['SelectedBankAccount'] . "' AND userid = '" . $_POST['SelectedUser'] . "'"; - $checkresult = DB_query($checkSql,$db); + $checkresult = DB_query($checkSql); $checkrow = DB_fetch_row($checkresult); if ( $checkrow[0] >0) { @@ -69,7 +69,7 @@ '" . $_POST['SelectedUser'] . "')"; $msg = _('User') . ': ' . $_POST['SelectedUser'].' '._('has been authorised to use') .' '. $_POST['SelectedBankAccount'] . ' ' . _('bank account'); - $result = DB_query($sql,$db); + $result = DB_query($sql); prnMsg($msg,'success'); unset($_POST['SelectedUser']); } @@ -80,7 +80,7 @@ AND userid='".$SelectedUser."'"; $ErrMsg = _('The bank account user record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); prnMsg(_('User').' '. $SelectedUser .' '. _('has been un-authorised to use').' '. $SelectedBankAccount .' '. _('bank account') ,'success'); unset($_GET['delete']); } @@ -101,7 +101,7 @@ bankaccountname FROM bankaccounts"; - $result = DB_query($SQL,$db); + $result = DB_query($SQL); echo '<option value="">' . _('Not Yet Selected') . '</option>'; while ($myrow = DB_fetch_array($result)) { if (isset($SelectedBankAccount) and $myrow['accountcode']==$SelectedBankAccount) { @@ -134,7 +134,7 @@ $SQLName = "SELECT bankaccountname FROM bankaccounts WHERE accountcode='" .$SelectedBankAccount."'"; - $result = DB_query($SQLName,$db); + $result = DB_query($SQLName); $myrow = DB_fetch_array($result); $SelectedBankName = $myrow['bankaccountname']; @@ -152,7 +152,7 @@ WHERE bankaccountusers.accountcode='" . $SelectedBankAccount . "' ORDER BY bankaccountusers.userid ASC"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<br /> <table class="selection">'; @@ -200,7 +200,7 @@ realname FROM www_users"; - $result = DB_query($SQL,$db); + $result = DB_query($SQL); if (!isset($_POST['SelectedUser'])){ echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; } Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2014-10-25 19:25:12 UTC (rev 6940) +++ trunk/BankAccounts.php 2014-10-26 23:18:08 UTC (rev 6941) @@ -37,7 +37,7 @@ $sql="SELECT count(accountcode) FROM bankaccounts WHERE accountcode='".$_POST['AccountCode']."'"; - $result=DB_query($sql, $db); + $result=DB_query($sql); $myrow=DB_fetch_row($result); if ($myrow[0]!=0 and !isset($SelectedBankAccount)) { @@ -82,7 +82,7 @@ /*Check if there are already transactions against this account - cant allow change currency if there are*/ $sql = "SELECT banktransid FROM banktrans WHERE bankact='" . $SelectedBankAccount . "'"; - $BankTransResult = DB_query($sql,$db); + $BankTransResult = DB_query($sql); if (DB_num_rows($BankTransResult)>0) { $sql = "UPDATE bankaccounts SET bankaccountname='" . $_POST['BankAccountName'] . "', bankaccountcode='" . $_POST['BankAccountCode'] . "', @@ -132,7 +132,7 @@ if( $InputError !=1 ) { $ErrMsg = _('The bank account could not be inserted or modified because'); $DbgMsg = _('The SQL used to insert/modify the bank account details was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $result = DB_query($sql,$ErrMsg,$DbgMsg); prnMsg($msg,'success'); echo '<br />'; @@ -155,7 +155,7 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'BankTrans' $sql= "SELECT COUNT(bankact) AS accounts FROM banktrans WHERE banktrans.bankact='" . $SelectedBankAccount . "'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_array($result); if ($myrow['accounts']>0) { $CancelDelete = 1; @@ -165,7 +165,7 @@ } if (!$CancelDelete) { $sql="DELETE FROM bankaccounts WHERE accountcode='" . $SelectedBankAccount . "'"; - $result = DB_query($sql,$db); + $... [truncated message content] |
From: <dai...@us...> - 2014-10-27 02:48:36
|
Revision: 6942 http://sourceforge.net/p/web-erp/reponame/6942 Author: daintree Date: 2014-10-27 02:48:29 +0000 (Mon, 27 Oct 2014) Log Message: ----------- continue removing $db from DB_query calls Modified Paths: -------------- trunk/BOMInquiry.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractCosting.php trunk/Contracts.php trunk/CounterReturns.php trunk/CounterSales.php trunk/CustItem.php trunk/Customers.php trunk/Dashboard.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/EDIProcessOrders.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLTrialBalance.php trunk/GoodsReceived.php trunk/ImportBankTrans.php trunk/ImportBankTransAnalysis.php trunk/InternalStockRequestAuthorisation.php trunk/Labels.php trunk/Locations.php trunk/MRPCreateDemands.php trunk/NoSalesItems.php trunk/PDFPrintLabel.php trunk/PDFWOPrint.php trunk/PO_Header.php trunk/PO_Items.php trunk/Payments.php trunk/PcReportTab.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/Prices_Customer.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/RelatedItemsUpdate.php trunk/SelectCompletedOrder.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/ShipmentCosting.php trunk/ShopParameters.php trunk/StockAdjustments.php trunk/StockClone.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockLocTransfer.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppLoginSetup.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTransInquiry.php trunk/TaxAuthorityRates.php trunk/TaxGroups.php trunk/WOSerialNos.php trunk/WhereUsedInquiry.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_Upgrade_3.01-3.02.php trunk/api/api_debtortransactions.php trunk/api/api_login.php trunk/api/api_salesorders.php trunk/includes/ConnectDB_postgres.inc trunk/includes/DefineCartClass.php trunk/includes/DefineContractClass.php trunk/includes/DefineSuppTransClass.php trunk/includes/GetSalesTransGLCodes.inc trunk/includes/SQL_CommonFunctions.inc trunk/includes/Z_POSDataCreation.php Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/BOMInquiry.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -157,8 +157,7 @@ labourcost, overheadcost FROM stockmaster - WHERE stockid='" . $StockID . "'", - $db); + WHERE stockid='" . $StockID . "'"); $myrow = DB_fetch_array($result); $ParentLabourCost = $myrow['labourcost']; $ParentOverheadCost = $myrow['overheadcost']; @@ -174,9 +173,9 @@ ON bom.component = stockmaster.stockid WHERE bom.parent = '" . $StockID . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "' - AND (bom.effectiveto > '" . Date('Y-m-d') . "' + AND (bom.effectiveto > '" . Date('Y-m-d') . "' OR bom.effectiveto='0000-00-00')"; - + $ErrMsg = _('The bill of material could not be retrieved because'); $BOMResult = DB_query ($sql,$ErrMsg); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/BOMs.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -17,7 +17,9 @@ // retrive all children of parent $c_result = DB_query("SELECT parent, component - FROM bom WHERE parent='" . $Parent. "' ORDER BY sequence ASC" ,$db); + FROM bom + WHERE parent='" . $Parent. "' + ORDER BY sequence ASC"); if (DB_num_rows($c_result) > 0) { while ($row = DB_fetch_array($c_result)) { @@ -465,7 +467,7 @@ echo '<table class="selection">'; echo '<tr><td><div class="centre">' . _('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -489,7 +491,7 @@ echo '<tr><td><div class="centre">' . _('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -514,7 +516,7 @@ echo '<tr><td><div class="centre">' . _('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -700,18 +702,18 @@ <td>' . _('Sequence in BOM') . ':</td> <td><input type="text" class="integer" required="required" size="5" name="Sequence" value="' . $_POST['Sequence'] . '" /></td> </tr>'; - + echo '<tr> <td>' . _('Location') . ': </td> <td><select tabindex="2" name="LocCode">'; DB_free_result($result); - $sql = "SELECT locationname, - locations.loccode - FROM locations - INNER JOIN locationusers - ON locationusers.loccode=locations.loccode - AND locationusers.userid='" . $_SESSION['UserID'] . "' + $sql = "SELECT locationname, + locations.loccode + FROM locations + INNER JOIN locationusers + ON locationusers.loccode=locations.loccode + AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 WHERE locations.usedforwo = 1"; $result = DB_query($sql); Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/BankAccounts.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -380,7 +380,7 @@ } $result = DB_query("SELECT currabrev, currency - FROM currencies",$db); + FROM currencies"); while ($myrow = DB_fetch_array($result)) { if ($myrow['currabrev']==$_POST['CurrCode']) { Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/BankMatching.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -202,8 +202,7 @@ currcode FROM bankaccounts INNER JOIN currencies ON bankaccounts.currcode=currencies.currabrev - WHERE accountcode='" . $_POST['BankAccount'] . "'", - $db); + WHERE accountcode='" . $_POST['BankAccount'] . "'"); $BankRow = DB_fetch_array($BankResult); $CurrDecimalPlaces = $BankRow['decimalplaces']; $CurrCode = $BankRow['currcode']; Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/CompanyPreferences.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -255,8 +255,7 @@ FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_=accountgroups.groupname WHERE accountgroups.pandl=0 - ORDER BY chartmaster.accountcode", - $db); + ORDER BY chartmaster.accountcode"); echo '<tr> <td>' . _('Debtors Control GL Account') . ':</td> @@ -351,8 +350,7 @@ FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_=accountgroups.groupname WHERE accountgroups.pandl=1 - ORDER BY chartmaster.accountcode", - $db); + ORDER BY chartmaster.accountcode"); while ($myrow = DB_fetch_row($result)) { if ($_POST['FreightAct']==$myrow[0]){ Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/ConfirmDispatch_Invoice.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -948,7 +948,8 @@ need the MBFlag later too so save it to $MBFlag */ $Result = DB_query("SELECT mbflag FROM stockmaster - WHERE stockid = '" . $OrderLine->StockID . "'",$db, _('Cannot retrieve the mbflag')); + WHERE stockid = '" . $OrderLine->StockID . "'", + _('Cannot retrieve the mbflag')); $myrow = DB_fetch_row($Result); $MBFlag = $myrow[0]; @@ -1000,7 +1001,7 @@ $DbgMsg = _('The SQL that failed was'); $AssResult = DB_query($SQL,$ErrMsg,$DbgMsg,true); - while ($AssParts = DB_fetch_array($AssResult,$db)){ + while ($AssParts = DB_fetch_array($AssResult)){ $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; /* Need to get the current location quantity Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/ContractCosting.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -288,15 +288,13 @@ /*Check if the contract work order is still open */ $CheckIfWOOpenResult = DB_query("SELECT closed FROM workorders - WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "'", - $db); + WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "'"); $CheckWORow=DB_fetch_row($CheckIfWOOpenResult); if ($CheckWORow[0]==0){ //then close the work order $CloseWOResult =DB_query("UPDATE workorders SET closed=1 WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "'", - $db, _('Could not update the work order to closed because:'), _('The SQL used to close the work order was:'), true); @@ -309,8 +307,7 @@ $result =DB_query("SELECT qtyrecd FROM woitems WHERE stockid='" . $_SESSION['Contract'.$identifier]->ContractRef . "' - AND wo='" . $_SESSION['Contract'.$identifier]->WO . "'", - $db); + AND wo='" . $_SESSION['Contract'.$identifier]->WO . "'"); if (DB_num_rows($result)==1) { $myrow=DB_fetch_row($result); if ($myrow[0]==0){ //then the contract wo has not been received (it will only ever be for 1 item) @@ -428,7 +425,9 @@ SET qtyrecd=qtyrecd+1 WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "' AND stockid='" . $_SESSION['Contract'.$identifier]->ContractRef . "'", - $db,$ErrMsg,$DbgMsg,true); + $ErrMsg, + $DbgMsg, + true); }//end if the contract wo was not received - work order item received/processed above if not }//end if there was a row returned from the woitems query } //end if the work order was still open (so end of closing it and processing receipt if necessary) Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/Contracts.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -21,7 +21,7 @@ $_POST['SelectedCustomer']=$_POST['SelectedCustomer'.$Index]; $_POST['SelectedBranch']=$_POST['SelectedBranch'.$Index]; } -} +} $ViewTopic= 'Contracts'; $BookMark = 'CreateContract'; @@ -283,7 +283,7 @@ VALUES ('" . $_SESSION['Contract'.$identifier]->LocCode . "', '" . $_SESSION['Contract'.$identifier]->LocCode . "', '" . _('Default for') . ' ' . $_SESSION['Contract'.$identifier]->LocCode . "', - '1')",$db); + '1')"); $WorkCentre = $_SESSION['Contract'.$identifier]->LocCode; } /*The above is a bit of a hack to get a default workcentre for a location based on the users default location*/ Modified: trunk/CounterReturns.php =================================================================== --- trunk/CounterReturns.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/CounterReturns.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -1495,7 +1495,7 @@ $result = DB_query("SELECT rate FROM currencies INNER JOIN bankaccounts ON currencies.currabrev=bankaccounts.currcode - WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'",$db); + WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'"); $myrow = DB_fetch_row($result); $BankAccountExRate = $myrow[0]; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/CounterSales.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -463,7 +463,7 @@ $KitResult = DB_query($sql,$ErrMsg,$DbgMsg); $ParentQty = $NewItemQty; - while ($KitParts = DB_fetch_array($KitResult,$db)) { + while ($KitParts = DB_fetch_array($KitResult)) { $NewItem = $KitParts['component']; $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewPOLine = 0; @@ -574,7 +574,7 @@ $KitResult = DB_query($sql,$ErrMsg); $ParentQty = $NewItemQty; - while ($KitParts = DB_fetch_array($KitResult,$db)){ + while ($KitParts = DB_fetch_array($KitResult)){ $NewItem = $KitParts['component']; $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewPOLine = 0; @@ -624,7 +624,7 @@ $KitResult = DB_query($sql,$ErrMsg); $ParentQty = $NewItemQty; - while ($KitParts = DB_fetch_array($KitResult,$db)){ + while ($KitParts = DB_fetch_array($KitResult)){ $NewItem = $KitParts['component']; $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewPOLine = 0; @@ -676,7 +676,7 @@ $KitResult = DB_query($sql,$ErrMsg); $ParentQty = $NewItemQty; - while ($KitParts = DB_fetch_array($KitResult,$db)){ + while ($KitParts = DB_fetch_array($KitResult)){ $NewItem = $KitParts['component']; $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewItemDue = date($_SESSION['DefaultDateFormat']); @@ -715,7 +715,7 @@ FROM discountmatrix WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND discountcategory ='" . $OrderLine->DiscCat . "' - AND quantitybreak <= '" . $QuantityOfDiscCat ."'",$db); + AND quantitybreak <= '" . $QuantityOfDiscCat ."'"); $myrow = DB_fetch_row($result); if ($myrow[0]==NULL){ $DiscountMatrixRate = 0; @@ -1209,14 +1209,15 @@ '" . $_SESSION['DefaultFactoryLocation'] . "', '" . Date('Y-m-d') . "', '" . Date('Y-m-d'). "')", - $db,$ErrMsg,$DbgMsg,true); + $ErrMsg, + $DbgMsg, + true); //Need to get the latest BOM to roll up cost $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*bom.quantity) AS cost FROM stockmaster INNER JOIN bom ON stockmaster.stockid=bom.component WHERE bom.parent='" . $StockItem->StockID . "' - AND bom.loccode='" . $_SESSION['DefaultFactoryLocation'] . "'", - $db); + AND bom.loccode='" . $_SESSION['DefaultFactoryLocation'] . "'"); $CostRow = DB_fetch_row($CostResult); if (is_null($CostRow[0]) OR $CostRow[0]==0){ $Cost =0; @@ -1252,7 +1253,7 @@ $result = DB_query("SELECT serialno FROM stockserialitems WHERE serialno='" . ($StockItem->NextSerialNo + $i) . "' - AND stockid='" . $StockItem->StockID ."'",$db); + AND stockid='" . $StockItem->StockID ."'"); if (DB_num_rows($result)!=0){ $WOQuantity++; prnMsg(($StockItem->NextSerialNo + $i) . ': ' . _('This automatically generated serial number already exists - it cannot be added to the work order'),'error'); @@ -1424,7 +1425,7 @@ $DbgMsg = _('The SQL that failed was'); $AssResult = DB_query($SQL,$ErrMsg,$DbgMsg,true); - while ($AssParts = DB_fetch_array($AssResult,$db)){ + while ($AssParts = DB_fetch_array($AssResult)){ $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; /* Need to get the current location quantity @@ -1932,7 +1933,7 @@ $result = DB_query("SELECT rate FROM currencies INNER JOIN bankaccounts ON currencies.currabrev=bankaccounts.currcode - WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'",$db); + WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'"); $myrow = DB_fetch_row($result); $BankAccountExRate = $myrow[0]; Modified: trunk/CustItem.php =================================================================== --- trunk/CustItem.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/CustItem.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -49,7 +49,7 @@ $InputError = 1; prnMsg(_('There is no stock item set up enter the stock code or select a stock item using the search page'), 'error'); } - + if (!is_numeric(filter_number_format($_POST['ConversionFactor']))) { $InputError = 1; unset($_POST['ConversionFactor']); @@ -90,7 +90,7 @@ unset($debtorsmasterResult); unset($DebtorNo); } - + if ($InputError == 0 AND isset($_POST['AddRecord'])) { /* insert took place and need to clear the form */ unset($DebtorNo); @@ -98,7 +98,7 @@ unset($_POST['ConversionFactor']); unset($_POST['cust_description']); unset($_POST['cust_part']); - + } } @@ -118,7 +118,7 @@ $ItemResult = DB_query("SELECT description FROM stockmaster WHERE stockid='" . $StockID . "'"); $DescriptionRow = DB_fetch_array($ItemResult); echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . ' ' . _('For Stock Code') . ' - ' . $StockID . ' - ' . $DescriptionRow['description'] . '</p><br />'; - + $sql = "SELECT custitem.debtorno, debtorsmaster.name, debtorsmaster.currcode, @@ -138,7 +138,7 @@ prnMsg(_('There is no customer data set up for the part selected'), 'info'); $NoCustItemData=1; } else if ($StockID != '') { - + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th class="ascending">' . _('Customer') . '</th> @@ -185,7 +185,7 @@ if (isset($DebtorNo) AND $DebtorNo != '' AND !isset($_POST['Searchcustomer'])) { /*NOT EDITING AN EXISTING BUT customer selected OR ENTERED*/ - + $sql = "SELECT debtorsmaster.name, debtorsmaster.currcode, currencies.decimalplaces AS currdecimalplaces @@ -280,7 +280,7 @@ stockmaster.units, stockmaster.mbflag FROM stockmaster - WHERE stockmaster.stockid='".$StockID."'", $db); + WHERE stockmaster.stockid='".$StockID."'"); $myrow = DB_fetch_row($result); $StockUOM = $myrow[1]; if (DB_num_rows($result) <> 1) { @@ -357,12 +357,12 @@ ON debtorsmaster.currcode = currencies.currabrev WHERE custitem.debtorno='" . $DebtorNo . "' AND custitem.stockid='" . $StockID . "'"; - + $ErrMsg = _('The customer purchasing details for the selected customer and item could not be retrieved because'); $EditResult = DB_query($sql, $ErrMsg); $myrow = DB_fetch_array($EditResult); $name = $myrow['name']; - + $CurrCode = $myrow['currcode']; $CurrDecimalPlaces = $myrow['currdecimalplaces']; $_POST['customersUOM'] = $myrow['customersUOM']; @@ -401,7 +401,7 @@ if (!isset($CurrCode)) { $CurrCode = ''; } - + if (!isset($_POST['customersUOM'])) { $_POST['customersUOM'] = ''; } @@ -443,11 +443,11 @@ <td><input type="text" name="cust_description" maxlength="30" size="30" value="' . $_POST['cust_description'] . '" /></td> </tr>'; - + echo '</table> <br /> <div class="centre">'; - + if ($Edit == true) { echo '<input type="submit" name="UpdateRecord" value="' . _('Update') . '" />'; echo '<input type="hidden" name="Edit" value="1" />'; @@ -457,7 +457,7 @@ echo '</div> <div class="centre">'; - + if (isset($StockLocation) AND isset($StockID) AND mb_strlen($StockID) != 0) { echo '<br /><a href="' . $RootPath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; echo '<br /><a href="' . $RootPath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/Customers.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -1096,8 +1096,7 @@ /*Process this first before showing remaining contacts */ $resultupcc = DB_query("DELETE FROM custcontacts WHERE debtorno='".$DebtorNo."' - AND contid='".$ID."'", - $db); + AND contid='".$ID."'"); prnMsg(_('Contact Deleted'),'success'); } Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/Dashboard.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -545,7 +545,7 @@ $result = DB_query("SELECT pandl FROM accountgroups INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ - WHERE chartmaster.accountcode='" . $myrow['accountcode'] ."'",$db); + WHERE chartmaster.accountcode='" . $myrow['accountcode'] ."'"); $PandLRow = DB_fetch_row($result); if ($PandLRow[0]==1){ $PandLAccount = True; Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/DeliveryDetails.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -503,14 +503,15 @@ '" . $_SESSION['DefaultFactoryLocation'] . "', '" . Date('Y-m-d') . "', '" . Date('Y-m-d'). "')", - $db,$ErrMsg,$DbgMsg,true); + $ErrMsg, + $DbgMsg, + true); //Need to get the latest BOM to roll up cost $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*bom.quantity) AS cost FROM stockmaster INNER JOIN bom ON stockmaster.stockid=bom.component WHERE bom.parent='" . $StockItem->StockID . "' - AND bom.loccode='" . $_SESSION['DefaultFactoryLocation'] . "'", - $db); + AND bom.loccode='" . $_SESSION['DefaultFactoryLocation'] . "'"); $CostRow = DB_fetch_row($CostResult); if (is_null($CostRow[0]) OR $CostRow[0]==0){ $Cost =0; @@ -546,7 +547,7 @@ $result = DB_query("SELECT serialno FROM stockserialitems WHERE serialno='" . ($StockItem->NextSerialNo + $i) . "' - AND stockid='" . $StockItem->StockID ."'",$db); + AND stockid='" . $StockItem->StockID ."'"); if (DB_num_rows($result)!=0){ $WOQuantity++; prnMsg(($StockItem->NextSerialNo + $i) . ': ' . _('This automatically generated serial number already exists - it cannot be added to the work order'),'error'); @@ -659,7 +660,7 @@ $ContractResult = DB_query("SELECT contractref, requireddate FROM contracts WHERE orderno='" . $_SESSION['ExistingOrder'.$identifier] ."' - AND status=1",$db); + AND status=1"); if (DB_num_rows($ContractResult)==1){ //then it is a contract quotation being changed to an order $ContractRow = DB_fetch_array($ContractResult); $WONo = GetNextTransNo(40,$db); @@ -667,7 +668,10 @@ $DbgMsg = _('The SQL that failed to update the contract status was'); $UpdContractResult=DB_query("UPDATE contracts SET status=2, wo='" . $WONo . "' - WHERE orderno='" .$_SESSION['ExistingOrder'.$identifier] . "'", $db,$ErrMsg,$DbgMsg,true); + WHERE orderno='" .$_SESSION['ExistingOrder'.$identifier] . "'", + $ErrMsg, + $DbgMsg, + true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, component, @@ -684,7 +688,9 @@ '2099-12-31', quantity FROM contractbom - WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); + WHERE contractref='" . $ContractRow['contractref'] . "'", + $ErrMsg, + $DbgMsg); $ErrMsg = _('Unable to insert a new work order for the sales order item'); $InsWOResult = DB_query("INSERT INTO workorders (wo, @@ -695,13 +701,13 @@ '" . $_SESSION['Items'.$identifier]->Location ."', '" . $ContractRow['requireddate'] . "', '" . Date('Y-m-d'). "')", - $db,$ErrMsg,$DbgMsg); + $ErrMsg, + $DbgMsg); //Need to get the latest BOM to roll up cost but also add the contract other requirements $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*contractbom.quantity) AS cost FROM stockmaster INNER JOIN contractbom ON stockmaster.stockid=contractbom.stockid - WHERE contractbom.contractref='" . $ContractRow['contractref'] . "'", - $db); + WHERE contractbom.contractref='" . $ContractRow['contractref'] . "'"); $CostRow = DB_fetch_row($CostResult); if (is_null($CostRow[0]) OR $CostRow[0]==0){ $Cost =0; @@ -711,8 +717,7 @@ } $CostResult = DB_query("SELECT SUM(costperunit*quantity) AS cost FROM contractreqts - WHERE contractreqts.contractref='" . $ContractRow['contractref'] . "'", - $db); + WHERE contractreqts.contractref='" . $ContractRow['contractref'] . "'"); $CostRow = DB_fetch_row($CostResult); //add other requirements cost to cost of contract BOM $Cost += $CostRow[0]; @@ -1009,7 +1014,9 @@ $ErrMsg = _('The stock locations could not be retrieved'); $DbgMsg = _('SQL used to retrieve the stock locations was') . ':'; $StkLocsResult = DB_query("SELECT locationname,locations.loccode - FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1",$db, $ErrMsg, $DbgMsg); + FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1", + $ErrMsg, + $DbgMsg); while ($myrow=DB_fetch_array($StkLocsResult)){ if ($_SESSION['Items'.$identifier]->Location==$myrow['loccode']){ Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/DiscountCategories.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -33,7 +33,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'"); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/EDIProcessOrders.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -468,7 +468,7 @@ defaultlocation, phoneno, email - FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); + FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1"); if (DB_num_rows($BranchResult)!=1){ $EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further'); $TryNextFile = True; /* Look for other EDI msgs */ Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/FixedAssetDepreciation.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -18,7 +18,7 @@ ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC",$db); + ORDER BY periods.lastdate_in_period DESC"); $LastDepnRun = DB_fetch_row($result); Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/FixedAssetItems.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -137,16 +137,16 @@ accumdepnact FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $AssetID . "'",$db); + WHERE assetid='" . $AssetID . "'"); $OldDetails = DB_fetch_array($result); if ($OldDetails['assetcategoryid'] !=$_POST['AssetCategoryID'] AND $OldDetails['cost']!=0){ - $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); + $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat'])); /* Get the new account codes for the new asset category */ $result = DB_query("SELECT costact, accumdepnact FROM fixedassetcategories - WHERE categoryid='" . $_POST['AssetCategoryID'] . "'",$db); + WHERE categoryid='" . $_POST['AssetCategoryID'] . "'"); $NewAccounts = DB_fetch_array($result); $TransNo = GetNextTransNo( 42, $db); /* transaction type is asset category change */ @@ -297,7 +297,7 @@ costact FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $AssetID . "'", $db); + WHERE assetid='" . $AssetID . "'"); $AssetRow = DB_fetch_array($result); $NBV = $AssetRow['cost'] -$AssetRow['accumdepn']; if ($NBV!=0) { @@ -614,7 +614,7 @@ <td>' . _('P/L after disposal') . ':</td> <td class="number">' . locale_number_format(-$AssetRow['cost']+$AssetRow['accumdepn']+$AssetRow['disposalproceeds'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; - + }else{ echo'<tr> <td>' . _('Net Book Value') . ':</td> @@ -628,7 +628,7 @@ ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC",$db); + ORDER BY periods.lastdate_in_period DESC"); $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/GLAccountInquiry.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -119,7 +119,7 @@ $result = DB_query("SELECT pandl FROM accountgroups INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ - WHERE chartmaster.accountcode='" . $SelectedAccount ."'",$db); + WHERE chartmaster.accountcode='" . $SelectedAccount ."'"); $PandLRow = DB_fetch_row($result); if ($PandLRow[0]==1){ $PandLAccount = True; @@ -152,7 +152,7 @@ if ($_POST['tag']!=0) { $sql = $sql . " AND tag='" . $_POST['tag'] . "'"; } - + $sql = $sql . " ORDER BY periodno, gltrans.trandate, counterindex"; $namesql = "SELECT accountname FROM chartmaster WHERE accountcode='" . $SelectedAccount . "'"; Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/GLAccountReport.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -42,7 +42,7 @@ accountgroups.pandl FROM accountgroups INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ - WHERE chartmaster.accountcode='" . $SelectedAccount . "'",$db); + WHERE chartmaster.accountcode='" . $SelectedAccount . "'"); $AccountDetailRow = DB_fetch_row($result); $AccountName = $AccountDetailRow[0]; if ($AccountDetailRow[1]==1){ @@ -238,7 +238,7 @@ $sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $AccountsResult = DB_query($sql); $i=0; - while ($myrow=DB_fetch_array($AccountsResult,$db)){ + while ($myrow=DB_fetch_array($AccountsResult)){ if(isset($_POST['Account'][$i]) AND $myrow['accountcode'] == $_POST['Account'][$i]){ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; $i++; @@ -254,7 +254,7 @@ $Periods = DB_query($sql); $id=0; - while ($myrow=DB_fetch_array($Periods,$db)){ + while ($myrow=DB_fetch_array($Periods)){ if (isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/GLTrialBalance.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -433,10 +433,7 @@ chartdetails.accountcode"; - $AccountsResult = DB_query($SQL, - $db, - _('No general ledger accounts were returned by the SQL because'), - _('The SQL that failed was:')); + $AccountsResult = DB_query($SQL, _('No general ledger accounts were returned by the SQL because'), _('The SQL that failed was:')); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/GoodsReceived.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -61,7 +61,7 @@ } if ($_SESSION['PO'.$identifier]->Status != 'Printed') { - prnMsg( _('Purchase orders must have a status of Printed before they can be received').'.<br />' . + prnMsg( _('Purchase orders must have a status of Printed before they can be received').'.<br />' . _('Order number') . ' ' . $_GET['PONumber'] . ' ' . _('has a status of') . ' ' . _($_SESSION['PO'.$identifier]->Status), 'warn'); include('includes/footer.inc'); exit; @@ -194,10 +194,10 @@ if ($LnItm->Controlled == 1) { if ($LnItm->Serialised==1){ - echo '<td><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . + echo '<td><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . _('Enter Serial Nos'). '</a></td>'; } else { - echo '<td><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . + echo '<td><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . _('Enter Batches'). '</a></td>'; } } @@ -306,7 +306,7 @@ $LineNo=1; if(DB_num_rows($Result)==0){//Those goods must have been received by another user. So should destroy the session data and show warning to users prnMsg(_('This order has been changed or invoiced since this delivery was started to be actioned').' . '._('Processing halted'),'error'); - echo '<div class="centre"><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php">' . + echo '<div class="centre"><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php">' . _('Select a different purchase order for receiving goods against') . '</a></div>'; unset($_SESSION['PO'.$identifier]->LineItems); unset($_SESSION['PO'.$identifier]); @@ -368,7 +368,7 @@ </tr> </table>'; } - echo '<div class="centre"><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php">' . + echo '<div class="centre"><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php">' . _('Select a different purchase order for receiving goods against') . '</a></div>'; echo '<div class="centre"><a href="' . $RootPath . '/GoodsReceived.php?PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '">' . _('Re-read the updated purchase order for receiving goods against'). '</a></div>'; unset($_SESSION['PO'.$identifier]->LineItems); @@ -618,7 +618,7 @@ FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $OrderLine->AssetID . "'",$db); + WHERE assetid='" . $OrderLine->AssetID . "'"); if (DB_num_rows($CheckAssetExistsResult)==1){ //then work with the assetid provided /*Need to add a fixedassettrans for the cost of the asset being received */ @@ -748,7 +748,7 @@ <br /> <br /> <a href="' . $RootPath . '/PO_SelectOSPurchOrder.php">' . _('Select a different purchase order for receiving goods against'). '</a> - </div>'; + </div>'; /*end of process goods received entry */ echo '</div>'; echo '</form>'; Modified: trunk/ImportBankTrans.php =================================================================== --- trunk/ImportBankTrans.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/ImportBankTrans.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -173,7 +173,6 @@ //Update the banktrans to show it has cleared the bank $result = DB_query("UPDATE banktrans SET amountcleared=amount WHERE banktransid = '" . $_SESSION['Trans'][$i]->BankTransID . "'", - $db, _('Could not update the bank transaction as cleared'), _('The SQL that failed to update the bank transaction as cleared was'), true); @@ -208,7 +207,6 @@ '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . -$_SESSION['Trans'][$i]->Amount . "')", - $db, _('Could not insert the customer transaction'), _('The SQL used to insert the debtortrans was'), true); @@ -217,7 +215,6 @@ SET lastpaiddate = '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', lastpaid='" . $_SESSION['Trans'][$i]->Amount ."' WHERE debtorno='" . $_SESSION['Trans'][$i]->DebtorNo . "'", - $db, _('Could not update the last payment date and amount paid'), _('The SQL that failed to update the debtorsmaster was'), true); @@ -238,7 +235,6 @@ '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . -round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the receipt because'), _('The SQL that failed to insert the receipt GL entry was'), true); @@ -257,7 +253,6 @@ '" . $_SESSION['Statement']->BankGLAccount . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the receipt because'), _('The SQL that failed to insert the receipt GL entry was'), true); @@ -281,7 +276,6 @@ '" . $GLAnalysis->GLCode . "', '" . DB_escape_string($GLAnalysis->Narrative . ' ' . $_SESSION['Trans'][$i]->Description) . "', '" . -round($GLAnalysis->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the receipt gl analysis because'), _('The SQL that failed to insert the gl analysis of this receipt was'), true); @@ -302,7 +296,6 @@ '" . $_SESSION['Statement']->BankGLAccount . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the receipt because'), _('The SQL that failed to insert the receipt GL entry was'), true); @@ -331,7 +324,6 @@ '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . $_SESSION['Trans'][$i]->Amount . "')", - $db, _('Could not insert the supplier transaction'), _('The SQL used to insert the supptrans was'), true); @@ -340,7 +332,6 @@ SET lastpaiddate = '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', lastpaid='" . $_SESSION['Trans'][$i]->Amount ."' WHERE supplierid='" . $_SESSION['Trans'][$i]->SupplierID . "'", - $db, _('Could not update the supplier last payment date and amount paid'), _('The SQL that failed to update the supplier with the last payment amount and date was'), true); @@ -360,7 +351,6 @@ '" . $_SESSION['CompanyRecord']['creditorsact'] . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . round(-$_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the supplier payment to creditors control because'), _('The SQL that failed to insert the creditors control GL entry was'), true); @@ -380,7 +370,6 @@ '" . $_SESSION['Statement']->BankGLAccount . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the supplier payment because'), _('The SQL that failed to insert the supplier payment GL entry to the bank account was'), true); @@ -405,7 +394,6 @@ '" . $GLAnalysis->GLCode . "', '" . DB_escape_string($GLAnalysis->Narrative . ' ' . $_SESSION['Trans'][$i]->Description) . "', '" . -round($GLAnalysis->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the payment gl analysis because'), _('The SQL that failed to insert the gl analysis of this payment was'), true); @@ -427,7 +415,6 @@ '" . $_SESSION['Statement']->BankGLAccount . "', '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", - $db, _('Cannot insert a GL entry for the payment because'), _('The SQL that failed to insert the payment GL entry was'), true); @@ -461,7 +448,6 @@ '" . $_SESSION['Trans'][$i]->Amount . "', '" . $_SESSION['Statement']->CurrCode . "', '" . $_SESSION['Trans'][$i]->Amount . "')", - $db, _('Could not insert the bank transaction'), _('The SQL that failed to insert the bank transaction was'), true); Modified: trunk/ImportBankTransAnalysis.php =================================================================== --- trunk/ImportBankTransAnalysis.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/ImportBankTransAnalysis.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -137,7 +137,7 @@ suppname FROM suppliers WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' - ORDER BY suppname",$db); + ORDER BY suppname"); if ($_SESSION['Trans'][$TransID]->SupplierID ==''){ echo '<option selected value="">' . _('GL Payment') . '</option>'; } else { @@ -168,7 +168,7 @@ name FROM debtorsmaster WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' - ORDER BY name",$db); + ORDER BY name"); if ($_SESSION['Trans'][$TransID]->DebtorNo ==''){ echo '<option selected value="">' . _('GL Receipt') . '</option>'; } else { Modified: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/InternalStockRequestAuthorisation.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -28,13 +28,13 @@ WHERE dispatchid='" . $CancelItems[0] . "' AND dispatchitemsid='" . $CancelItems[1] . "'"; $result = DB_query($sql); - $result = DB_Query("SELECT stockid FROM stockrequestitems WHERE completed=0 AND dispatchid='" . $CancelItems[0] . "'",$db); + $result = DB_query("SELECT stockid FROM stockrequestitems WHERE completed=0 AND dispatchid='" . $CancelItems[0] . "'"); if (DB_num_rows($result) ==0){ $result = DB_query("UPDATE stockrequest SET authorised='1' - WHERE dispatchid='" . $CancelItems[0] . "'",$db); + WHERE dispatchid='" . $CancelItems[0] . "'"); } - + } } } Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/Labels.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -136,8 +136,7 @@ hpos='" . $_POST['HPos' . $i] . "', fontsize='" . $_POST['FontSize' . $i] . "', barcode='" . $_POST['Barcode' . $i] . "' - WHERE labelfieldid='" . $_POST['LabelFieldID' . $i] . "'", - $db); + WHERE labelfieldid='" . $_POST['LabelFieldID' . $i] . "'"); } else { prnMsg (_('Entries for Vertical Position, Horizontal Position, and Font Size must be integers.'),'error'); } @@ -160,8 +159,7 @@ '" . $_POST['VPos'] . "', '" . $_POST['HPos'] . "', '" . $_POST['FontSize'] . "', - '" . $_POST['Barcode'] . "')", - $db); + '" . $_POST['Barcode'] . "')"); } } elseif(isset($_GET['SelectedLabelID'])){ $SelectedLabelID =$_GET['SelectedLabelID']; Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/Locations.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -348,15 +348,15 @@ /* need to figure out if this location is the only one in the same tax province */ $result = DB_query("SELECT taxprovinceid FROM locations - WHERE loccode='" . $SelectedLocation . "'",$db); + WHERE loccode='" . $SelectedLocation . "'"); $TaxProvinceRow = DB_fetch_row($result); $result = DB_query("SELECT COUNT(taxprovinceid) FROM locations - WHERE taxprovinceid='" .$TaxProvinceRow[0] . "'",$db); + WHERE taxprovinceid='" .$TaxProvinceRow[0] . "'"); $TaxProvinceCount = DB_fetch_row($result); if ($TaxProvinceCount[0]==1){ /* if its the only location in this tax authority then delete the appropriate records in TaxAuthLevels */ $result = DB_query("DELETE FROM taxauthrates - WHERE dispatchtaxprovince='" . $TaxProvinceRow[0] . "'",$db); + WHERE dispatchtaxprovince='" . $TaxProvinceRow[0] . "'"); } $result= DB_query("DELETE FROM locstock WHERE loccode ='" . $SelectedLocation . "'"); Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/MRPCreateDemands.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -228,7 +228,7 @@ $result= DB_query("SELECT locations.loccode, locationname - FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1",$db); + FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1"); while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } Modified: trunk/NoSalesItems.php =================================================================== --- trunk/NoSalesItems.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/NoSalesItems.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -21,7 +21,7 @@ <td><select name="Location[]" multiple="multiple"> <option value="All" selected="selected">' . _('All') . '</option>';; $sql = "SELECT locations.loccode,locationname - FROM locations + FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 ORDER BY locationname"; $locationresult = DB_query($sql); @@ -214,7 +214,7 @@ FROM locstock INNER JOIN locationusers ON locationusers.loccode=locstock.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 WHERE stockid = '" . $myrow['stockid'] . "'" . - $WhereLocation , $db); + $WhereLocation); $QOHRow = DB_fetch_row($QOHResult); $QOH = $QOHRow[0]; Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/PDFPrintLabel.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -141,8 +141,7 @@ topmargin*" . $PtsPerMM . " as label_topmargin, leftmargin*" . $PtsPerMM . " as label_leftmargin FROM labels - WHERE labelid='" . $_POST['LabelID'] . "'", - $db); + WHERE labelid='" . $_POST['LabelID'] . "'"); $LabelDimensions = DB_fetch_array($result); $result = DB_query("SELECT fieldvalue, @@ -151,8 +150,7 @@ fontsize, barcode FROM labelfields - WHERE labelid = '" . $_POST['LabelID'] . "'", - $db); + WHERE labelid = '" . $_POST['LabelID'] . "'"); $LabelFields = array(); $i=0; while ($LabelFieldRow = DB_fetch_array($result)){ Modified: trunk/PDFWOPrint.php =================================================================== --- trunk/PDFWOPrint.php 2014-10-26 23:18:08 UTC (rev 6941) +++ trunk/PDFWOPrint.php 2014-10-27 02:48:29 UTC (rev 6942) @@ -196,28 +196,28 @@ $WOHeader = DB_fetch_array($result); if ($WOHeader['controlled']==1) { $sql = "SELECT serialno - FROM woserialnos + FROM woserialnos WHERE woserialnos.stockid='" . $StockID . "' AND woserialnos.wo ='" . $SelectedWO . "'"; $result = DB_query($sql, $ErrMsg); if (DB_num_rows($result) > 0) { $SerialNoArray=DB_fetch_array($result); $SerialNo=$SerialNoArray[0]; - } + } else { $SerialNo=$WOHeader['nextlotsnref']; - } + } } //controlled $PackQty=0; - $sql = "SELECT value - FROM stockitemproperties + $sql = "SELECT value + FROM stockitemproperties INNER JOIN stockcatproperties ON stockcatproperties.stkcatpropid=stockitemproperties.stkcatpropid WHERE stockid='" . $StockID . "' AND label='PackQty'"; $result = DB_query($sql, $ErrMsg); $PackQtyArray=DB_fetch_array($result); - $PackQty=$PackQtyArray['value']; + $PackQty=$PackQtyArray['value']; if ($PackQty==0) { $PackQty=1; } @@ -271,14 +271,13 @@ FROM worequirements INNER JOIN stockmaster ON worequirements.stockid=stockmaster.stockid WHERE wo='" . $SelectedWO . "' - AND worequirements.parentstockid='" . $StockID . "'", - $db); + AND worequirements.parentstockid='" . $StockID . "'"); $IssuedAlreadyResult = DB_query("SELECT stockid, - SUM(-qty) AS total - FROM stockmoves - WHERE stockmoves.type=28 - AND reference='".$SelectedWO."' - GROUP BY stockid",$db); + SUM(-qty) AS total + FROM stockmoves + WHERE stockmoves.type=28 + AND reference='".$SelectedWO."' + GROUP BY stockid"); while ($IssuedRow = DB_fetch_array($IssuedAlreadyResult)){ $IssuedAlreadyRow[$IssuedRow['stockid']] = $IssuedRow['total']; } @@ -300,7 +299,7 @@ $WOLine[$i]['description'] = $RequirementsRow['description']; $WOLine[$i]['controlled'] = $RequirementsRow['controlled']; $WOLine[$i]['qtyreqd'] = $WOHeader['qtyreqd']*$RequirementsRow['qtypu']; - $WOLine[$i]['issued'] = $Issued ; + $WOLine[$i]['issued'] = $Issued ; $WOLine[$i]['decimalplaces'] = $RequirementsRow['decimalplaces']; $i+=1; } @@ -325,7 +324,7 @@ $i+=1; } } - + } if ($SelectedWO == 'Preview' or $i > -1) { /*Yes there are line items to start the ball rolling with a page header */ @@ -336,7 +335,7 @@ if ($SelectedWO == 'Preview') { $WOLine[$i]['action'] = str_pad('', 20, 'x'); $WOLine[$i]['item'] = str_pad('', 10, 'x'); - $WOLine[$i]['description'] = str_pad('', 50, 'x'); + $WOLine[$i]['description'] = str_pad('', 50, 'x'); $WOLine[$i]['qtyreqd'] = 9999999.99; $WOLine[$i]['issued'] = 9999999.99; $WOLine[$i]['decimalplaces'] = 2; @@ -353,16 +352,16 @@ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x, $YPos, $FormDesign->Data->Column3->Length, $FormDesign->Data->Column3->FontSize, $WOLine[$i]['description'], 'left'); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x, $YPos, $FormDesign->Data->Column4->Length, $FormDesign->Data->Column4->FontSize, locale_number_format($WOLine[$i]['qtyreqd'],$WOLine[$i]['decimalplaces']), 'right'); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x, $YPos, $FormDesign->Data->Column5->Length, $FormDesign->Data->Column5->FontSize, locale_number_format($WOLine[$i]['issued'],$WOLine[$i]['decimalplaces']), 'right'); - + $YPos -= $line_height; if ($YPos - (2*$line_height) <= $Page_Height - $FormDesign->Comments->y) { $PageNumber++; $YPos = $Page_Height - $FormDesign->Data->y; include('includes/PDFWOPageHeader.inc'); - } - + } + /*display already issued and available qty and lots where applicable*/ - + $IssuedAlreadyDetail = DB_query("SELECT stockmoves.stockid, SUM(qty) as qty, stockserialmoves.serialno, @@ -374,8 +373,8 @@ ON stockmoves.loccode=locations.loccode WHERE stockmoves.type=28 AND stockmoves.stockid = '".$WOLine[$i]['item']."' - AND reference='".$SelectedWO."' - GROUP BY stockserialmoves.serialno",$db); + AND reference='".$SelectedWO."' + GROUP BY stockserialmoves.serialno"); while ($IssuedRow = DB_fetch_array($IssuedAlreadyDetail)){ if ($WOLine[$i]['controlled']) { $CurLot=$IssuedRow['serialno']; @@ -392,9 +391,9 @@ $PageNumber++; $YPos = $Page_Height - $FormDesign->Data->y; include('includes/PDFWOPageHeader.inc'); - } + } } - + if ($WOLine[$i]['issued'] <= $WOLine[$i]['qtyreqd']) { $AvailQty = DB_query("SELECT locstock.loccode, locstock.bin, @@ -402,9 +401,9 @@ serialno, stockserialitems.quantity as qty FROM locstock LEFT OUTER JOIN stockserialitems - ON locstock.loccode=stockserialitems.loccode AND locstock.stockid = stockserialitems.stockid + ON locstock.loccode=stockserialitems.loccode AND locstock.stockid = stockserialitems.stockid WHERE locstock.loccode='".$WOHeader['loccode']."' - AND locstock.stockid='".$WOLine[$i]['item']."'",$db); + AND locstock.stockid='".$WOLine[$i]['item']."'"); while ($ToIssue = DB_fetch_array($AvailQty)){ if ($WOLine[$i]['controlled']) { $CurLot=$ToIssue['serialno']; @@ -423,7 +422,7 @@ $PageNumber++; $YPos = $Page_Height - $FormDesign->Data->y; include('includes/PDFWOPageHeader.inc'); - } + } //echo $CurLot . ' ' . $CurQty . '<br>'; } } @@ -437,9 +436,9 @@ $PageNumber++; $YPos = $Page_Height - $FormDesign->Data->y; include('includes/PDFWOPageHeader.inc'); - } + } } //end while there are line items to print out - + if ($YPos - (2*$line_height) <= $Page_Height - $FormDesign->Comments->y) { // need to ensure space for totals $PageNumber++; include('includes/PDFWOPageHeader.inc'); @@ -460,7 +459,7 @@ $PageNumber++; $YPos = $Page_Height - $FormDesign->Headings->Column1->y; include('includes/PDFWOPageHeader.inc'); - } + } $LeftOvers = $pdf->addTextWrap($FormDesign->Comments->x, $YPos,$FormDesign->Comments->Length,$FormDesign->Comments->FontSize, $LeftOvers, 'left'); } @@ -512,7 +511,7 @@ /** /*the user has just gone into the page need to ask the question whether to print the order or email it */ include('includes/header.inc'); - + if (!isset($LabelItem)) { $sql = "SELECT workorders.wo, stockmaster.description, @@ -528,21 +527,21 @@ ON woitems.stockid=stockmaster.stockid WHERE woitems.stockid='" . $StockID . "' AND woitems.wo ='" . $SelectedWO . "'"; - + $result = DB_query($sql, $ErrMsg); $Labels = DB_fetch_array($result); $LabelItem=$Labels['stockid']; $LabelDesc=$Labels['description']; $QtyPerBox=0; - $sql = "SELECT value - FROM stockitemproperties + $sql = "SELECT value + FROM stockitemproperties INNER JOIN stockcatproperties ON stockcatproperties.stkcatpropid=stockitemproperties.stkcatpropid WHERE stockid='" . $StockID . "' AND label='PackQty'"; $result = DB_query($sql, $ErrMsg); $PackQtyArray=DB_fetch_array($result); - $QtyPerBox=$PackQtyArray['value']; + $QtyPerBox=$PackQtyArray['value']; if ($QtyPerBox==0) { $QtyPerBox=1; } @@ -553,17 +552,17 @@ $LeftOverQty=locale_number_format($LeftOverQty, $Labels['decimalplaces']); if ($Labels['controlled']==1) { $sql = "SELECT serialno - FROM woserialnos + FROM woserialnos WHERE woserialnos.stockid='" . $StockID . "' AND woserialnos.wo ='" . $SelectedWO . "'"; $result = DB_query($sql, $ErrMsg); if (DB_num_rows($result) > 0) { $SerialNoArray=DB_fetch_array($result); $LabelLot=$SerialNoArray[0]; - } + } else { $LabelLot=$WOHeader['nextlotsnref']; - } + } } //controlled } //not set yet echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; @@ -574,7 +573,7 @@ } //$ViewingOnly == 1 echo '<br /><br />'; echo '<input type="hidden" name="WO" value="' . $SelectedWO . '" />'; - echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; + echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; echo '<table> <tr... [truncated message content] |
From: <dai...@us...> - 2014-10-27 07:06:55
|
Revision: 6943 http://sourceforge.net/p/web-erp/reponame/6943 Author: daintree Date: 2014-10-27 07:06:42 +0000 (Mon, 27 Oct 2014) Log Message: ----------- removed all $db from DB_error_no($db) calls Modified Paths: -------------- trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMListing.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/Dashboard.php trunk/DebtorsAtPeriodEnd.php trunk/FixedAssetItems.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/MRP.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFSellThroughSupportClaim.php trunk/PDFStockCheckComparison.php trunk/PDFSuppTransListing.php trunk/PO_Items.php trunk/PcReportTab.php trunk/Prices_Customer.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchaseByPrefSupplier.php trunk/ReorderLevel.php trunk/SalesGraph.php trunk/SelectCompletedOrder.php trunk/ShipmentCosting.php trunk/StockCheck.php trunk/StockClone.php trunk/StockDispatch.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierBalsAtPeriodEnd.php trunk/Tax.php trunk/UpgradeDatabase.php trunk/Z_ChangeLocationCode.php trunk/Z_ChangeStockCode.php trunk/Z_DataExport.php trunk/Z_ImportDebtors.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_ImportSuppliers.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_session.inc trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/doc/Change.log trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/ConnectDB_postgres.inc trunk/includes/DefineOfferClass.php trunk/includes/FreightCalculation.inc trunk/includes/GetConfig.php trunk/includes/PDFPaymentRun_PymtFooter.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/AgedDebtors.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -263,7 +263,7 @@ } $CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/ - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); @@ -365,7 +365,7 @@ } $DetailResult = DB_query($sql,'','',False,False); /*Dont trap errors */ - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/AgedSuppliers.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -104,7 +104,7 @@ $SupplierResult = DB_query($SQL,'','',False,False); /*dont trap errors */ - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; include('includes/header.inc'); prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); @@ -191,7 +191,7 @@ AND supptrans.supplierno = '" . $AgedAnalysis["supplierid"] . "'"; $DetailResult = DB_query($sql,'','',False,False); /*dont trap errors - trapped below*/ - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/BOMExtendedQty.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -150,7 +150,7 @@ } // End of while $ComponentCounter > 0 - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Quantity Extended BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/BOMIndented.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -148,7 +148,7 @@ } // End of while $ComponentCounter > 0 } // End of if $_POST['Levels'] - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/BOMIndentedReverse.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -136,7 +136,7 @@ } // End of while $ComponentCounter > 0 - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/BOMListing.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -38,7 +38,7 @@ $BOMResult = DB_query($SQL,'','',false,false); //dont do error trapping inside DB_query - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Bill of Materials Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'error'); Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/CustomerBranches.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -255,7 +255,7 @@ $result = DB_query($SQL, $ErrMsg); } - if (DB_error_no($db) ==0 AND $InputError==0) { + if (DB_error_no() ==0 AND $InputError==0) { prnMsg($msg,'success'); unset($_POST['BranchCode']); unset($_POST['BrName']); @@ -355,7 +355,7 @@ } $ErrMsg = _('The branch record could not be deleted') . ' - ' . _('the SQL server returned the following message'); $result = DB_query($SQL,$ErrMsg); - if (DB_error_no($db)==0){ + if (DB_error_no()==0){ prnMsg(_('Branch Deleted'),'success'); } } Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/CustomerReceipt.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -635,7 +635,7 @@ } $CustomerSearchResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); if ($debug==1){ prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error'); Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Dashboard.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -141,7 +141,7 @@ ROUND(ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)),currencies.decimalplaces) > 0"; $CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/ - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ @@ -252,7 +252,7 @@ } $DetailResult = DB_query($sql,'','',False,False); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ @@ -418,7 +418,7 @@ supptrans.transno"; $TransResult = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/DebtorsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -53,7 +53,7 @@ $CustomerResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details could not be retrieved by the SQL because') . DB_error_msg($db),'error'); Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/FixedAssetItems.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -271,7 +271,7 @@ $DbgMsg = _('The SQL that was used to add the asset failed was'); $result = DB_query($sql, $ErrMsg, $DbgMsg); - if (DB_error_no($db) ==0) { + if (DB_error_no() ==0) { $NewAssetID = DB_Last_Insert_ID($db,'fixedassets', 'assetid'); prnMsg( _('The new asset has been added to the database with an asset code of:') . ' ' . $NewAssetID,'success'); unset($_POST['LongDescription']); Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/GLBalanceSheet.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -104,7 +104,7 @@ WHERE accountgroups.pandl=1"; $AccumProfitResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) ); @@ -143,7 +143,7 @@ $AccountsResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/GLProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -181,7 +181,7 @@ $AccountsResult = DB_query($SQL); - if (DB_error_no($db) != 0) { + if (DB_error_no() != 0) { $Title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/GLTagProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -190,7 +190,7 @@ $AccountsResult = DB_query($SQL); - if (DB_error_no($db) != 0) { + if (DB_error_no() != 0) { $Title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/GLTrialBalance.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -159,7 +159,7 @@ chartdetails.accountcode"; $AccountsResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; $ViewTopic = 'GeneralLedger'; $BookMark = 'TrialBalance'; Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/InventoryPlanning.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -101,7 +101,7 @@ } $InventoryResult = DB_query($SQL, '', '', false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -178,7 +178,7 @@ $SalesResult = DB_query($SQL,'','', false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -215,7 +215,7 @@ $DemandResult = DB_query($SQL, '', '', false , false); $ListCount = DB_num_rows($DemandResult); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -264,7 +264,7 @@ $BOMDemandResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/InventoryPlanningPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -179,7 +179,7 @@ $InventoryResult = DB_query($SQL, '', '', false, false); $ListCount = DB_num_rows($InventoryResult); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -237,7 +237,7 @@ $SalesResult=DB_query($SQL,'','',FALSE,FALSE); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -264,7 +264,7 @@ $DemandResult = DB_query($SQL, '', '', false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -297,7 +297,7 @@ $BOMDemandResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/InventoryQuantities.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -80,7 +80,7 @@ $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/InventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -66,7 +66,7 @@ } $InventoryResult = DB_query($SQL,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The inventory valuation could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRP.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -536,7 +536,7 @@ // Display parameters from last run $sql = "SELECT * FROM mrpparameters"; $result = DB_query($sql,'','',false,false); - if (DB_error_no($db)==0){ + if (DB_error_no()==0){ $myrow = DB_fetch_array($result); Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRPPlannedPurchaseOrders.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -110,7 +110,7 @@ } $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('MRP Planned Purchase Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP planned purchase orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRPPlannedWorkOrders.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -102,7 +102,7 @@ } $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('MRP Planned Work Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP planned work orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRPReport.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -30,7 +30,7 @@ ORDER BY daterequired,whererequired"; $result = DB_query($sql,'','',False,False); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $errors = 1; $holddb = $db; $Title = _('Print MRP Report Error'); @@ -81,7 +81,7 @@ WHERE part = '" . $_POST['Part'] . "' ORDER BY mrpdate"; $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $errors = 1; $holddb = $db; } @@ -115,7 +115,7 @@ TO_DAYS(duedate) - TO_DAYS(CURRENT_DATE) AS datediff FROM mrpplannedorders WHERE part = '" . $_POST['Part'] . "' ORDER BY mrpdate"; $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $errors = 1; $holddb = $db; } Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRPReschedules.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -41,7 +41,7 @@ ORDER BY mrpsupplies.part"; $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MRPShortages.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -151,7 +151,7 @@ " ORDER BY '" . $_POST['Sort'] . "'"; $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('MRP Shortages and Excesses') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP shortages and excesses could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/MailInventoryValuation.php =================================================================== --- trunk/MailInventoryValuation.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/MailInventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -115,7 +115,7 @@ $InventoryResult = DB_query($SQL,'','',false,true); $ListCount = DB_num_rows($InventoryResult); -if (DB_error_no($db) !=0) { +if (DB_error_no() !=0) { $Title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); echo _('The inventory valuation could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/OutstandingGRNs.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -42,7 +42,7 @@ $GRNsResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFBankingSummary.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -103,7 +103,7 @@ AND debtortrans.type=12"; $CustRecs=DB_query($SQL,'','',false,false); - if (DB_error_no($db)!=0){ + if (DB_error_no()!=0){ $Title = _('Create PDF Print-out For A Batch Of Receipts'); include ('includes/header.inc'); prnMsg(_('An error occurred getting the customer receipts for batch number') . ' ' . $_POST['BatchNo'],'error'); @@ -122,7 +122,7 @@ AND gltrans.account !='" . $_SESSION['CompanyRecord']['debtorsact'] . "'"; $GLRecs=DB_query($SQL,'','',false,false); - if (DB_error_no($db)!=0){ + if (DB_error_no()!=0){ $Title = _('Create PDF Print-out For A Batch Of Receipts'); include ('includes/header.inc'); prnMsg(_('An error occurred getting the GL receipts for batch number') . ' ' . $_POST['BatchNo'],'error'); Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFChequeListing.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -102,7 +102,7 @@ AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'"; $Result=DB_query($sql,'','',false,false); -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); @@ -145,7 +145,7 @@ AND gltrans.type='" . $myrow['type'] . "'"; $GLTransResult = DB_query($sql,'','',false,false); - if (DB_error_no($db)!=0){ + if (DB_error_no()!=0){ $Title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the GL transactions'),'error'); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFCustTransListing.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -78,7 +78,7 @@ $result=DB_query($sql,'','',false,false); -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the transactions'),'error'); Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFCustomerList.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -228,7 +228,7 @@ $CustomersResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Customer List') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The customer List could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db) ); Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFDIFOT.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -186,7 +186,7 @@ $Result=DB_query($sql,'','',false,false); //dont error check - see below -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('DIFOT Report Error'); include('includes/header.inc'); prnMsg( _('An error occurred getting the days between delivery requested and actual invoice'),'error'); Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFDeliveryDifferences.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -187,7 +187,7 @@ $Result=DB_query($sql,'','',false,false); //dont error check - see below -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('Delivery Differences Log Report Error'); include('includes/header.inc'); prnMsg( _('An error occurred getting the variances between deliveries and orders'),'error'); Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFLowGP.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -52,7 +52,7 @@ $LowGPSalesResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { include('includes/header.inc'); prnMsg(_('The low GP items could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFOrderStatus.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -260,7 +260,7 @@ $Result=DB_query($sql,'','',false,false); //dont trap errors here -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ include('includes/header.inc'); echo '<br />' . _('An error occurred getting the orders details'); if ($debug==1){ Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFOrdersInvoiced.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -248,7 +248,7 @@ $Result=DB_query($sql,'','',false,false); //dont trap errors here -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ include('includes/header.inc'); prnMsg(_('An error occurred getting the orders details'),'',_('Database Error')); if ($debug==1){ Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFPeriodStockTransListing.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -133,7 +133,7 @@ } $result=DB_query($sql,'','',false,false); -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('Transaction Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the transactions'),'error'); Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFPriceList.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -147,7 +147,7 @@ } $PricesResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Price List') . ' - ' . _('Problem Report....'); include('includes/header.inc'); prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFPrintLabel.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -40,7 +40,7 @@ $LabelsResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFRemittanceAdvice.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -76,7 +76,7 @@ $TransResult = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Remittance Advice Problem Report'); include('includes/header.inc'); prnMsg(_('The details of the payment to the supplier could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/PDFSellThroughSupportClaim.php =================================================================== --- trunk/PDFSellThroughSupportClaim.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFSellThroughSupportClaim.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -67,7 +67,7 @@ $ClaimsResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { include('includes/header.inc'); prnMsg(_('The sell through support items to claim could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFStockCheckComparison.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -29,7 +29,7 @@ stockcheckfreeze.stockid"; $StockChecks = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); echo '<br />'; @@ -55,7 +55,7 @@ AND stockcounts.loccode='" . $myrow['loccode'] . "'"; $StockCounts = DB_query($sql); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Count Comparison') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); echo '<br />'; @@ -261,7 +261,7 @@ $Counts = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Inventory Comparison') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); echo '<br />'; Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PDFSuppTransListing.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -76,7 +76,7 @@ $result=DB_query($sql,'','',false,false); -if (DB_error_no($db)!=0){ +if (DB_error_no()!=0){ $Title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PO_Items.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -451,7 +451,7 @@ $ErrMsg = _('The account details for') . ' ' . $_POST['GLCode'] . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the details of the account, but failed was'); $GLValidResult = DB_query($sql,$ErrMsg,$DbgMsg,false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $AllowUpdate = false; prnMsg( _('The validation process for the GL Code entered could not be executed because') . ' ' . DB_error_msg($db), 'error'); if ($debug==1){ Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PcReportTab.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -97,7 +97,7 @@ $TabDetail = DB_query($SQL); - if (DB_error_no($db)!=0){ + if (DB_error_no()!=0){ include('includes/header.inc'); prnMsg(_('An error occurred getting the orders details'),'',_('Database Error')); if ($debug==1){ Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Prices_Customer.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -151,7 +151,7 @@ //run the SQL from either of the above possibilites if ($InputError!=1){ $result = DB_query($sql,'','',false,false); - if (DB_error_no($db)!=0){ + if (DB_error_no()!=0){ If ($msg==_('Price Updated')){ $msg = _('The price could not be updated because') . ' - ' . DB_error_msg($db); } else { Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PrintCustStatements.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -57,7 +57,7 @@ FROM bankaccounts WHERE bankaccounts.invoice = '1'"; $result=DB_query($sql,'','',false,false); - if (DB_error_no($db)!=1) { + if (DB_error_no()!=1) { if (DB_num_rows($result)==1){ $myrow = DB_fetch_array($result); $DefaultBankAccountNumber = $myrow['bankaccountnumber']; Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PrintCustTrans.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -219,7 +219,7 @@ $result=DB_query($sql, '', '',false, false); - if (DB_error_no($db)!=0) { + if (DB_error_no()!=0) { $Title = _('Transaction Print Error Report'); include ('includes/header.inc'); prnMsg( _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'),'error'); @@ -273,7 +273,7 @@ } // end else $result=DB_query($sql); - if (DB_error_no($db)!=0 OR DB_num_rows($result)==0) { + if (DB_error_no()!=0 OR DB_num_rows($result)==0) { $Title = _('Transaction Print Error Report'); include ('includes/header.inc'); @@ -698,7 +698,7 @@ } $result=DB_query($sql); - if (DB_num_rows($result)==0 OR DB_error_no($db)!=0) { + if (DB_num_rows($result)==0 OR DB_error_no()!=0) { echo '<p>' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'); if ($debug==1) { echo _('The SQL used to get this information that failed was') . '<br />' . $sql; @@ -881,7 +881,7 @@ echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql); - if (DB_error_no($db)!=0) { + if (DB_error_no()!=0) { echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); if ($debug==1){ echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' .$sql; Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PrintCustTransPortrait.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -90,7 +90,7 @@ FROM bankaccounts WHERE bankaccounts.invoice = '1'"; $result=DB_query($sql,'','',false,false); - if (DB_error_no($db)!=1) { + if (DB_error_no()!=1) { if (DB_num_rows($result)==1){ $myrow = DB_fetch_array($result); $DefaultBankAccountNumber = _('Account:') .' ' .$myrow['bankaccountnumber']; @@ -240,7 +240,7 @@ $result=DB_query($sql,'','',false,false); - if (DB_error_no($db)!=0) { + if (DB_error_no()!=0) { $Title = _('Transaction Print Error Report'); include ('includes/header.inc'); @@ -299,7 +299,7 @@ } // end else $result=DB_query($sql); - if (DB_error_no($db)!=0) { + if (DB_error_no()!=0) { $Title = _('Transaction Print Error Report'); include ('includes/header.inc'); echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); @@ -742,7 +742,7 @@ } $result=DB_query($sql); - if (DB_num_rows($result)==0 OR DB_error_no($db)!=0) { + if (DB_num_rows($result)==0 OR DB_error_no()!=0) { echo '<p>' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'); if ($debug==1){ prnMsg( _('The SQL used to get this information that failed was') . '<br />' . $sql,'warn'); @@ -933,7 +933,7 @@ echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql); - if (DB_error_no($db)!=0) { + if (DB_error_no()!=0) { echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); if ($debug==1){ echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql; Modified: trunk/PurchaseByPrefSupplier.php =================================================================== --- trunk/PurchaseByPrefSupplier.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/PurchaseByPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -395,7 +395,7 @@ $ItemsResult = DB_query($SQL, '', '', false, false); $ListCount = DB_num_rows($ItemsResult); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Supplier Ordering') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The supplier inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -443,7 +443,7 @@ AND (type=10 OR type=11)"; $SalesResult=DB_query($SQL,'','',FALSE,FALSE); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -467,7 +467,7 @@ $DemandResult = DB_query($SQL, '', '', false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -496,7 +496,7 @@ $BOMDemandResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); @@ -527,7 +527,7 @@ $TotalDemand = $DemandRow['qtydemand'] + $BOMDemandRow['dem']; $OnOrdResult = DB_query($SQL, '', '', false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/ReorderLevel.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -56,7 +56,7 @@ $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Reorder Level') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Reorder Level report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/SalesGraph.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -294,7 +294,7 @@ $graph->SetPrecisionY($_SESSION['CompanyRecord']['decimalplaces']); $SalesResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The sales graph data for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); include('includes/footer.inc'); Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/SelectCompletedOrder.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -420,7 +420,7 @@ $SalesOrdersResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg( _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db), 'info'); echo '<br /> ' . $SQL; } Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/ShipmentCosting.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -96,7 +96,7 @@ $ErrMsg = _('Shipment') . ' ' . $_GET['SelectedShipment'] . ' ' . _('Item costs cannot be retrieved from the database'); $GetShiptCostsResult = DB_query($sql); -if (DB_error_no($db) !=0 OR DB_num_rows($GetShiptCostsResult)==0) { +if (DB_error_no() !=0 OR DB_num_rows($GetShiptCostsResult)==0) { echo '<br />'; prnMsg ( _('No Item Cost Records exist for Shipment') . ' ' . $_GET['SelectedShipment'] . ' ' . _('in the database'), 'error'); include ('includes/footer.inc'); Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/StockCheck.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -39,7 +39,7 @@ stockmaster.mbflag!='D'"; $result = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Count Sheets - Problem Report'); include('includes/header.inc'); prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); @@ -61,7 +61,7 @@ AND stockcheckfreeze.loccode='" . $_POST['Location'] . "'"; $result = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('The old quantities could not be deleted from the freeze file because') . ' ' . DB_error_msg($db),'error'); @@ -92,7 +92,7 @@ AND stockmaster.mbflag!='D'"; $result = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Freeze - Problem Report'); include('includes/header.inc'); prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); @@ -135,7 +135,7 @@ $InventoryResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Sheets') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); prnMsg( _('The inventory quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); @@ -188,7 +188,7 @@ $DemandResult = DB_query($SQL,'','',false, false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Check Sheets - Problem Report'); include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db), 'error'); @@ -218,7 +218,7 @@ AND salesorders.quotation=0"; $DemandResult = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { prnMsg(_('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; Modified: trunk/StockClone.php =================================================================== --- trunk/StockClone.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/StockClone.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -317,7 +317,7 @@ $ErrMsg = _('The item could not be added because'); $DbgMsg = _('The SQL that was used to add the item failed was'); $result = DB_query($sql, $ErrMsg, $DbgMsg,'',true); - if (DB_error_no($db) ==0) { + if (DB_error_no() ==0) { //now insert the language descriptions $ErrMsg = _('Could not update the language description because'); $DbgMsg = _('The SQL that was used to update the language description and failed was'); @@ -498,7 +498,7 @@ $Result = DB_Txn_Commit($db); //finish up - if (DB_error_no($db) ==0) { + if (DB_error_no() ==0) { prnMsg( _('New cloned Item') .' ' . '<a href="SelectProduct.php?StockID=' . $_POST['StockID'] . '">' . $_POST['StockID'] . '</a> '. _('has been added to the database') . '<br />' . _('We also attempted to setup item purchase data and pricing.')); Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/StockDispatch.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -120,7 +120,7 @@ $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Stock Dispatch - Problem Report'); include('includes/header.inc'); prnMsg( _('The Stock Dispatch report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/StockUsage.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -136,7 +136,7 @@ } $MovtsResult = DB_query($sql); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $sql; Modified: trunk/StockUsageGraph.php =================================================================== --- trunk/StockUsageGraph.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/StockUsageGraph.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -47,7 +47,7 @@ ORDER BY periodno LIMIT 24"; } $MovtsResult = DB_query($sql); -if (DB_error_no($db) !=0) { +if (DB_error_no() !=0) { $Title = _('Stock Usage Graph Problem'); include ('includes/header.inc'); echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Stocks.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -626,7 +626,7 @@ $ErrMsg = _('The item could not be added because'); $DbgMsg = _('The SQL that was used to add the item failed was'); $result = DB_query($sql, $ErrMsg, $DbgMsg,'',true); - if (DB_error_no($db) ==0) { + if (DB_error_no() ==0) { //now insert the language descriptions $ErrMsg = _('Could not update the language description because'); $DbgMsg = _('The SQL that was used to update the language description and failed was'); @@ -676,7 +676,7 @@ $DbgMsg = _('NB Locations records can be added by opening the utility page') . ' <i>Z_MakeStockLocns.php</i> ' . _('The SQL that was used to add the location records that failed was'); $InsResult = DB_query($sql,$ErrMsg,$DbgMsg,true); DB_Txn_Commit($db); - if (DB_error_no($db) ==0) { + if (DB_error_no() ==0) { prnMsg( _('New Item') .' ' . '<a href="SelectProduct.php?StockID=' . $StockID . '">' . $StockID . '</a> '. _('has been added to the database') . '<br />' . _('NB: The item cost and pricing must also be setup') . '<br />' . '<a target="_blank" href="StockCostUpdate.php?StockID=' . $StockID . '">' . _('Enter Item Cost') . '</a> Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/SuppPaymentRun.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -105,7 +105,7 @@ supptrans.transno"; $TransResult = DB_query($sql,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Payment Run - Problem Report'); include('includes/header.inc'); prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); @@ -179,7 +179,7 @@ AND transno = '" . $DetailTrans['transno'] . "'"; $ProcessResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('None of the payments will be processed since updates to the transaction records for') . ' ' .$SupplierName . ' ' . _('could not be processed because') . ' - ' . DB_error_msg($db),'error'); @@ -210,7 +210,7 @@ $ProcessResult = DB_Txn_Commit($db); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); prnMsg(_('None of the payments will be processed. Unfortunately, there was a problem committing the changes to the database because') . ' - ' . DB_error_msg($db),'error'); @@ -313,7 +313,7 @@ $AccountsResults = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { echo '<br />' . _('The bank accounts could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db); if ($debug==1){ echo '<br />' . _('The SQL used to retrieve the bank accounts was') . ':<br />' . $SQL; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/SuppPriceList.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -134,7 +134,7 @@ } $result = DB_query($sql,'','',false,true); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Price List') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Price List could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -47,7 +47,7 @@ $SupplierResult = DB_query($SQL); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Tax.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -50,7 +50,7 @@ $DebtorTransResult = DB_query($SQL,'','',false,false); //don't trap errors in DB_query - if(DB_error_no($db) !=0) { + if(DB_error_no() !=0) { $Title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg(_('The accounts receivable transaction details could not be retrieved because') . ' ' . DB_error_msg($db),'error'); @@ -164,7 +164,7 @@ $SuppTransResult = DB_query($SQL,'','',false,false); //doint trap errors in DB_query - if(DB_error_no($db) !=0) { + if(DB_error_no() !=0) { $Title = _('Taxation Reporting Error'); include('includes/header.inc'); echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db); Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/UpgradeDatabase.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -228,7 +228,7 @@ $sql = mb_substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, '','', false, false); echo '<tr><td>' . $sql . '</td>'; - switch (DB_error_no($db)) { + switch (DB_error_no()) { case 0: echo '<td style="background-color:green">' . _('Success') . '</td></tr>'; break; @@ -260,7 +260,7 @@ echo '<td style="background-color:yellow">' . _('Note').' - '. _('Index already dropped previously') . '</td></tr>'; break; default: - echo '<td style="background-color:red">' . _('Failure').' - '. _('Error number').' - '.DB_error_no($db) .' ' . DB_error_msg($db) . '</td></tr>'; + echo '<td style="background-color:red">' . _('Failure').' - '. _('Error number').' - '.DB_error_no() .' ' . DB_error_msg() . '</td></tr>'; break; } $sql=''; Modified: trunk/Z_ChangeLocationCode.php =================================================================== --- trunk/Z_ChangeLocationCode.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Z_ChangeLocationCode.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -143,7 +143,7 @@ //check if MRP tables exist before assuming $result = DB_query("SELECT COUNT(*) FROM mrpparameters",'','',false,false); - if (DB_error_no($db)==0) { + if (DB_error_no()==0) { echo '<br />' . _('Changing MRP parameters information'); $sql = "UPDATE mrpparameters SET location='" . $_POST['NewLocationID'] . "' WHERE location='" . $_POST['OldLocationID'] . "'"; $ErrMsg = _('The SQL to update the mrpparameters records failed'); Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2014-10-27 02:48:29 UTC (rev 6942) +++ trunk/Z_ChangeStockCode.php 2014-10-27 07:06:42 UTC (rev 6943) @@ -122,19 +122,19 @@ //check if MRP tables exist before assuming $sql = "SELECT * FROM mrpparameters"; $result = DB_query($sql, '', '', false, false); - if (DB_error_no($db) == 0) { + if (DB_error_no() == 0) { $result = DB_query("SELECT COUNT(*) FROM mrpplannedorders",'','',false,false); - if (DB_error_no($db)==0) { + if (DB_error_no()==0) { ChangeFieldInTable("mrpplannedorders", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); } $result = DB_query("SELECT * FROM mrprequirements" ,'','',false,false); - if (DB_error_no($db)==0){ + if (DB_error_no()==0){ ChangeFieldInTable("mrprequirements", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); } $result = DB_query("SELECT * FROM mrpsupplies" ,'','',false,false); - if (DB_error_no($db)==0){ + if (DB_error_no()==0){ ChangeFieldInTable("mrpsupplies", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); ... [truncated message content] |
From: <dai...@us...> - 2014-10-27 07:15:47
|
Revision: 6944 http://sourceforge.net/p/web-erp/reponame/6944 Author: daintree Date: 2014-10-27 07:15:34 +0000 (Mon, 27 Oct 2014) Log Message: ----------- removed all $db from DB_error_msg($db) calls Modified Paths: -------------- trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/DailySalesInquiry.php trunk/Dashboard.php trunk/DebtorsAtPeriodEnd.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/OutstandingGRNs.php trunk/PDFCustomerList.php trunk/PDFLowGP.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFSellThroughSupportClaim.php trunk/PDFStockCheckComparison.php trunk/PO_Items.php trunk/Prices_Customer.php trunk/PurchaseByPrefSupplier.php trunk/ReorderLevel.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGraph.php trunk/SalesTopCustomersInquiry.php trunk/SalesTopItemsInquiry.php trunk/SelectCompletedOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shipt_Select.php trunk/ShiptsList.php trunk/StockCheck.php trunk/StockDispatch.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierTransInquiry.php trunk/Tax.php trunk/UpgradeDatabase.php trunk/Z_DataExport.php trunk/api/api_session.inc trunk/doc/Change.log trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_postgres.inc trunk/includes/FreightCalculation.inc trunk/includes/PDFPaymentRun_PymtFooter.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/AgedDebtors.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -266,7 +266,7 @@ if (DB_error_no() !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); - prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -368,7 +368,7 @@ if (DB_error_no() !=0) { $Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/AgedSuppliers.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -107,7 +107,7 @@ if (DB_error_no() !=0) { $Title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; include('includes/header.inc'); - prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -194,7 +194,7 @@ if (DB_error_no() !=0) { $Title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); - prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/BOMExtendedQty.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -153,7 +153,7 @@ if (DB_error_no() !=0) { $Title = _('Quantity Extended BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/BOMIndented.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -151,7 +151,7 @@ if (DB_error_no() !=0) { $Title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/BOMIndentedReverse.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -139,7 +139,7 @@ if (DB_error_no() !=0) { $Title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /> <a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/CustomerReceipt.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -636,7 +636,7 @@ $CustomerSearchResult = DB_query($SQL,'','',false,false); if (DB_error_no() !=0) { - prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg(),'error'); if ($debug==1){ prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error'); } Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/CustomerTransInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -93,7 +93,7 @@ } $sql .= " ORDER BY id"; - $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg(); $DbgMsg = _('The SQL that failed was'); $TransResult = DB_query($sql,$ErrMsg,$DbgMsg); Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/DailySalesInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -107,7 +107,7 @@ } $sql .= " GROUP BY stockmoves.trandate ORDER BY stockmoves.trandate"; -$ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); +$ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg(); $SalesResult = DB_query($sql,$ErrMsg); echo '<table class="selection"> Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Dashboard.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -142,7 +142,7 @@ $CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/ if (DB_error_no() !=0) { - prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -253,7 +253,7 @@ $DetailResult = DB_query($sql,'','',False,False); if (DB_error_no() !=0) { - prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; @@ -419,7 +419,7 @@ $TransResult = DB_query($sql,'','',false,false); if (DB_error_no() !=0) { - prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/DebtorsAtPeriodEnd.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -56,7 +56,7 @@ if (DB_error_no() !=0) { $Title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg(_('The customer details could not be retrieved by the SQL because') . DB_error_msg($db),'error'); + prnMsg(_('The customer details could not be retrieved by the SQL because') . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/GLBalanceSheet.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -107,7 +107,7 @@ if (DB_error_no() !=0) { $Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /> <a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ @@ -146,7 +146,7 @@ if (DB_error_no() !=0) { $Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/GLProfit_Loss.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -184,7 +184,7 @@ if (DB_error_no() != 0) { $Title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug == 1){ echo '<br />' . $SQL; Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/GLTagProfit_Loss.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -193,7 +193,7 @@ if (DB_error_no() != 0) { $Title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /> <a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug == 1){ Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/GLTrialBalance.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -164,7 +164,7 @@ $ViewTopic = 'GeneralLedger'; $BookMark = 'TrialBalance'; include('includes/header.inc'); - prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/InventoryPlanning.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -104,7 +104,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -181,7 +181,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' .$SQL; @@ -218,7 +218,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -267,7 +267,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/InventoryPlanningPrefSupplier.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -182,7 +182,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -240,7 +240,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -267,7 +267,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -300,7 +300,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/InventoryQuantities.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -83,7 +83,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/InventoryValuation.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -69,7 +69,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The inventory valuation could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The inventory valuation could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/MRPPlannedPurchaseOrders.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -113,7 +113,7 @@ if (DB_error_no() !=0) { $Title = _('MRP Planned Purchase Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The MRP planned purchase orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The MRP planned purchase orders could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/MRPPlannedWorkOrders.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -105,7 +105,7 @@ if (DB_error_no() !=0) { $Title = _('MRP Planned Work Orders') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The MRP planned work orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The MRP planned work orders could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/MRPReschedules.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -44,7 +44,7 @@ if (DB_error_no() !=0) { $Title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/MRPShortages.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -154,7 +154,7 @@ if (DB_error_no() !=0) { $Title = _('MRP Shortages and Excesses') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The MRP shortages and excesses could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The MRP shortages and excesses could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br/><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br/>' . $sql; Modified: trunk/MailInventoryValuation.php =================================================================== --- trunk/MailInventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/MailInventoryValuation.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -118,7 +118,7 @@ if (DB_error_no() !=0) { $Title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); - echo _('The inventory valuation could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db); + echo _('The inventory valuation could not be retrieved by the SQL because') . ' - ' . DB_error_msg(); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/OutstandingGRNs.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -45,7 +45,7 @@ if (DB_error_no() !=0) { $Title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; /* if ($debug==1){ Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFCustomerList.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -231,7 +231,7 @@ if (DB_error_no() !=0) { $Title = _('Customer List') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The customer List could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db) ); + prnMsg( _('The customer List could not be retrieved by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFLowGP.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -55,7 +55,7 @@ if (DB_error_no() !=0) { include('includes/header.inc'); - prnMsg(_('The low GP items could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The low GP items could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFPriceList.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -150,7 +150,7 @@ if (DB_error_no() !=0) { $Title = _('Price List') . ' - ' . _('Problem Report....'); include('includes/header.inc'); - prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1) { prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFPrintLabel.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -41,7 +41,7 @@ $LabelsResult = DB_query($SQL,'','',false,false); if (DB_error_no() !=0) { - prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFRemittanceAdvice.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -79,7 +79,7 @@ if (DB_error_no() !=0) { $Title = _('Remittance Advice Problem Report'); include('includes/header.inc'); - prnMsg(_('The details of the payment to the supplier could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of the payment to the supplier could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; Modified: trunk/PDFSellThroughSupportClaim.php =================================================================== --- trunk/PDFSellThroughSupportClaim.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFSellThroughSupportClaim.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -70,7 +70,7 @@ if (DB_error_no() !=0) { include('includes/header.inc'); - prnMsg(_('The sell through support items to claim could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The sell through support items to claim could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PDFStockCheckComparison.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -33,7 +33,7 @@ $Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); echo '<br />'; - prnMsg( _('The inventory check file could not be retrieved because'). ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The inventory check file could not be retrieved because'). ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; @@ -59,7 +59,7 @@ $Title = _('Stock Count Comparison') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); echo '<br />'; - prnMsg( _('The inventory counts file could not be retrieved because'). ' - ' . DB_error_msg($db). 'error'); + prnMsg( _('The inventory counts file could not be retrieved because'). ' - ' . DB_error_msg(). 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; @@ -265,7 +265,7 @@ $Title = _('Inventory Comparison') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); echo '<br />'; - prnMsg( _('The inventory counts could not be retrieved by the SQL because').' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The inventory counts could not be retrieved by the SQL because').' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PO_Items.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -453,7 +453,7 @@ $GLValidResult = DB_query($sql,$ErrMsg,$DbgMsg,false,false); if (DB_error_no() !=0) { $AllowUpdate = false; - prnMsg( _('The validation process for the GL Code entered could not be executed because') . ' ' . DB_error_msg($db), 'error'); + prnMsg( _('The validation process for the GL Code entered could not be executed because') . ' ' . DB_error_msg(), 'error'); if ($debug==1){ prnMsg (_('The SQL used to validate the code entered was') . ' ' . $sql,'error'); } Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Prices_Customer.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -153,9 +153,9 @@ $result = DB_query($sql,'','',false,false); if (DB_error_no()!=0){ If ($msg==_('Price Updated')){ - $msg = _('The price could not be updated because') . ' - ' . DB_error_msg($db); + $msg = _('The price could not be updated because') . ' - ' . DB_error_msg(); } else { - $msg = _('The price could not be added because') . ' - ' . DB_error_msg($db); + $msg = _('The price could not be added because') . ' - ' . DB_error_msg(); } }else { ReSequenceEffectiveDates ($Item, $SalesType, $CurrCode, $_SESSION['CustomerID'], $db); Modified: trunk/PurchaseByPrefSupplier.php =================================================================== --- trunk/PurchaseByPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/PurchaseByPrefSupplier.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -398,7 +398,7 @@ if (DB_error_no() !=0) { $Title = _('Supplier Ordering') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg(_('The supplier inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The supplier inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -446,7 +446,7 @@ if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />'. $SQL; @@ -470,7 +470,7 @@ if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />'.$SQL; @@ -499,7 +499,7 @@ if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />'.$SQL; @@ -530,7 +530,7 @@ if (DB_error_no() !=0) { $Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />'. $SQL; Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/ReorderLevel.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -59,7 +59,7 @@ if (DB_error_no() !=0) { $Title = _('Reorder Level') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Reorder Level report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Reorder Level report could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; Modified: trunk/SalesByTypePeriodInquiry.php =================================================================== --- trunk/SalesByTypePeriodInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SalesByTypePeriodInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -345,7 +345,7 @@ break; } - $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg(); $SalesResult = DB_query($sql,$ErrMsg); Modified: trunk/SalesCategoryPeriodInquiry.php =================================================================== --- trunk/SalesCategoryPeriodInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SalesCategoryPeriodInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -155,7 +155,7 @@ GROUP BY stockmaster.categoryid ORDER BY netsalesvalue DESC"; - $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg(); $SalesResult = DB_query($sql,$ErrMsg); echo '<table cellpadding="2" class="selection">'; Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SalesGraph.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -296,7 +296,7 @@ $SalesResult = DB_query($SQL); if (DB_error_no() !=0) { - prnMsg(_('The sales graph data for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The sales graph data for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg(),'error'); include('includes/footer.inc'); exit; } Modified: trunk/SalesTopCustomersInquiry.php =================================================================== --- trunk/SalesTopCustomersInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SalesTopCustomersInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -204,7 +204,7 @@ } } - $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg(); $SalesResult = DB_query($sql,$ErrMsg); Modified: trunk/SalesTopItemsInquiry.php =================================================================== --- trunk/SalesTopItemsInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SalesTopItemsInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -209,7 +209,7 @@ } } - $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg(); $SalesResult = DB_query($sql,$ErrMsg); Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SelectCompletedOrder.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -421,7 +421,7 @@ $SalesOrdersResult = DB_query($SQL); if (DB_error_no() !=0) { - prnMsg( _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db), 'info'); + prnMsg( _('No orders were returned by the SQL because') . ' ' . DB_error_msg(), 'info'); echo '<br /> ' . $SQL; } Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/ShipmentCosting.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -429,7 +429,7 @@ '" . _('Shipment of') . ' ' . $myrow['itemcode'] . " " . _('cost was') . ' ' . $StdCostUnit . ' ' . _('changed to') . ' ' . locale_number_format($ItemShipmentCost,$_SESSION['CompanyRecord']['decimalplaces']) . ' x ' . _('QOH of') . ' ' . $QOH . "', " . -$ValueOfChange . ")"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the shipment stock cost adjustment posting could not be inserted because'). ' ' . DB_error_msg($db); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the shipment stock cost adjustment posting could not be inserted because'). ' ' . DB_error_msg(); $Result = DB_query($SQL, $ErrMsg,'',TRUE); @@ -448,7 +448,7 @@ '" . _('Shipment of') . ' ' . $myrow['itemcode'] . ' ' . _('cost was') . ' ' . $StdCostUnit . ' ' . _('changed to') . ' ' . locale_number_format($ItemShipmentCost,$_SESSION['CompanyRecord']['decimalplaces']) . ' x ' . _('QOH of') . ' ' . $QOH . "', " . $ValueOfChange . ")"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because') .' '. DB_error_msg($db); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because') .' '. DB_error_msg(); $Result = DB_query($SQL, $ErrMsg,'',TRUE); @@ -462,7 +462,7 @@ lastcostupdate='" . Date('Y-m-d') . "' WHERE stockid='" . $myrow['itemcode'] . "'"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The shipment cost details for the stock item could not be updated because'). ': ' . DB_error_msg($db); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The shipment cost details for the stock item could not be updated because'). ': ' . DB_error_msg(); $result = DB_query($sql, $ErrMsg,'',TRUE); Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Shipments.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -99,7 +99,7 @@ INNER JOIN purchorders ON purchorderdetails.orderno=purchorders.orderno WHERE purchorderdetails.shiptref='" . $_GET['SelectedShipment'] . "'"; - $ErrMsg = _('The lines on the shipment cannot be retrieved because'). ' - ' . DB_error_msg($db); + $ErrMsg = _('The lines on the shipment cannot be retrieved because'). ' - ' . DB_error_msg(); $LineItemsResult = DB_query($LineItemsSQL, $ErrMsg); if (DB_num_rows($GetShiptHdrResult)==0) { Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Shipt_Select.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -98,7 +98,7 @@ stockmaster.decimalplaces, stockmaster.units"; - $ErrMsg = _('No Stock Items were returned from the database because'). ' - '. DB_error_msg($db); + $ErrMsg = _('No Stock Items were returned from the database because'). ' - '. DB_error_msg(); $StockItemsResult = DB_query($SQL, $ErrMsg); } Modified: trunk/ShiptsList.php =================================================================== --- trunk/ShiptsList.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/ShiptsList.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -22,7 +22,7 @@ eta FROM shipments WHERE supplierid='" . $_GET['SupplierID'] . "'"; -$ErrMsg = _('No shipments were returned from the database because'). ' - '. DB_error_msg($db); +$ErrMsg = _('No shipments were returned from the database because'). ' - '. DB_error_msg(); $ShiptsResult = DB_query($SQL, $ErrMsg); if (DB_num_rows($ShiptsResult)==0){ Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/StockCheck.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -42,7 +42,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Count Sheets - Problem Report'); include('includes/header.inc'); - prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; @@ -64,7 +64,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); - prnMsg(_('The old quantities could not be deleted from the freeze file because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The old quantities could not be deleted from the freeze file because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; @@ -95,7 +95,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Freeze - Problem Report'); include('includes/header.inc'); - prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $sql; @@ -138,7 +138,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Sheets') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); - prnMsg( _('The inventory quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The inventory quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -191,7 +191,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Check Sheets - Problem Report'); include('includes/header.inc'); - prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db), 'error'); + prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg(), 'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -219,7 +219,7 @@ $DemandResult = DB_query($sql,'','',false,false); if (DB_error_no() !=0) { - prnMsg(_('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because') . ' - ' . DB_error_msg(),'error'); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; } Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/StockDispatch.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -123,7 +123,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Dispatch - Problem Report'); include('includes/header.inc'); - prnMsg( _('The Stock Dispatch report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Stock Dispatch report could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /> <a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/StockUsage.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -137,7 +137,7 @@ } $MovtsResult = DB_query($sql); if (DB_error_no() !=0) { - echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); + echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg(); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $sql; } Modified: trunk/StockUsageGraph.php =================================================================== --- trunk/StockUsageGraph.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/StockUsageGraph.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -50,7 +50,7 @@ if (DB_error_no() !=0) { $Title = _('Stock Usage Graph Problem'); include ('includes/header.inc'); - echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); + echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg(); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $sql; } Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SuppPaymentRun.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -108,7 +108,7 @@ if (DB_error_no() !=0) { $Title = _('Payment Run - Problem Report'); include('includes/header.inc'); - prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . ' ' . $sql; @@ -182,7 +182,7 @@ if (DB_error_no() !=0) { $Title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); - prnMsg(_('None of the payments will be processed since updates to the transaction records for') . ' ' .$SupplierName . ' ' . _('could not be processed because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('None of the payments will be processed since updates to the transaction records for') . ' ' .$SupplierName . ' ' . _('could not be processed because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $SQL; @@ -213,7 +213,7 @@ if (DB_error_no() !=0) { $Title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); - prnMsg(_('None of the payments will be processed. Unfortunately, there was a problem committing the changes to the database because') . ' - ' . DB_error_msg($db),'error'); + prnMsg(_('None of the payments will be processed. Unfortunately, there was a problem committing the changes to the database because') . ' - ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . '<br />' . $SQL,'error'); @@ -314,7 +314,7 @@ $AccountsResults = DB_query($SQL,'','',false,false); if (DB_error_no() !=0) { - echo '<br />' . _('The bank accounts could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db); + echo '<br />' . _('The bank accounts could not be retrieved by the SQL because') . ' - ' . DB_error_msg(); if ($debug==1){ echo '<br />' . _('The SQL used to retrieve the bank accounts was') . ':<br />' . $SQL; } Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SuppPriceList.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -137,7 +137,7 @@ if (DB_error_no() !=0) { $Title = _('Price List') . ' - ' . _('Problem Report'); include('includes/header.inc'); - prnMsg( _('The Price List could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg( _('The Price List could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /> <a href="' .$RootPath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -50,7 +50,7 @@ if (DB_error_no() !=0) { $Title = _('Supplier Balances - Problem Report'); include('includes/header.inc'); - prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />' . $SQL; Modified: trunk/SupplierTransInquiry.php =================================================================== --- trunk/SupplierTransInquiry.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/SupplierTransInquiry.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -93,7 +93,7 @@ $sql .= " ORDER BY id"; $TransResult = DB_query($sql); - $ErrMsg = _('The supplier transactions for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); + $ErrMsg = _('The supplier transactions for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg(); $DbgMsg = _('The SQL that failed was'); echo '<table class="selection">'; Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Tax.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -53,7 +53,7 @@ if(DB_error_no() !=0) { $Title = _('Taxation Reporting Error'); include('includes/header.inc'); - prnMsg(_('The accounts receivable transaction details could not be retrieved because') . ' ' . DB_error_msg($db),'error'); + prnMsg(_('The accounts receivable transaction details could not be retrieved because') . ' ' . DB_error_msg(),'error'); echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; if($debug==1) { echo '<br />' . $SQL; @@ -167,7 +167,7 @@ if(DB_error_no() !=0) { $Title = _('Taxation Reporting Error'); include('includes/header.inc'); - echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db); + echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg(); echo '<br /><a href="' . $RootPath . '/index.php?">' . _('Back to the menu') . '</a>'; if($debug==1) { echo '<br />' . $SQL; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/UpgradeDatabase.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -251,7 +251,7 @@ echo '<td style="background-color:yellow">' . _('Note').' - '. _('Entry has already been done') . '</td></tr>'; break; case 1064: - echo '<td style="background-color:red">' . _('Note').' - '. _('SQL syntax error. The SQL error message is'). ' ' . DB_error_msg($db) . '</td></tr>'; + echo '<td style="background-color:red">' . _('Note').' - '. _('SQL syntax error. The SQL error message is'). ' ' . DB_error_msg() . '</td></tr>'; break; case 1068: echo '<td style="background-color:yellow">' . _('Note').' - '. _('Primary key already exists') . '</td></tr>'; Modified: trunk/Z_DataExport.php =================================================================== --- trunk/Z_DataExport.php 2014-10-27 07:06:42 UTC (rev 6943) +++ trunk/Z_DataExport.php 2014-10-27 07:15:34 UTC (rev 6944) @@ -68,7 +68,7 @@ if (DB_error_no() !=0) { $Title = _('Price List Export Problem ....'); include('includes/header.inc'); - prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php?' . SID . '">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -164,7 +164,7 @@ if (DB_error_no() !=0) { $Title = _('Customer List Export Problem ....'); include('includes/header.inc'); - prnMsg( _('The Customer List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Customer List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -255,7 +255,7 @@ if (DB_error_no() !=0) { $Title = _('Salesman List Export Problem ....'); include('includes/header.inc'); - prnMsg( _('The Salesman List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Salesman List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -304,7 +304,7 @@ if (DB_error_no() !=0) { $Title = _('Security Token List Export Problem ....'); include('includes/header.inc'); - prnMsg( _('The Image List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Image List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />' . $SQL; @@ -343,7 +343,7 @@ if (DB_error_no() !=0) { $Title = _('Security Token List Export Problem ....'); include('includes/header.inc'); - prnMsg( _('The Security Token List could not be retrieve... [truncated message content] |
From: <dai...@us...> - 2014-10-27 07:21:00
|
Revision: 6945 http://sourceforge.net/p/web-erp/reponame/6945 Author: daintree Date: 2014-10-27 07:20:48 +0000 (Mon, 27 Oct 2014) Log Message: ----------- removed all $db from DB_Txn_XXXXX($db) calls Modified Paths: -------------- trunk/BankReconciliation.php trunk/ConfirmDispatch_Invoice.php trunk/ContractCosting.php trunk/Contracts.php trunk/CopyBOM.php trunk/CounterReturns.php trunk/CounterSales.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustomerAllocations.php trunk/CustomerReceipt.php trunk/DeliveryDetails.php trunk/Departments.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GLJournal.php trunk/GoodsReceived.php trunk/ImportBankTrans.php trunk/InternalStockRequest.php trunk/InternalStockRequestFulfill.php trunk/PDFStockCheckComparison.php trunk/PO_Items.php trunk/Payments.php trunk/PcAuthorizeExpenses.php trunk/RecurringSalesOrders.php trunk/RecurringSalesOrdersProcess.php trunk/ReverseGRN.php trunk/SelectCreditItems.php trunk/SelectSalesOrder.php trunk/ShipmentCosting.php trunk/ShopParameters.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockClone.php trunk/StockCostUpdate.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppPaymentRun.php trunk/SupplierAllocations.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SystemParameters.php trunk/TaxCategories.php trunk/UnitsOfMeasure.php trunk/WOSerialNos.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeGLAccountCode.php trunk/Z_ChangeLocationCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_CreateChartDetails.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_ImportDebtors.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLTransactions.php trunk/Z_ImportPriceList.php trunk/Z_ImportStocks.php trunk/Z_ImportSuppliers.php trunk/api/api_debtortransactions.php trunk/api/api_purchdata.php trunk/api/api_salesorders.php trunk/api/api_stock.php trunk/api/api_workorders.php trunk/includes/DefineTenderClass.php trunk/includes/GLPostings.inc trunk/includes/PDFPaymentRun_PymtFooter.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/BankReconciliation.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -53,7 +53,7 @@ /*Post the exchange difference to the last day of the month prior to current date*/ $PostingDate = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, Date('m'), 0,Date('Y'))); $PeriodNo = GetPeriod($PostingDate,$db); - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); //yet to code the journal @@ -92,7 +92,7 @@ $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnMsg(_('Exchange difference of') . ' ' . locale_number_format($ExchangeDifference,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success'); } //end if the bank statement balance was numeric } Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ConfirmDispatch_Invoice.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -750,7 +750,7 @@ /*Start an SQL transaction */ - DB_Txn_Begin($db); + DB_Txn_Begin(); if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){ $SQL = "UPDATE custbranch @@ -1630,7 +1630,7 @@ EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ - DB_Txn_Commit($db); + DB_Txn_Commit(); // ************************************************************************* // E N D O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ContractCosting.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -238,7 +238,7 @@ $ContractCloseNo = GetNextTransNo( 32 ,$db); $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); - DB_Txn_Begin($db); + DB_Txn_Begin(); $SQL = "INSERT INTO gltrans (type, typeno, @@ -432,7 +432,7 @@ }//end if there was a row returned from the woitems query } //end if the work order was still open (so end of closing it and processing receipt if necessary) - DB_Txn_Commit($db); + DB_Txn_Commit(); $_SESSION['Contract'.$identifier]->Status=3; prnMsg(_('The contract has been closed. No further charges can be posted against this contract.'),'success'); Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Contracts.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -529,7 +529,7 @@ $CustomerDetailsRow = DB_fetch_array($CustomerDetailsResult); //start a DB transaction - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $OrderNo = GetNextTransNo(30, $db); $HeaderSQL = "INSERT INTO salesorders ( orderno, debtorno, @@ -600,7 +600,7 @@ WHERE contractref='" . DB_escape_string($_SESSION['Contract'.$identifier]->ContractRef) . "'"; $ErrMsg = _('Unable to update the contract status and order number because'); $UpdContractResult = DB_query($sql,$ErrMsg,$DbgMsg,true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); $_SESSION['Contract'.$identifier]->Status=1; $_SESSION['Contract'.$identifier]->OrderNo=$OrderNo; prnMsg(_('The contract has been made into quotation number') . ' ' . $OrderNo,'info'); Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/CopyBOM.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -30,7 +30,7 @@ $NewStockID = $_POST['ExStockID']; } if ($InputError==0){ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); if($NewOrExisting == 'N') { /* duplicate rows into stockmaster */ @@ -150,7 +150,7 @@ $result = DB_query($sql); } - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); UpdateCost($db, $NewStockID); Modified: trunk/CounterReturns.php =================================================================== --- trunk/CounterReturns.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/CounterReturns.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -903,7 +903,7 @@ // ************************************************************************* // S T A R T O F C R E D I T N O T E S Q L P R O C E S S I N G // ************************************************************************* - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*Now Get the next invoice number - GetNextTransNo() function in SQL_CommonFunctions * GetPeriod() in includes/DateFunctions.inc */ @@ -1585,7 +1585,7 @@ $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); } //end if $_POST['AmountPaid']!= 0 - DB_Txn_Commit($db); + DB_Txn_Commit(); // ************************************************************************* // E N D O F C R E D I T N O T E S Q L P R O C E S S I N G // ************************************************************************* Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/CounterSales.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -1069,7 +1069,7 @@ // ************************************************************************* // S T A R T O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*First add the order to the database - it only exists in the session currently! */ $OrderNo = GetNextTransNo(30, $db); $InvoiceNo = GetNextTransNo(10, $db); @@ -2034,7 +2034,7 @@ $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); } //end if $_POST['AmountPaid']!= 0 - DB_Txn_Commit($db); + DB_Txn_Commit(); // ************************************************************************* // E N D O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Credit_Invoice.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -538,7 +538,7 @@ /*Start an SQL transaction */ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $DefaultDispatchDate= FormatDateForSQL($DefaultDispatchDate); @@ -1472,7 +1472,7 @@ } /*end of if Sales and GL integrated */ - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); unset($_SESSION['CreditItems' . $identifier]->LineItems); unset($_SESSION['CreditItems' . $identifier]); Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Currencies.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -134,7 +134,7 @@ } //run the SQL from either of the above possibilites $ExDiffTransNo = GetNextTransNo(36,$db); - $resultTx = DB_Txn_Begin($db); + $resultTx = DB_Txn_Begin(); $result = DB_query($sql); if ($InputError!=1){ @@ -219,7 +219,7 @@ } } } - $resultTx = DB_Txn_Commit($db); + $resultTx = DB_Txn_Commit(); unset($SelectedCurrency); unset($_POST['Country']); Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/CustomerAllocations.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -83,7 +83,7 @@ //========[ START TRANSACTION ]=========== // $Error = ''; - $Result= DB_Txn_Begin($db); + $Result= DB_Txn_Begin(); $AllAllocations = 0; foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) { if ($AllocnItem->PrevAllocRecordID != 'NA') { @@ -197,9 +197,9 @@ //========[ COMMIT TRANSACTION ]=========== // if (empty($Error) ) { - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); } else { - $Result = DB_Txn_Rollback($db); + $Result = DB_Txn_Rollback(); prnMsg($Error,'error'); } unset($_SESSION['Alloc']); Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/CustomerReceipt.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -255,7 +255,7 @@ $_SESSION['ReceiptBatch']->BatchNo = GetNextTransNo(12,$db); /*Start a transaction to do the whole lot inside */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $BatchReceiptsTotal = 0; //in functional currency $BatchDiscount = 0; //in functional currency @@ -572,7 +572,7 @@ $ErrMsg = _('Cannot commit the changes'); $DbgMsg = _('The SQL that failed was'); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />'; prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/DeliveryDetails.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -333,7 +333,7 @@ $QuotDate = FormatDateforSQL($_SESSION['Items'.$identifier]->QuoteDate); $ConfDate = FormatDateforSQL($_SESSION['Items'.$identifier]->ConfirmedDate); - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $OrderNo = GetNextTransNo(30, $db); @@ -584,7 +584,7 @@ }//end if auto create WOs in on } /* end inserted line items into sales order details */ - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />'; if ($_SESSION['Items'.$identifier]->Quotation==1){ prnMsg(_('Quotation Number') . ' ' . $OrderNo . ' ' . _('has been entered'),'success'); @@ -653,7 +653,7 @@ $QuotDate = FormatDateforSQL($_SESSION['Items'.$identifier]->QuoteDate); $ConfDate = FormatDateforSQL($_SESSION['Items'.$identifier]->ConfirmedDate); - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*see if this is a contract quotation being changed to an order? */ if ($_SESSION['Items'.$identifier]->Quotation==0) { //now its being changed? to an order @@ -797,7 +797,7 @@ } /* updated line items into sales order details */ - $Result=DB_Txn_Commit($db); + $Result=DB_Txn_Commit(); $Quotation = $_SESSION['Items'.$identifier]->Quotation; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Departments.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -92,7 +92,7 @@ if ($InputError!=1){ //run the SQL from either of the above possibilites if (is_array($sql)) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $ErrMsg = _('The department could not be inserted'); $DbgMsg = _('The sql that failed was') . ':'; foreach ($sql as $SQLStatement ) { @@ -103,9 +103,9 @@ } } if ($InputError!=1){ - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } else { - $result = DB_Txn_Rollback($db); + $result = DB_Txn_Rollback(); } } else { $result = DB_query($sql); Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/FixedAssetDepreciation.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -80,7 +80,7 @@ $InputError =true; } if (isset($_POST['CommitDepreciation']) AND $InputError==false){ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $TransNo = GetNextTransNo(44, $db); $PeriodNo = GetPeriod($_POST['ProcessDate'],$db); } @@ -266,7 +266,7 @@ <br />'; if (isset($_POST['CommitDepreciation']) AND $InputError==false){ - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); echo '<br /><a href="index.php">' ._('Return to main menu') . '</a>'; Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/FixedAssetItems.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -127,7 +127,7 @@ if ($_POST['submit']==_('Update')) { /*so its an existing one */ /*Start a transaction to do the whole lot inside */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*Need to check if changing the balance sheet codes - as will need to do journals for the cost and accum depn of the asset to the new category */ $result = DB_query("SELECT assetcategoryid, @@ -279,7 +279,7 @@ unset($_POST['BarCode']); unset($_POST['SerialNo']); }//ALL WORKED SO RESET THE FORM VARIABLES - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } } else { echo '<br />' . "\n"; @@ -315,7 +315,7 @@ prnMsg(_('There is a purchase order set up for this asset. The purchase order line must be deleted first'),'error'); } if ($CancelDelete==0) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*Need to remove cost and accumulate depreciation from cost and accumdepn accounts */ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); @@ -366,7 +366,7 @@ $sql="DELETE FROM fixedassets WHERE assetid='" . $AssetID . "'"; $result=DB_query($sql, _('Could not delete the asset record'),'',true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnMsg(_('Deleted the asset record for asset number' ) . ' ' . $AssetID ); unset($_POST['LongDescription']); @@ -382,7 +382,7 @@ } //end if OK Delete Asset } /* end if delete asset */ -$result = DB_Txn_Commit($db); +$result = DB_Txn_Commit(); echo '<form id="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> <div>'; Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/GLJournal.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -61,7 +61,7 @@ $PeriodNo = GetPeriod($_SESSION['JournalDetail']->JnlDate,$db); /*Start a transaction to do the whole lot inside */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $TransNo = GetNextTransNo( 0, $db); @@ -114,7 +114,7 @@ $ErrMsg = _('Cannot commit the changes'); - $result= DB_Txn_Commit($db); + $result= DB_Txn_Commit(); prnMsg(_('Journal').' ' . $TransNo . ' '._('has been successfully entered'),'success'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/GoodsReceived.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -386,7 +386,7 @@ /* *********************** BEGIN SQL TRANSACTIONS *********************** */ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*Now Get the next GRN - function in SQL_CommonFunctions*/ $GRN = GetNextTransNo(25, $db); @@ -730,7 +730,7 @@ EnsureGLEntriesBalance(25, $GRN,$db); } - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); $PONo = $_SESSION['PO'.$identifier]->OrderNo; unset($_SESSION['PO'.$identifier]->LineItems); unset($_SESSION['PO'.$identifier]); Modified: trunk/ImportBankTrans.php =================================================================== --- trunk/ImportBankTrans.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ImportBankTrans.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -161,7 +161,7 @@ */ for($i=1;$i<=count($_SESSION['Trans']);$i++){ - DB_Txn_Begin($db); + DB_Txn_Begin(); if ($_SESSION['Trans'][$i]->DebtorNo!='' OR $_SESSION['Trans'][$i]->SupplierID!='' OR $_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ @@ -452,7 +452,7 @@ _('The SQL that failed to insert the bank transaction was'), true); } - DB_Txn_Commit($db); // complete this bank transactions posting + DB_Txn_Commit(); // complete this bank transactions posting } //end loop around the transactions echo '<p />'; prnMsg(_('Completed the importing of analysed bank transactions'),'info'); Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/InternalStockRequest.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -60,7 +60,7 @@ } if (isset($_POST['Submit'])) { - DB_Txn_Begin($db); + DB_Txn_Begin(); $InputError=0; if ($_SESSION['Request']->Department=='') { prnMsg( _('You must select a Department for the request'), 'error'); @@ -127,7 +127,7 @@ } } - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg( _('The internal stock request has been entered and now needs to be authorised'), 'success'); echo '<br /><div class="centre"><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes">' . _('Create another request') . '</a></div>'; include('includes/footer.inc'); Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/InternalStockRequestFulfill.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -42,7 +42,7 @@ $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity @@ -166,7 +166,7 @@ $Result = DB_query($SQL, $ErrMsg, $DbgMsg,true); } - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); $ConfirmationText = _('An internal stock request for'). ' ' . $StockID . ' ' . _('has been fulfilled from location').' ' . $Location .' '. _('for a quantity of') . ' ' . locale_number_format($Quantity, $DecimalPlaces ) ; prnMsg( $ConfirmationText,'success'); Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/PDFStockCheckComparison.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -79,7 +79,7 @@ if ($StockQtyDifference !=0){ // only adjust stock if there is an adjustment to make!! - DB_Txn_Begin($db); + DB_Txn_Begin(); // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity @@ -171,7 +171,7 @@ } //END INSERT GL TRANS $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Unable to COMMIT transaction while adjusting stock in StockCheckAdjustmet report'); - DB_Txn_Commit($db); + DB_Txn_Commit(); } // end if $StockQtyDifference !=0 Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/PO_Items.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -78,7 +78,7 @@ */ if ($InputError!=1){ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*figure out what status to set the order to */ if (IsEmailAddress($_SESSION['UserEmail'])){ @@ -388,7 +388,7 @@ } /*end of if its a new order or an existing one */ - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); /* Only show the link to auto receive the order if the user has permission to receive goods and permission to authorise and has authorised the order */ if ($_SESSION['PO'.$identifier]->Status == 'Authorised' AND in_array($_SESSION['PageSecurityArray']['GoodsReceived.php'], $_SESSION['AllowedPageSecurityTokens'])){ Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Payments.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -319,7 +319,7 @@ //Start a transaction to do the whole lot inside - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); if ($_SESSION['PaymentDetail' . $identifier]->SupplierID=='') { @@ -589,7 +589,7 @@ $DbgMsg = _('Cannot insert a bank transaction using the SQL'); $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg(_('Payment') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); $LastSupplier = ($_SESSION['PaymentDetail' . $identifier]->SupplierID); Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/PcAuthorizeExpenses.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -141,7 +141,7 @@ //build narrative $Narrative= _('PettyCash') . ' - '. $myrow['tabcode'] . ' - ' . $myrow['codeexpense'] . ' - ' . DB_escape_string($myrow['notes']) . ' - ' . $myrow['receipt']; //insert to gltrans - DB_Txn_Begin($db); + DB_Txn_Begin(); $sqlFrom="INSERT INTO `gltrans` (`counterindex`, `type`, @@ -232,7 +232,7 @@ posted = 1 WHERE counterindex = '".$myrow['counterindex']."'"; $resultupdate = DB_query($sql, '', '', true); - DB_Txn_Commit($db); + DB_Txn_Commit(); } if ($k==1){ Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/RecurringSalesOrders.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -189,7 +189,7 @@ exit; } If (isset($_POST['Process'])) { - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $InputErrors =0; If (!Is_Date($_POST['StartDate'])){ $InputErrors =1; @@ -290,7 +290,7 @@ } /* inserted line items into sales order details */ - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnmsg(_('The new recurring order template has been added'),'success'); } else { /* must be updating an existing recurring order */ Modified: trunk/RecurringSalesOrdersProcess.php =================================================================== --- trunk/RecurringSalesOrdersProcess.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/RecurringSalesOrdersProcess.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -89,7 +89,7 @@ $EmailText =''; echo '<br />' . _('Recurring order') . ' ' . $RecurrOrderRow['recurrorderno'] . ' ' . _('for') . ' ' . $RecurrOrderRow['debtorno'] . ' - ' . $RecurrOrderRow['branchcode'] . ' ' . _('is being processed'); - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*the last recurrence was the date of the last time the order recurred the frequency is the number of times per annum that the order should recurr @@ -197,7 +197,7 @@ $ErrMsg = _('Could not update the last recurrence of the recurring order template. The database reported the error:'); $Result = DB_query($sql,$ErrMsg,true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('Recurring order was created for') . ' ' . $RecurrOrderRow['name'] . ' ' . _('with order Number') . ' ' . $OrderNo, 'success'); @@ -241,7 +241,7 @@ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); /*Start an SQL transaction */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $TotalFXNetInvoice = 0; $TotalFXTax = 0; @@ -695,7 +695,7 @@ $DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used'); $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('Invoice number'). ' '. $InvoiceNo .' '. _('processed'),'success'); Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ReverseGRN.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -115,7 +115,7 @@ /*Start an SQL transaction */ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $PeriodNo = GetPeriod(ConvertSQLDate($GRN['deliverydate']), $db); @@ -332,7 +332,7 @@ } /* end of if GL and stock integrated*/ - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />'; unset($_GET['GRNNo']); // to ensure it cant be done again!! Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SelectCreditItems.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -1125,7 +1125,7 @@ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); /*Start an SQL transaction */ - DB_Txn_Begin($db); + DB_Txn_Begin(); /*Now insert the Credit Note into the DebtorTrans table allocations will have to be done seperately*/ @@ -1988,7 +1988,7 @@ } /*end of if Sales and GL integrated */ - DB_Txn_Commit($db); + DB_Txn_Commit(); unset($_SESSION['CreditItems'.$identifier]->LineItems); unset($_SESSION['CreditItems'.$identifier]); Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SelectSalesOrder.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -231,11 +231,11 @@ if ($SupplierID !=''){ //then we have just added a purchase order echo '<br />'; prnMsg(_('Purchase Order') . ' ' . $PO_OrderNo . ' ' . _('on') . ' ' . $SupplierID . ' ' . _('has been created'),'success'); - DB_Txn_Commit($db); + DB_Txn_Commit(); } /*Starting a new purchase order with a different supplier */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $PO_OrderNo = GetNextTransNo(18, $db); //get the next PO number @@ -394,7 +394,7 @@ if ($SupplierID !=''){ //then we have just added a purchase order irrespective of autoauthorise status echo '<br />'; prnMsg(_('Purchase Order') . ' ' . $PO_OrderNo . ' ' . _('on') . ' ' . $SupplierID . ' ' . _('has been created'),'success'); - DB_Txn_Commit($db); + DB_Txn_Commit(); } $result = DB_query("UPDATE salesorders SET poplaced=1 WHERE " . $OrdersToPlacePOFor); }/*There were items that had purchasing data set up to create POs for */ Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ShipmentCosting.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -136,7 +136,7 @@ if (isset($_POST['Close'])){ /*Set up a transaction to buffer all updates or none */ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); } @@ -697,7 +697,7 @@ TRUE); $result = DB_query("UPDATE shipments SET closed=1 WHERE shiptref='" .$_GET['SelectedShipment']. "'",_('Could not update the shipment to closed'),'',TRUE); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br /><br />'; prnMsg( _('Shipment'). ' ' . $_GET['SelectedShipment'] . ' ' . _('has been closed') ); Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/ShopParameters.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -170,11 +170,11 @@ if (sizeof($SQL) > 0 ) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); foreach ($SQL as $SqlLine) { $result = DB_query($SqlLine,$ErrMsg,$DbgMsg,true); } - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnMsg( _('Shop configuration updated'),'success'); $ForceConfigReload = True; // Required to force a load even if stored in the session vars Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SpecialOrder.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -345,7 +345,7 @@ $StkLocAddResult = DB_query($sql); $StkLocAddress = DB_fetch_array($StkLocAddResult); - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*Insert to purchase order header record */ $sql = "INSERT INTO purchorders (supplierno, @@ -578,7 +578,7 @@ } - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); unset($_SESSION['SPL'.$identifier]); /*Clear the PO data to allow a newy to be input*/ echo '<br /><br /><a href="' . $RootPath . '/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>'; exit; Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockAdjustments.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -195,7 +195,7 @@ $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity @@ -364,7 +364,7 @@ EnsureGLEntriesBalance(17, $AdjustmentNumber,$db); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID . ' - ' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment' . $identifier]->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['Adjustment' . $identifier]->DecimalPlaces) ; prnMsg( $ConfirmationText,'success'); Modified: trunk/StockClone.php =================================================================== --- trunk/StockClone.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockClone.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -272,7 +272,7 @@ $Errors[$i] = 'DuplicateStockID'; //exit; } else { - DB_Txn_Begin($db); + DB_Txn_Begin(); $sql = "INSERT INTO stockmaster (stockid, description, longdescription, @@ -367,7 +367,7 @@ $ErrMsg = _('The locations for the item') . ' ' . $_POST['StockID'] . ' ' . _('could not be added because'); $DbgMsg = _('NB Locations records can be added by opening the utility page') . ' <i>Z_MakeStockLocns.php</i> ' . _('The SQL that was used to add the location records that failed was'); $InsResult = DB_query($sql,$ErrMsg,$DbgMsg); - DB_Txn_Commit($db); + DB_Txn_Commit(); //check for any purchase data $sql = "SELECT purchdata.supplierno, suppliers.suppname, @@ -485,7 +485,7 @@ $OldRow = DB_fetch_array($OldResult); //now update cloned item costs - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); $SQL = "UPDATE stockmaster SET materialcost='" . $OldRow['materialcost'] . "', labourcost ='" . $OldRow['labourcost'] . "', overheadcost ='" . $OldRow['overheadcost'] . "', @@ -495,7 +495,7 @@ $ErrMsg = _('The cost details for the cloned stock item could not be updated because'); $DbgMsg = _('The SQL that failed was'); $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); //finish up if (DB_error_no() ==0) { Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockCostUpdate.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -64,7 +64,7 @@ prnMsg (_('The entered item code does not exist'),'error',_('Non-existent Item')); } elseif ($OldCost != $NewCost){ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $_POST['QOH']); $SQL = "UPDATE stockmaster SET materialcost='" . filter_number_format($_POST['MaterialCost']) . "', @@ -78,7 +78,7 @@ $DbgMsg = _('The SQL that failed was'); $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); UpdateCost($db, $StockID); //Update any affected BOMs } Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockLocTransfer.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -189,7 +189,7 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to BEGIN Location Transfer transaction'); - DB_Txn_Begin($db); + DB_Txn_Begin(); for ($i=0;$i < $_POST['LinesCounter'];$i++){ @@ -216,7 +216,7 @@ } } $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to COMMIT Location Transfer transaction'); - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg( _('The inventory transfer records have been created successfully'),'success'); echo '<p><a href="'.$RootPath.'/PDFStockLocTransfer.php?TransferNo=' . $_POST['Trf_ID'] . '">' . _('Print the Transfer Docket'). '</a></p>'; Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockLocTransferReceive.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -65,7 +65,7 @@ foreach ($_SESSION['Transfer']->TransferItem AS $TrfLine) { if ($TrfLine->Quantity >=0){ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /* Need to get the current location quantity will need it later for the stock movement */ $SQL="SELECT locstock.quantity @@ -358,7 +358,7 @@ } /*end of foreach TransferItem */ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Unable to COMMIT the Stock Transfer transaction'); - DB_Txn_Commit($db); + DB_Txn_Commit(); unset($_SESSION['Transfer']->LineItem); unset($_SESSION['Transfer']); Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/StockTransfers.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -189,7 +189,7 @@ $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); $SQLTransferDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity @@ -443,7 +443,7 @@ $DbgMsg = _('The following SQL to update the location stock record was used'); $Result = DB_query($SQL,$ErrMsg, $DbgMsg, true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('An inventory transfer of').' ' . $_SESSION['Transfer']->TransferItem[0]->StockID . ' - ' . $_SESSION['Transfer']->TransferItem[0]->ItemDescription . ' '. _('has been created from').' ' . $_SESSION['Transfer']->StockLocationFrom . ' '. _('to') . ' ' . $_SESSION['Transfer']->StockLocationTo . ' '._('for a quantity of').' ' . $_SESSION['Transfer']->TransferItem[0]->Quantity,'success'); echo '<br /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Stocks.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -394,7 +394,7 @@ if ($InputError == 0){ - DB_Txn_Begin($db); + DB_Txn_Begin(); $sql = "UPDATE stockmaster SET longdescription='" . $_POST['LongDescription'] . "', @@ -564,7 +564,7 @@ $result = DB_query($SQL, $ErrMsg, $DbgMsg,true); } } /* end if the stock category changed and forced a change in WIP account */ - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg( _('Stock Item') . ' ' . $StockID . ' ' . _('has been updated'), 'success'); echo '<br />'; } @@ -581,7 +581,7 @@ $Errors[$i] = 'StockID'; $i++; } else { - DB_Txn_Begin($db); + DB_Txn_Begin(); $sql = "INSERT INTO stockmaster (stockid, description, longdescription, @@ -675,7 +675,7 @@ $ErrMsg = _('The locations for the item') . ' ' . $StockID . ' ' . _('could not be added because'); $DbgMsg = _('NB Locations records can be added by opening the utility page') . ' <i>Z_MakeStockLocns.php</i> ' . _('The SQL that was used to add the location records that failed was'); $InsResult = DB_query($sql,$ErrMsg,$DbgMsg,true); - DB_Txn_Commit($db); + DB_Txn_Commit(); if (DB_error_no() ==0) { prnMsg( _('New Item') .' ' . '<a href="SelectProduct.php?StockID=' . $StockID . '">' . $StockID . '</a> '. _('has been added to the database') . '<br />' . _('NB: The item cost and pricing must also be setup') . @@ -799,7 +799,7 @@ } if ($CancelDelete==0) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); /*Deletes LocStock records*/ $sql ="DELETE FROM locstock WHERE stockid='".$StockID."'"; @@ -822,7 +822,7 @@ $sql="DELETE FROM stockmaster WHERE stockid='".$StockID."'"; $result=DB_query($sql, _('Could not delete the item record'),'',true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); prnMsg(_('Deleted the stock master record for') . ' ' . $StockID . '....' . '<br />. . ' . _('and all the location stock records set up for the part') . Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SuppPaymentRun.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -67,7 +67,7 @@ if (isset($_POST['PrintPDFAndProcess'])){ - $ProcessResult = DB_Txn_Begin($db); + $ProcessResult = DB_Txn_Begin(); } while ($SuppliersToPay = DB_fetch_array($SuppliersResult)){ @@ -187,7 +187,7 @@ if ($debug==1){ echo '<br />' . _('The SQL that failed was') . $SQL; } - $ProcessResult = DB_Txn_Rollback($db); + $ProcessResult = DB_Txn_Rollback(); include('includes/footer.inc'); exit; } @@ -208,7 +208,7 @@ /*All the payment processing is in the below file */ include('includes/PDFPaymentRun_PymtFooter.php'); - $ProcessResult = DB_Txn_Commit($db); + $ProcessResult = DB_Txn_Commit(); if (DB_error_no() !=0) { $Title = _('Payment Processing - Problem Report') . '.... '; @@ -218,7 +218,7 @@ if ($debug==1){ prnMsg(_('The SQL that failed was') . '<br />' . $SQL,'error'); } - $ProcessResult = DB_Txn_Rollback($db); + $ProcessResult = DB_Txn_Rollback(); include('includes/footer.inc'); exit; } Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SupplierAllocations.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -103,7 +103,7 @@ /* actions to take having checked that the input is sensible 1st set up a transaction on this thread*/ - DB_Txn_Begin($db); + DB_Txn_Begin(); foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) { @@ -246,7 +246,7 @@ /* OK Commit the transaction */ - DB_Txn_Commit($db); + DB_Txn_Commit(); /*finally delete the session variables holding all the previous data */ Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SupplierCredit.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -667,7 +667,7 @@ /*Start an SQL transaction */ - DB_Txn_Begin($db); + DB_Txn_Begin(); /*Get the next transaction number for internal purposes and the period to post GL transactions in based on the credit note date*/ @@ -1324,7 +1324,7 @@ $Result = DB_query($SQL,$ErrMsg, $DbgMsg, true); } //end of non-gl fixed asset stuff - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg(_('Supplier credit note number') . ' ' . $CreditNoteNo . ' ' . _('has been processed'),'success'); echo '<br /><div class="centre"><a href="' . $RootPath . '/SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Credit Note for this Supplier') . '</a></div>'; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SupplierInvoice.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -149,7 +149,7 @@ include('includes/PO_ReadInOrder.inc'); if ($_SESSION['PO'.$identifier]->Status == 'Authorised'){ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*Now Get the next GRN - function in SQL_CommonFunctions*/ $GRN = GetNextTransNo(25, $db); if (!isset($_GET['DeliveryDate'])){ @@ -432,7 +432,7 @@ EnsureGLEntriesBalance(25, $GRN,$db); } - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); //Now add all these deliveries to this purchase invoice @@ -1048,7 +1048,7 @@ /* SQL to process the postings for purchase invoice */ /*Start an SQL transaction */ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*Get the next transaction number for internal purposes and the period to post GL transactions in based on the invoice date*/ $InvoiceNo = GetNextTransNo(20, $db); @@ -1876,7 +1876,7 @@ $Result = DB_query($SQL,$ErrMsg, $DbgMsg, true); } //end of non-gl fixed asset stuff - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('Supplier invoice number') . ' ' . $InvoiceNo . ' ' . _('has been processed'),'success'); echo '<br /> Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/SystemParameters.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -335,11 +335,11 @@ } $ErrMsg = _('The system configuration could not be updated because'); if (sizeof($sql) > 1 ) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); foreach ($sql as $line) { $result = DB_query($line,$ErrMsg); } - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } elseif(sizeof($sql)==1) { $result = DB_query($sql,$ErrMsg); } Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/TaxCategories.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -79,7 +79,7 @@ $InputError = 1; prnMsg( _('The tax category cannot be created because another with the same name already exists'),'error'); } else { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $sql = "INSERT INTO taxcategories ( taxcatname ) VALUES ( @@ -99,7 +99,7 @@ FROM taxauthorities CROSS JOIN taxprovinces"; $result = DB_query($sql,$ErrMsg,true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } $msg = _('New tax category added'); } Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/UnitsOfMeasure.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -90,7 +90,7 @@ if ($InputError!=1){ //run the SQL from either of the above possibilites if (is_array($sql)) { - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); $tmpErr = _('Could not update unit of measure'); $tmpDbg = _('The sql that failed was') . ':'; foreach ($sql as $stmt ) { @@ -101,9 +101,9 @@ } } if ($InputError!=1){ - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } else { - $result = DB_Txn_Rollback($db); + $result = DB_Txn_Rollback(); } } else { $result = DB_query($sql); Modified: trunk/WOSerialNos.php =================================================================== --- trunk/WOSerialNos.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/WOSerialNos.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -53,7 +53,7 @@ if (!is_numeric(filter_number_format($_POST['NumberToAdd']))){ prnMsg(_('The quantity of controlled items to add was not numeric - a number is expected'),'error'); } else { - DB_Txn_Begin($db); + DB_Txn_Begin(); /*Process the additional controlled items into woserialnos and update the quantity on the work order order in woitems*/ $InputError = false; @@ -106,7 +106,7 @@ $ErrMsg, $DbgMsg, true); - DB_Txn_Commit($db); + DB_Txn_Commit(); } } // end Adding a number of serial numbers automatically else { //adding just an individual entry @@ -135,7 +135,7 @@ prnMsg(_('The serial number or batch reference must be unique to the item. The serial number/batch entered already exists'),'error'); } if (!$InputError){ - DB_Txn_Begin($db); + DB_Txn_Begin(); $ErrMsg = _('Could not add a new serial number/batch'); $result = DB_query("UPDATE woitems SET qtyreqd=qtyreqd+" . filter_number_format($_POST['Quantity']) . " @@ -158,7 +158,7 @@ $ErrMsg = _('Unable to add the batch or serial number requested'); $result = DB_query($sql,$ErrMsg,$DbgMsg,true); - DB_Txn_Commit($db); + DB_Txn_Commit(); } } } @@ -224,7 +224,7 @@ }//end loop around all serial numbers/batches $ErrMsg = _('Could not update serial/batches on the work order'); if (sizeof($sql)>0){ - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); foreach ($sql as $SQLStatement){ $result = DB_query($SQLStatement,$ErrMsg,$DbgMsg,true); } @@ -234,7 +234,7 @@ $ErrMsg, $DbgMsg, true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } } Modified: trunk/WorkOrderCosting.php =================================================================== --- trunk/WorkOrderCosting.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/WorkOrderCosting.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -319,7 +319,7 @@ $TotalVariance = $TotalUsageVar + $TotalCostVar; $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $WOCloseNo = GetNextTransNo(29, $db); - $TransResult = DB_Txn_Begin($db); + $TransResult = DB_Txn_Begin(); while ($WORow = DB_fetch_array($WOItemsResult)){ if ($TotalStdValueRecd==0){ @@ -522,7 +522,7 @@ _('Could not delete the predefined work order serial numbers'), _('The SQL used to delete the predefined serial numbers was:'), true); - $TransResult = DB_Txn_Commit($db); + $TransResult = DB_Txn_Commit(); if ($_SESSION['CompanyRecord']['gllink_stock']==1){ if ($_SESSION['WeightedAverageCosting']==1){ prnMsg(_('The item cost as calculated from the work order has been applied against the weighted average cost and the necessary GL journals created to update stock as a result of closing this work order'),'success'); Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/WorkOrderEntry.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -298,7 +298,7 @@ $EOQ=1; } - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); // insert parent item info $SQL = "INSERT INTO woitems (wo, @@ -317,7 +317,7 @@ //Recursively insert real component requirements - see includes/SQL_CommonFunctions.in for function WoRealRequirements WoRealRequirements($db, $_POST['WO'], $_POST['StockLocation'], $NewItem); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); unset($NewItem); } //end if there were no input errors @@ -445,7 +445,7 @@ } if ($CancelDelete==false) { //ie all tests proved ok to delete - DB_Txn_Begin($db); + DB_Txn_Begin(); $ErrMsg = _('The work order could not be deleted'); $DbgMsg = _('The SQL used to delete the work order was'); //delete the worequirements @@ -463,7 +463,7 @@ $ErrMsg=_('The work order could not be deleted'); $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg(_('The work order has been cancelled'),'success'); Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/WorkOrderIssue.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -147,7 +147,7 @@ /************************ BEGIN SQL TRANSACTIONS ************************/ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*Now Get the next WO Issue transaction type 28 - function in SQL_CommonFunctions*/ $WOIssueNo = GetNextTransNo(28, $db); @@ -369,7 +369,7 @@ true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('The issue of') . ' ' . $QuantityIssued . ' ' . _('of') . ' ' . $_POST['IssueItem'] . ' ' . _('against work order') . ' '. $_POST['WO'] . ' ' . _('has been processed'),'info'); echo '<p><ul><li><a href="' . $RootPath . '/WorkOrderIssue.php?WO=' . $_POST['WO'] . '&StockID=' . $_POST['StockID'] . '">' . _('Issue more components to this work order') . '</a></li>'; Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/WorkOrderReceive.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -190,7 +190,7 @@ if ($InputError==false){ /************************ BEGIN SQL TRANSACTIONS ************************/ - $Result = DB_Txn_Begin($db); + $Result = DB_Txn_Begin(); /*Now Get the next WOReceipt transaction type 26 - function in SQL_CommonFunctions*/ $WOReceiptNo = GetNextTransNo(26, $db); @@ -731,7 +731,7 @@ true); - $Result = DB_Txn_Commit($db); + $Result = DB_Txn_Commit(); prnMsg(_('The receipt of') . ' ' . $QuantityReceived . ' ' . $WORow['units'] . ' ' . _('of') . ' ' . $_POST['StockID'] . ' - ' . $WORow['description'] . ' ' . _('against work order') . ' '. $_POST['WO'] . ' ' . _('has been processed'),'info'); echo '<a href="' . $RootPath . '/SelectWorkOrder.php">' . _('Select a different work order for receiving finished stock against'). '</a>'; Modified: trunk/Z_BottomUpCosts.php =================================================================== --- trunk/Z_BottomUpCosts.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_BottomUpCosts.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -38,9 +38,9 @@ if ($inputerror == 1) { //exited loop with errors so rollback prnMsg(_('Failed on item') . ' ' . $item['component']. ' ' . _('Cost update has been rolled back'),'error'); - DB_Txn_Rollback($db); + DB_Txn_Rollback(); } else { //all good so commit data transaction - DB_Txn_Commit($db); + DB_Txn_Commit(); prnMsg( _('All cost updates committed to the database.'),'success'); } Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeBranchCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -40,7 +40,7 @@ } - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); prnMsg(_('Inserting the new customer branches master record'),'info'); $sql = "INSERT INTO custbranch (`branchcode`, @@ -178,7 +178,7 @@ $ErrMsg = _('The SQL to update contract header records failed because'); $result = DB_query($sql,$ErrMsg,$DbgMsg,true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); $result = DB_IgnoreForeignKeys($db); prnMsg(_('Deleting the old customer branch record'),'info'); Modified: trunk/Z_ChangeCustomerCode.php =================================================================== --- trunk/Z_ChangeCustomerCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeCustomerCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -30,7 +30,7 @@ exit; } - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); prnMsg(_('Inserting the new debtors master record'),'info'); $sql = "INSERT INTO debtorsmaster (`debtorno`, @@ -218,7 +218,7 @@ $result = DB_query($sql,$ErrMsg,$DbgMsg,true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); $result = DB_ReinstateForeignKeys($db); } Modified: trunk/Z_ChangeGLAccountCode.php =================================================================== --- trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -41,7 +41,7 @@ if ($InputError ==0){ // no input errors - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); echo '<br />' . _('Adding the new chartmaster record'); $sql = "INSERT INTO chartmaster (accountcode, accountname, @@ -112,7 +112,7 @@ DB_ReinstateForeignKeys($db); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />' . _('Deleting the old chartmaster record'); $sql = "DELETE FROM chartmaster WHERE accountcode='" . $_POST['OldAccountCode'] . "'"; Modified: trunk/Z_ChangeLocationCode.php =================================================================== --- trunk/Z_ChangeLocationCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeLocationCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -48,7 +48,7 @@ } if ($InputError ==0){ // no input errors - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); DB_IgnoreForeignKeys($db); echo '<br />' . _('Adding the new location record'); @@ -225,7 +225,7 @@ DB_ReinstateForeignKeys($db); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />' . _('Deleting the old location record'); $sql = "DELETE FROM locations WHERE loccode='" . $_POST['OldLocationID'] . "'"; Modified: trunk/Z_ChangeStockCategory.php =================================================================== --- trunk/Z_ChangeStockCategory.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeStockCategory.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -40,7 +40,7 @@ include ('includes/footer.inc'); exit; } - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); echo '<br />' . _('Adding the new stock Category record'); $sql = "INSERT INTO stockcategory (categoryid, categorydescription, @@ -92,7 +92,7 @@ $sql = 'SET FOREIGN_KEY_CHECKS=1'; $result = DB_query($sql, $ErrMsg, $DbgMsg, true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />' . _('Deleting the old stock category record'); $sql = "DELETE FROM stockcategory WHERE categoryid='" . $_POST['OldStockCategory'] . "'"; $ErrMsg = _('The SQL to delete the old stock category record failed'); Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeStockCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -52,7 +52,7 @@ if ($InputError ==0){ // no input errors DB_IgnoreForeignKeys($db); - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); echo '<br />' . _('Adding the new stock master record'); $sql = "INSERT INTO stockmaster (stockid, categoryid, @@ -179,7 +179,7 @@ DB_ReinstateForeignKeys($db); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); echo '<br />' . _('Deleting the old stock master record'); $sql = "DELETE FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'"; Modified: trunk/Z_ChangeSupplierCode.php =================================================================== --- trunk/Z_ChangeSupplierCode.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_ChangeSupplierCode.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -60,7 +60,7 @@ return; } - $result = DB_Txn_Begin($db); + $result = DB_Txn_Begin(); prnMsg(_('Inserting the new supplier record'),'info'); $sql = "INSERT INTO suppliers (`supplierid`, @@ -96,7 +96,7 @@ $ErrMsg = _('The SQL to delete the old supplier record failed'); $result = DB_query($sql,$ErrMsg,$DbgMsg,true); - $result = DB_Txn_Commit($db); + $result = DB_Txn_Commit(); } function checkSupplierExist($codeSupplier) { Modified: trunk/Z_CreateChartDetails.php =================================================================== --- trunk/Z_CreateChartDetails.php 2014-10-27 07:15:34 UTC (rev 6944) +++ trunk/Z_CreateChartDetails.php 2014-10-27 07:20:48 UTC (rev 6945) @@ -60,7 +60,7 @@ ... [truncated message content] |
From: <dai...@us...> - 2014-10-27 07:30:22
|
Revision: 6946 http://sourceforge.net/p/web-erp/reponame/6946 Author: daintree Date: 2014-10-27 07:30:11 +0000 (Mon, 27 Oct 2014) Log Message: ----------- removed all $db from DB_Maintenance($db) calls Modified Paths: -------------- trunk/AccountGroups.php trunk/UpgradeDatabase.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeGLAccountCode.php trunk/Z_ChangeLocationCode.php trunk/Z_ChangeStockCode.php trunk/api/api_login.php trunk/doc/Change.log trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/ConnectDB_postgres.inc trunk/includes/UserLogin.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/AccountGroups.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -143,7 +143,7 @@ /*SelectedAccountGroup could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ if ($_POST['SelectedAccountGroup']!==$_POST['GroupName']) { - DB_IgnoreForeignKeys($db); + DB_IgnoreForeignKeys(); $sql = "UPDATE chartmaster SET group_='" . $_POST['GroupName'] . "' @@ -159,7 +159,7 @@ $result = DB_query($sql, $ErrMsg, $DbgMsg); - DB_ReinstateForeignKeys($db); + DB_ReinstateForeignKeys(); } $sql = "UPDATE accountgroups SET groupname='" . $_POST['GroupName'] . "', Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/UpgradeDatabase.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -191,7 +191,7 @@ prnMsg(_('Only mysql upgrades are performed seamlessly at this time. Your database will need to be manually updated'),'info'); } - $result = DB_IgnoreForeignKeys($db); + $result = DB_IgnoreForeignKeys(); foreach ($SQLScripts AS $SQLScriptFile) { @@ -269,7 +269,7 @@ } //end of for loop around the lines of the sql script echo '</table>'; } //end of loop around SQLScripts apply - $result =DB_ReinstateForeignKeys($db); + $result =DB_ReinstateForeignKeys(); /*Now get the modified VersionNumber and script pagesecurities */ $ForceConfigReload=true; include('includes/GetConfig.php'); Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/Z_ChangeBranchCode.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -180,7 +180,7 @@ $result = DB_Txn_Commit(); - $result = DB_IgnoreForeignKeys($db); + $result = DB_IgnoreForeignKeys(); prnMsg(_('Deleting the old customer branch record'),'info'); $sql = "DELETE FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "' @@ -188,7 +188,7 @@ $ErrMsg = _('The SQL to delete the old customer branch record failed because'); $result = DB_query($sql,$ErrMsg,$DbgMsg,true,true); - $result = DB_ReinstateForeignKeys($db); + $result = DB_ReinstateForeignKeys(); } Modified: trunk/Z_ChangeCustomerCode.php =================================================================== --- trunk/Z_ChangeCustomerCode.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/Z_ChangeCustomerCode.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -203,7 +203,7 @@ $ErrMsg = _('The SQL to update contract header records failed'); $result = DB_query($sql,$ErrMsg,$DbgMsg,true); - $result = DB_IgnoreForeignKeys($db); + $result = DB_IgnoreForeignKeys(); prnMsg(_('Deleting the old customer branch records from the CustBranch table'),'info'); $sql = "DELETE FROM custbranch WHERE debtorno='" . $_POST['OldDebtorNo'] . "'"; @@ -219,7 +219,7 @@ $result = DB_Txn_Commit(); - $result = DB_ReinstateForeignKeys($db); + $result = DB_ReinstateForeignKeys(); } Modified: trunk/Z_ChangeGLAccountCode.php =================================================================== --- trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -57,7 +57,7 @@ $result = DB_query($sql,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); - DB_IgnoreForeignKeys($db); + DB_IgnoreForeignKeys(); ChangeFieldInTable("bankaccounts", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); @@ -110,7 +110,7 @@ ChangeFieldInTable("workcentres", "overheadrecoveryact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - DB_ReinstateForeignKeys($db); + DB_ReinstateForeignKeys(); $result = DB_Txn_Commit(); Modified: trunk/Z_ChangeLocationCode.php =================================================================== --- trunk/Z_ChangeLocationCode.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/Z_ChangeLocationCode.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -49,7 +49,7 @@ if ($InputError ==0){ // no input errors $result = DB_Txn_Begin(); - DB_IgnoreForeignKeys($db); + DB_IgnoreForeignKeys(); echo '<br />' . _('Adding the new location record'); $sql = "INSERT INTO locations (loccode, @@ -223,7 +223,7 @@ $result = DB_query($sql,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); - DB_ReinstateForeignKeys($db); + DB_ReinstateForeignKeys(); $result = DB_Txn_Commit(); Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/Z_ChangeStockCode.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -51,7 +51,7 @@ if ($InputError ==0){ // no input errors - DB_IgnoreForeignKeys($db); + DB_IgnoreForeignKeys(); $result = DB_Txn_Begin(); echo '<br />' . _('Adding the new stock master record'); $sql = "INSERT INTO stockmaster (stockid, @@ -177,7 +177,7 @@ ChangeFieldInTable("offers", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); ChangeFieldInTable("tenderitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - DB_ReinstateForeignKeys($db); + DB_ReinstateForeignKeys(); $result = DB_Txn_Commit(); Modified: trunk/api/api_login.php =================================================================== --- trunk/api/api_login.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/api/api_login.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -114,7 +114,7 @@ ,'d') > $_SESSION['DB_Maintenance']){ /*Do the DB maintenance routing for the DB_type selected */ - DB_Maintenance($db); + DB_Maintenance(); //purge the audit trail if necessary if (isset($_SESSION['MonthsAuditTrail'])){ $sql = "DELETE FROM audittrail Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/doc/Change.log 2014-10-27 07:30:11 UTC (rev 6946) @@ -1,5 +1,7 @@ webERP Change Log +27/10/14 Phil: Removed the $db parameter from all DB_Txn_Begin($db) DB_Txn_Commit($db) DB_Txn_Rollback($db)calls - $db is now global +27/10/14 Phil: Removed the $db parameter from all DB_Maintenance($db) calls - $db is now global 27/10/14 Phil: Removed the $db parameter from all DB_error_msg($db) calls - $db is now global 27/10/14 Phil: Removed the $db parameter from all DB_error_no($db) calls - $db is now global 27/10/14 Phil: Removed all $db in DB_query() calls as now a global Modified: trunk/includes/ConnectDB_mysql.inc =================================================================== --- trunk/includes/ConnectDB_mysql.inc 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/includes/ConnectDB_mysql.inc 2014-10-27 07:30:11 UTC (rev 6946) @@ -184,7 +184,7 @@ return "\n".'interval ' . $val . ' '. $Inter."\n"; } -function DB_Maintenance($Conn=''){ +function DB_Maintenance(){ prnMsg(_('The system has just run the regular database administration and optimisation routine.'),'info'); $TablesResult = DB_query('SHOW TABLES'); @@ -198,25 +198,25 @@ } -function DB_Txn_Begin($Conn=''){ - mysql_query("SET autocommit=0"); - mysql_query("START TRANSACTION"); +function DB_Txn_Begin(){ + mysql_query("SET autocommit=0",$db); + mysql_query("START TRANSACTION",$db); } -function DB_Txn_Commit($Conn=''){ - mysql_query("COMMIT"); - mysql_query("SET autocommit=1"); +function DB_Txn_Commit(){ + mysql_query("COMMIT",$db); + mysql_query("SET autocommit=1",$db); } -function DB_Txn_Rollback($Conn=''){ - mysql_query("ROLLBACK"); +function DB_Txn_Rollback(){ + mysql_query("ROLLBACK",$db); } -function DB_IgnoreForeignKeys($Conn=''){ - mysql_query("SET FOREIGN_KEY_CHECKS=0"); +function DB_IgnoreForeignKeys(){ + mysql_query("SET FOREIGN_KEY_CHECKS=0",$db); } -function DB_ReinstateForeignKeys($Conn=''){ - mysql_query("SET FOREIGN_KEY_CHECKS=1"); +function DB_ReinstateForeignKeys(){ + mysql_query("SET FOREIGN_KEY_CHECKS=1",$db); } -?> +?> \ No newline at end of file Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/includes/ConnectDB_mysqli.inc 2014-10-27 07:30:11 UTC (rev 6946) @@ -196,7 +196,7 @@ return "\n".'interval ' . $val . ' '. $Inter."\n"; } -function DB_Maintenance($Conn=''){ +function DB_Maintenance(){ prnMsg(_('The system has just run the regular database administration and optimisation routine.'),'info'); @@ -210,27 +210,27 @@ WHERE confname='DB_Maintenance_LastRun'"); } -function DB_Txn_Begin($Conn=''){ +function DB_Txn_Begin(){ global $db; mysqli_query($db,'SET autocommit=0'); mysqli_query($db,'START TRANSACTION'); } -function DB_Txn_Commit($Conn=''){ +function DB_Txn_Commit(){ global $db; mysqli_query($db,'COMMIT'); mysqli_query($db,'SET autocommit=1'); } -function DB_Txn_Rollback($Conn=''){ +function DB_Txn_Rollback(){ global $db; mysqli_query($db,'ROLLBACK'); } -function DB_IgnoreForeignKeys($Conn=''){ +function DB_IgnoreForeignKeys(){ global $db; mysqli_query($db,'SET FOREIGN_KEY_CHECKS=0'); } -function DB_ReinstateForeignKeys($Conn=''){ +function DB_ReinstateForeignKeys(){ global $db; mysqli_query($db, 'SET FOREIGN_KEY_CHECKS=1'); } Modified: trunk/includes/ConnectDB_postgres.inc =================================================================== --- trunk/includes/ConnectDB_postgres.inc 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/includes/ConnectDB_postgres.inc 2014-10-27 07:30:11 UTC (rev 6946) @@ -139,7 +139,7 @@ Return $Result; } } -function DB_Maintenance($Conn){ +function DB_Maintenance(){ prnMsg(_('The system has just run the regular database administration and optimisation routine'),'info'); Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2014-10-27 07:20:48 UTC (rev 6945) +++ trunk/includes/UserLogin.php 2014-10-27 07:30:11 UTC (rev 6946) @@ -158,7 +158,7 @@ ,'d') >= $_SESSION['DB_Maintenance']){ /*Do the DB maintenance routing for the DB_type selected */ - DB_Maintenance($db); + DB_Maintenance(); $_SESSION['DB_Maintenance_LastRun'] = Date('Y-m-d'); /* Audit trail purge only runs if DB_Maintenance is enabled */ |
From: <dai...@us...> - 2014-10-29 06:29:25
|
Revision: 6951 http://sourceforge.net/p/web-erp/reponame/6951 Author: daintree Date: 2014-10-29 06:29:22 +0000 (Wed, 29 Oct 2014) Log Message: ----------- couple I missed Modified Paths: -------------- trunk/PcAuthorizeExpenses.php trunk/PcReportTab.php Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2014-10-28 11:25:32 UTC (rev 6950) +++ trunk/PcAuthorizeExpenses.php 2014-10-29 06:29:22 UTC (rev 6951) @@ -168,7 +168,7 @@ '', '" . $TagTo ."')"; - $ResultFrom = DB_Query($sqlFrom, $db, '', '', true); + $ResultFrom = DB_Query($sqlFrom,'', '', true); $sqlTo="INSERT INTO `gltrans` (`counterindex`, `type`, @@ -195,7 +195,7 @@ '', '" . $TagTo ."')"; - $ResultTo = DB_Query($sqlTo, $db, '', '', true); + $ResultTo = DB_query($sqlTo,'', '', true); if ($myrow['codeexpense'] == 'ASSIGNCASH'){ // if it's a cash assignation we need to updated banktrans table as well. Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2014-10-28 11:25:32 UTC (rev 6950) +++ trunk/PcReportTab.php 2014-10-29 06:29:22 UTC (rev 6951) @@ -120,7 +120,7 @@ $SqlTabs = "SELECT * FROM pctabs WHERE tabcode='".$SelectedTabs."'"; - $TabResult = DB_query($SqlTabs, $db, _('No Petty Cash tabs were returned by the SQL because'), _('The SQL that failed was:')); + $TabResult = DB_query($SqlTabs, _('No Petty Cash tabs were returned by the SQL because'), _('The SQL that failed was:')); $Tabs=DB_fetch_array($TabResult); |
From: <te...@us...> - 2014-11-05 07:05:50
|
Revision: 6960 http://sourceforge.net/p/web-erp/reponame/6960 Author: tehonu Date: 2014-11-05 07:05:45 +0000 (Wed, 05 Nov 2014) Log Message: ----------- Fixed bugs in previous commit Modified Paths: -------------- trunk/PDFPriceList.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2014-11-05 05:10:23 UTC (rev 6959) +++ trunk/PDFPriceList.php 2014-11-05 07:05:45 UTC (rev 6960) @@ -147,10 +147,10 @@ } $PricesResult = DB_query($SQL,'','',false,false); - if (DB_error_no($db) !=0) { + if (DB_error_no() !=0) { $Title = _('Price List') . ' - ' . _('Problem Report....'); include('includes/header.inc'); - prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; if ($debug==1) { prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-05 05:10:23 UTC (rev 6959) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-05 07:05:45 UTC (rev 6960) @@ -1,5 +1,7 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); +ALTER TABLE `stockcategory` ADD INDEX `CategoryDescription` (`categorydescription`); + UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2014-11-06 02:59:18
|
Revision: 6962 http://sourceforge.net/p/web-erp/reponame/6962 Author: tehonu Date: 2014-11-06 02:59:12 +0000 (Thu, 06 Nov 2014) Log Message: ----------- More flexible selection of inventory categories Modified Paths: -------------- trunk/InventoryPlanning.php trunk/InventoryValuation.php trunk/PDFPriceList.php trunk/StockCheck.php Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2014-11-06 02:29:31 UTC (rev 6961) +++ trunk/InventoryPlanning.php 2014-11-06 02:59:12 UTC (rev 6962) @@ -9,11 +9,7 @@ include ('includes/SQL_CommonFunctions.inc'); -if (isset($_POST['PrintPDF']) - and isset($_POST['FromCriteria']) - and mb_strlen($_POST['FromCriteria'])>=1 - and isset($_POST['ToCriteria']) - and mb_strlen($_POST['ToCriteria'])>=1) { +if (isset($_POST['PrintPDF'])) { include ('includes/class.pdf.php'); @@ -69,8 +65,7 @@ AND stockmaster.discontinued = 0 AND stockmaster.categoryid=stockcategory.categoryid AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') GROUP BY stockmaster.categoryid, stockmaster.description, stockcategory.categorydescription, @@ -90,9 +85,8 @@ stockcategory WHERE locstock.stockid=stockmaster.stockid AND stockmaster.discontinued = 0 - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND stockmaster.categoryid=stockcategory.categoryid - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') AND locstock.loccode = '" . $_POST['Location'] . "' ORDER BY stockmaster.categoryid, @@ -123,14 +117,14 @@ $Category = ''; - $CurrentPeriod = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); + $CurrentPeriod = GetPeriod(Date($_SESSION['DefaultDateFormat'])); $Period_1 = $CurrentPeriod -1; $Period_2 = $CurrentPeriod -2; $Period_3 = $CurrentPeriod -3; $Period_4 = $CurrentPeriod -4; $Period_5 = $CurrentPeriod -5; - while ($InventoryPlan = DB_fetch_array($InventoryResult,$db)){ + while ($InventoryPlan = DB_fetch_array($InventoryResult)){ if ($Category!=$InventoryPlan['categoryid']){ $FontSize=10; @@ -359,81 +353,71 @@ echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/inventory.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; - if (empty($_POST['FromCriteria']) or empty($_POST['ToCriteria'])) { - /*if $FromCriteria is not set then show a form to allow input */ - - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - - echo '<tr> - <td>' . _('From Inventory Category Code') . ':</td> - <td><select name="FromCriteria">'; - - $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; - $CatResult= DB_query($sql); - while ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('Select Inventory Categories') . ':</td> + <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $CatResult = DB_query($SQL); + while ($MyRow = DB_fetch_array($CatResult)) { + if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { + echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; + } else { + echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; } - echo '</select> + } + echo '</select> </td> - </tr> - <tr> - <td>' . _('To Inventory Category Code') . ':</td> - <td><select name="ToCriteria">'; + </tr>'; + + echo '<tr> + <td>' . _('For Inventory in Location') . ':</td> + <td><select name="Location">'; - /*Set the index for the categories result set back to 0 */ - DB_data_seek($CatResult,0); + $sql = "SELECT locations.loccode, locationname FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; + $LocnResult=DB_query($sql); - while ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; - } - echo '</select></td> - </tr> - <tr> - <td>' . _('For Inventory in Location') . ':</td> - <td><select name="Location">'; + echo '<option value="All">' . _('All Locations') . '</option>'; - $sql = "SELECT locations.loccode, locationname FROM locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; - $LocnResult=DB_query($sql); + while ($myrow=DB_fetch_array($LocnResult)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + echo '</select> + </td> + </tr>'; - echo '<option value="All">' . _('All Locations') . '</option>'; + echo '<tr> + <td>' . _('Stock Planning') . ':</td> + <td><select name="NumberMonthsHolding"> + <option selected="selected" value="1">' . _('One Month MAX') . '</option> + <option value="1.5">' . _('One Month and a half MAX') . '</option> + <option value="2">' . _('Two Months MAX') . '</option> + <option value="2.5">' . _('Two Month and a half MAX') . '</option> + <option value="3">' . _('Three Months MAX') . '</option> + <option value="4">' . _('Four Months MAX') . '</option> + <option value="11">' . _('One Month AVG') . '</option> + <option value="11.5">' . _('One Month and a half AVG') . '</option> + <option value="12">' . _('Two Months AVG') . '</option> + <option value="12.5">' . _('Two Month and a half AVG') . '</option> + <option value="13">' . _('Three Months AVG') . '</option> + <option value="14">' . _('Four Months AVG') . '</option> + </select> + </td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> + </form>'; - while ($myrow=DB_fetch_array($LocnResult)){ - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } - echo '</select> - </td> - </tr>'; - - echo '<tr> - <td>' . _('Stock Planning') . ':</td> - <td><select name="NumberMonthsHolding"> - <option selected="selected" value="1">' . _('One Month MAX') . '</option> - <option value="1.5">' . _('One Month and a half MAX') . '</option> - <option value="2">' . _('Two Months MAX') . '</option> - <option value="2.5">' . _('Two Month and a half MAX') . '</option> - <option value="3">' . _('Three Months MAX') . '</option> - <option value="4">' . _('Four Months MAX') . '</option> - <option value="11">' . _('One Month AVG') . '</option> - <option value="11.5">' . _('One Month and a half AVG') . '</option> - <option value="12">' . _('Two Months AVG') . '</option> - <option value="12.5">' . _('Two Month and a half AVG') . '</option> - <option value="13">' . _('Three Months AVG') . '</option> - <option value="14">' . _('Four Months AVG') . '</option> - </select> - </td> - </tr> - </table> - <br /> - <div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div> - </div> - </form>'; - } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2014-11-06 02:29:31 UTC (rev 6961) +++ trunk/InventoryValuation.php 2014-11-06 02:59:12 UTC (rev 6962) @@ -3,11 +3,7 @@ /* $Id$ */ include('includes/session.inc'); -if ((isset($_POST['PrintPDF']) OR isset($_POST['CSV'])) - AND isset($_POST['FromCriteria']) - AND mb_strlen($_POST['FromCriteria'])>=1 - AND isset($_POST['ToCriteria']) - AND mb_strlen($_POST['ToCriteria'])>=1){ +if (isset($_POST['PrintPDF']) OR isset($_POST['CSV'])){ /*Now figure out the inventory data to report for the category range under review */ if ($_POST['Location']=='All'){ @@ -37,8 +33,7 @@ stockmaster.stockid, stockmaster.description HAVING SUM(locstock.quantity)!=0 - AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' - AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') ORDER BY stockcategory.categorydescription, stockmaster.stockid"; } else { @@ -58,8 +53,7 @@ WHERE stockmaster.stockid=locstock.stockid AND stockmaster.categoryid=stockcategory.categoryid AND locstock.quantity!=0 - AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' - AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND locstock.loccode = '" . $_POST['Location'] . "' ORDER BY stockcategory.categorydescription, stockmaster.stockid"; @@ -79,11 +73,7 @@ } } -if (isset($_POST['PrintPDF']) - AND isset($_POST['FromCriteria']) - AND mb_strlen($_POST['FromCriteria'])>=1 - AND isset($_POST['ToCriteria']) - AND mb_strlen($_POST['ToCriteria'])>=1){ +if (isset($_POST['PrintPDF'])){ include('includes/PDFStarter.php'); @@ -111,7 +101,7 @@ $CatTot_Val=0; $CatTot_Qty=0; - while ($InventoryValn = DB_fetch_array($InventoryResult,$db)){ + while ($InventoryValn = DB_fetch_array($InventoryResult)){ if ($Category!=$InventoryValn['categoryid']){ $FontSize=10; @@ -205,7 +195,7 @@ } elseif (isset($_POST['CSV'])) { $CSVListing = _('Category ID') .','. _('Category Description') .','. _('Stock ID') .','. _('Description') .','. _('Decimal Places') .','. _('Qty On Hand') .','. _('Units') .','. _('Unit Cost') .','. _('Total') . "\n"; - while ($InventoryValn = DB_fetch_row($InventoryResult, $db)) { + while ($InventoryValn = DB_fetch_row($InventoryResult)) { $CSVListing .= '"'; $CSVListing .= implode('","', $InventoryValn) . '"' . "\n"; } @@ -223,82 +213,68 @@ $Title=_('Inventory Valuation Reporting'); include('includes/header.inc'); + echo '<p class="page_title_text"> + <img src="'.$RootPath.'/css/'.$Theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $Title . ' + </p>'; - if (empty($_POST['FromCriteria']) OR empty($_POST['ToCriteria'])) { + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - /*if $FromCriteria is not set then show a form to allow input */ - echo '<p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $Title . ' - </p>'; - - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <div> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> + echo '<table class="selection"> <tr> - <td>' . _('From Inventory Category Code') . ':</td> - <td><select name="FromCriteria">'; - - $sql="SELECT categoryid, - categorydescription - FROM stockcategory - ORDER BY categorydescription"; - - $CatResult= DB_query($sql); - While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + <td>' . _('Select Inventory Categories') . ':</td> + <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $CatResult = DB_query($SQL); + while ($MyRow = DB_fetch_array($CatResult)) { + if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { + echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; + } else { + echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; } - echo '</select></td> - </tr>'; + } + echo '</select> + </td> + </tr>'; - echo '<tr> - <td>' . _('To Inventory Category Code') . ':</td> - <td><select name="ToCriteria">'; + echo '<tr> + <td>' . _('For Inventory in Location') . ':</td> + <td><select name="Location">'; - /*Set the index for the categories result set back to 0 */ - DB_data_seek($CatResult,0); + $sql = "SELECT locations.loccode, + locationname + FROM locations + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; - While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; - } - echo '</select></td> - </tr>'; + $LocnResult=DB_query($sql); - echo '<tr> - <td>' . _('For Inventory in Location') . ':</td> - <td><select name="Location">'; + echo '<option value="All">' . _('All Locations') . '</option>'; - $sql = "SELECT locations.loccode, - locationname - FROM locations - INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; + while ($myrow=DB_fetch_array($LocnResult)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + echo '</select></td> + </tr>'; - $LocnResult=DB_query($sql); + echo '<tr> + <td>' . _('Summary or Detailed Report') . ':</td> + <td><select name="DetailedReport"> + <option selected="selected" value="No">' . _('Summary Report') . '</option> + <option value="Yes">' . _('Detailed Report') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + <input type="submit" name="CSV" value="' . _('Output to CSV') . '" /> + </div>'; + echo '</div> + </form>'; - echo '<option value="All">' . _('All Locations') . '</option>'; - - while ($myrow=DB_fetch_array($LocnResult)){ - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } - echo '</select></td> - </tr>'; - - echo '<tr> - <td>' . _('Summary or Detailed Report') . ':</td> - <td><select name="DetailedReport"> - <option selected="selected" value="No">' . _('Summary Report') . '</option> - <option value="Yes">' . _('Detailed Report') . '</option> - </select></td> - </tr> - </table> - <br /> - <div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - <input type="submit" name="CSV" value="' . _('Output to CSV') . '" /> - </div>'; - echo '</div> - </form>'; - } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2014-11-06 02:29:31 UTC (rev 6961) +++ trunk/PDFPriceList.php 2014-11-06 02:59:12 UTC (rev 6962) @@ -284,79 +284,75 @@ echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . '/images/customer.png" title="' . _('Price List') . '" />' . ' ' . _('Print a price list by inventory category') . '</p>'; - if (!isset($_POST['FromCriteria']) or !isset($_POST['ToCriteria'])) { - /*if $FromCriteria is not set then show a form to allow input */ + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; + echo '<table class="selection"> + <tr> + <td>' . _('Select Inventory Categories') . ':</td> + <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $CatResult = DB_query($SQL); + while ($MyRow = DB_fetch_array($CatResult)) { + if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { + echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; + } else { + echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; + } + } + echo '</select> + </td> + </tr>'; - echo '<table class="selection"> - <tr> - <td>' . _('Select Inventory Categories') . ':</td> - <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; - $SQL = 'SELECT categoryid, categorydescription - FROM stockcategory - ORDER BY categorydescription'; - $CatResult = DB_query($SQL); - while ($MyRow = DB_fetch_array($CatResult)) { - if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { - echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; - } else { - echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; - } - } - echo '</select> - </td> - </tr>'; + echo '<tr><td>' . _('For Sales Type/Price List').':</td> + <td><select name="SalesType">'; + $sql = "SELECT sales_type, typeabbrev FROM salestypes"; + $SalesTypesResult=DB_query($sql); - echo '<tr><td>' . _('For Sales Type/Price List').':</td> - <td><select name="SalesType">'; - $sql = "SELECT sales_type, typeabbrev FROM salestypes"; - $SalesTypesResult=DB_query($sql); + while ($myrow=DB_fetch_array($SalesTypesResult)) { + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } + echo '</select></td></tr>'; - while ($myrow=DB_fetch_array($SalesTypesResult)) { - echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; - } - echo '</select></td></tr>'; + echo '<tr><td>' . _('For Currency').':</td> + <td><select name="Currency">'; + $sql = "SELECT currabrev, currency FROM currencies ORDER BY currency"; + $CurrencyResult=DB_query($sql); + echo '<option selected="selected" value="All">' . _('All') . '</option>'; + while ($myrow=DB_fetch_array($CurrencyResult)) { + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + } + echo '</select></td></tr>'; - echo '<tr><td>' . _('For Currency').':</td> - <td><select name="Currency">'; - $sql = "SELECT currabrev, currency FROM currencies ORDER BY currency"; - $CurrencyResult=DB_query($sql); - echo '<option selected="selected" value="All">' . _('All') . '</option>'; - while ($myrow=DB_fetch_array($CurrencyResult)) { - echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; - } - echo '</select></td></tr>'; + echo '<tr> + <td>' . _('Show Gross Profit %') . ':</td> + <td><select name="ShowGPPercentages"> + <option selected="selected" value="No">' . _('Prices Only') . '</option> + <option value="Yes">' . _('Show GP % too') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials"> + <option selected="selected" value="Sales Type Prices">' . _('Default Sales Type Prices') . '</option> + <option value="Customer Special Prices Only">' . _('Customer Special Prices Only') . '</option> + <option value="Full Description">' . _('Full Description') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Effective As At') . ':</td> + <td><input type="text" required="required" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /> + </div> + </div> + </form>'; - echo '<tr> - <td>' . _('Show Gross Profit %') . ':</td> - <td><select name="ShowGPPercentages"> - <option selected="selected" value="No">' . _('Prices Only') . '</option> - <option value="Yes">' . _('Show GP % too') . '</option> - </select></td> - </tr> - <tr> - <td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials"> - <option selected="selected" value="Sales Type Prices">' . _('Default Sales Type Prices') . '</option> - <option value="Customer Special Prices Only">' . _('Customer Special Prices Only') . '</option> - <option value="Full Description">' . _('Full Description') . '</option> - </select></td> - </tr> - <tr> - <td>' . _('Effective As At') . ':</td> - <td><input type="text" required="required" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> - </tr> - </table> - <br /> - <div class="centre"> - <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /> - </div> - </div> - </form>'; - } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2014-11-06 02:29:31 UTC (rev 6961) +++ trunk/StockCheck.php 2014-11-06 02:59:12 UTC (rev 6962) @@ -4,11 +4,7 @@ include('includes/session.inc'); -If (isset($_POST['PrintPDF']) - AND isset($_POST['FromCriteria']) - AND mb_strlen($_POST['FromCriteria'])>=1 - AND isset($_POST['ToCriteria']) - AND mb_strlen($_POST['ToCriteria'])>=1){ +If (isset($_POST['PrintPDF'])){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Stock Count Sheets')); @@ -31,12 +27,12 @@ '" . Date('Y-m-d') . "' FROM locstock, stockmaster - WHERE locstock.stockid=stockmaster.stockid AND locstock.loccode='" . $_POST['Location'] . "' AND - stockmaster.categoryid>='" . $_POST['FromCriteria'] . "' AND - stockmaster.categoryid<='" . $_POST['ToCriteria'] . "' AND - stockmaster.mbflag!='A' AND - stockmaster.mbflag!='K' AND - stockmaster.mbflag!='D'"; + WHERE locstock.stockid=stockmaster.stockid + AND locstock.loccode='" . $_POST['Location'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + AND stockmaster.mbflag!='D'"; $result = DB_query($sql,'','',false,false); if (DB_error_no() !=0) { @@ -56,8 +52,7 @@ $sql = "DELETE stockcheckfreeze FROM stockcheckfreeze INNER JOIN stockmaster ON stockcheckfreeze.stockid=stockmaster.stockid - WHERE stockmaster.categoryid >='" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid<='" . $_POST['ToCriteria'] . "' + WHERE stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND stockcheckfreeze.loccode='" . $_POST['Location'] . "'"; $result = DB_query($sql,'','',false,false); @@ -84,8 +79,7 @@ FROM locstock INNER JOIN stockmaster ON locstock.stockid=stockmaster.stockid WHERE locstock.loccode='" . $_POST['Location'] . "' - AND stockmaster.categoryid>='" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid<='" . $_POST['ToCriteria'] . "' + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND stockmaster.mbflag!='A' AND stockmaster.mbflag!='K' AND stockmaster.mbflag!='G' @@ -123,8 +117,7 @@ ON stockcheckfreeze.stockid=stockmaster.stockid INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + WHERE stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND (stockmaster.mbflag='B' OR mbflag='M') AND stockcheckfreeze.loccode = '" . $_POST['Location'] . "'"; if (isset($_POST['NonZerosOnly']) and $_POST['NonZerosOnly']==true){ @@ -258,109 +251,101 @@ $Title=_('Stock Check Sheets'); include('includes/header.inc'); - if (!isset($_POST['FromCriteria']) and !isset($_POST['ToCriteria'])) { + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' + . _('print') . '" alt="" />' . ' ' . $Title . '</p><br />'; - /*if $FromCriteria is not set then show a form to allow input */ - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' - . _('print') . '" alt="" />' . ' ' . $Title . '</p><br />'; - - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - - echo '<tr><td>' . _('From Inventory Category Code') . ':</td> - <td><select name="FromCriteria">'; - - $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; - $CatResult= DB_query($sql); - While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('Select Inventory Categories') . ':</td> + <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $CatResult = DB_query($SQL); + while ($MyRow = DB_fetch_array($CatResult)) { + if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { + echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; + } else { + echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; + } + echo '</select> + </td> + </tr>'; - echo '<tr> - <td>' . _('To Inventory Category Code') . ':</td> - <td><select name="ToCriteria">'; + echo '<tr> + <td>' . _('For Inventory in Location') . ':</td> + <td><select name="Location">'; + $sql = "SELECT locations.loccode, locationname FROM locations + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + ORDER BY locationname"; + $LocnResult=DB_query($sql); - /*Set the index for the categories result set back to 0 */ - DB_data_seek($CatResult,0); - - While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + while ($myrow=DB_fetch_array($LocnResult)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } - echo '</select></td></tr>'; + echo '</select> + </td> + </tr>'; - echo '<tr> - <td>' . _('For Inventory in Location') . ':</td> - <td><select name="Location">'; - $sql = "SELECT locations.loccode, locationname FROM locations - INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 - ORDER BY locationname"; - $LocnResult=DB_query($sql); + echo '<tr> + <td>' . _('Action for Stock Check Freeze') . ':</td> + <td><select name="MakeStkChkData">'; - while ($myrow=DB_fetch_array($LocnResult)){ - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } - echo '</select> - </td> - </tr>'; + if (!isset($_POST['MakeStkChkData'])){ + $_POST['MakeStkChkData'] = 'PrintOnly'; + } + if ($_POST['MakeStkChkData'] =='New'){ + echo '<option selected="selected" value="New">' . _('Make new stock check data file') . '</option>'; + } else { + echo '<option value="New">' . _('Make new stock check data file') . '</option>'; + } + if ($_POST['MakeStkChkData'] =='AddUpdate'){ + echo '<option selected="selected" value="AddUpdate">' . _('Add/update existing stock check file') . '</option>'; + } else { + echo '<option value="AddUpdate">' . _('Add/update existing stock check file') . '</option>'; + } + if ($_POST['MakeStkChkData'] =='PrintOnly'){ + echo '<option selected="selected" value="PrintOnly">' . _('Print Stock Check Sheets Only') . '</option>'; + } else { + echo '<option value="PrintOnly">' . _('Print Stock Check Sheets Only') . '</option>'; + } + echo '</select></td></tr>'; - echo '<tr> - <td>' . _('Action for Stock Check Freeze') . ':</td> - <td><select name="MakeStkChkData">'; + echo '<tr> + <td>' . _('Show system quantity on sheets') . ':</td> + <td>'; - if (!isset($_POST['MakeStkChkData'])){ - $_POST['MakeStkChkData'] = 'PrintOnly'; - } - if ($_POST['MakeStkChkData'] =='New'){ - echo '<option selected="selected" value="New">' . _('Make new stock check data file') . '</option>'; - } else { - echo '<option value="New">' . _('Make new stock check data file') . '</option>'; - } - if ($_POST['MakeStkChkData'] =='AddUpdate'){ - echo '<option selected="selected" value="AddUpdate">' . _('Add/update existing stock check file') . '</option>'; - } else { - echo '<option value="AddUpdate">' . _('Add/update existing stock check file') . '</option>'; - } - if ($_POST['MakeStkChkData'] =='PrintOnly'){ - echo '<option selected="selected" value="PrintOnly">' . _('Print Stock Check Sheets Only') . '</option>'; - } else { - echo '<option value="PrintOnly">' . _('Print Stock Check Sheets Only') . '</option>'; - } - echo '</select></td></tr>'; + if (isset($_POST['ShowInfo']) and $_POST['ShowInfo'] == false){ + echo '<input type="checkbox" name="ShowInfo" value="false" />'; + } else { + echo '<input type="checkbox" name="ShowInfo" value="true" />'; + } + echo '</td> + </tr>'; - echo '<tr> - <td>' . _('Show system quantity on sheets') . ':</td> - <td>'; + echo '<tr> + <td>' . _('Only print items with non zero quantities') . ':</td> + <td>'; + if (isset($_POST['NonZerosOnly']) and $_POST['NonZerosOnly'] == false){ + echo '<input type="checkbox" name="NonZerosOnly" value="false" />'; + } else { + echo '<input type="checkbox" name="NonZerosOnly" value="true" />'; + } - if (isset($_POST['ShowInfo']) and $_POST['ShowInfo'] == false){ - echo '<input type="checkbox" name="ShowInfo" value="false" />'; - } else { - echo '<input type="checkbox" name="ShowInfo" value="true" />'; - } - echo '</td> - </tr>'; + echo '</td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print and Process') . '" /> + </div> + </div> + </form>'; - echo '<tr> - <td>' . _('Only print items with non zero quantities') . ':</td> - <td>'; - if (isset($_POST['NonZerosOnly']) and $_POST['NonZerosOnly'] == false){ - echo '<input type="checkbox" name="NonZerosOnly" value="false" />'; - } else { - echo '<input type="checkbox" name="NonZerosOnly" value="true" />'; - } - - echo '</td> - </tr> - </table> - <br /> - <div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print and Process') . '" /> - </div> - </div> - </form>'; - } include('includes/footer.inc'); } /*end of else not PrintPDF */ |
From: <dai...@us...> - 2014-11-06 09:15:14
|
Revision: 6966 http://sourceforge.net/p/web-erp/reponame/6966 Author: daintree Date: 2014-11-06 09:15:09 +0000 (Thu, 06 Nov 2014) Log Message: ----------- Fix login errors for automated scripts; Modified Paths: -------------- trunk/MailInventoryValuation.php trunk/includes/ConnectDB.inc trunk/includes/DateFunctions.inc trunk/includes/MiscFunctions.php trunk/includes/UserLogin.php trunk/includes/session.inc trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/MailInventoryValuation.php =================================================================== --- trunk/MailInventoryValuation.php 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/MailInventoryValuation.php 2014-11-06 09:15:09 UTC (rev 6966) @@ -17,6 +17,7 @@ include('includes/session.inc'); include ('includes/class.pdf.php'); $Recipients = GetMailList('InventoryValuationRecipients'); + if (sizeOf($Recipients) == 0) { $Title = _('Inventory Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); @@ -242,7 +243,7 @@ echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; - + }else{ $Title = _('Print Inventory Valuation Error'); include('includes/header.inc'); @@ -250,8 +251,8 @@ echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; - + } - + } ?> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/includes/ConnectDB.inc 2014-11-06 09:15:09 UTC (rev 6966) @@ -9,7 +9,7 @@ require_once ($PathPrefix .'includes/MiscFunctions.php'); if (!isset($_SESSION['DatabaseName'])){ //need to get the database name from the file structure if (isset($_POST['CompanyNameField'])){ - if (isset($CompanyList) && is_array($CompanyList)) { + if (isset($CompanyList) AND is_array($CompanyList)) { foreach ($CompanyList as $CompanyEntryKey => $CompanyEntry){ if (is_dir('./companies/'. $CompanyEntry['database']) AND ($CompanyEntryKey == $_POST['CompanyNameField']) ) { $_SESSION['DatabaseName'] = $CompanyEntry['database']; @@ -45,15 +45,11 @@ prnMsg(_('The company name abbreviation entered at login must also have a company directory defined. See your system administrator'),'error'); } } // end provision for old setup - + include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); } elseif (isset($DatabaseName)) { /* Scripts that do not require a login must have the $DatabaseName variable set in hard code */ $_SESSION['DatabaseName'] = $DatabaseName; $_SESSION['CompanyName']= $DatabaseName; include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); } - -} else { - include_once($PathPrefix .'includes/ConnectDB_' . $DBType . '.inc'); } - -?> +?> \ No newline at end of file Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/includes/DateFunctions.inc 2014-11-06 09:15:09 UTC (rev 6966) @@ -924,7 +924,7 @@ $EarliestDispatch = time(); /* If the hour is after Dispatch Cut Off Time default dispatch date to tomorrow */ $EarliestDispatch = (Date('H')>=$_SESSION['DispatchCutOffTime'])?($EarliestDispatch+24*60*60):$EarliestDispatch; - + if ((Date('w',$EarliestDispatch)==0) AND ($_SESSION['WorkingDaysWeek'] != '7')){ /*if today is a sunday AND the company does NOT work 7 days a week, the dispatch date must be tomorrow (Monday) or after */ @@ -1081,4 +1081,4 @@ return $myrow[0]; } -?> +?> \ No newline at end of file Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/includes/MiscFunctions.php 2014-11-06 09:15:09 UTC (rev 6966) @@ -419,10 +419,12 @@ return $result; } -function GetMailList($Recipients){ - global $db; +function GetMailList($MailGroup){ $ToList = array(); - $sql = "SELECT email,realname FROM mailgroupdetails INNER JOIN www_users ON www_users.userid=mailgroupdetails.userid WHERE mailgroupdetails.groupname='".$Recipients."'"; + $sql = "SELECT email,realname + FROM mailgroupdetails INNER JOIN www_users + ON www_users.userid=mailgroupdetails.userid + WHERE mailgroupdetails.groupname='" . $MailGroup . "'"; $ErrMsg = _('Failed to retrieve mail lists'); $result = DB_query($sql,$ErrMsg); if(DB_num_rows($result) != 0){ Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/includes/UserLogin.php 2014-11-06 09:15:09 UTC (rev 6966) @@ -42,8 +42,8 @@ } /* The SQL to get the user info must use the * syntax because the field name could change between versions if the fields are specifed directly then the sql fails and the db upgrade will fail */ $sql = "SELECT * - FROM www_users - WHERE www_users.userid='" . $Name . "'"; + FROM www_users + WHERE www_users.userid='" . $Name . "'"; $ErrMsg = _('Could not retrieve user details on login because'); $debug =1; @@ -110,6 +110,7 @@ $_SESSION['SalesmanLogin'] = $myrow['salesman']; $_SESSION['CanCreateTender'] = $myrow['cancreatetender']; $_SESSION['AllowedDepartment'] = $myrow['department']; + $_SESSION['ShowDashboard'] = $myrow['dashboard']; if (isset($myrow['pdflanguage'])) { $_SESSION['PDFLanguage'] = $myrow['pdflanguage']; Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/includes/session.inc 2014-11-06 09:15:09 UTC (rev 6966) @@ -5,7 +5,6 @@ $PathPrefix=''; } - if (!file_exists($PathPrefix . 'config.php')){ $RootPath = dirname(htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8')); if ($RootPath == '/' OR $RootPath == "\\") { @@ -81,8 +80,16 @@ include($PathPrefix . 'includes/LanguageSetup.php'); $FirstLogin = False; -if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ +if(basename($_SERVER['SCRIPT_NAME'])=='Logout.php'){ + header('Location: index.php'); +} elseif (isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ + $_SESSION['AllowedPageSecurityTokens'] = array(); + $_SESSION['DatabaseName'] = $DefaultDatabase; + $_SESSION['CompanyName'] = $DefaultDatabase; + include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); + include($PathPrefix . 'includes/GetConfig.php'); +} else { include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ if (isset($_POST['UserNameEntryField']) AND isset($_POST['Password'])) { @@ -125,9 +132,6 @@ die(include($PathPrefix . 'includes/Login.php')); } -} /* only do security checks if AllowAnyone is not true */ - elseif(basename($_SERVER['SCRIPT_NAME'])=='Logout.php'){ - header('Location: index.php'); } /*If the Code $Version - held in ConnectDB.inc is > than the Database VersionNumber held in config table then do upgrades */ @@ -139,8 +143,11 @@ If (isset($_POST['Theme']) AND ($_SESSION['UsersRealName'] == $_POST['RealName'])) { $_SESSION['Theme'] = $_POST['Theme']; $Theme = $_POST['Theme']; +} elseif (isset($_SESSION['Theme'])) { + $Theme = $_SESSION['Theme']; } else { - $Theme = $_SESSION['Theme']; + $Theme = 'xenos'; + $_SESSION['Theme'] = 'xenos'; } @@ -212,7 +219,8 @@ } else { $debug = 0; //don't allow debug messages } -if ($FirstLogin AND !$SupplierLogin AND !$CustomerLogin) { + +if ($FirstLogin AND !$SupplierLogin AND !$CustomerLogin AND $_SESSION['ShowDashboard']==1) { header('Location: ' . $PathPrefix .'Dashboard.php'); } Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-06 08:41:58 UTC (rev 6965) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-06 09:15:09 UTC (rev 6966) @@ -1,7 +1,5 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); - -ALTER TABLE `stockcategory` ADD INDEX `CategoryDescription` (`categorydescription`); - +ALTER TABLE `www_users` ADD `dashboard` TINYINT NOT NULL DEFAULT '0'; UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2014-11-08 05:14:31
|
Revision: 6971 http://sourceforge.net/p/web-erp/reponame/6971 Author: daintree Date: 2014-11-08 05:14:21 +0000 (Sat, 08 Nov 2014) Log Message: ----------- login logic fixed Modified Paths: -------------- trunk/includes/ConnectDB.inc trunk/javascripts/MiscFunctions.js Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2014-11-08 00:43:17 UTC (rev 6970) +++ trunk/includes/ConnectDB.inc 2014-11-08 05:14:21 UTC (rev 6971) @@ -7,42 +7,42 @@ $Version='4.11.5'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); -if (!isset($_SESSION['DatabaseName'])){ //need to get the database name from the file structure +if (!isset($_SESSION['DatabaseName'])){ if (isset($_POST['CompanyNameField'])){ - if (isset($CompanyList) AND is_array($CompanyList)) { - foreach ($CompanyList as $CompanyEntryKey => $CompanyEntry){ - if (is_dir('./companies/'. $CompanyEntry['database']) AND ($CompanyEntryKey == $_POST['CompanyNameField']) ) { - $_SESSION['DatabaseName'] = $CompanyEntry['database']; - $_SESSION['CompanyName'] = $CompanyEntry['company']; - include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); - break; - } - } - if (!isset($_SESSION['DatabaseName'])) { - prnMsg(_('You do not seem to have a database configured correctly to use with webERP. Check you database exists and there is a corresponding directory in the \'companies\' directory of the same name. Contact your system administrator for assistance.'),'error'); - exit; - } + if (isset($CompanyList) AND is_array($CompanyList)) { + foreach ($CompanyList as $CompanyEntryKey => $CompanyEntry){ + if (is_dir('./companies/'. $CompanyEntry['database']) AND ($CompanyEntryKey == $_POST['CompanyNameField']) ) { + $_SESSION['DatabaseName'] = $CompanyEntry['database']; + $_SESSION['CompanyName'] = $CompanyEntry['company']; + break; + } + } + if (!isset($_SESSION['DatabaseName'])) { + prnMsg(_('You do not seem to have a database configured correctly to use with webERP. Check you database exists and there is a corresponding directory in the \'companies\' directory of the same name. Contact your system administrator for assistance.'),'error'); + exit; + } if (ContainsIllegalCharacters( $_SESSION['DatabaseName'])){ - prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); - echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; - exit; + prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); + echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; + exit; } } //provision for old setup - delete when we have a reliable upgrade for config.php else { if (ContainsIllegalCharacters($_POST['CompanyNameField'])){ - prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); - echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; - exit; + prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); + echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; + exit; } if (is_dir('companies/' . $_POST['CompanyNameField']) AND $_POST['CompanyNameField'] != '..'){ - $_SESSION['DatabaseName'] = $_POST['CompanyNameField']; - $_SESSION['CompanyName'] = $_POST['CompanyNameField']; - include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); + $_SESSION['DatabaseName'] = $_POST['CompanyNameField']; + $_SESSION['CompanyName'] = $_POST['CompanyNameField']; } else { - prnMsg(_('The company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is not configured for use with this installation of webERP. Check that a directory named ' . $_POST['CompanyNameField'] . ' is set up under the companies sub-directory.'),'error'); - prnMsg(_('Check the company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is the same as the database name.'),'error'); - prnMsg(_('The company name abbreviation entered at login must also have a company directory defined. See your system administrator'),'error'); + prnMsg(_('The company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is not configured for use with this installation of webERP. Check that a directory named ' . $_POST['CompanyNameField'] . ' is set up under the companies sub-directory.'),'error'); + prnMsg(_('Check the company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is the same as the database name.'),'error'); + prnMsg(_('The company name abbreviation entered at login must also have a company directory defined. See your system administrator'),'error'); + echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; + exit; } } // end provision for old setup include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); @@ -51,5 +51,7 @@ $_SESSION['CompanyName']= $DatabaseName; include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); } +} else { + include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); } ?> \ No newline at end of file Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2014-11-08 00:43:17 UTC (rev 6970) +++ trunk/javascripts/MiscFunctions.js 2014-11-08 05:14:21 UTC (rev 6971) @@ -44,13 +44,13 @@ break; default: alert('something is wrong with your language setting'); - + } if(patt.test(this.value)){ this.setCustomValidity(''); return true; - + }else{ this.setCustomValidity('The number format is wrong'); return false; @@ -98,7 +98,7 @@ m=mA[3]; y=mA[1]; } - + if (m<1 || m>12){ alert("Month must be between 1 and 12"); return false; @@ -289,7 +289,7 @@ function(a,b) { if (direction=="a") { if (columnClass=="number") { - return parseFloat(a[columnNumber])-parseFloat(b[columnNumber]); + return parseFloat(e[columnNumber].replace(/[,.]/g, '')) - parseFloat(t[columnNumber].replace(/[,.]/g, '') } else if (columnClass=="date") { da=new Date(a[columnNumber]); db=new Date(b[columnNumber]); @@ -299,7 +299,7 @@ } } else { if (columnClass=="number") { - return parseFloat(b[columnNumber])-parseFloat(a[columnNumber]); + return parseFloat(e[columnNumber].replace(/[,.]/g, '')) - parseFloat(t[columnNumber].replace(/[,.]/g, '') } else if (columnClass=="date") { da=new Date(a[columnNumber]); db=new Date(b[columnNumber]); @@ -341,7 +341,7 @@ if (ds[i].className=="number") ds[i].onkeypress=rTN; if (ds[i].className=="integer") ds[i].onkeypress=rTI; if (ds[i].className=="number"){ - + ds[i].origonchange=ds[i].onchange; ds[i].newonchange=rLocaleNumber; ds[i].onchange=function(){ @@ -349,7 +349,7 @@ this.origonchange(); this.newonchange(); }; - + } } var ds=document.getElementsByTagName("th"); |
From: <dai...@us...> - 2014-11-08 23:48:45
|
Revision: 6972 http://sourceforge.net/p/web-erp/reponame/6972 Author: daintree Date: 2014-11-08 23:48:35 +0000 (Sat, 08 Nov 2014) Log Message: ----------- Phil: Applied Tims fix to the javascript number sorting problem - thanks Tim Modified Paths: -------------- trunk/doc/Change.log trunk/javascripts/MiscFunctions.js Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-11-08 05:14:21 UTC (rev 6971) +++ trunk/doc/Change.log 2014-11-08 23:48:35 UTC (rev 6972) @@ -1,5 +1,6 @@ webERP Change Log +9/11/14: Tim: fix to javascript function to sort numbers including formatted numbers with commas. 8/11/14: Alessandro Saporetti: Fixed the bug that the wrong invoiced quantity result in Z_DeleteInvoice.php. 7/11/14 Exson: Remove date range from sql when users input the PO number in PO_SelectOSPurchOrder.php. 06/11/14 Exson: Add code change for table custitem and pricematrix in Z_ChangeStockCode.php. Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2014-11-08 05:14:21 UTC (rev 6971) +++ trunk/javascripts/MiscFunctions.js 2014-11-08 23:48:35 UTC (rev 6972) @@ -289,7 +289,7 @@ function(a,b) { if (direction=="a") { if (columnClass=="number") { - return parseFloat(e[columnNumber].replace(/[,.]/g, '')) - parseFloat(t[columnNumber].replace(/[,.]/g, '') + return parseFloat(a[columnNumber].replace(/[,.]/g, '')) - parseFloat(b[columnNumber].replace(/[,.]/g, '')); } else if (columnClass=="date") { da=new Date(a[columnNumber]); db=new Date(b[columnNumber]); @@ -299,7 +299,7 @@ } } else { if (columnClass=="number") { - return parseFloat(e[columnNumber].replace(/[,.]/g, '')) - parseFloat(t[columnNumber].replace(/[,.]/g, '') + return parseFloat(b[columnNumber].replace(/[,.]/g, '')) - parseFloat(a[columnNumber].replace(/[,.]/g, '')); } else if (columnClass=="date") { da=new Date(a[columnNumber]); db=new Date(b[columnNumber]); @@ -341,15 +341,13 @@ if (ds[i].className=="number") ds[i].onkeypress=rTN; if (ds[i].className=="integer") ds[i].onkeypress=rTI; if (ds[i].className=="number"){ - - ds[i].origonchange=ds[i].onchange; - ds[i].newonchange=rLocaleNumber; - ds[i].onchange=function(){ - if(this.origonchange) - this.origonchange(); - this.newonchange(); - }; - + ds[i].origonchange=ds[i].onchange; + ds[i].newonchange=rLocaleNumber; + ds[i].onchange=function(){ + if(this.origonchange) + this.origonchange(); + this.newonchange(); + }; } } var ds=document.getElementsByTagName("th"); @@ -357,4 +355,4 @@ if (ds[i].className=="ascending") ds[i].onclick=SortSelect; } } -window.onload=initial; +window.onload=initial; \ No newline at end of file |
From: <te...@us...> - 2014-11-14 09:10:25
|
Revision: 6979 http://sourceforge.net/p/web-erp/reponame/6979 Author: tehonu Date: 2014-11-14 09:10:13 +0000 (Fri, 14 Nov 2014) Log Message: ----------- Fixed bug that set StartDate = 0000-00-00 when WorkOrderEntry.php script was called from MRPPlannedWorkOrders.php Modified Paths: -------------- trunk/MRPPlannedWorkOrders.php trunk/WorkOrderEntry.php Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2014-11-14 02:57:33 UTC (rev 6978) +++ trunk/MRPPlannedWorkOrders.php 2014-11-14 09:10:13 UTC (rev 6979) @@ -280,7 +280,7 @@ $k++; } - echo '<td><a href="' . $RootPath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '">' . _('Convert') . '</a></td> + echo '<td><a href="' . $RootPath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '&StartDate=' . $myrow['mrpdate'] . '">' . _('Convert') . '</a></td> <td>' . '<a href="' . $RootPath . '/SelectProduct.php?StockID=' . $myrow['part'] . '">' . $myrow['part'] . '</a>' . '<input type="hidden" name="' . $j . '_part" value="' . $myrow['part']. '" /></td> <td>' . $myrow['description'] . '</td> <td>' . ConvertSQLDate($myrow['mrpdate']) . '</td> Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2014-11-14 02:57:33 UTC (rev 6978) +++ trunk/WorkOrderEntry.php 2014-11-14 09:10:13 UTC (rev 6979) @@ -26,7 +26,7 @@ } if (isset($_GET['StartDate'])){ - $StartDate = ConvertSQLDate($_GET['StartDate']); + $StartDate = $_GET['StartDate']; } else { $StartDate=Date($_SESSION['DefaultDateFormat']); } |
From: <te...@us...> - 2014-11-18 02:23:27
|
Revision: 6992 http://sourceforge.net/p/web-erp/reponame/6992 Author: tehonu Date: 2014-11-18 02:23:21 +0000 (Tue, 18 Nov 2014) Log Message: ----------- Added script UserLocations.php. Does the same thing as LocationUsers.php but the other way around. Selecting an user, can maintain the locations she is authorized to. Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.11-4.12.sql Added Paths: ----------- trunk/UserLocations.php Added: trunk/UserLocations.php =================================================================== --- trunk/UserLocations.php (rev 0) +++ trunk/UserLocations.php 2014-11-18 02:23:21 UTC (rev 6992) @@ -0,0 +1,264 @@ +<?php +/* $Id: LocationUsers.php 6806 2013-09-28 05:10:46Z daintree $*/ + +include('includes/session.inc'); +$Title = _('User Authorised Inventory Locations Maintenance'); +$ViewTopic = 'Inventory';// Filename in ManualContents.php's TOC. +$BookMark = 'LocationUsers';// Anchor's id in the manual's html document. +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('User Authorised Locations') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_POST['SelectedLocation'])) { + $SelectedLocation = mb_strtoupper($_POST['SelectedLocation']); +} elseif (isset($_GET['SelectedLocation'])) { + $SelectedLocation = mb_strtoupper($_GET['SelectedLocation']); +} else { + $SelectedLocation = ''; +} + +if (isset($_POST['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_POST['SelectedUser']); +} elseif (isset($_GET['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_GET['SelectedUser']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedUser); + unset($SelectedLocation); +} + +if (isset($_POST['Process'])) { + if ($_POST['SelectedUser'] == '') { + prnMsg(_('You have not selected any User'), 'error'); + echo '<br />'; + unset($SelectedUser); + unset($_POST['SelectedUser']); + } +} + +if (isset($_POST['submit'])) { + + $InputError = 0; + + if ($_POST['SelectedLocation'] == '') { + $InputError = 1; + prnMsg(_('You have not selected an inventory location to be authorised for this user'), 'error'); + echo '<br />'; + unset($SelectedUser); + } + + if ($InputError != 1) { + + // First check the user is not being duplicated + + $CheckSql = "SELECT count(*) + FROM locationusers + WHERE loccode= '" . $_POST['SelectedLocation'] . "' + AND userid = '" . $_POST['SelectedUser'] . "'"; + + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $InputError = 1; + prnMsg(_('The location') . ' ' . $_POST['SelectedLocation'] . ' ' . _('is already authorised for this user'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO locationusers (loccode, + userid, + canview, + canupd) + VALUES ('" . $_POST['SelectedLocation'] . "', + '" . $_POST['SelectedUser'] . "', + '1', + '1')"; + + $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedLocation'] . ' ' . _('location has been changed'); + $Result = DB_query($SQL); + prnMsg($msg, 'success'); + unset($_POST['SelectedLocation']); + } + } +} elseif (isset($_GET['delete'])) { + $SQL = "DELETE FROM locationusers + WHERE loccode='" . $SelectedLocation . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The Location user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedLocation . ' ' . _('location removed'), 'success'); + unset($_GET['delete']); +} elseif (isset($_GET['ToggleUpdate'])) { + $SQL = "UPDATE locationusers + SET canupd='" . $_GET['ToggleUpdate'] . "' + WHERE loccode='" . $SelectedLocation . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The Location user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to update') . ' ' . $SelectedLocation . ' ' . _('location removed'), 'success'); + unset($_GET['ToggleUpdate']); +} + +if (!isset($SelectedUser)) { + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedLocation will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Select User') . ':</td> + <td><select name="SelectedUser">'; + + $Result = DB_query("SELECT userid, + realname + FROM www_users + ORDER BY userid"); + + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($MyRow = DB_fetch_array($Result)) { + if (isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; + + echo '</form>'; + +} + +//end of ifs and buts! +if (isset($_POST['process']) or isset($SelectedUser)) { + $SQLName = "SELECT realname + FROM www_users + WHERE userid='" . $SelectedUser . "'"; + $Result = DB_query($SQLName); + $MyRow = DB_fetch_array($Result); + $SelectedUserName = $MyRow['realname']; + + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised inventory locations for') . ' ' . $SelectedUserName . '</a></div> + <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; + + $SQL = "SELECT locationusers.loccode, + canview, + canupd, + locations.locationname + FROM locationusers INNER JOIN locations + ON locationusers.loccode=locations.loccode + WHERE locationusers.userid='" . $SelectedUser . "' + ORDER BY locations.locationname ASC"; + + $Result = DB_query($SQL); + + echo '<table class="selection">'; + echo '<tr> + <th colspan="6"><h3>' . _('Authorised Inventory Locations for User') . ': ' . $SelectedUserName . '</h3></th> + </tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('View') . '</th> + <th>' . _('Update') . '</th> + </tr>'; + + $k = 0; //row colour counter + + while ($MyRow = DB_fetch_array($Result)) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + + if ($MyRow['canupd'] == 1) { + $ToggleText = '<td><a href="%s?SelectedLocation=%s&ToggleUpdate=0&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to remove Update for this location?') . '\');">' . _('Remove Update') . '</a></td>'; + } else { + $ToggleText = '<td><a href="%s?SelectedLocation=%s&ToggleUpdate=1&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to add Update for this location?') . '\');">' . _('Add Update') . '</a></td>'; + } + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td>' . + $ToggleText . ' + <td><a href="%s?SelectedLocation=%s&delete=yes&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this location?') . '\');">' . _('Un-authorise') . '</a></td> + </tr>', + $MyRow['loccode'], + $MyRow['locationname'], + $MyRow['canview'], + $MyRow['canupd'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['loccode'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['loccode']); + } + //END WHILE LIST LOOP + echo '</table>'; + + if (!isset($_GET['delete'])) { + + + echo '<table class="selection">'; //Main table + + echo '<tr> + <td>' . _('Select Location') . ':</td> + <td><select name="SelectedLocation">'; + + $Result = DB_query("SELECT loccode, + locationname + FROM locations + WHERE NOT EXISTS (SELECT locationusers.loccode + FROM locationusers + WHERE locationusers.userid='" . $SelectedUser . "' + AND locationusers.loccode=locations.loccode) + ORDER BY locationname"); + + if (!isset($_POST['SelectedLocation'])) { + echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + } + while ($MyRow = DB_fetch_array($Result)) { + if (isset($_POST['SelectedLocation']) and $MyRow['loccode'] == $_POST['SelectedLocation']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['loccode'] . '">' . $MyRow['locationname'] . '</option>'; + + } //end while loop + + echo '</select> + </td> + </tr> + </table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </form>'; + + } // end if user wish to delete +} + +include('includes/footer.inc'); +?> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2014-11-17 06:45:51 UTC (rev 6991) +++ trunk/includes/MainMenuLinksArray.php 2014-11-18 02:23:21 UTC (rev 6992) @@ -507,6 +507,7 @@ $MenuItems['system']['Maintenance']['Caption'] = array( _('Inventory Categories Maintenance'), _('Inventory Locations Maintenance'), _('Inventory Location Authorised Users Maintenance'), + _('User Authorised Inventory Locations Maintenance'), _('Discount Category Maintenance'), _('Units of Measure'), _('MRP Available Production Days'), @@ -518,6 +519,7 @@ $MenuItems['system']['Maintenance']['URL'] = array( '/StockCategories.php', '/Locations.php', '/LocationUsers.php', + '/UserLocations.php', '/DiscountCategories.php', '/UnitsOfMeasure.php', '/MRPCalendar.php', Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-17 06:45:51 UTC (rev 6991) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-18 02:23:21 UTC (rev 6992) @@ -1,6 +1,6 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); ALTER TABLE `www_users` ADD `dashboard` TINYINT NOT NULL DEFAULT '0'; -UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; +INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); - +UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; \ No newline at end of file |
From: <dai...@us...> - 2014-11-22 02:28:59
|
Revision: 6998 http://sourceforge.net/p/web-erp/reponame/6998 Author: daintree Date: 2014-11-22 02:28:56 +0000 (Sat, 22 Nov 2014) Log Message: ----------- Couple of new scripts/fixes Modified Paths: -------------- trunk/SalesTypes.php trunk/Z_DeleteOldPrices.php trunk/doc/Change.log trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.11-4.12.sql Added Paths: ----------- trunk/CustomerBalancesMovement.php trunk/Z_AutoCustomerAllocations.php trunk/Z_RebuildSalesAnalysis.php trunk/Z_UpdateItemCosts.php Added: trunk/CustomerBalancesMovement.php =================================================================== --- trunk/CustomerBalancesMovement.php (rev 0) +++ trunk/CustomerBalancesMovement.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -0,0 +1,179 @@ +<?php +/* $Id: Z_CustomerBalancesMovements.php 6941 2014-10-26 23:18:08Z daintree $*/ +$PageSecurity = 1; +include('includes/session.inc'); +$Title=_('Customer Balances Movements'); +include('includes/header.inc'); + +echo '<p class="page_title_text"> + <img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Customer Balances Movements') . '" alt="" />' . ' ' . _('Customer Balances Movements') . ' + </p>'; + +if (!isset($_POST['RunReport'])){ + + $SalesAreasResult = DB_query("SELECT areacode, areadescription FROM areas"); + $CustomersResult = DB_query("SELECT debtorno, name FROM debtorsmaster ORDER BY name"); + + echo '<form id="Form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + + <table cellpadding="2" class="selection"> + <tr> + <td>' . _('Customer') . '</td> + <td><select name="Customer"> + <option selected="selected" value="">' . _('All') . '</option>'; + while ($CustomerRow = DB_fetch_array($CustomersResult)) { + echo '<option value="' . $CustomerRow['debtorno'] . '">' . $CustomerRow['name'] . '</option>'; + } + echo '</select> + </td> + </tr> + <tr> + <td>' . _('Sales Area') . '</td> + <td><select name="SalesArea"> + <option selected="selected" value="">' . _('All') . '</option>'; + while ($AreaRow = DB_fetch_array($SalesAreasResult)) { + echo '<option value="' . $AreaRow['areacode'] . '">' . $AreaRow['areadescription'] . '</option>'; + } + echo '</select> + </td> + </tr> + <tr> + <td>' . _('Date From') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="11" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0, 0, 0, Date('m') - $_SESSION['NumberOfMonthMustBeShown'], Date('d'), Date('Y'))) . '" /></td> + </tr> + <tr> + <td>' . _('Date To') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="11" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + + </table> + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="RunReport" value="' . _('Show Customer Balance Movements') . '" /> + </div> + </div> + </form> + <br />'; + include('includes/footer.inc'); + exit; +} + +if ($_POST['Customer']!='') { + $WhereClause = "debtorsmaster.debtorno='" . $_POST['Customer'] . "'"; +} elseif ($_POST['SalesArea']!='') { + $WhereClause = "custbranch.area='" . $_POST['SalesArea'] . "'"; +} else { + $WhereClause =''; +} + +$sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, + debtorsmaster.debtorno, + debtorsmaster.name, + decimalplaces AS currdecimalplaces, + SUM((ovamount+ovgst+ovdiscount+ovfreight-alloc)/debtortrans.rate) AS localbalance + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN custbranch + ON debtorsmaster.debtorno=custbranch.debtorno"; + +if (mb_strlen($WhereClause)>0){ + $sql .= " WHERE " . $WhereClause . " "; +} +$sql .= " GROUP BY debtorsmaster.debtorno"; + +$result = DB_query($sql); + +$LocalTotal =0; + +echo '<table> + <tr> + <th class="ascending">' . _('Customer') . ' </th> + <th class="ascending">' . _('Opening Balance') . '</th> + <th class="ascending">' . _('Debits') . '</th> + <th class="ascending">' . _('Credits') . '</th> + <th class="ascending">' . _('Balance') . '</th> + </tr>'; + + +$OpeningBalances =0; +$Debits =0; +$Credits =0; +$ClosingBalances =0; + +while ($myrow=DB_fetch_array($result)){ + +/*Get the sum of all transactions after the ending date - + * we need to take off the sum of all movements after the ending date from the current balance calculated above + * to get the balance as at the end of the period + */ + $sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight) AS currencytotalpost, + debtorsmaster.debtorno, + SUM((ovamount+ovgst+ovdiscount+ovfreight)/debtortrans.rate) AS localtotalpost + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + WHERE trandate > '" . FormatDateForSQL($_POST['ToDate']) . "' + AND debtorsmaster.debtorno = '" . $myrow['debtorno'] . "' + GROUP BY debtorsmaster.debtorno"; + + $TransPostResult = DB_query($sql); + $TransPostRow = DB_fetch_array($TransPostResult); +/* Now we need to get the debits and credits during the period under review + */ + $sql = "SELECT SUM(CASE WHEN debtortrans.type=10 THEN ovamount+ovgst+ovdiscount+ovfreight ELSE 0 END) AS currencydebits, + SUM(CASE WHEN debtortrans.type<>10 THEN ovamount+ovgst+ovdiscount+ovfreight ELSE 0 END) AS currencycredits, + debtorsmaster.debtorno, + SUM(CASE WHEN debtortrans.type=10 THEN (ovamount+ovgst+ovdiscount+ovfreight-alloc)/debtortrans.rate ELSE 0 END) AS localdebits, + SUM(CASE WHEN debtortrans.type<>10 THEN (ovamount+ovgst+ovdiscount+ovfreight-alloc)/debtortrans.rate ELSE 0 END) AS localcredits + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + WHERE trandate>='" . FormatDateForSQL($_POST['FromDate']) . "' AND trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "' + AND debtorsmaster.debtorno = '" . $myrow['debtorno'] . "' + GROUP BY debtorsmaster.debtorno"; + + $TransResult = DB_query($sql); + $TransRow = DB_fetch_array($TransResult); + + $OpeningBal = $myrow['localbalance']-$TransPostRow['localtotalpost']-$TransRow['localdebits']+$TransRow['localcredits']; + $ClosingBal = $myrow['localbalance']-$TransPostRow['localtotalpost']; + + echo '<tr> + <td>' . $myrow['name'] . ' </td> + <td class="number">' . locale_number_format($OpeningBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($TransRow['localdebits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($TransRow['localcredits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($ClosingBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr>'; + $OpeningBalances += $OpeningBal; + $Debits += $TransRow['localdebits']; + $Credits += $TransRow['localcredits']; + $ClosingBalances += $ClosingBal; +} + +echo '</table>'; + +if ($_POST['Customer']==''){ //if there could be several customers being reported + echo '<table> + <tr> + <th></th> + <th>' . _('Opening Balance') . '</th> + <th>' . _('Debits') . '</th> + <th>' . _('Credits') . '</th> + <th>' . _('Balance') . '</th> + </tr> + <tr> + <td>' . _('TOTALS') . '</td> + <td class="number">' . locale_number_format($OpeningBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($Debits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($Credits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($ClosingBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + </table>'; +} + +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2014-11-20 12:37:23 UTC (rev 6997) +++ trunk/SalesTypes.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -184,10 +184,10 @@ $sql = "SELECT typeabbrev,sales_type FROM salestypes ORDER BY typeabbrev"; $result = DB_query($sql); - echo '<table class="selection">'; - echo '<tr> - <th class="ascending">' . _('Type Code') . '</th> - <th class="ascending">' . _('Type Name') . '</th> + echo '<table class="selection"> + <tr> + <th class="ascending">' . _('Type Code') . '</th> + <th class="ascending">' . _('Type Name') . '</th> </tr>'; $k=0; //row colour counter @@ -218,19 +218,21 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Show All Sales Types Defined') . '</a></div>'; + echo '<br /> + <div class="centre"> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Show All Sales Types Defined') . '</a> + </div>'; } if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" >'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" > + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br />'; // The user wish to EDIT an existing type - if ( isset($SelectedType) AND $SelectedType!='' ) - { + if ( isset($SelectedType) AND $SelectedType!='' ) { $sql = "SELECT typeabbrev, sales_type @@ -243,40 +245,45 @@ $_POST['TypeAbbrev'] = $myrow['typeabbrev']; $_POST['Sales_Type'] = $myrow['sales_type']; - echo '<input type="hidden" name="SelectedType" value="' . $SelectedType . '" />'; - echo '<input type="hidden" name="TypeAbbrev" value="' . $_POST['TypeAbbrev'] . '" />'; - echo '<table class="selection">'; - echo '<tr><th colspan="4"><b>' . _('Sales Type/Price List Setup') . '</b></th></tr>'; - echo '<tr><td>' . _('Type Code') . ':</td><td>'; + echo '<input type="hidden" name="SelectedType" value="' . $SelectedType . '" /> + <input type="hidden" name="TypeAbbrev" value="' . $_POST['TypeAbbrev'] . '" /> + <table class="selection"> + <tr> + <th colspan="4"><b>' . _('Sales Type/Price List Setup') . '</b></th> + </tr> + <tr> + <td>' . _('Type Code') . ':</td> + <td>' . $_POST['TypeAbbrev'] . '</td> + </tr>'; - // We dont allow the user to change an existing type code - - echo $_POST['TypeAbbrev'] . '</td></tr>'; - } else { // This is a new type so the user may volunteer a type code - echo '<table class="selection">'; - echo '<tr><th colspan="4"><b>' . _('Sales Type/Price List Setup') . '</b></th></tr>'; - echo '<tr><td>' . _('Type Code') . ':</td> - <td><input type="text" ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size="3" maxlength="2" name="TypeAbbrev" /></td></tr>'; + echo '<table class="selection"> + <tr> + <th colspan="4"><b>' . _('Sales Type/Price List Setup') . '</b></th> + </tr> + <tr> + <td>' . _('Type Code') . ':</td> + <td><input type="text" ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size="3" maxlength="2" name="TypeAbbrev" /></td> + </tr>'; } if (!isset($_POST['Sales_Type'])) { $_POST['Sales_Type']=''; } - echo '<tr><td>' . _('Sales Type Name') . ':</td> - <td><input type="text" name="Sales_Type" value="' . $_POST['Sales_Type'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Sales Type Name') . ':</td> + <td><input type="text" name="Sales_Type" value="' . $_POST['Sales_Type'] . '" /></td> + </tr> + </table>'; // close main table - echo '</table>'; // close main table - - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - - echo '</div> + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div> + </div> </form>'; } // end if user wish to delete include('includes/footer.inc'); -?> +?> \ No newline at end of file Added: trunk/Z_AutoCustomerAllocations.php =================================================================== --- trunk/Z_AutoCustomerAllocations.php (rev 0) +++ trunk/Z_AutoCustomerAllocations.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -0,0 +1,251 @@ +<?php + +/* $Id: CustomerAllocations.php 6596 2014-03-03 02:32:31Z exsonqu $*/ + +/* +Call this page with: + 1. A DebtorNo to show all outstanding receipts or credits yet to be allocated. +*/ + +include('includes/DefineCustAllocsClass.php'); +include('includes/session.inc'); +$Title = _('Automatic Customer Receipt') . '/' . _('Credit Note Allocations'); + +$ViewTopic= 'ARTransactions'; +$BookMark = 'CustomerAllocations'; + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_GET['DebtorNo'])) { + // Page called with customer code + + $SQL = "SELECT debtortrans.id, + debtortrans.transno, + systypes.typename, + debtortrans.type, + debtortrans.debtorno, + debtorsmaster.name, + debtortrans.trandate, + debtortrans.reference, + debtortrans.rate, + debtortrans.ovamount+debtortrans.ovgst+debtortrans.ovdiscount+debtortrans.ovfreight as total, + debtortrans.alloc, + currencies.decimalplaces AS currdecimalplaces, + debtorsmaster.currcode + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN systypes + ON debtortrans.type=systypes.typeid + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.debtorno='" . $_GET['DebtorNo'] . "' + AND ( (debtortrans.type=12 AND debtortrans.ovamount<0) OR debtortrans.type=11) + AND debtortrans.settled=0 + ORDER BY debtortrans.id"; + + $result = DB_query($SQL); + + if (DB_num_rows($result)==0) { + prnMsg(_('No outstanding receipts or credits to be allocated for this customer'),'info'); + include('includes/footer.inc'); + exit; + } + echo '<table class="selection">'; + echo $TableHeader; + + while ($myrow = DB_fetch_array($result)) { + unset($_SESSION['Alloc']->Allocs); + unset($_SESSION['Alloc']); + $_SESSION['Alloc'] = new Allocation; + $_SESSION['Alloc']->AllocTrans = $myrow['id']; + $_SESSION['Alloc']->DebtorNo = $myrow['debtorno']; + $_SESSION['Alloc']->CustomerName = $myrow['name']; + $_SESSION['Alloc']->TransType = $myrow['type']; + $_SESSION['Alloc']->TransTypeName = $myrow['typename']; + $_SESSION['Alloc']->TransNo = $myrow['transno']; + $_SESSION['Alloc']->TransExRate = $myrow['rate']; + $_SESSION['Alloc']->TransAmt = $myrow['total']; + $_SESSION['Alloc']->PrevDiffOnExch = $myrow['diffonexch']; + $_SESSION['Alloc']->TransDate = ConvertSQLDate($myrow['trandate']); + $_SESSION['Alloc']->CurrDecimalPlaces = $myrow['decimalplaces']; + + // Now get invoices or neg receipts that have outstanding balances + $SQL = "SELECT debtortrans.id, + typename, + transno, + trandate, + rate, + ovamount+ovgst+ovfreight+ovdiscount as total, + diffonexch, + alloc + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + WHERE debtortrans.settled=0 + AND (systypes.typeid=10 OR (systypes.typeid=12 AND ovamount>0) + AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' + ORDER BY debtortransid DESC"; + $TransResult = DB_query($SQL); + $BalToAllocate = $_SESSION['Alloc']->TransAmt - $myrow['alloc']; + while ($myalloc=DB_fetch_array($TransResult) AND $BalToAllocate > 0) { + if ($myalloc['total']-$myalloc['alloc']< $BalToAllocate) { + $ThisAllocation = $myalloc['total']-$myalloc['alloc']; + } else { + $ThisAllocation = $BalToAllocate; + } + $_SESSION['Alloc']->add_to_AllocsAllocn ($myalloc['id'], + $myalloc['typename'], + $myalloc['transno'], + ConvertSQLDate($myalloc['trandate']), + $ThisAllocation, + $myalloc['total'], + $myalloc['rate'], + $myalloc['diffonexch'], + $myalloc['diffonexch'], + $myalloc['alloc'], + 'NA'); + $BalToAllocate -= $ThisAllocation; + } + DB_free_result($TransResult); + ProcessAllocation(); + } + echo '</table>'; +} + +include('includes/footer.inc'); + +function ProcessAllocation() { + global $db; + if ($InputError==0) { + // + //========[ START TRANSACTION ]=========== + // + $Error = ''; + $Result= DB_Txn_Begin(); + $AllAllocations = 0; + foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) { + + if ($AllocnItem->AllocAmt > 0) { + $SQL = "INSERT INTO + custallocns ( + datealloc, + amt, + transid_allocfrom, + transid_allocto + ) VALUES ( + '" . date('Y-m-d') . "', + '" . $AllocnItem->AllocAmt . "', + '" . $_SESSION['Alloc']->AllocTrans . "', + '" . $AllocnItem->ID . "' + )"; + if( !$Result = DB_query($SQL) ) { + $Error = _('Could not insert allocation record'); + } + } + $NewAllocTotal = $AllocnItem->PrevAlloc + $AllocnItem->AllocAmt; + $AllAllocations = $AllAllocations + $AllocnItem->AllocAmt; + $Settled = (abs($NewAllocTotal-$AllocnItem->TransAmount) < 0.005) ? 1 : 0; + + $SQL = "UPDATE debtortrans + SET diffonexch='" . $AllocnItem->DiffOnExch . "', + alloc = '" . $NewAllocTotal . "', + settled = '" . $Settled . "' + WHERE id = '" . $AllocnItem->ID."'"; + if( !$Result = DB_query($SQL) ) { + $Error = _('Could not update difference on exchange'); + } + } + if (abs($TotalAllocated + $_SESSION['Alloc']->TransAmt) < 0.01) { + $Settled = 1; + } else { + $Settled = 0; + } + // Update the receipt or credit note + $SQL = "UPDATE debtortrans + SET alloc = '" . -$AllAllocations . "', + diffonexch = '" . -$TotalDiffOnExch . "', + settled='" . $Settled . "' + WHERE id = '" . $_SESSION['Alloc']->AllocTrans . "'"; + + if( !$Result = DB_query($SQL) ) { + $Error = _('Could not update receipt or credit note'); + } + + // If GLLink to debtors active post diff on exchange to GL + $MovtInDiffOnExch = -$_SESSION['Alloc']->PrevDiffOnExch - $TotalDiffOnExch; + + if ($MovtInDiffOnExch !=0) { + if ($_SESSION['CompanyRecord']['gllink_debtors'] == 1) { + $PeriodNo = GetPeriod($_SESSION['Alloc']->TransDate,); + $_SESSION['Alloc']->TransDate = FormatDateForSQL($_SESSION['Alloc']->TransDate); + + $SQL = "INSERT INTO gltrans ( + type, + typeno, + trandate, + periodno, + account, + narrative, + amount + ) VALUES ( + '" . $_SESSION['Alloc']->TransType . "', + '" . $_SESSION['Alloc']->TransNo . "', + '" . $_SESSION['Alloc']->TransDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['exchangediffact'] . "', + '', + '" . $MovtInDiffOnExch . "' + )"; + if( !$Result = DB_query($SQL) ) { + $Error = _('Could not update exchange difference in General Ledger'); + } + + $SQL = "INSERT INTO gltrans ( + type, + typeno, + trandate, + periodno, + account, + narrative, + amount + ) VALUES ('" . $_SESSION['Alloc']->TransType . "', + '" . $_SESSION['Alloc']->TransNo . "', + '" . $_SESSION['Alloc']->TransDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '', + '" . -$MovtInDiffOnExch . "')"; + + if( !$Result = DB_query($SQL) ) { + $Error = _('Could not update debtors control in General Ledger'); + } + } + + } + + // + //========[ COMMIT TRANSACTION ]=========== + // + if (empty($Error) ) { + $Result = DB_Txn_Commit(); + } else { + $Result = DB_Txn_Rollback(); + prnMsg($Error,'error'); + } + unset($_SESSION['Alloc']); + unset($_POST['AllocTrans']); + } +} + +?> +ocTrans']); + } +} + +?> + +} + +?> + +?> Property changes on: trunk/Z_AutoCustomerAllocations.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: trunk/Z_DeleteOldPrices.php =================================================================== --- trunk/Z_DeleteOldPrices.php 2014-11-20 12:37:23 UTC (rev 6997) +++ trunk/Z_DeleteOldPrices.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -6,18 +6,42 @@ include('includes/header.inc'); if (isset($_POST['DeleteOldPrices'])){ - $result=DB_query("DELETE FROM prices WHERE enddate<'" . Date('Y-m-d') . "' AND enddate <>'0000-00-00'"); + DB_Txn_Begin(); + $result=DB_query("DELETE FROM prices WHERE enddate<'" . Date('Y-m-d') . "' AND enddate <>'0000-00-00'",'','',true); + $result=DB_query("SELECT stockid, + typeabbrev, + currabrev, + debtorno, + branchcode, + MAX(startdate) as lateststart + FROM prices + WHERE startdate<='" . Date('Y-m-d') . "' + AND enddate ='0000-00-00' + GROUP BY stockid, + typeabbrev, + currabrev, + debtorno, + branchcode"); + + while ($myrow = DB_fetch_array($result)){ + $DelResult = DB_query("DELETE FROM prices WHERE stockid='" . $myrow['stockid'] . "' + AND debtorno='" . $myrow['debtorno'] . "' + AND branchcode='" . $myrow['branchcode'] . "' + AND currabrev='" . $myrow['currabrev'] . "' + AND typeabbrev='" . $myrow['typeabbrev'] . "' + AND enddate='0000-00-00' + AND startdate<'" . $myrow['lateststart'] . "'",'','',true); + } prnMsg(_('All old prices have been deleted'),'success'); + DB_Txn_Commit(); } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; -echo '<div class="centre">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -echo '<br /> - <input type="submit" name="DeleteOldPrices" value="' . _('Purge Old Prices') . '" onclick="return confirm(\'' . _('Are You Sure you wish to delete all old prices?') . '\');" />'; - -echo '</div> +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div class="centre"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br /> + <input type="submit" name="DeleteOldPrices" value="' . _('Purge Old Prices') . '" onclick="return confirm(\'' . _('Are You Sure you wish to delete all old prices?') . '\');" /> + </div> </form>'; include('includes/footer.inc'); Added: trunk/Z_RebuildSalesAnalysis.php =================================================================== --- trunk/Z_RebuildSalesAnalysis.php (rev 0) +++ trunk/Z_RebuildSalesAnalysis.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -0,0 +1,69 @@ +<?php +/* $Id: Z_RebuildSalesAnalysis.php 5784 2012-12-29 04:00:43Z daintree $*/ +/* Script to rebuild sales analysis records from stock movements*/ +$PageSecurity = 15; +include ('includes/session.inc'); +$Title = _('Rebuild sales analysis Records'); +include('includes/header.inc'); + +echo '<br /><br />' . _('This script rebuilds sales analysis records. NB: all sales budget figures will be lost!'); + +$result = DB_query("TRUNCATE TABLE salesanalysis"); + +$sql = "INSERT INTO salesanalysis (typeabbrev, + periodno, + amt, + cost, + cust, + custbranch, + qty, + disc, + stockid, + area, + budgetoractual, + salesperson, + stkcategory) + SELECT salestype, + (SELECT periodno FROM periods WHERE MONTH(lastdate_in_period)=MONTH(trandate) AND YEAR(lastdate_in_period)=YEAR(trandate)) as prd, + SUM(price*-qty) as salesvalue, + SUM(standardcost*-qty) as cost, + stockmoves.debtorno, + stockmoves.branchcode, + SUM(-qty), + SUM(-qty*price*discountpercent) AS discountvalue, + stockmoves.stockid, + custbranch.area, + 1, + custbranch.salesman, + stockmaster.categoryid + FROM stockmoves + INNER JOIN debtorsmaster + ON stockmoves.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON stockmoves.debtorno=custbranch.debtorno + AND stockmoves.branchcode=custbranch.branchcode + INNER JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + WHERE show_on_inv_crds=1 + GROUP BY salestype, + debtorno, + prd, + branchcode, + stockid, + area, + salesman, + categoryid + ORDER BY prd"; + +$ErrMsg = _('The sales analysis data could not be recreated because'); +$Result = DB_query($sql,$ErrMsg); + +echo '<p />'; +prnMsg(_('The sales analsysis data has been recreated based on current stock master and customer master information'),'info'); + +include('includes/footer.inc'); +?> + +?> +?> + Property changes on: trunk/Z_RebuildSalesAnalysis.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: trunk/Z_UpdateItemCosts.php =================================================================== --- trunk/Z_UpdateItemCosts.php (rev 0) +++ trunk/Z_UpdateItemCosts.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -0,0 +1,124 @@ +<?php +include('includes/session.inc'); +$Title = _('Update Item Costs From CSV'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); +echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/maintenance.png" title="' . + _('Update Item Costs from CSV file') . '" />' . ' ' . + _('Update Item Costs from CSV file') . '</p>'; + +$FieldHeadings = array('StockID', + 'Material Cost', + 'Labour Cost', + 'Overhead Cost'); + +if (isset($_FILES['CostUpdateFile']) and $_FILES['CostUpdateFile']['name']) { //start file processing + //check file info + $FileName = $_FILES['CostUpdateFile']['name']; + $TempName = $_FILES['CostUpdateFile']['tmp_name']; + $FileSize = $_FILES['CostUpdateFile']['size']; + $InputError = 0; + + //get file handle + $FileHandle = fopen($TempName, 'r'); + + //get the header row + $HeadRow = fgetcsv($FileHandle, 10000, ','); + + //check for correct number of fields + if ( count($HeadRow) != count($FieldHeadings) ) { + prnMsg (_('File contains') . ' '. count($HeadRow). ' ' . _('columns, expected') . ' '. count($FieldHeadings) ,'error'); + fclose($FileHandle); + include('includes/footer.inc'); + exit; + } + + //test header row field name and sequence + $HeadingColumnNumber = 0; + foreach ($HeadRow as $HeadField) { + if ( trim(mb_strtoupper($HeadField)) != trim(mb_strtoupper($FieldHeadings[$HeadingColumnNumber]))) { + prnMsg (_('The file to import the item cost updates from contains incorrect column headings') . ' '. mb_strtoupper($HeadField). ' != '. mb_strtoupper($FieldHeadings[$HeadingColumnNumber]). '<br />' . _('The column headings must be') . ' StockID, Material Cost, Labour Cost, Overhead Cost','error'); + fclose($FileHandle); + include('includes/footer.inc'); + exit; + } + $HeadingColumnNumber++; + } + //start database transaction + DB_Txn_Begin(); + + //loop through file rows + $LineNumber = 1; + while ( ($myrow = fgetcsv($FileHandle, 10000, ',')) !== FALSE ) { + + $StockID = mb_strtoupper($myrow[0]); + + $NewCost = (double)$myrow[1]+(double)$myrow[2]+(double)$myrow[3]; + + $sql = "SELECT mbflag, + materialcost, + labourcost, + overheadcost, + sum(quantity) as totalqoh + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid=locstock.stockid + WHERE stockmaster.stockid='" . $StockID . "' + GROUP BY materialcost, + labourcost, + overheadcost"; + + $ErrMsg = _('The selected item code does not exist'); + $OldResult = DB_query($sql,$ErrMsg); + $OldRow = DB_fetch_array($OldResult); + $QOH = $OldRow['totalqoh']; + + $OldCost = $OldRow['materialcost'] + $OldRow['labourcost'] + $OldRow['overheadcost']; + //dont update costs for assembly or kit-sets or ghost items!! + if ($OldCost != $NewCost AND $OldRow['mbflag']!='K' AND $OldRow['mbflag']!='A' AND $OldRow['mbflag']!='G'){ + + ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH); + + $SQL = "UPDATE stockmaster SET materialcost='" . (double) $myrow[1] . "', + labourcost='" . (double) $myrow[2] . "', + overheadcost='" . (double) $myrow[3] . "', + lastcost='" . $OldCost . "', + lastcostupdate ='" . Date('Y-m-d')."' + WHERE stockid='" . $StockID . "'"; + + $ErrMsg = _('The cost details for the stock item could not be updated because'); + $DbgMsg = _('The SQL that failed was'); + $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); + + UpdateCost($db, $StockID); //Update any affected BOMs + + } + + $LineNumber++; + } + + DB_Txn_Commit(); + prnMsg( _('Batch Update of costs') .' ' . $FileName . ' '. _('has been completed. All transactions committed to the database.'),'success'); + + fclose($FileHandle); + +} else { //show file upload form + + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" enctype="multipart/form-data">'; + echo '<div class="centre">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div class="page_help_text">' . + _('This function updates the costs of all items from a comma separated variable (csv) file.') . '<br />' . + _('The file must contain two columns, and the first row should be the following headers:') . '<br /><i>StockID, Material Cost, Labour Cost, Overhead Cost</i><br />' . + _('followed by rows containing these four fields for each cost to be updated.') . '<br />' . + _('The StockID field must have a corresponding entry in the stockmaster table.') . '</div>'; + + echo '<br /><input type="hidden" name="MAX_FILE_SIZE" value="1000000" />' ._('Upload file') . ': <input name="CostUpdateFile" type="file" /> + <input type="submit" name="submit" value="' . _('Send File') . '" /> + </div> + </form>'; +} + +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-11-20 12:37:23 UTC (rev 6997) +++ trunk/doc/Change.log 2014-11-22 02:28:56 UTC (rev 6998) @@ -1,12 +1,16 @@ webERP Change Log + +22/11/14 Phil: Z_DeleteOldPrices.php now removes all old prices where there is a later start for a price with no end date +22/11/14 Phil: Added new script CustomerBalancesMovement.php to show customer activity debits and credits and the movement of their balances over a specified date range +22/11/14 Phil: Added new script Z_UpdateItemCosts.php that allows a csv import of items and costs and updates the standard cost based on imported data 20/11/14 Exson: Add GRN numbers to select grns screen in SuppInvGRNs.php. -20/11/14 Exson: Fixed the pop up error when input account no in Payments.php by align the js function with applying it. The fixes are mismatched before. Hope it's the last time. -17/11/14 Thumb: Move EnsureGLBalance() to the right place in ConfirmDispatch_Invoice.php to ensure that the whole transaction are checked instead of only one type of it checked. +20/11/14 Exson: Fixed the pop up error when input account no in Payments.php by align the js function with applying it. The fixes are mismatched before. Hope it's the last time. +17/11/14 Thumb: Move EnsureGLBalance() to the right place in ConfirmDispatch_Invoice.php to ensure that the whole transaction are checked instead of only one type of it checked. 17/11/14 Exson: Fixed InvoiceQuantityDefault parameters failed to save in SystemParameters.php. Reported by Richard. 15/11/14: Exson: Remove qtyrecd in work orders requirements calculation from group by in MRP.php. 15/11/14 Exson: Fixed the NULL bug for no issued materials for WO and make multiple times material issues correctly in MRP.php. 14/11/14 Exson: Fixed the foreign key constrained failure bug in Z_DeleteCreditNote.php. -14/11/14 Exson: Fixed the bug in MRP.php that wo requirement not counting demand for work orders without issuing items. Thanks for Tim's reminder. +14/11/14 Exson: Fixed the bug in MRP.php that wo requirement not counting demand for work orders without issuing items. Thanks for Tim's reminder. 14/11/2014 Tim: The systypes should be 28 instead of 38 for work order issued in MRP.php. 13/11/Exson: Fixed bugs that issued materials not be calculated in demand for work orders and over received are ignored in level netting and negative inventory are not considered in REORDER level management in MRP.php which leads to wrong MRP results. 9/11/14: Tim: fix to javascript function to sort numbers including formatted numbers with commas. Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2014-11-20 12:37:23 UTC (rev 6997) +++ trunk/includes/MainMenuLinksArray.php 2014-11-22 02:28:56 UTC (rev 6998) @@ -110,7 +110,8 @@ _('Customer Listing By Area/Salesperson'), _('Sales Graphs'), _('List Daily Transactions'), - _('Customer Transaction Inquiries') ); + _('Customer Transaction Inquiries'), + _('Customer Activity and Balances')); if ($_SESSION['InvoicePortraitFormat']==0){ $PrintInvoicesOrCreditNotesScript = '/PrintCustTrans.php'; @@ -128,7 +129,8 @@ '/PDFCustomerList.php', '/SalesGraph.php', '/PDFCustTransListing.php', - '/CustomerTransInquiry.php'); + '/CustomerTransInquiry.php', + '/CustomerBalancesMovement.php' ); $MenuItems['AR']['Maintenance']['Caption'] = array( _('Add Customer'), _('Select Customer')); Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-20 12:37:23 UTC (rev 6997) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-11-22 02:28:56 UTC (rev 6998) @@ -1,6 +1,7 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); ALTER TABLE `www_users` ADD `dashboard` TINYINT NOT NULL DEFAULT '0'; - +INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('Z_UpdateItemCosts.php', '15', 'Use CSV of item codes and costs to update webERP item costs'); +INSERT INTO scripts (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); -UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; \ No newline at end of file +UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2014-11-22 02:39:24
|
Revision: 6999 http://sourceforge.net/p/web-erp/reponame/6999 Author: daintree Date: 2014-11-22 02:39:16 +0000 (Sat, 22 Nov 2014) Log Message: ----------- script to export sales analysis automatically to an ftp server intended to be run from cron Modified Paths: -------------- trunk/Z_AutoCustomerAllocations.php Added Paths: ----------- trunk/Z_ExportSalesAnalysis.php Modified: trunk/Z_AutoCustomerAllocations.php =================================================================== --- trunk/Z_AutoCustomerAllocations.php 2014-11-22 02:28:56 UTC (rev 6998) +++ trunk/Z_AutoCustomerAllocations.php 2014-11-22 02:39:16 UTC (rev 6999) @@ -19,7 +19,7 @@ if (isset($_GET['DebtorNo'])) { // Page called with customer code - + $SQL = "SELECT debtortrans.id, debtortrans.transno, systypes.typename, @@ -53,7 +53,7 @@ } echo '<table class="selection">'; echo $TableHeader; - + while ($myrow = DB_fetch_array($result)) { unset($_SESSION['Alloc']->Allocs); unset($_SESSION['Alloc']); @@ -215,7 +215,7 @@ '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '', '" . -$MovtInDiffOnExch . "')"; - + if( !$Result = DB_query($SQL) ) { $Error = _('Could not update debtors control in General Ledger'); } @@ -237,15 +237,4 @@ } } -?> -ocTrans']); - } -} - -?> - -} - -?> - -?> +?> \ No newline at end of file Added: trunk/Z_ExportSalesAnalysis.php =================================================================== --- trunk/Z_ExportSalesAnalysis.php (rev 0) +++ trunk/Z_ExportSalesAnalysis.php 2014-11-22 02:39:16 UTC (rev 6999) @@ -0,0 +1,165 @@ +<?php +/* $Id: Z_ExportSalesAnalysis.php 5785 2012-12-29 04:47:42Z daintree $*/ + +/* Creates the csv files necessary for Phocas sales analysis and sends to an ftp server*/ + +/*Config */ + +$FTP_Server = 'someftpserver.com'; +$FTP_User = 'someuser'; +$FTP_Password = ''; + +$AllowAnyone=true; +$PageSecurity=15; +$_POST['CompanyNameField']= 'yourdatabase'; + +include ('includes/session.inc'); +$Title = _('Create and send sales analysis files'); +include ('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/inventory.png" title="' . _('Export Sales Analysis Files') .'" alt="" /><b>' . $Title. '</b></p>'; + +function stripcomma($str) { //because we're using comma as a delimiter + return str_replace(',', '', $str); +} + +echo '<div class="centre">' . _('Making a comma separated values file of the stock items') . '</div>'; + +$ErrMsg = _('The SQL to get the stock items failed with the message'); + +$sql = "SELECT stockid, categoryid, description FROM stockmaster"; +$result = DB_query($sql, $ErrMsg); + +if (!file_exists($_SESSION['reports_dir'])){ + $Result = mkdir('./' . $_SESSION['reports_dir']); +} + +$ItemsFileName = $_SESSION['reports_dir'] . '/StockItems.csv'; + +unlink($ItemsFileName); + +$fp = fopen($ItemsFileName,'w'); + +if ($fp==FALSE){ + + prnMsg(_('Could not open or create the file under') . ' ' . $ItemsFileName,'error'); + include('includes/footer.inc'); + exit; +} +fputs($fp, '"Item Code", "Category ID", "Item Description"' . "\n"); +While ($myrow = DB_fetch_row($result)){ + $line = stripcomma($myrow[0]) . ', ' . stripcomma($myrow[1]) . ', ' . stripcomma($myrow[2]); + //fputs($fp,"\xEF\xBB\xBF" . $line . "\n"); + fputs($fp, $line . "\n"); +} + +fclose($fp); +//Now the customers + +echo '<div class="centre">' . _('Making a comma separated values file of the customers') . '</div>'; + +$ErrMsg = _('The SQL to get the customers failed with the message'); + +$sql = "SELECT debtorsmaster.debtorno, debtorsmaster.name, custbranch.branchcode, brname, salestype, area, salesman FROM debtorsmaster INNER JOIN custbranch ON debtorsmaster.debtorno=custbranch.debtorno"; +$result = DB_query($sql, $ErrMsg); + +$CustomersFileName = $_SESSION['reports_dir'] . '/Customers.csv'; + +unlink($CustomersFileName); + +$fp = fopen($CustomersFileName,'w'); + +if ($fp==FALSE){ + + prnMsg(_('Could not open or create the file under') . ' ' . $CustomersFileName,'error'); + include('includes/footer.inc'); + exit; +} +fputs($fp, '"Customer Code", "Customer Name", "Branch Code", "Branch Name", "Price List", "Sales Area", "Salesman"' . "\n"); +While ($myrow = DB_fetch_row($result)){ + $line = stripcomma($myrow[0]) . ', ' . stripcomma($myrow[1]). ', ' . stripcomma($myrow[2]) . ', ' . stripcomma($myrow[3]) . ', ' . stripcomma($myrow[4]) . ', ' . stripcomma($myrow[5]) . ', ' . stripcomma($myrow[6]); + //fputs($fp,"\xEF\xBB\xBF" . $line . "\n"); + fputs($fp, $line . "\n"); +} + +fclose($fp); + +//Now the sales analysis invoice & credit note lines + +echo '<div class="centre">' . _('Making a comma separated values file of the sales lines') . '</div>'; + +$ErrMsg = _('The SQL to get the sales data failed with the message'); + +$sql = "SELECT stockmoves.debtorno, + stockmoves.branchcode, + stockid, + trandate, + -qty, + -price*(1-discountpercent)*qty, + -standardcost*qty, + transno + FROM stockmoves + INNER JOIN custbranch + ON stockmoves.debtorno=custbranch.debtorno + AND stockmoves.branchcode=custbranch.branchcode + WHERE (stockmoves.type=10 OR stockmoves.type=11) + AND show_on_inv_crds=1"; + +$result = DB_query($sql, $ErrMsg); + +$SalesFileName = $_SESSION['reports_dir'] . '/SalesAnalysis.csv'; + +unlink($SalesFileName); + +$fp = fopen($SalesFileName,'w'); + +if ($fp==FALSE){ + + prnMsg(_('Could not open or create the file under') . ' ' . $SalesFileName,'error'); + include('includes/footer.inc'); + exit; +} +fputs($fp,'"Customer Code", "Branch Code", "Item Code", "Date", "Quantity", "Line Value", "Line Cost", "Inv/Credit Number"' . "\n"); +While ($myrow = DB_fetch_row($result)){ + $line = stripcomma($myrow[0]) . ', ' . stripcomma($myrow[1]) . ', ' . stripcomma($myrow[2]) . ', ' . stripcomma($myrow[3]) . ', ' . stripcomma($myrow[4]) . ', ' . stripcomma($myrow[5]) . ', ' . stripcomma($myrow[6]) . ', ' . stripcomma($myrow[7]); + //fputs($fp,"\xEF\xBB\xBF" . $line . "\n"); + fputs($fp, $line . "\n"); +} + +fclose($fp); + +// set up basic ftp connection +$conn_id = ftp_connect($FTP_Server); + +// login with username and password +$login_result = ftp_login($conn_id, $FTP_User, $FTP_Password); + +// check connection +if ((!$conn_id) || (!$login_result)) { + echo "FTP connection has failed!"; + echo "Attempted to connect to $FTP_Server with user $FTP_User"; + exit; +} else { + echo "Connected to ftp_server"; +} + +// upload the files +$upload = ftp_put($conn_id, '/' . Date('Y-m-d') .'_Sales.csv', $SalesFileName, FTP_BINARY); +$upload = ftp_put($conn_id, '/' . Date('Y-m-d') .'_Items.csv', $ItemsFileName, FTP_BINARY); +$upload = ftp_put($conn_id, '/' . Date('Y-m-d') .'_Customers.csv', $CustomersFileName, FTP_BINARY); + +// check upload status +if (!$upload) { + echo "FTP upload has failed!"; +} else { + echo "Uploaded $source_file to $ftp_server as $destination_file"; +} + +// close the FTP stream +ftp_close($conn_id); + +include('includes/footer.inc'); + +?>oter.inc'); + +?> \ No newline at end of file Property changes on: trunk/Z_ExportSalesAnalysis.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property |
From: <rc...@us...> - 2014-11-24 15:56:28
|
Revision: 7004 http://sourceforge.net/p/web-erp/reponame/7004 Author: rchacon Date: 2014-11-24 15:56:19 +0000 (Mon, 24 Nov 2014) Log Message: ----------- Spanish translation improvements. Merging "View GL Entries" and "View the GL Entries". Modified Paths: -------------- trunk/CustomerInquiry.php trunk/doc/Change.log Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2014-11-24 02:12:27 UTC (rev 7003) +++ trunk/CustomerInquiry.php 2014-11-24 15:56:19 UTC (rev 7004) @@ -45,7 +45,6 @@ } } - if (isset($_GET['Status'])) { if (is_numeric($_GET['Status'])) { @@ -323,7 +322,7 @@ </td> <td> <a href="', $RootPath, '/GLTransInquiry.php?TypeID=', $MyRow['type'], '&TransNo=', $MyRow['transno'], '">', _('View GL Entries'), ' - <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View the GL Entries'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View GL Entries'), '" alt="" /> </a> </td> </tr>'; @@ -441,7 +440,7 @@ </td> <td> <a href="', $RootPath, '/GLTransInquiry.php?TypeID=', $MyRow['type'], '&TransNo=', $MyRow['transno'], '">' . _('View GL Entries') . ' - <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View the GL Entries'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View GL Entries'), '" alt="" /> </a> </td> </tr>'; @@ -511,7 +510,7 @@ <td></td> <td> <a href="', $RootPath, '/GLTransInquiry.php?TypeID=', $MyRow['type'], '&TransNo=', $MyRow['transno'], '">', _('View GL Entries'), ' - <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View the GL Entries'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View GL Entries'), '" alt="" /> </a> </td> </tr>'; @@ -565,7 +564,7 @@ <td></td> <td> <a href="', $RootPath, '/GLTransInquiry.php?TypeID=', $MyRow['type'], '&TransNo=', $MyRow['transno'], '">' . _('View GL Entries') . ' - <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View the GL Entries'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View GL Entries'), '" alt="" /> </a> </td> </tr>'; @@ -614,7 +613,7 @@ <td></td> <td> <a href="', $RootPath, '/GLTransInquiry.php?TypeID=', $MyRow['type'], '&TransNo=', $MyRow['transno'], '">', _('View GL Entries'), ' - <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View the GL Entries'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="', _('View GL Entries'), '" alt="" /> </a> </td> </tr>'; @@ -648,4 +647,4 @@ echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-11-24 02:12:27 UTC (rev 7003) +++ trunk/doc/Change.log 2014-11-24 15:56:19 UTC (rev 7004) @@ -1,5 +1,6 @@ webERP Change Log +22/11/14 RChacon: Spanish translation improvements. Merging "View GL Entries" and "View the GL Entries". 22/11/14 Exson: Fix the qualitytext does not have default value for strict sql mode in Credit_Invoice.php. 22/11/14 Phil: Z_DeleteOldPrices.php now removes all old prices where there is a later start for a price with no end date 22/11/14 Phil: Added new script CustomerBalancesMovement.php to show customer activity debits and credits and the movement of their balances over a specified date range |
From: <rc...@us...> - 2014-11-24 16:25:39
|
Revision: 7005 http://sourceforge.net/p/web-erp/reponame/7005 Author: rchacon Date: 2014-11-24 16:25:25 +0000 (Mon, 24 Nov 2014) Log Message: ----------- Spanish files... Modified Paths: -------------- trunk/doc/Change.log trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-11-24 15:56:19 UTC (rev 7004) +++ trunk/doc/Change.log 2014-11-24 16:25:25 UTC (rev 7005) @@ -1,6 +1,6 @@ webERP Change Log -22/11/14 RChacon: Spanish translation improvements. Merging "View GL Entries" and "View the GL Entries". +24/11/14 RChacon: Spanish translation improvements. Merging "View GL Entries" and "View the GL Entries". 22/11/14 Exson: Fix the qualitytext does not have default value for strict sql mode in Credit_Invoice.php. 22/11/14 Phil: Z_DeleteOldPrices.php now removes all old prices where there is a later start for a price with no end date 22/11/14 Phil: Added new script CustomerBalancesMovement.php to show customer activity debits and credits and the movement of their balances over a specified date range Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-11-24 15:56:19 UTC (rev 7004) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-11-24 16:25:25 UTC (rev 7005) @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-13 21:09+1300\n" -"PO-Revision-Date: 2014-09-11 10:07-0600\n" +"POT-Creation-Date: 2014-11-24 08:05-0600\n" +"PO-Revision-Date: 2014-11-24 10:23-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -19,7 +19,7 @@ "X-Launchpad-Export-Date: 2011-05-24 09:54+0000\n" "X-Poedit-SourceCharset: UTF-8\n" -#: AccountGroups.php:5 includes/MainMenuLinksArray.php:374 +#: AccountGroups.php:6 includes/MainMenuLinksArray.php:376 msgid "Account Groups" msgstr "Grupos contables" @@ -175,23 +175,23 @@ #: Areas.php:115 Areas.php:124 BankAccounts.php:163 CreditStatus.php:125 #: Currencies.php:244 Currencies.php:252 Currencies.php:260 #: CustomerBranches.php:301 CustomerBranches.php:311 CustomerBranches.php:321 -#: CustomerBranches.php:331 CustomerBranches.php:341 Customers.php:296 -#: Customers.php:305 Customers.php:313 Customers.php:324 Customers.php:334 -#: CustomerTypes.php:146 CustomerTypes.php:156 Departments.php:141 -#: Factors.php:134 FixedAssetCategories.php:137 GLAccounts.php:79 -#: GLAccounts.php:95 Locations.php:265 Locations.php:273 Locations.php:284 -#: Locations.php:293 Locations.php:302 Locations.php:311 Locations.php:320 -#: Locations.php:329 Locations.php:337 Manufacturers.php:154 -#: MRPDemandTypes.php:87 PaymentMethods.php:143 PaymentTerms.php:146 -#: PaymentTerms.php:153 PcExpenses.php:161 SalesCategories.php:128 -#: SalesCategories.php:135 SalesPeople.php:150 SalesPeople.php:157 -#: SalesPeople.php:163 SalesTypes.php:140 SalesTypes.php:150 Shippers.php:81 -#: Shippers.php:93 StockCategories.php:209 Stocks.php:738 Stocks.php:747 -#: Stocks.php:755 Stocks.php:763 Stocks.php:771 Stocks.php:779 Stocks.php:787 -#: Stocks.php:795 Suppliers.php:646 Suppliers.php:655 Suppliers.php:663 -#: SupplierTypes.php:126 TaxCategories.php:132 TaxGroups.php:134 -#: TaxGroups.php:142 TaxProvinces.php:129 UnitsOfMeasure.php:135 -#: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:86 +#: CustomerBranches.php:331 CustomerBranches.php:341 CustomerTypes.php:146 +#: CustomerTypes.php:156 Customers.php:296 Customers.php:305 Customers.php:313 +#: Customers.php:324 Customers.php:334 Departments.php:141 Factors.php:134 +#: FixedAssetCategories.php:137 GLAccounts.php:79 GLAccounts.php:95 +#: Locations.php:265 Locations.php:273 Locations.php:284 Locations.php:293 +#: Locations.php:302 Locations.php:311 Locations.php:320 Locations.php:329 +#: Locations.php:337 MRPDemandTypes.php:87 Manufacturers.php:154 +#: PaymentMethods.php:143 PaymentTerms.php:146 PaymentTerms.php:153 +#: PcExpenses.php:161 SalesCategories.php:128 SalesCategories.php:135 +#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 +#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:81 Shippers.php:93 +#: StockCategories.php:209 Stocks.php:734 Stocks.php:743 Stocks.php:751 +#: Stocks.php:759 Stocks.php:767 Stocks.php:775 Stocks.php:783 Stocks.php:791 +#: SupplierTypes.php:126 Suppliers.php:646 Suppliers.php:655 Suppliers.php:663 +#: TaxCategories.php:132 TaxGroups.php:134 TaxGroups.php:142 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:86 +#: WorkCentres.php:89 WorkCentres.php:95 msgid "There are" msgstr "Existen" @@ -246,50 +246,50 @@ #: AccountGroups.php:285 AccountSections.php:169 AddCustomerContacts.php:25 #: AddCustomerContacts.php:27 AddCustomerNotes.php:101 #: AddCustomerTypeNotes.php:94 AgedDebtors.php:454 AgedSuppliers.php:276 -#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:17 -#: BOMExtendedQty.php:256 BOMIndented.php:248 BOMIndentedReverse.php:236 -#: BOMInquiry.php:188 BOMListing.php:110 BOMs.php:237 BOMs.php:888 -#: COGSGLPostings.php:19 CompanyPreferences.php:102 CounterReturns.php:1623 -#: CounterSales.php:2090 CounterSales.php:2186 Credit_Invoice.php:276 -#: CreditStatus.php:21 Currencies.php:30 CustEDISetup.php:17 CustItem.php:120 -#: CustItem.php:210 CustItem.php:238 DailyBankTransactions.php:11 -#: DebtorsAtPeriodEnd.php:129 DiscountCategories.php:12 -#: DiscountCategories.php:149 DiscountMatrix.php:16 EDIMessageFormat.php:105 -#: FixedAssetLocations.php:13 FixedAssetRegister.php:16 -#: FixedAssetRegister.php:256 FixedAssetTransfer.php:14 FormDesigner.php:185 -#: GLBalanceSheet.php:387 GLBudgets.php:32 GLJournalInquiry.php:11 -#: GLJournal.php:250 InternalStockRequest.php:311 InventoryPlanning.php:360 -#: InventoryPlanningPrefSupplier.php:386 MaintenanceTasks.php:14 -#: MaintenanceUserSchedule.php:16 MRPReport.php:516 NoSalesItems.php:91 -#: PcAssignCashToTab.php:59 PcAssignCashToTab.php:133 -#: PcAssignCashToTab.php:149 PcAssignCashToTab.php:193 PDFPickingList.php:29 -#: PDFStockLocTransfer.php:16 PO_AuthorisationLevels.php:10 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_SelectOSPurchOrder.php:148 -#: PriceMatrix.php:16 PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 -#: Prices.php:11 PurchaseByPrefSupplier.php:305 PurchData.php:241 -#: PurchData.php:373 PurchData.php:401 RecurringSalesOrders.php:320 -#: RelatedItemsUpdate.php:24 SalesAnalReptCols.php:51 SalesAnalRepts.php:14 -#: SalesCategories.php:11 SalesGLPostings.php:19 SalesGraph.php:40 -#: SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:48 -#: SelectCompletedOrder.php:11 SelectContract.php:69 SelectCreditItems.php:220 -#: SelectCreditItems.php:291 SelectCustomer.php:265 SelectGLAccount.php:65 -#: SelectOrderItems.php:559 SelectOrderItems.php:1444 -#: SelectOrderItems.php:1544 SelectProduct.php:512 SelectSalesOrder.php:508 -#: SelectSupplier.php:14 SelectSupplier.php:220 SelectWorkOrder.php:9 -#: SelectWorkOrder.php:174 SellThroughSupport.php:229 ShipmentCosting.php:11 -#: Shipments.php:17 Shippers.php:123 Shippers.php:160 Shipt_Select.php:8 -#: StockLocMovements.php:14 StockLocStatus.php:29 +#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:256 BOMIndented.php:248 +#: BOMIndentedReverse.php:236 BOMInquiry.php:187 BOMListing.php:110 +#: BOMs.php:239 BOMs.php:890 BankReconciliation.php:17 COGSGLPostings.php:19 +#: CompanyPreferences.php:102 CounterReturns.php:1623 CounterSales.php:2091 +#: CounterSales.php:2187 CreditStatus.php:21 Credit_Invoice.php:276 +#: Currencies.php:30 CustEDISetup.php:17 CustItem.php:120 CustItem.php:210 +#: CustItem.php:238 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:129 +#: DiscountCategories.php:12 DiscountCategories.php:149 DiscountMatrix.php:16 +#: EDIMessageFormat.php:105 FixedAssetLocations.php:13 +#: FixedAssetRegister.php:16 FixedAssetRegister.php:256 +#: FixedAssetTransfer.php:14 FormDesigner.php:185 GLBalanceSheet.php:387 +#: GLBudgets.php:32 GLJournal.php:250 GLJournalInquiry.php:11 +#: InternalStockRequest.php:311 InventoryPlanning.php:354 +#: InventoryPlanningPrefSupplier.php:386 MRPReport.php:516 +#: MaintenanceTasks.php:14 MaintenanceUserSchedule.php:16 NoSalesItems.php:91 +#: PDFPickingList.php:29 PDFStockLocTransfer.php:16 POReport.php:60 +#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 +#: PO_SelectOSPurchOrder.php:148 PcAssignCashToTab.php:59 +#: PcAssignCashToTab.php:133 PcAssignCashToTab.php:149 +#: PcAssignCashToTab.php:193 PriceMatrix.php:16 Prices.php:11 +#: PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 PurchData.php:241 +#: PurchData.php:373 PurchData.php:401 PurchaseByPrefSupplier.php:305 +#: RecurringSalesOrders.php:320 RelatedItemsUpdate.php:24 +#: SalesAnalReptCols.php:51 SalesAnalRepts.php:14 SalesCategories.php:11 +#: SalesGLPostings.php:19 SalesGraph.php:40 SalesPeople.php:20 +#: SalesTypes.php:20 SelectAsset.php:48 SelectCompletedOrder.php:11 +#: SelectContract.php:69 SelectCreditItems.php:220 SelectCreditItems.php:291 +#: SelectCustomer.php:265 SelectGLAccount.php:65 SelectOrderItems.php:559 +#: SelectOrderItems.php:1442 SelectOrderItems.php:1542 SelectProduct.php:511 +#: SelectSalesOrder.php:512 SelectSupplier.php:14 SelectSupplier.php:220 +#: SelectWorkOrder.php:9 SelectWorkOrder.php:174 SellThroughSupport.php:229 +#: ShipmentCosting.php:11 Shipments.php:17 Shippers.php:123 Shippers.php:160 +#: Shipt_Select.php:8 StockLocMovements.php:14 StockLocStatus.php:29 #: StockSerialItemResearch.php:30 SupplierPriceList.php:14 #: SupplierPriceList.php:224 SupplierPriceList.php:394 #: SupplierPriceList.php:398 SupplierPriceList.php:449 -#: SupplierPriceList.php:499 Suppliers.php:304 SupplierTenderCreate.php:556 +#: SupplierPriceList.php:499 SupplierTenderCreate.php:556 #: SupplierTenderCreate.php:664 SupplierTenders.php:322 -#: SupplierTenders.php:388 SupplierTransInquiry.php:10 TopItems.php:117 -#: UnitsOfMeasure.php:10 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:163 WorkOrderCosting.php:22 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:31 WorkOrderStatus.php:59 -#: WWW_Access.php:11 WWW_Users.php:36 Z_BottomUpCosts.php:57 -#: ../webSHOP/includes/header.php:216 +#: SupplierTenders.php:388 SupplierTransInquiry.php:10 Suppliers.php:304 +#: TopItems.php:118 UnitsOfMeasure.php:10 WWW_Access.php:11 WWW_Users.php:36 +#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:163 +#: WorkOrderCosting.php:22 WorkOrderEntry.php:11 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:31 WorkOrderStatus.php:58 Z_BottomUpCosts.php:57 +#: ../webSHOP/includes/header.php:251 msgid "Search" msgstr "Buscar" @@ -309,132 +309,136 @@ #: GLProfit_Loss.php:133 GLProfit_Loss.php:134 GLProfit_Loss.php:185 #: SelectGLAccount.php:23 SelectGLAccount.php:37 SelectGLAccount.php:51 msgid "Profit and Loss" -msgstr "Ganancias y Pérdidas" +msgstr "Ganancias y pérdidas" #: AccountGroups.php:310 AccountGroups.php:313 AccountGroups.php:448 -#: AccountGroups.php:450 BOMs.php:126 BOMs.php:800 BOMs.php:802 -#: CompanyPreferences.php:427 CompanyPreferences.php:429 -#: CompanyPreferences.php:442 CompanyPreferences.php:444 -#: CompanyPreferences.php:457 CompanyPreferences.php:459 +#: AccountGroups.php:450 BOMs.php:128 BOMs.php:802 BOMs.php:804 +#: CompanyPreferences.php:425 CompanyPreferences.php:427 +#: CompanyPreferences.php:440 CompanyPreferences.php:442 +#: CompanyPreferences.php:455 CompanyPreferences.php:457 #: ContractCosting.php:202 Currencies.php:330 Currencies.php:508 #: Currencies.php:510 CustomerBranches.php:451 Customers.php:659 #: Customers.php:1049 Customers.php:1055 Customers.php:1058 -#: DailyBankTransactions.php:145 DeliveryDetails.php:1148 -#: DeliveryDetails.php:1191 DeliveryDetails.php:1194 FormDesigner.php:101 -#: GLTransInquiry.php:74 Labels.php:603 Labels.php:605 Labels.php:630 +#: DailyBankTransactions.php:145 DeliveryDetails.php:1155 +#: DeliveryDetails.php:1198 DeliveryDetails.php:1201 FormDesigner.php:101 +#: GLTransInquiry.php:74 Labels.php:601 Labels.php:603 Labels.php:628 #: Locations.php:646 Locations.php:648 Locations.php:661 Locations.php:663 -#: MRPCalendar.php:224 MRP.php:546 MRP.php:550 MRP.php:554 MRP.php:558 -#: MRP.php:562 PaymentMethods.php:206 PaymentMethods.php:207 -#: PaymentMethods.php:208 PaymentMethods.php:209 PaymentMethods.php:275 -#: PaymentMethods.php:282 PaymentMethods.php:289 PaymentMethods.php:296 -#: PcAuthorizeExpenses.php:248 PDFChequeListing.php:65 -#: PDFDeliveryDifferences.php:76 PDFDIFOT.php:80 PDFWOPrint.php:601 -#: PDFWOPrint.php:605 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:807 PO_PDFPurchOrder.php:413 -#: PO_PDFPurchOrder.php:416 PurchData.php:296 PurchData.php:667 -#: PurchData.php:670 RecurringSalesOrders.php:493 RecurringSalesOrders.php:496 +#: MRP.php:554 MRP.php:558 MRP.php:562 MRP.php:566 MRP.php:570 +#: MRPCalendar.php:224 PDFChequeListing.php:65 PDFDIFOT.php:80 +#: PDFDeliveryDifferences.php:76 PDFWOPrint.php:600 PDFWOPrint.php:604 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:807 PO_PDFPurchOrder.php:413 PO_PDFPurchOrder.php:416 +#: PaymentMethods.php:206 PaymentMethods.php:207 PaymentMethods.php:208 +#: PaymentMethods.php:209 PaymentMethods.php:275 PaymentMethods.php:282 +#: PaymentMethods.php:289 PaymentMethods.php:296 PcAuthorizeExpenses.php:248 +#: PurchData.php:296 PurchData.php:667 PurchData.php:670 +#: RecurringSalesOrders.php:493 RecurringSalesOrders.php:496 #: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 #: SalesAnalReptCols.php:422 SalesAnalRepts.php:420 SalesAnalRepts.php:423 #: SalesAnalRepts.php:448 SalesAnalRepts.php:451 SalesAnalRepts.php:476 #: SalesAnalRepts.php:479 SalesCategories.php:264 SalesCategories.php:351 #: SalesCategories.php:355 SalesPeople.php:219 SalesPeople.php:359 -#: SalesPeople.php:361 SelectProduct.php:239 SelectProduct.php:364 +#: SalesPeople.php:361 SelectProduct.php:238 SelectProduct.php:363 #: ShipmentCosting.php:667 ShopParameters.php:289 ShopParameters.php:293 #: ShopParameters.php:337 ShopParameters.php:341 ShopParameters.php:391 #: ShopParameters.php:395 ShopParameters.php:413 ShopParameters.php:417 -#: ShopParameters.php:495 ShopParameters.php:499 StockClone.php:907 -#: StockClone.php:909 StockClone.php:932 StockClone.php:934 Stocks.php:1216 -#: Stocks.php:1218 Stocks.php:1241 Stocks.php:1243 SuppContractChgs.php:90 -#: SystemParameters.php:410 SystemParameters.php:433 SystemParameters.php:468 -#: SystemParameters.php:540 SystemParameters.php:548 SystemParameters.php:588 -#: SystemParameters.php:679 SystemParameters.php:688 SystemParameters.php:696 -#: SystemParameters.php:714 SystemParameters.php:721 SystemParameters.php:765 -#: SystemParameters.php:861 SystemParameters.php:1004 -#: SystemParameters.php:1006 SystemParameters.php:1016 -#: SystemParameters.php:1018 SystemParameters.php:1072 -#: SystemParameters.php:1084 SystemParameters.php:1086 -#: SystemParameters.php:1124 SystemParameters.php:1126 TaxGroups.php:310 -#: TaxGroups.php:313 TaxGroups.php:364 WWW_Users.php:505 WWW_Users.php:507 -#: WWW_Users.php:678 WWW_Users.php:680 +#: ShopParameters.php:495 ShopParameters.php:499 StockClone.php:909 +#: StockClone.php:911 StockClone.php:934 StockClone.php:936 Stocks.php:1212 +#: Stocks.php:1214 Stocks.php:1237 Stocks.php:1239 SuppContractChgs.php:90 +#: SystemParameters.php:413 SystemParameters.php:436 SystemParameters.php:471 +#: SystemParameters.php:552 SystemParameters.php:560 SystemParameters.php:600 +#: SystemParameters.php:691 SystemParameters.php:700 SystemParameters.php:708 +#: SystemParameters.php:726 SystemParameters.php:733 SystemParameters.php:777 +#: SystemParameters.php:873 SystemParameters.php:1016 +#: SystemParameters.php:1018 SystemParameters.php:1028 +#: SystemParameters.php:1030 SystemParameters.php:1084 +#: SystemParameters.php:1096 SystemParameters.php:1098 +#: SystemParameters.php:1136 SystemParameters.php:1138 TaxGroups.php:310 +#: TaxGroups.php:313 TaxGroups.php:364 WWW_Users.php:508 WWW_Users.php:510 +#: WWW_Users.php:681 WWW_Users.php:683 +#: reportwriter/languages/en_US/reports.php:114 msgid "Yes" msgstr "Sí" #: AccountGroups.php:316 AccountGroups.php:453 AccountGroups.php:455 -#: BankAccounts.php:216 BankAccounts.php:410 BankAccounts.php:412 -#: BankAccounts.php:416 BankAccounts.php:424 BOMs.php:128 BOMs.php:799 -#: BOMs.php:803 CompanyPreferences.php:426 CompanyPreferences.php:430 -#: CompanyPreferences.php:441 CompanyPreferences.php:445 -#: CompanyPreferences.php:456 CompanyPreferences.php:460 +#: BOMs.php:130 BOMs.php:801 BOMs.php:805 BankAccounts.php:216 +#: BankAccounts.php:410 BankAccounts.php:412 BankAccounts.php:416 +#: BankAccounts.php:424 CompanyPreferences.php:424 CompanyPreferences.php:428 +#: CompanyPreferences.php:439 CompanyPreferences.php:443 +#: CompanyPreferences.php:454 CompanyPreferences.php:458 #: ContractCosting.php:200 Currencies.php:332 Currencies.php:513 #: Currencies.php:515 CustomerBranches.php:451 Customers.php:658 #: Customers.php:1047 Customers.php:1054 Customers.php:1057 -#: DailyBankTransactions.php:147 DeliveryDetails.php:1149 -#: DeliveryDetails.php:1192 DeliveryDetails.php:1195 FormDesigner.php:99 -#: GLTransInquiry.php:93 Labels.php:602 Labels.php:606 Labels.php:631 +#: DailyBankTransactions.php:147 DeliveryDetails.php:1156 +#: DeliveryDetails.php:1199 DeliveryDetails.php:1202 FormDesigner.php:99 +#: GLTransInquiry.php:93 Labels.php:600 Labels.php:604 Labels.php:629 #: Locations.php:651 Locations.php:653 Locations.php:666 Locations.php:668 -#: MRPCalendar.php:226 MRP.php:544 MRP.php:548 MRP.php:552 MRP.php:556 -#: MRP.php:560 NoSalesItems.php:191 PaymentMethods.php:206 -#: PaymentMethods.php:207 PaymentMethods.php:208 PaymentMethods.php:209 -#: PaymentMethods.php:276 PaymentMethods.php:283 PaymentMethods.php:290 -#: PaymentMethods.php:297 PcAuthorizeExpenses.php:246 PDFChequeListing.php:64 -#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:79 PDFWOPrint.php:602 -#: PDFWOPrint.php:606 PO_AuthorisationLevels.php:136 +#: MRP.php:552 MRP.php:556 MRP.php:560 MRP.php:564 MRP.php:568 +#: MRPCalendar.php:226 NoSalesItems.php:191 PDFChequeListing.php:64 +#: PDFDIFOT.php:79 PDFDeliveryDifferences.php:75 PDFWOPrint.php:601 +#: PDFWOPrint.php:605 PO_AuthorisationLevels.php:136 #: PO_AuthorisationLevels.php:141 PO_Header.php:806 PO_PDFPurchOrder.php:414 -#: PO_PDFPurchOrder.php:417 PurchData.php:299 PurchData.php:668 +#: PO_PDFPurchOrder.php:417 PaymentMethods.php:206 PaymentMethods.php:207 +#: PaymentMethods.php:208 PaymentMethods.php:209 PaymentMethods.php:276 +#: PaymentMethods.php:283 PaymentMethods.php:290 PaymentMethods.php:297 +#: PcAuthorizeExpenses.php:246 PurchData.php:299 PurchData.php:668 #: PurchData.php:671 RecurringSalesOrders.php:492 RecurringSalesOrders.php:495 #: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 #: SalesAnalReptCols.php:423 SalesAnalRepts.php:419 SalesAnalRepts.php:422 #: SalesAnalRepts.php:447 SalesAnalRepts.php:450 SalesAnalRepts.php:475 #: SalesAnalRepts.php:478 SalesCategories.php:266 SalesCategories.php:352 #: SalesCategories.php:354 SalesPeople.php:221 SalesPeople.php:364 -#: SalesPeople.php:366 SelectProduct.php:241 SelectProduct.php:366 +#: SalesPeople.php:366 SelectProduct.php:240 SelectProduct.php:365 #: ShipmentCosting.php:668 ShopParameters.php:290 ShopParameters.php:292 #: ShopParameters.php:338 ShopParameters.php:340 ShopParameters.php:392 #: ShopParameters.php:394 ShopParameters.php:414 ShopParameters.php:416 -#: ShopParameters.php:496 ShopParameters.php:498 StockClone.php:902 -#: StockClone.php:904 StockClone.php:927 StockClone.php:929 Stocks.php:1211 -#: Stocks.php:1213 Stocks.php:1236 Stocks.php:1238 SuppContractChgs.php:92 -#: SystemParameters.php:411 SystemParameters.php:434 SystemParameters.php:469 -#: SystemParameters.php:541 SystemParameters.php:549 SystemParameters.php:589 -#: SystemParameters.php:680 SystemParameters.php:689 SystemParameters.php:697 -#: SystemParameters.php:715 SystemParameters.php:722 SystemParameters.php:766 -#: SystemParameters.php:862 SystemParameters.php:1003 -#: SystemParameters.php:1007 SystemParameters.php:1015 -#: SystemParameters.php:1019 SystemParameters.php:1073 -#: SystemParameters.php:1083 SystemParameters.php:1087 -#: SystemParameters.php:1123 SystemParameters.php:1127 TaxGroups.php:311 -#: TaxGroups.php:314 TaxGroups.php:366 WWW_Users.php:504 WWW_Users.php:508 -#: WWW_Users.php:677 WWW_Users.php:681 includes/PDFLowGPPageHeader.inc:44 +#: ShopParameters.php:496 ShopParameters.php:498 StockClone.php:904 +#: StockClone.php:906 StockClone.php:929 StockClone.php:931 Stocks.php:1207 +#: Stocks.php:1209 Stocks.php:1232 Stocks.php:1234 SuppContractChgs.php:92 +#: SystemParameters.php:414 SystemParameters.php:437 SystemParameters.php:472 +#: SystemParameters.php:553 SystemParameters.php:561 SystemParameters.php:601 +#: SystemParameters.php:692 SystemParameters.php:701 SystemParameters.php:709 +#: SystemParameters.php:727 SystemParameters.php:734 SystemParameters.php:778 +#: SystemParameters.php:874 SystemParameters.php:1015 +#: SystemParameters.php:1019 SystemParameters.php:1027 +#: SystemParameters.php:1031 SystemParameters.php:1085 +#: SystemParameters.php:1095 SystemParameters.php:1099 +#: SystemParameters.php:1135 SystemParameters.php:1139 TaxGroups.php:311 +#: TaxGroups.php:314 TaxGroups.php:366 WWW_Users.php:507 WWW_Users.php:511 +#: WWW_Users.php:680 WWW_Users.php:684 includes/PDFLowGPPageHeader.inc:44 +#: reportwriter/languages/en_US/reports.php:82 msgid "No" msgstr "No" #: AccountGroups.php:325 AccountSections.php:191 AddCustomerContacts.php:148 #: AddCustomerNotes.php:137 AddCustomerTypeNotes.php:131 Areas.php:164 -#: BankAccounts.php:241 BOMs.php:155 COGSGLPostings.php:112 +#: BOMs.php:157 BankAccounts.php:241 COGSGLPostings.php:112 #: COGSGLPostings.php:216 CreditStatus.php:175 Currencies.php:362 #: Currencies.php:379 CustItem.php:166 CustomerBranches.php:455 -#: Customers.php:1132 Customers.php:1166 CustomerTypes.php:205 +#: CustomerTypes.php:205 Customers.php:1131 Customers.php:1165 #: Departments.php:186 EDIMessageFormat.php:150 Factors.php:334 #: FixedAssetCategories.php:190 FixedAssetLocations.php:111 -#: FreightCosts.php:253 GeocodeSetup.php:173 GLAccounts.php:317 GLTags.php:96 -#: ImportBankTransAnalysis.php:223 InternalStockRequest.php:293 Labels.php:335 -#: Labels.php:360 Locations.php:420 MailingGroupMaintenance.php:178 -#: MaintenanceTasks.php:118 Manufacturers.php:217 MRPDemands.php:309 -#: MRPDemandTypes.php:120 PaymentMethods.php:210 PaymentTerms.php:205 -#: PcAssignCashToTab.php:277 PcClaimExpensesFromTab.php:276 PcExpenses.php:226 -#: PcTabs.php:236 PcTypeTabs.php:180 PO_AuthorisationLevels.php:151 -#: PriceMatrix.php:287 Prices_Customer.php:286 Prices.php:253 -#: PurchData.php:312 SalesCategories.php:272 SalesGLPostings.php:137 -#: SalesGLPostings.php:253 SalesPeople.php:232 SalesTypes.php:206 -#: SecurityTokens.php:130 SelectCustomer.php:614 SelectCustomer.php:633 -#: SelectCustomer.php:663 SelectCustomer.php:681 SelectCustomer.php:705 -#: SelectCustomer.php:722 SelectGLAccount.php:117 SelectGLAccount.php:132 -#: SellThroughSupport.php:298 Shippers.php:144 StockCategories.php:289 +#: FreightCosts.php:253 GLAccounts.php:317 GLTags.php:96 GeocodeSetup.php:173 +#: ImportBankTransAnalysis.php:223 InternalStockRequest.php:293 Labels.php:333 +#: Labels.php:358 Locations.php:420 MRPDemandTypes.php:120 MRPDemands.php:309 +#: MailingGroupMaintenance.php:178 MaintenanceTasks.php:118 +#: Manufacturers.php:217 PO_AuthorisationLevels.php:151 PaymentMethods.php:210 +#: PaymentTerms.php:205 PcAssignCashToTab.php:277 +#: PcClaimExpensesFromTab.php:276 PcExpenses.php:226 PcTabs.php:236 +#: PcTypeTabs.php:180 PriceMatrix.php:287 Prices.php:253 +#: Prices_Customer.php:286 PurchData.php:312 SalesCategories.php:272 +#: SalesGLPostings.php:137 SalesGLPostings.php:253 SalesPeople.php:232 +#: SalesTypes.php:206 SecurityTokens.php:130 SelectCustomer.php:614 +#: SelectCustomer.php:633 SelectCustomer.php:663 SelectCustomer.php:681 +#: SelectCustomer.php:705 SelectCustomer.php:722 SelectGLAccount.php:117 +#: SelectGLAccount.php:132 SellThroughSupport.php:298 Shippers.php:144 +#: StockCategories.php:289 SuppTransGLAnalysis.php:125 #: SupplierContacts.php:165 SupplierTenderCreate.php:157 SupplierTypes.php:170 -#: SuppTransGLAnalysis.php:125 TaxAuthorities.php:172 TaxCategories.php:184 -#: TaxGroups.php:190 TaxProvinces.php:179 UnitsOfMeasure.php:185 -#: WorkCentres.php:142 WWW_Access.php:126 WWW_Users.php:341 -#: includes/InputSerialItems.php:110 includes/OutputSerialItems.php:20 +#: TaxAuthorities.php:172 TaxCategories.php:184 TaxGroups.php:190 +#: TaxProvinces.php:179 UnitsOfMeasure.php:185 WWW_Access.php:126 +#: WWW_Users.php:344 WorkCentres.php:142 includes/InputSerialItems.php:110 +#: includes/OutputSerialItems.php:20 +#: reportwriter/languages/en_US/reports.php:143 #, php-format msgid "Edit" msgstr "Editar" @@ -445,40 +449,41 @@ #: AccountGroups.php:326 AccountSections.php:195 AddCustomerContacts.php:149 #: AddCustomerNotes.php:138 AddCustomerTypeNotes.php:132 Areas.php:165 -#: BankAccounts.php:242 BOMs.php:157 COGSGLPostings.php:113 +#: BOMs.php:159 BankAccounts.php:242 COGSGLPostings.php:113 #: COGSGLPostings.php:217 ContractBOM.php:272 ContractOtherReqts.php:124 -#: CounterReturns.php:740 CounterSales.php:836 Credit_Invoice.php:404 -#: CreditStatus.php:176 Currencies.php:365 CustItem.php:167 -#: CustomerReceipt.php:989 Customers.php:1167 CustomerTypes.php:206 +#: CounterReturns.php:740 CounterSales.php:836 CreditStatus.php:176 +#: Credit_Invoice.php:404 Currencies.php:365 CustItem.php:167 +#: CustomerReceipt.php:989 CustomerTypes.php:206 Customers.php:1166 #: Departments.php:187 DiscountCategories.php:238 DiscountMatrix.php:183 #: EDIMessageFormat.php:151 FixedAssetCategories.php:191 FreightCosts.php:254 -#: GeocodeSetup.php:174 GLAccounts.php:318 GLJournal.php:430 GLTags.php:97 +#: GLAccounts.php:318 GLJournal.php:430 GLTags.php:97 GeocodeSetup.php:174 #: ImportBankTransAnalysis.php:224 InternalStockCategoriesByRole.php:184 -#: InternalStockRequest.php:294 Labels.php:336 Labels.php:361 Labels.php:609 -#: Locations.php:421 MailingGroupMaintenance.php:179 MaintenanceTasks.php:119 -#: Manufacturers.php:218 MRPDemands.php:310 MRPDemandTypes.php:121 -#: PaymentMethods.php:211 Payments.php:1104 PaymentTerms.php:206 +#: InternalStockRequest.php:294 Labels.php:334 Labels.php:359 Labels.php:607 +#: Locations.php:421 MRPDemandTypes.php:121 MRPDemands.php:310 +#: MailingGroupMaintenance.php:179 MaintenanceTasks.php:119 +#: Manufacturers.php:218 PO_AuthorisationLevels.php:153 PO_Items.php:768 +#: PaymentMethods.php:211 PaymentTerms.php:206 Payments.php:1103 #: PcAssignCashToTab.php:281 PcClaimExpensesFromTab.php:277 PcExpenses.php:227 #: PcExpensesTypeTab.php:187 PcTabs.php:237 PcTypeTabs.php:181 -#: PO_AuthorisationLevels.php:153 PO_Items.php:768 PriceMatrix.php:286 -#: Prices_Customer.php:287 Prices.php:254 PurchData.php:314 PurchData.php:721 -#: RelatedItemsUpdate.php:155 RelatedItemsUpdate.php:170 -#: SalesAnalReptCols.php:299 SalesAnalRepts.php:307 SalesCategories.php:273 -#: SalesGLPostings.php:138 SalesGLPostings.php:254 SalesPeople.php:233 -#: SalesTypes.php:207 SecurityTokens.php:131 SelectCreditItems.php:778 -#: SelectCustomer.php:615 SelectCustomer.php:634 SelectCustomer.php:664 -#: SelectCustomer.php:682 SelectCustomer.php:706 SelectCustomer.php:723 -#: SelectOrderItems.php:1359 SellThroughSupport.php:299 Shipments.php:440 -#: Shippers.php:145 SpecialOrder.php:668 StockCategories.php:290 -#: StockCategories.php:619 StockLocTransfer.php:327 SuppContractChgs.php:99 -#: SuppCreditGRNs.php:117 SuppFixedAssetChgs.php:90 SuppInvGRNs.php:147 +#: PriceMatrix.php:286 Prices.php:254 Prices_Customer.php:287 +#: PurchData.php:314 PurchData.php:721 RelatedItemsUpdate.php:155 +#: RelatedItemsUpdate.php:170 SalesAnalReptCols.php:299 SalesAnalRepts.php:307 +#: SalesCategories.php:273 SalesGLPostings.php:138 SalesGLPostings.php:254 +#: SalesPeople.php:233 SalesTypes.php:207 SecurityTokens.php:131 +#: SelectCreditItems.php:778 SelectCustomer.php:615 SelectCustomer.php:634 +#: SelectCustomer.php:664 SelectCustomer.php:682 SelectCustomer.php:706 +#: SelectCustomer.php:723 SelectOrderItems.php:1357 SellThroughSupport.php:299 +#: Shipments.php:440 Shippers.php:145 SpecialOrder.php:668 +#: StockCategories.php:290 StockCategories.php:619 StockLocTransfer.php:325 +#: SuppContractChgs.php:99 SuppCreditGRNs.php:117 SuppFixedAssetChgs.php:90 +#: SuppInvGRNs.php:147 SuppShiptChgs.php:90 SuppTransGLAnalysis.php:126 #: SupplierContacts.php:166 SupplierTenderCreate.php:422 -#: SupplierTenderCreate.php:452 SupplierTypes.php:172 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:126 TaxAuthorities.php:173 TaxCategories.php:186 -#: TaxGroups.php:191 TaxProvinces.php:180 UnitsOfMeasure.php:186 -#: WorkCentres.php:143 WOSerialNos.php:327 WWW_Access.php:127 -#: WWW_Users.php:342 includes/InputSerialItemsKeyed.php:60 +#: SupplierTenderCreate.php:452 SupplierTypes.php:172 TaxAuthorities.php:173 +#: TaxCategories.php:186 TaxGroups.php:191 TaxProvinces.php:180 +#: UnitsOfMeasure.php:186 WOSerialNos.php:335 WWW_Access.php:127 +#: WWW_Users.php:345 WorkCentres.php:143 includes/InputSerialItemsKeyed.php:60 #: includes/OutputSerialItems.php:99 +#: reportwriter/languages/en_US/reports.php:141 #, php-format msgid "Delete" msgstr "Eliminar" @@ -519,10 +524,13 @@ "long and less than 30 characters long. Only alpha numeric characters can be " "used." msgstr "" +"Se debe ingresar un nombre único para el grupo de cuentas -de al menos 3 " +"caracteres y menos de 30 caracteres. Sólo se pueden usar caracteres " +"alfanuméricos." #: AccountGroups.php:413 AccountGroups.php:415 msgid "Top Level Group" -msgstr "Grupo de Nivel Superior" +msgstr "Grupo de nivel superior" #: AccountGroups.php:429 msgid "Section In Accounts" @@ -534,33 +542,37 @@ "only profit and loss accounts or NO if the group will contain balance sheet " "account" msgstr "" +"Seleccione SI si este grupo cuenta contendrá cuentas que consistirá en sólo " +"cuentas de pérdidas y ganancias, o NO si el grupo contendrá cuenta de balance" #: AccountGroups.php:462 msgid "" "Enter the sequence number that this account group and its child general " "ledger accounts should display in the trial balance" msgstr "" +"Introduce el número de secuencia que este grupo de cuentas y sus cuentas " +"hijas del libro mayor deben mostrar en el balance de comprobación" #: AccountGroups.php:465 AccountSections.php:262 AddCustomerContacts.php:260 #: AddCustomerNotes.php:242 AddCustomerTypeNotes.php:221 Areas.php:229 -#: BankAccounts.php:431 BOMs.php:816 COGSGLPostings.php:365 +#: BOMs.php:818 BankAccounts.php:431 COGSGLPostings.php:365 #: CreditStatus.php:259 Currencies.php:522 CustLoginSetup.php:273 #: Departments.php:258 DiscountMatrix.php:142 EDIMessageFormat.php:248 #: FixedAssetCategories.php:350 FixedAssetLocations.php:161 -#: FreightCosts.php:371 GeocodeSetup.php:271 GLAccounts.php:265 Labels.php:643 -#: Locations.php:680 Manufacturers.php:312 MRPDemands.php:424 -#: MRPDemandTypes.php:188 OffersReceived.php:57 OffersReceived.php:146 -#: PaymentMethods.php:302 PaymentTerms.php:310 PO_AuthorisationLevels.php:264 +#: FreightCosts.php:371 GLAccounts.php:265 GeocodeSetup.php:271 Labels.php:641 +#: Locations.php:680 MRPDemandTypes.php:188 MRPDemands.php:424 +#: Manufacturers.php:312 OffersReceived.php:57 OffersReceived.php:146 +#: PO_AuthorisationLevels.php:264 PaymentMethods.php:302 PaymentTerms.php:310 #: PriceMatrix.php:230 Prices_Customer.php:369 SalesAnalReptCols.php:552 #: SalesAnalRepts.php:519 SalesGLPostings.php:425 SalesPeople.php:373 -#: Shippers.php:203 StockCategories.php:646 SupplierContacts.php:284 -#: SuppLoginSetup.php:292 TaxAuthorities.php:327 TaxCategories.php:244 -#: TaxProvinces.php:234 UnitsOfMeasure.php:241 WorkCentres.php:283 -#: WWW_Users.php:749 +#: Shippers.php:203 StockCategories.php:646 SuppLoginSetup.php:291 +#: SupplierContacts.php:284 TaxAuthorities.php:327 TaxCategories.php:244 +#: TaxProvinces.php:234 UnitsOfMeasure.php:241 WWW_Users.php:752 +#: WorkCentres.php:283 msgid "Enter Information" -msgstr "Guardar la Información" +msgstr "Guardar la información" -#: AccountSections.php:5 includes/MainMenuLinksArray.php:373 +#: AccountSections.php:5 includes/MainMenuLinksArray.php:375 msgid "Account Sections" msgstr "Secciones contables" @@ -657,12 +669,12 @@ #: AddCustomerContacts.php:59 AddCustomerNotes.php:51 #: AddCustomerTypeNotes.php:48 Areas.php:72 CustomerTypes.php:68 -#: DeliveryDetails.php:801 DeliveryDetails.php:818 Factors.php:105 -#: FixedAssetItems.php:250 MRPCalendar.php:176 PcAssignCashToTab.php:91 -#: PcClaimExpensesFromTab.php:82 PcExpenses.php:98 PcTabs.php:104 -#: PcTypeTabs.php:63 PO_Items.php:380 SalesAnalReptCols.php:129 -#: SalesPeople.php:97 SalesTypes.php:66 Stocks.php:572 Suppliers.php:531 -#: SupplierTypes.php:68 +#: DeliveryDetails.php:806 DeliveryDetails.php:823 Factors.php:105 +#: FixedAssetItems.php:250 MRPCalendar.php:176 PO_Items.php:380 +#: PcAssignCashToTab.php:91 PcClaimExpensesFromTab.php:82 PcExpenses.php:98 +#: PcTabs.php:104 PcTypeTabs.php:63 SalesAnalReptCols.php:129 +#: SalesPeople.php:97 SalesTypes.php:66 Stocks.php:568 SupplierTypes.php:68 +#: Suppliers.php:531 msgid "has been updated" msgstr "ha sido actualizado" @@ -675,18 +687,18 @@ msgstr "El registro del contacto ha sido eliminado" #: AddCustomerContacts.php:126 CompanyPreferences.php:173 -#: CustomerBranches.php:408 Customers.php:1119 Customers.php:1127 +#: CustomerBranches.php:408 Customers.php:1118 Customers.php:1126 #: ImportBankTransAnalysis.php:207 PrintWOItemSlip.php:185 #: PrintWOItemSlip.php:196 PrintWOItemSlip.php:207 SalesPeople.php:200 #: SelectCustomer.php:609 StockDispatch.php:275 StockDispatch.php:286 -#: StockDispatch.php:297 SupplierContacts.php:152 SuppTransGLAnalysis.php:108 -#: Tax.php:411 includes/InputSerialItemsFile.php:92 +#: StockDispatch.php:297 SuppTransGLAnalysis.php:108 SupplierContacts.php:152 +#: Tax.php:411 UserLocations.php:176 includes/InputSerialItemsFile.php:92 #: includes/InputSerialItemsFile.php:144 msgid "Name" msgstr "Nombre" -#: AddCustomerContacts.php:127 AddCustomerContacts.php:223 Customers.php:1120 -#: Customers.php:1128 SelectCustomer.php:610 WWW_Access.php:110 +#: AddCustomerContacts.php:127 AddCustomerContacts.php:223 Customers.php:1119 +#: Customers.php:1127 SelectCustomer.php:610 WWW_Access.php:110 #: WWW_Access.php:173 msgid "Role" msgstr "Perfil" @@ -696,33 +708,32 @@ msgstr "Número de teléfono" #: AddCustomerContacts.php:129 AddCustomerContacts.php:241 -#: CustomerBranches.php:414 CustomerBranches.php:849 CustomerInquiry.php:418 -#: CustomerInquiry.php:460 Customers.php:1122 Customers.php:1130 +#: CustomerBranches.php:414 CustomerBranches.php:849 CustomerInquiry.php:433 +#: CustomerInquiry.php:475 Customers.php:1121 Customers.php:1129 #: EmailCustTrans.php:15 EmailCustTrans.php:64 Factors.php:246 Factors.php:297 #: Locations.php:616 OrderDetails.php:115 PDFRemittanceAdvice.php:251 -#: PDFWOPrint.php:592 PDFWOPrint.php:595 PDFWOPrint.php:675 PDFWOPrint.php:678 -#: PO_PDFPurchOrder.php:400 PO_PDFPurchOrder.php:403 PrintCustTrans.php:750 -#: PrintCustTrans.php:981 PrintCustTrans.php:1030 +#: PDFWOPrint.php:591 PDFWOPrint.php:594 PDFWOPrint.php:674 PDFWOPrint.php:677 +#: PO_PDFPurchOrder.php:400 PO_PDFPurchOrder.php:403 PrintCustTrans.php:748 +#: PrintCustTrans.php:979 PrintCustTrans.php:1028 #: PrintCustTransPortrait.php:793 PrintCustTransPortrait.php:1039 -#: PrintCustTransPortrait.php:1095 PrintCustTrans_SunlightPower.php:746 -#: PrintCustTrans_SunlightPower.php:977 PrintCustTrans_SunlightPower.php:1026 -#: SelectCustomer.php:427 SelectCustomer.php:612 SelectSupplier.php:288 -#: SupplierContacts.php:156 SupplierContacts.php:277 UserSettings.php:184 -#: WWW_Users.php:297 includes/PDFPickingListHeader.inc:25 -#: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:85 -#: includes/PDFTransPageHeaderPortrait.inc:114 -#: includes/PDFTransPageHeader_SunlightPower.inc:84 -#: includes/PDFWOPageHeader.inc:19 includes/PO_PDFOrderPageHeader.inc:29 -#: ../webSHOP/Checkout.php:443 ../webSHOP/Register.php:607 +#: PrintCustTransPortrait.php:1095 SelectCustomer.php:427 +#: SelectCustomer.php:612 SelectSupplier.php:288 SupplierContacts.php:156 +#: SupplierContacts.php:277 UserSettings.php:184 WWW_Users.php:300 +#: includes/PDFPickingListHeader.inc:25 includes/PDFStatementPageHeader.inc:67 +#: includes/PDFTransPageHeader.inc:85 +#: includes/PDFTransPageHeaderPortrait.inc:114 includes/PDFWOPageHeader.inc:19 +#: includes/PO_PDFOrderPageHeader.inc:29 ../webSHOP/Checkout.php:298 +#: ../webSHOP/Register.php:595 msgid "Email" msgstr "Correo-e" -#: AddCustomerContacts.php:130 AddCustomerContacts.php:250 Customers.php:1123 -#: Customers.php:1131 PcAssignCashToTab.php:242 PcAssignCashToTab.php:380 +#: AddCustomerContacts.php:130 AddCustomerContacts.php:250 Customers.php:1122 +#: Customers.php:1130 PDFQuotation.php:252 PDFQuotationPortrait.php:249 +#: PcAssignCashToTab.php:242 PcAssignCashToTab.php:380 #: PcAuthorizeExpenses.php:97 PcClaimExpensesFromTab.php:238 -#: PcClaimExpensesFromTab.php:405 PcReportTab.php:336 PDFQuotation.php:252 -#: PDFQuotationPortrait.php:249 SelectCustomer.php:613 ShopParameters.php:198 -#: SystemParameters.php:363 WOSerialNos.php:298 WOSerialNos.php:304 +#: PcClaimExpensesFromTab.php:405 PcReportTab.php:333 SelectCustomer.php:613 +#: ShopParameters.php:198 SystemParameters.php:366 WOSerialNos.php:306 +#: WOSerialNos.php:312 msgid "Notes" msgstr "Notas" @@ -740,7 +751,7 @@ msgstr "Código del contacto" #: AddCustomerContacts.php:214 Factors.php:234 SupplierContacts.php:239 -#: ../webSHOP/Checkout.php:527 ../webSHOP/Register.php:622 +#: ../webSHOP/Checkout.php:379 ../webSHOP/Register.php:610 msgid "Contact Name" msgstr "Nombre del contacto" @@ -749,10 +760,8 @@ #: SelectCustomer.php:425 SelectOrderItems.php:597 #: SupplierTenderCreate.php:395 includes/PDFStatementPageHeader.inc:63 #: includes/PDFTransPageHeader.inc:84 -#: includes/PDFTransPageHeaderPortrait.inc:110 -#: includes/PDFTransPageHeader_SunlightPower.inc:83 -#: ../webSHOP/Checkout.php:537 ../webSHOP/Register.php:260 -#: ../webSHOP/Register.php:735 +#: includes/PDFTransPageHeaderPortrait.inc:110 ../webSHOP/Checkout.php:389 +#: ../webSHOP/Register.php:255 ../webSHOP/Register.php:723 msgid "Phone" msgstr "Teléfono" @@ -791,16 +800,15 @@ #: AddCustomerNotes.php:117 AddCustomerNotes.php:222 #: AddCustomerTypeNotes.php:111 AddCustomerTypeNotes.php:211 -#: AgedControlledInventory.php:47 BankMatching.php:282 +#: AgedControlledInventory.php:47 BankMatching.php:281 #: BankReconciliation.php:217 BankReconciliation.php:294 #: ContractCosting.php:177 CustomerAllocations.php:348 -#: CustomerAllocations.php:378 CustomerInquiry.php:237 +#: CustomerAllocations.php:378 CustomerInquiry.php:252 #: CustomerTransInquiry.php:106 GLAccountInquiry.php:174 #: GLAccountReport.php:343 GLTransInquiry.php:47 MRPCalendar.php:219 -#: PaymentAllocations.php:66 PcAssignCashToTab.php:238 -#: PcAuthorizeExpenses.php:93 PDFRemittanceAdvice.php:308 -#: PrintCustTrans.php:858 PrintCustTransPortrait.php:907 -#: PrintCustTrans_SunlightPower.php:854 PrintWOItemSlip.php:187 +#: PDFRemittanceAdvice.php:308 PaymentAllocations.php:66 +#: PcAssignCashToTab.php:238 PcAuthorizeExpenses.php:93 PrintCustTrans.php:856 +#: PrintCustTransPortrait.php:907 PrintWOItemSlip.php:187 #: PrintWOItemSlip.php:198 PrintWOItemSlip.php:209 ReverseGRN.php:396 #: SelectCustomer.php:659 SelectCustomer.php:701 ShipmentCosting.php:538 #: ShipmentCosting.php:615 Shipments.php:491 StockDispatch.php:277 @@ -813,13 +821,13 @@ #: includes/PDFQuotationPortraitPageHeader.inc:80 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTransPageHeader.inc:51 #: includes/PDFTransPageHeaderPortrait.inc:63 -#: includes/PDFTransPageHeader_SunlightPower.inc:48 +#: reportwriter/languages/en_US/reports.php:64 msgid "Date" msgstr "Fecha" -#: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 PcReportTab.php:181 -#: SelectCustomer.php:660 SelectCustomer.php:702 StockClone.php:911 -#: Stocks.php:1220 UpgradeDatabase.php:236 UpgradeDatabase.php:239 +#: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 PcReportTab.php:180 +#: SelectCustomer.php:660 SelectCustomer.php:702 StockClone.php:913 +#: Stocks.php:1216 UpgradeDatabase.php:236 UpgradeDatabase.php:239 #: UpgradeDatabase.php:242 UpgradeDatabase.php:245 UpgradeDatabase.php:248 #: UpgradeDatabase.php:251 UpgradeDatabase.php:254 UpgradeDatabase.php:257 #: UpgradeDatabase.php:260 Z_Upgrade_3.10-3.11.php:62 @@ -915,16 +923,17 @@ msgstr "" #: AgedControlledInventory.php:12 InventoryQuantities.php:155 -#: InventoryValuation.php:231 Locations.php:392 Locations.php:453 -#: MRPCalendar.php:21 MRPCreateDemands.php:197 MRPDemands.php:27 -#: MRPDemandTypes.php:17 MRP.php:534 MRPPlannedPurchaseOrders.php:265 +#: InventoryValuation.php:217 Locations.php:392 Locations.php:453 MRP.php:542 +#: MRPCalendar.php:21 MRPCreateDemands.php:197 MRPDemandTypes.php:17 +#: MRPDemands.php:27 MRPPlannedPurchaseOrders.php:265 #: MRPPlannedWorkOrders.php:247 MRPPlannedWorkOrders.php:321 -#: PricesByCost.php:8 ReorderLevelLocation.php:12 ReorderLevel.php:194 +#: PricesByCost.php:8 ReorderLevel.php:194 ReorderLevelLocation.php:12 #: SelectProduct.php:88 StockDispatch.php:319 StockMovements.php:22 #: StockQties_csv.php:8 StockQuantityByDate.php:10 StockReorderLevel.php:20 -#: StockSerialItemResearch.php:9 StockSerialItems.php:9 StockStatus.php:46 +#: StockSerialItemResearch.php:9 StockSerialItems.php:9 StockStatus.php:45 #: StockTransferControlled.php:14 SuppLoginSetup.php:24 WWW_Users.php:16 #: includes/MainMenuLinksArray.php:26 +#: reportwriter/languages/en_US/reports.php:243 msgid "Inventory" msgstr "Inventario" @@ -934,14 +943,15 @@ #: AgedControlledInventory.php:42 MRPReschedules.php:126 MRPShortages.php:261 #: StockClone.php:53 Stocks.php:63 +#: reportwriter/languages/en_US/reports.php:103 msgid "Stock" msgstr "Existencia" #: AgedControlledInventory.php:43 BOMIndented.php:314 -#: BOMIndentedReverse.php:293 BOMInquiry.php:109 BOMInquiry.php:200 -#: BOMs.php:565 BOMs.php:912 ContractBOM.php:242 ContractBOM.php:354 -#: ContractOtherReqts.php:98 CounterReturns.php:1686 CounterSales.php:2095 -#: CounterSales.php:2249 CreditStatus.php:152 CreditStatus.php:243 +#: BOMIndentedReverse.php:293 BOMInquiry.php:109 BOMInquiry.php:199 +#: BOMs.php:567 BOMs.php:914 ContractBOM.php:242 ContractBOM.php:354 +#: ContractOtherReqts.php:98 CounterReturns.php:1686 CounterSales.php:2096 +#: CounterSales.php:2250 CreditStatus.php:152 CreditStatus.php:243 #: CustomerPurchases.php:76 EmailConfirmation.php:219 #: EmailConfirmation.php:349 FixedAssetCategories.php:167 #: FixedAssetDepreciation.php:91 FixedAssetRegister.php:87 @@ -950,43 +960,42 @@ #: GLTransInquiry.php:49 GoodsReceived.php:101 #: InternalStockCategoriesByRole.php:168 InternalStockRequest.php:345 #: InternalStockRequest.php:559 InternalStockRequest.php:629 -#: InventoryQuantities.php:246 InventoryValuation.php:207 Labels.php:292 -#: MaintenanceTasks.php:95 MaintenanceUserSchedule.php:50 -#: MaterialsNotUsed.php:35 MRPDemands.php:92 MRPDemands.php:295 -#: MRPDemandTypes.php:113 MRPPlannedWorkOrders.php:258 MRPReport.php:536 -#: MRPReport.php:750 MRPReschedules.php:192 MRPShortages.php:350 -#: NoSalesItems.php:194 PaymentTerms.php:182 PcExpenses.php:190 -#: PcExpenses.php:296 PcExpensesTypeTab.php:171 PcReportTab.php:179 -#: PcTypeTabs.php:164 PDFOrdersInvoiced.php:335 PDFOrderStatus.php:337 -#: PO_Items.php:716 PO_Items.php:1188 PO_SelectOSPurchOrder.php:263 -#: PO_SelectPurchOrder.php:214 PricesByCost.php:153 RelatedItemsUpdate.php:154 -#: ReorderLevelLocation.php:73 ReorderLevel.php:298 ReverseGRN.php:395 -#: SalesCategories.php:509 SecurityTokens.php:94 SecurityTokens.php:103 -#: SecurityTokens.php:120 SelectAsset.php:264 SelectCompletedOrder.php:505 -#: SelectContract.php:147 SelectCreditItems.php:1021 SelectOrderItems.php:1454 -#: SelectOrderItems.php:1616 SelectProduct.php:532 SelectProduct.php:758 -#: SelectSalesOrder.php:556 SelectWorkOrder.php:219 Shipt_Select.php:191 -#: StockClone.php:665 StockCounts.php:142 StockDispatch.php:504 -#: StockLocStatus.php:173 StockQuantityByDate.php:109 Stocks.php:988 +#: InventoryQuantities.php:246 InventoryValuation.php:197 Labels.php:290 +#: MRPDemandTypes.php:113 MRPDemands.php:92 MRPDemands.php:295 +#: MRPPlannedWorkOrders.php:258 MRPReport.php:536 MRPReport.php:750 +#: MRPReschedules.php:192 MRPShortages.php:350 MaintenanceTasks.php:95 +#: MaintenanceUserSchedule.php:50 MaterialsNotUsed.php:35 NoSalesItems.php:194 +#: PDFOrderStatus.php:337 PDFOrdersInvoiced.php:335 PO_Items.php:716 +#: PO_Items.php:1187 PO_SelectOSPurchOrder.php:263 PO_SelectPurchOrder.php:214 +#: PaymentTerms.php:182 PcExpenses.php:190 PcExpenses.php:296 +#: PcExpensesTypeTab.php:171 PcReportTab.php:178 PcTypeTabs.php:164 +#: PricesByCost.php:153 RelatedItemsUpdate.php:154 ReorderLevel.php:298 +#: ReorderLevelLocation.php:73 ReverseGRN.php:395 SalesCategories.php:509 +#: SecurityTokens.php:94 SecurityTokens.php:103 SecurityTokens.php:120 +#: SelectAsset.php:264 SelectCompletedOrder.php:505 SelectContract.php:147 +#: SelectCreditItems.php:1021 SelectOrderItems.php:1452 +#: SelectOrderItems.php:1614 SelectProduct.php:531 SelectProduct.php:757 +#: SelectSalesOrder.php:560 SelectWorkOrder.php:219 Shipt_Select.php:191 +#: StockClone.php:667 StockCounts.php:142 StockDispatch.php:504 +#: StockLocStatus.php:173 StockQuantityByDate.php:109 Stocks.php:984 #: SuppCreditGRNs.php:92 SuppCreditGRNs.php:192 SuppFixedAssetChgs.php:78 -#: SuppInvGRNs.php:120 SuppInvGRNs.php:257 SupplierCredit.php:317 -#: SupplierCredit.php:385 SupplierInvoice.php:664 SupplierInvoice.php:744 -#: SupplierPriceList.php:39 SupplierPriceList.php:271 +#: SuppInvGRNs.php:120 SuppInvGRNs.php:258 SuppPriceList.php:309 +#: SupplierCredit.php:317 SupplierCredit.php:385 SupplierInvoice.php:664 +#: SupplierInvoice.php:744 SupplierPriceList.php:39 SupplierPriceList.php:271 #: SupplierPriceList.php:533 SupplierTenderCreate.php:434 #: SupplierTenderCreate.php:695 SupplierTenderCreate.php:853 #: SupplierTenders.php:326 SupplierTenders.php:421 SupplierTenders.php:687 -#: SuppPriceList.php:309 TopItems.php:169 WorkCentres.php:128 -#: WorkOrderCosting.php:100 WorkOrderCosting.php:132 WorkOrderEntry.php:738 -#: WorkOrderIssue.php:761 Z_ItemsWithoutPicture.php:33 -#: includes/DefineLabelClass.php:12 includes/DefineLabelClass.php:45 +#: TopItems.php:170 WorkCentres.php:128 WorkOrderCosting.php:98 +#: WorkOrderCosting.php:130 WorkOrderEntry.php:735 WorkOrderIssue.php:759 +#: Z_ItemsWithoutPicture.php:33 api/api_xml-rpc.php:3489 #: includes/PDFGrnHeader.inc:29 includes/PDFInventoryPlanPageHeader.inc:51 #: includes/PDFOstdgGRNsPageHeader.inc:38 #: includes/PDFStockLocTransferHeader.inc:65 #: includes/PDFStockTransferHeader.inc:36 includes/PDFTopItemsHeader.inc:50 #: includes/PDFTransPageHeader.inc:211 #: includes/PDFTransPageHeaderPortrait.inc:267 -#: includes/PDFTransPageHeader_SunlightPower.inc:210 api/api_xml-rpc.php:3489 -#: ../webSHOP/includes/PlaceOrder.php:250 +#: includes/DefineLabelClass.php:12 includes/DefineLabelClass.php:45 +#: ../webSHOP/includes/PlaceOrder.php:236 msgid "Description" msgstr "Descripción" @@ -996,7 +1005,7 @@ #: AgedControlledInventory.php:45 msgid "Quantity Remaining" -msgstr "" +msgstr "Cantidad restante" #: AgedControlledInventory.php:46 msgid "Inventory Value" @@ -1011,31 +1020,33 @@ #: CounterReturns.php:756 CounterSales.php:759 CounterSales.php:853 #: CounterSales.php:855 Credit_Invoice.php:298 Credit_Invoice.php:302 #: CustomerAllocations.php:349 CustomerAllocations.php:379 -#: CustomerInquiry.php:242 DeliveryDetails.php:876 DeliveryDetails.php:945 +#: CustomerInquiry.php:257 DeliveryDetails.php:881 DeliveryDetails.php:950 #: GLBalanceSheet.php:191 GLBalanceSheet.php:203 GLBalanceSheet.php:293 #: GLBalanceSheet.php:302 GLBudgets.php:213 GLJournal.php:435 #: GLTransInquiry.php:195 GLTrialBalance.php:225 GLTrialBalance.php:245 -#: GLTrialBalance.php:266 GLTrialBalance.php:362 GLTrialBalance.php:495 -#: GLTrialBalance.php:515 GLTrialBalance.php:539 GLTrialBalance.php:651 -#: GLTrialBalance.php:671 GLTrialBalance.php:695 InventoryValuation.php:207 -#: MaterialsNotUsed.php:77 OffersReceived.php:111 OrderDetails.php:174 +#: GLTrialBalance.php:266 GLTrialBalance.php:362 GLTrialBalance.php:492 +#: GLTrialBalance.php:512 GLTrialBalance.php:536 GLTrialBalance.php:648 +#: GLTrialBalance.php:668 GLTrialBalance.php:692 InventoryValuation.php:197 +#: MaterialsNotUsed.php:77 OffersReceived.php:111 OrderDetails.php:177 #: OutstandingGRNs.php:243 PDFCustTransListing.php:137 #: PDFOrdersInvoiced.php:379 PDFRemittanceAdvice.php:310 #: PDFSuppTransListing.php:131 RecurringSalesOrders.php:335 #: SalesByTypePeriodInquiry.php:395 SalesByTypePeriodInquiry.php:430 #: SalesByTypePeriodInquiry.php:465 SalesByTypePeriodInquiry.php:500 #: SalesByTypePeriodInquiry.php:561 SelectCreditItems.php:692 -#: SelectCreditItems.php:696 SelectOrderItems.php:1301 -#: SuppContractChgs.php:107 SuppFixedAssetChgs.php:97 -#: SupplierAllocations.php:458 SupplierAllocations.php:570 -#: SupplierAllocations.php:645 SupplierCredit.php:407 SupplierInquiry.php:214 -#: SuppShiptChgs.php:97 SuppTransGLAnalysis.php:139 Tax.php:250 -#: Z_CheckDebtorsControl.php:149 includes/PDFQuotationPageHeader.inc:109 +#: SelectCreditItems.php:696 SelectOrderItems.php:1299 +#: SuppContractChgs.php:107 SuppFixedAssetChgs.php:97 SuppShiptChgs.php:97 +#: SuppTransGLAnalysis.php:139 SupplierAllocations.php:458 +#: SupplierAllocations.php:570 SupplierAllocations.php:645 +#: SupplierCredit.php:407 SupplierInquiry.php:214 Tax.php:250 +#: Z_CheckDebtorsControl.php:149 api/api_debtortransactions.php:1271 +#: api/api_debtortransactions.php:1284 api/api_debtortransactions.php:1581 +#: includes/PDFQuotationPageHeader.inc:109 #: includes/PDFQuotationPortraitPageHeader.inc:100 -#: includes/PO_PDFOrderPageHeader.inc:81 api/api_debtortransactions.php:1271 -#: api/api_debtortransactions.php:1284 api/api_debtortransactions.php:1581 -#: ../webSHOP/includes/DisplayShoppingCart.php:8 -#: ../webSHOP/includes/PlaceOrder.php:299 +#: includes/PO_PDFOrderPageHeader.inc:81 +#: reportwriter/languages/en_US/reports.php:107 +#: ../webSHOP/includes/DisplayShoppingCart.php:7 +#: ../webSHOP/includes/PlaceOrder.php:285 #, php-format msgid "Total" msgstr "Total" @@ -1058,30 +1069,30 @@ #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:108 #: GLBalanceSheet.php:147 GLProfit_Loss.php:185 GLTagProfit_Loss.php:194 #: GLTrialBalance.php:163 InternalStockRequest.php:320 -#: InventoryPlanning.php:105 InventoryPlanning.php:182 -#: InventoryPlanning.php:219 InventoryPlanning.php:268 +#: InventoryPlanning.php:99 InventoryPlanning.php:176 +#: InventoryPlanning.php:213 InventoryPlanning.php:262 #: InventoryPlanningPrefSupplier.php:183 InventoryPlanningPrefSupplier.php:241 #: InventoryPlanningPrefSupplier.php:268 InventoryPlanningPrefSupplier.php:301 -#: InventoryQuantities.php:84 InventoryValuation.php:70 -#: MailInventoryValuation.php:21 MailInventoryValuation.php:119 -#: MailSalesReport_csv.php:30 MailSalesReport.php:23 +#: InventoryQuantities.php:84 InventoryValuation.php:64 #: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 #: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 #: MRPReschedules.php:57 MRPShortages.php:155 MRPShortages.php:167 -#: OutstandingGRNs.php:46 OutstandingGRNs.php:59 PDFCustomerList.php:20 -#: PDFCustomerList.php:232 PDFCustomerList.php:244 PDFLowGP.php:20 -#: PDFSellThroughSupportClaim.php:17 PDFStockCheckComparison.php:33 -#: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:265 -#: PurchaseByPrefSupplier.php:399 PurchaseByPrefSupplier.php:447 -#: PurchaseByPrefSupplier.php:471 PurchaseByPrefSupplier.php:500 -#: PurchaseByPrefSupplier.php:531 ReorderLevel.php:60 SelectAsset.php:39 -#: SelectProduct.php:44 StockCheck.php:65 StockCheck.php:139 -#: SupplierTenderCreate.php:671 SupplierTenders.php:397 SuppPriceList.php:138 +#: MailInventoryValuation.php:22 MailInventoryValuation.php:120 +#: MailSalesReport.php:23 MailSalesReport_csv.php:30 OutstandingGRNs.php:46 +#: OutstandingGRNs.php:59 PDFCustomerList.php:20 PDFCustomerList.php:232 +#: PDFCustomerList.php:244 PDFLowGP.php:20 PDFSellThroughSupportClaim.php:17 +#: PDFStockCheckComparison.php:33 PDFStockCheckComparison.php:59 +#: PDFStockCheckComparison.php:265 PurchaseByPrefSupplier.php:399 +#: PurchaseByPrefSupplier.php:447 PurchaseByPrefSupplier.php:471 +#: PurchaseByPrefSupplier.php:500 PurchaseByPrefSupplier.php:531 +#: ReorderLevel.php:60 SelectAsset.php:39 SelectProduct.php:44 +#: StockCheck.php:60 StockCheck.php:132 SuppPriceList.php:138 +#: SupplierTenderCreate.php:671 SupplierTenders.php:397 #: includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Informe de problemas" -#: AgedDebtors.php:269 CustomerInquiry.php:97 CustomerInquiry.php:122 +#: AgedDebtors.php:269 CustomerInquiry.php:117 CustomerInquiry.php:142 #: CustomerPurchases.php:25 Dashboard.php:145 DebtorsAtPeriodEnd.php:59 msgid "The customer details could not be retrieved by the SQL because" msgstr "No se pudo obtener mediante SQL el detalle del cliente porque" @@ -1091,55 +1102,55 @@ #: BOMExtendedQty.php:244 BOMIndented.php:155 BOMIndented.php:236 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:222 BOMListing.php:45 #: Credit_Invoice.php:201 Dashboard.php:146 Dashboard.php:257 -#: Dashboard.php:423 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:112 -#: GLBalanceSheet.php:150 GLBalanceSheet.php:329 GLProfit_Loss.php:188 -#: GLProfit_Loss.php:200 GLTagProfit_Loss.php:198 GLTagProfit_Loss.php:211 -#: GLTrialBalance.php:168 GLTrialBalance.php:182 InventoryPlanning.php:108 -#: InventoryPlanning.php:185 InventoryPlanning.php:222 -#: InventoryPlanning.php:271 InventoryPlanning.php:346 +#: Dashboard.php:437 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 +#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:112 GLBalanceSheet.php:150 +#: GLBalanceSheet.php:329 GLProfit_Loss.php:188 GLProfit_Loss.php:200 +#: GLTagProfit_Loss.php:198 GLTagProfit_Loss.php:211 GLTrialBalance.php:168 +#: GLTrialBalance.php:182 GetStockImage.php:150 InventoryPlanning.php:102 +#: InventoryPlanning.php:179 InventoryPlanning.php:216 +#: InventoryPlanning.php:265 InventoryPlanning.php:340 #: InventoryPlanningPrefSupplier.php:186 InventoryPlanningPrefSupplier.php:244 #: InventoryPlanningPrefSupplier.php:271 InventoryPlanningPrefSupplier.php:304 #: InventoryPlanningPrefSupplier.php:372 InventoryQuantities.php:87 -#: InventoryQuantities.php:98 InventoryValuation.php:73 -#: InventoryValuation.php:102 MailInventoryValuation.php:122 -#: MailInventoryValuation.php:218 MailInventoryValuation.php:242 -#: MailInventoryValuation.php:250 MRPPlannedPurchaseOrders.php:117 +#: InventoryQuantities.php:98 InventoryValuation.php:67 +#: InventoryValuation.php:92 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:311 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 +#: MailInventoryValuation.php:123 MailInventoryValuation.php:219 +#: MailInventoryValuation.php:243 MailInventoryValuation.php:251 #: OutstandingGRNs.php:49 OutstandingGRNs.php:62 PDFCustomerList.php:235 #: PDFCustomerList.php:247 PDFFGLabel.php:217 PDFGLJournal.php:100 -#: PDFGrn.php:176 PDFLowGP.php:59 PDFLowGP.php:71 PDFPriceList.php:154 +#: PDFGrn.php:176 PDFLowGP.php:59 PDFLowGP.php:71 PDFPriceList.php:147 #: PDFPrintLabel.php:45 PDFQALabel.php:116 PDFQuotation.php:276 #: PDFQuotationPortrait.php:268 PDFRemittanceAdvice.php:83 #: PDFSellThroughSupportClaim.php:74 PDFSellThroughSupportClaim.php:86 #: PDFStockCheckComparison.php:37 PDFStockCheckComparison.php:63 #: PDFStockCheckComparison.php:269 PDFWOPrint.php:109 PO_PDFPurchOrder.php:31 -#: PO_PDFPurchOrder.php:156 PrintCustOrder_generic.php:254 -#: PrintCustOrder.php:238 PrintWOItemSlip.php:123 +#: PO_PDFPurchOrder.php:156 PrintCustOrder.php:238 +#: PrintCustOrder_generic.php:254 PrintWOItemSlip.php:123 #: PurchaseByPrefSupplier.php:402 PurchaseByPrefSupplier.php:450 #: PurchaseByPrefSupplier.php:474 PurchaseByPrefSupplier.php:503 #: PurchaseByPrefSupplier.php:534 ReorderLevel.php:63 ReorderLevel.php:182 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:32 StockCheck.php:46 -#: StockCheck.php:68 StockCheck.php:99 StockCheck.php:142 StockCheck.php:153 -#: StockCheck.php:195 StockDispatch.php:128 StockDispatch.php:141 -#: SupplierBalsAtPeriodEnd.php:54 SupplierBalsAtPeriodEnd.php:65 +#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:32 StockCheck.php:42 +#: StockCheck.php:63 StockCheck.php:93 StockCheck.php:135 StockCheck.php:146 +#: StockCheck.php:188 StockDispatch.php:128 StockDispatch.php:141 #: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:217 SuppPriceList.php:142 Tax.php:57 Tax.php:171 -#: Tax.php:310 Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 +#: SuppPaymentRun.php:217 SuppPriceList.php:142 SupplierBalsAtPeriodEnd.php:54 +#: SupplierBalsAtPeriodEnd.php:65 Tax.php:57 Tax.php:171 Tax.php:310 +#: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:41 +#: includes/ConstructSQLForUserDefinedSalesReport.inc:180 +#: includes/ConstructSQLForUserDefinedSalesReport.inc:188 +#: includes/ConstructSQLForUserDefinedSalesReport.inc:343 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 #: includes/PDFPaymentRun_PymtFooter.php:119 #: includes/PDFPaymentRun_PymtFooter.php:156 #: includes/PDFPaymentRun_PymtFooter.php:187 #: includes/PDFPaymentRun_PymtFooter.php:218 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:180 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:188 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:343 msgid "Back to the menu" msgstr "Volver al menú" @@ -1158,39 +1169,39 @@ msgstr "no se pudo obtener porque" #: AgedDebtors.php:374 AgedSuppliers.php:200 Areas.php:94 -#: ConfirmDispatch_Invoice.php:172 ConfirmDispatch_Invoice.php:1000 -#: ConfirmDispatch_Invoice.php:1014 Contracts.php:592 CounterReturns.php:1024 -#: CounterReturns.php:1038 CounterSales.php:1424 CounterSales.php:1438 +#: ConfirmDispatch_Invoice.php:172 ConfirmDispatch_Invoice.php:1001 +#: ConfirmDispatch_Invoice.php:1015 Contracts.php:592 CounterReturns.php:1024 +#: CounterReturns.php:1038 CounterSales.php:1425 CounterSales.php:1439 #: Credit_Invoice.php:747 Credit_Invoice.php:768 CustItem.php:73 #: CustItem.php:86 CustItem.php:197 CustomerReceipt.php:574 #: CustomerReceipt.php:726 CustomerReceipt.php:754 CustomerTransInquiry.php:97 -#: Dashboard.php:259 Dashboard.php:425 DeliveryDetails.php:409 -#: GLProfit_Loss.php:609 GLTagProfit_Loss.php:515 Payments.php:362 -#: PDFRemittanceAdvice.php:85 PurchData.php:114 PurchData.php:132 -#: PurchData.php:360 RecurringSalesOrders.php:267 ReverseGRN.php:192 -#: ReverseGRN.php:206 ReverseGRN.php:383 SelectCreditItems.php:1441 -#: SelectSalesOrder.php:209 SelectSalesOrder.php:373 SellThroughSupport.php:81 -#: SellThroughSupport.php:97 SMTPServer.php:62 StockCheck.php:224 -#: StockClone.php:420 StockClone.php:494 StockCostUpdate.php:78 -#: StockCostUpdate.php:88 StockLocStatus.php:165 StockMovements.php:92 -#: StockQuantityByDate.php:98 StockReorderLevel.php:45 StockStatus.php:286 -#: StockTransfers.php:202 StockUsageGraph.php:55 StockUsage.php:142 -#: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:138 -#: SupplierInquiry.ph... [truncated message content] |
From: <rc...@us...> - 2014-11-24 17:41:03
|
Revision: 7006 http://sourceforge.net/p/web-erp/reponame/7006 Author: rchacon Date: 2014-11-24 17:40:55 +0000 (Mon, 24 Nov 2014) Log Message: ----------- In PrintCustStatements.php, make translatable the currency name and the transaction type. Modified Paths: -------------- trunk/PrintCustStatements.php trunk/doc/Change.log trunk/includes/PDFStatementPageHeader.inc Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2014-11-24 16:25:25 UTC (rev 7005) +++ trunk/PrintCustStatements.php 2014-11-24 17:40:55 UTC (rev 7006) @@ -49,7 +49,7 @@ $FirstStatement = True; - + // check if the user has set a default bank account for invoices, if not leave it blank $sql = "SELECT bankaccounts.invoice, bankaccounts.bankaccountnumber, @@ -124,7 +124,7 @@ ON debtortrans.type=systypes.typeid WHERE debtortrans.debtorno='" . $StmtHeader['debtorno'] . "' AND debtortrans.settled=0"; - + if ($_SESSION['SalesmanLogin'] != '') { $sql .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; } @@ -198,7 +198,7 @@ $FontSize=9; - $LeftOvers = $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,$myrow['typename'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize, _($myrow['typename']), 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,50,$FontSize,$myrow['transno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+211,$YPos,50,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); @@ -248,7 +248,7 @@ $DisplayOutstanding = locale_number_format($myrow['ostdg'],$StmtHeader['currdecimalplaces']); $FontSize=9; - $LeftOvers = $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,$myrow['typename'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize, _($myrow['typename']), 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,50,$FontSize,$myrow['transno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+211,$YPos,50,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); @@ -266,7 +266,7 @@ /*Now show also in the remittance advice sectin */ $FontSize=8; - $LeftOvers = $pdf->addTextWrap($Perforation+10,$YPos,30,$FontSize,$myrow['typename'], 'left'); + $LeftOvers = $pdf->addTextWrap($Perforation+10,$YPos,30,$FontSize, _($myrow['typename']), 'left'); $LeftOvers = $pdf->addTextWrap($Perforation+75,$YPos,30,$FontSize,$myrow['transno'], 'left'); $LeftOvers = $pdf->addTextWrap($Perforation+90,$YPos,60,$FontSize,$DisplayOutstanding, 'right'); @@ -420,7 +420,7 @@ /* Show the bank account details */ $pdf->addText($Perforation-250, $Bottom_Margin+32, $FontSize, _('Please make payments to our account:') . ' ' . $DefaultBankAccountNumber); $pdf->addText($Perforation-250, $Bottom_Margin+32-$line_height, $FontSize, _('Quoting your account reference') . ' ' . $StmtHeader['debtorno'] ); - + /*also show the total due in the remittance section */ if ($AgedAnalysis['balance']>0){ /*No point showing a negative balance for payment! */ $FontSize=8; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-11-24 16:25:25 UTC (rev 7005) +++ trunk/doc/Change.log 2014-11-24 17:40:55 UTC (rev 7006) @@ -1,5 +1,6 @@ webERP Change Log +24/11/14 RChacon: In PrintCustStatements.php, make translatable the currency name and the transaction type. 24/11/14 RChacon: Spanish translation improvements. Merging "View GL Entries" and "View the GL Entries". 22/11/14 Exson: Fix the qualitytext does not have default value for strict sql mode in Credit_Invoice.php. 22/11/14 Phil: Z_DeleteOldPrices.php now removes all old prices where there is a later start for a price with no end date Modified: trunk/includes/PDFStatementPageHeader.inc =================================================================== --- trunk/includes/PDFStatementPageHeader.inc 2014-11-24 16:25:25 UTC (rev 7005) +++ trunk/includes/PDFStatementPageHeader.inc 2014-11-24 17:40:55 UTC (rev 7006) @@ -113,7 +113,7 @@ $FontSize=8; $XPos = $Page_Width/2 - 60; -$pdf->addText($XPos, $YPos,$FontSize, _('All amounts stated in') . ' - ' . $StmtHeader['currency']); +$pdf->addText($XPos, $YPos,$FontSize, _('All amounts stated in') . ': ' . _($StmtHeader['currency'])); $YPos -= $line_height; $pdf->addText($XPos, $YPos,$FontSize, $StmtHeader['terms']); |
From: <rc...@us...> - 2014-11-29 17:45:55
|
Revision: 7010 http://sourceforge.net/p/web-erp/reponame/7010 Author: rchacon Date: 2014-11-29 17:45:46 +0000 (Sat, 29 Nov 2014) Log Message: ----------- Add label and mouse-over help for Pan size input field. Modified Paths: -------------- trunk/Stocks.php trunk/doc/Manual/ManualInventory.html Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2014-11-29 16:25:11 UTC (rev 7009) +++ trunk/Stocks.php 2014-11-29 17:45:46 UTC (rev 7010) @@ -1287,8 +1287,8 @@ </tr>'; echo '<tr> - <td>' . _('Pan Size') . ':</td> - <td><input type="text" class="number" name="Pansize" size="6" maxlength="6" value="' . locale_number_format($_POST['Pansize'],0) . '" /></td> + <td><label for="Pansize">' . _('Pan Size') . ':</label></td> + <td><input class="number" id="Pansize" maxlength="6" name="Pansize" size="6" title="' . _('Order multiple. It is the minimum packing quantity.') . '" type="text" value="' . locale_number_format($_POST['Pansize'],0) . '" /></td> </tr> <tr> <td>' . _('Shrinkage Factor') . ':</td> Modified: trunk/doc/Manual/ManualInventory.html =================================================================== --- trunk/doc/Manual/ManualInventory.html 2014-11-29 16:25:11 UTC (rev 7009) +++ trunk/doc/Manual/ManualInventory.html 2014-11-29 17:45:46 UTC (rev 7010) @@ -138,12 +138,15 @@ <p>The description translations can be maintained within the same parameters above. The translations that can be maintained are set in the system configuration screen. Any number of translations can be maintained. These translations are used to print on customer invoices if the customer is set up to use one of the languages for which translations are maintained. If not translation is available then the fall back is to the default description.</p> - <!--h3>Image File</h3> + <h3>Image File</h3> - <p>...</p--><!--Restrictions (.jpg)--> + <!--Restrictions (.jpg)--> <!--Suggested content: Where is it used? (e.g. scripts, formulas, etc.)--> + <p>Picture files of items can be uploaded to the server. The system will check that files uploaded are less than defined maxum size (in KB) before they will be allowed to be uploaded. Large pictures will make the system slow and will be difficult to view in the stock maintenance screen.</p> + <p>Maximum Size in KB of uploaded images are defined by system administrators in <i><u>Main Menu</u></i> > <i><u>Setup</u></i> > <i>General Setup Options</i> > <i><u>System Parameters</u></i> > <i>General Settings</i>.</p> + <h3>Category</h3> <p>These categories need to be set up first - from the System Setup tab of the menu. In selecting the stock category, be aware that the system uses the category information for analysis and summary reporting as well as identifying accounts for standard cost general ledger integration, if this option is enabled. There is a link to create new stock categories from the stock item entry page.</p> @@ -280,7 +283,7 @@ <h3>Pan Size</h3> - <p>This modifier is sometimes called the order multiple. It is minimum packing quantity. It allows you to create planned orders in even multiples. This is especially useful if you are required by your suppliers to place orders in specific lot sizes. It is also a useful modifier is you have established your own production run sizes. This modifier causes MRP to inflate the required order quantity to an even increment of the pansize value. As with all modifiers you do need to be careful with this modifier as its use could lead to excess inventories.</p> + <p>This modifier is sometimes called the order multiple. It is the minimum packing quantity. It allows you to create planned orders in even multiples. This is especially useful if you are required by your suppliers to place orders in specific lot sizes. It is also a useful modifier is you have established your own production run sizes. This modifier causes MRP to inflate the required order quantity to an even increment of the pansize value. As with all modifiers you do need to be careful with this modifier as its use could lead to excess inventories.</p> <p>In other words if it is most efficient to manufacture an item in batches of 10 then the pan size would be 10, and MRP would calculate demand in batches of 10, so would inflate a demand of 17 to 20. For instance, we purchase some chemical materials which is 25 kg/pack. The pansize means you have to purchase at least one pack each time.</p> |
From: <dai...@us...> - 2014-12-01 07:08:58
|
Revision: 7011 http://sourceforge.net/p/web-erp/reponame/7011 Author: daintree Date: 2014-12-01 07:08:55 +0000 (Mon, 01 Dec 2014) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/CustomerBalancesMovement.php trunk/config.distrib.php trunk/includes/Login.php Modified: trunk/CustomerBalancesMovement.php =================================================================== --- trunk/CustomerBalancesMovement.php 2014-11-29 17:45:46 UTC (rev 7010) +++ trunk/CustomerBalancesMovement.php 2014-12-01 07:08:55 UTC (rev 7011) @@ -3,11 +3,14 @@ $PageSecurity = 1; include('includes/session.inc'); $Title=_('Customer Balances Movements'); -include('includes/header.inc'); -echo '<p class="page_title_text"> +if (!isset($_POST['CreateCSV'])){ + include('includes/header.inc'); + + echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Customer Balances Movements') . '" alt="" />' . ' ' . _('Customer Balances Movements') . ' </p>'; +} if (!isset($_POST['RunReport'])){ @@ -48,6 +51,10 @@ <td>' . _('Date To') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="11" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr> + <tr> + <td>' . _('Create CSV') . ':</td> + <td><input type="checkbox" name="CreateCSV" value=""></td> + </tr> </table> <br /> @@ -90,15 +97,19 @@ $LocalTotal =0; -echo '<table> - <tr> - <th class="ascending">' . _('Customer') . ' </th> - <th class="ascending">' . _('Opening Balance') . '</th> - <th class="ascending">' . _('Debits') . '</th> - <th class="ascending">' . _('Credits') . '</th> - <th class="ascending">' . _('Balance') . '</th> - </tr>'; +if (!isset($_POST['CreateCSV'])){ + echo '<table> + <tr> + <th class="ascending">' . _('Customer') . ' </th> + <th class="ascending">' . _('Opening Balance') . '</th> + <th class="ascending">' . _('Debits') . '</th> + <th class="ascending">' . _('Credits') . '</th> + <th class="ascending">' . _('Balance') . '</th> + </tr>'; +} else { + $CSVFile = '"' . _('Customer') . '","' . _('Opening Balance') . '","' . _('Debits') . '", "' . _('Credits') . '","' . _('Balance') . '"' . "\n"; +} $OpeningBalances =0; $Debits =0; @@ -127,8 +138,8 @@ $sql = "SELECT SUM(CASE WHEN debtortrans.type=10 THEN ovamount+ovgst+ovdiscount+ovfreight ELSE 0 END) AS currencydebits, SUM(CASE WHEN debtortrans.type<>10 THEN ovamount+ovgst+ovdiscount+ovfreight ELSE 0 END) AS currencycredits, debtorsmaster.debtorno, - SUM(CASE WHEN debtortrans.type=10 THEN (ovamount+ovgst+ovdiscount+ovfreight-alloc)/debtortrans.rate ELSE 0 END) AS localdebits, - SUM(CASE WHEN debtortrans.type<>10 THEN (ovamount+ovgst+ovdiscount+ovfreight-alloc)/debtortrans.rate ELSE 0 END) AS localcredits + SUM(CASE WHEN debtortrans.type=10 THEN (ovamount+ovgst+ovdiscount+ovfreight)/debtortrans.rate ELSE 0 END) AS localdebits, + SUM(CASE WHEN debtortrans.type<>10 THEN (ovamount+ovgst+ovdiscount+ovfreight)/debtortrans.rate ELSE 0 END) AS localcredits FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno WHERE trandate>='" . FormatDateForSQL($_POST['FromDate']) . "' AND trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "' @@ -138,42 +149,71 @@ $TransResult = DB_query($sql); $TransRow = DB_fetch_array($TransResult); - $OpeningBal = $myrow['localbalance']-$TransPostRow['localtotalpost']-$TransRow['localdebits']+$TransRow['localcredits']; + $OpeningBal = $myrow['localbalance']-$TransPostRow['localtotalpost']-$TransRow['localdebits']-$TransRow['localcredits']; $ClosingBal = $myrow['localbalance']-$TransPostRow['localtotalpost']; + if($OpeningBal !=0 OR $ClosingBal!=0 OR $TransRow['localdebits']!=0 OR $TransRow['localcredits']!=0) { - echo '<tr> - <td>' . $myrow['name'] . ' </td> - <td class="number">' . locale_number_format($OpeningBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($TransRow['localdebits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($TransRow['localcredits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($ClosingBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - </tr>'; + if (!isset($_POST['CreateCSV'])){ + echo '<tr> + <td>' . $myrow['name'] . ' </td> + <td class="number">' . locale_number_format($OpeningBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($TransRow['localdebits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($TransRow['localcredits'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($ClosingBal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr>'; + } else { //send the line to CSV file + $CSVFile .= '"' . stripcomma($myrow['name']) . '","' . stripcomma($OpeningBal) . '","' . stripcomma($TransRow['localdebits']) . '","' . stripcomma($TransRow['localcredits']) . '","' . stripcomma($ClosingBal) . '"' . "\n"; + + } + } + $OpeningBalances += $OpeningBal; $Debits += $TransRow['localdebits']; $Credits += $TransRow['localcredits']; $ClosingBalances += $ClosingBal; } -echo '</table>'; - +if (!isset($_POST['CreateCSV'])){ + echo '</table>'; +} if ($_POST['Customer']==''){ //if there could be several customers being reported - echo '<table> - <tr> - <th></th> - <th>' . _('Opening Balance') . '</th> - <th>' . _('Debits') . '</th> - <th>' . _('Credits') . '</th> - <th>' . _('Balance') . '</th> - </tr> - <tr> - <td>' . _('TOTALS') . '</td> - <td class="number">' . locale_number_format($OpeningBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($Debits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($Credits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($ClosingBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - </tr> - </table>'; + if (!isset($_POST['CreateCSV'])){ + echo '<table> + <tr> + <th></th> + <th>' . _('Opening Balance') . '</th> + <th>' . _('Debits') . '</th> + <th>' . _('Credits') . '</th> + <th>' . _('Balance') . '</th> + </tr> + <tr> + <td>' . _('TOTALS') . '</td> + <td class="number">' . locale_number_format($OpeningBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($Debits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($Credits,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($ClosingBalances,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + </table>'; + } else { + $CSVFile .= '"' . _('TOTALS') . '","' . stripcomma($OpeningBalances) . '","' . stripcomma($Debits) . '","' . stripcomma($Credits) . '","' . stripcomma($ClosingBalances) . '"' . "\n"; + } } +if (isset($_POST['CreateCSV'])){ + + header('Content-Encoding: UTF-8'); + header('Content-type: text/csv; charset=UTF-8'); + header("Content-disposition: attachment; filename=CustomerBalancesMovement_" . FormatDateForSQL($_POST['FromDate']) . '-' . FormatDateForSQL($_POST['ToDate']) .'.csv'); + header("Pragma: public"); + header("Expires: 0"); + echo "\xEF\xBB\xBF"; // UTF-8 BOM + echo $CSVFile; + exit; +} + include('includes/footer.inc'); + +function stripcomma($str) { //because we're using comma as a delimiter + return str_replace(',', '', $str); +} ?> \ No newline at end of file Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2014-11-29 17:45:46 UTC (rev 7010) +++ trunk/config.distrib.php 2014-12-01 07:08:55 UTC (rev 7011) @@ -51,7 +51,7 @@ // 'ShowInputBox' // 'Hide' - +//$AllowCompanySelectionBox = 'Hide'; //$AllowCompanySelectionBox = 'ShowInputBox'; $AllowCompanySelectionBox = 'ShowSelectionBox'; Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2014-11-29 17:45:46 UTC (rev 7010) +++ trunk/includes/Login.php 2014-12-01 07:08:55 UTC (rev 7011) @@ -37,7 +37,7 @@ <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <span> <?php - if (isset($CompanyList) && is_array($CompanyList)) { + if (isset($CompanyList) AND is_array($CompanyList)) { foreach ($CompanyList as $key => $CompanyEntry){ if ($DefaultDatabase == $CompanyEntry['database']) { $CompanyNameField = "$key"; |
From: <rc...@us...> - 2014-12-05 14:15:03
|
Revision: 7015 http://sourceforge.net/p/web-erp/reponame/7015 Author: rchacon Date: 2014-12-05 14:14:54 +0000 (Fri, 05 Dec 2014) Log Message: ----------- Update "Pan size" translation (thanks to Klaus for German translation). Modified Paths: -------------- trunk/doc/Manual/ManualInventory.html trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po Modified: trunk/doc/Manual/ManualInventory.html =================================================================== --- trunk/doc/Manual/ManualInventory.html 2014-12-05 04:04:44 UTC (rev 7014) +++ trunk/doc/Manual/ManualInventory.html 2014-12-05 14:14:54 UTC (rev 7015) @@ -159,11 +159,11 @@ <h3>Packaged Volume</h3> - <p>This field is required for freight calculations. It records the volume of the one of the item as packaged for dispatch. The freight calculation takes the higher of the freight costs based on the total weight of the order and the total volume of the order. Most freight companies use a conversion and charge the higher of the two. See the section on freight calculations.</p><!--Suggestion: add a link to the freight calculations section.--> + <p>Also called the gross volume. This field is required for freight calculations. It records the volume of the one of the item as packaged for dispatch. The freight calculation takes the higher of the freight costs based on the total weight of the order and the total volume of the order. Most freight companies use a conversion and charge the higher of the two. See the section on freight calculations.</p><!--Suggestion: add a link to the freight calculations section.--> - <h3>Packaged Gross Weight</h3><!--Suggestion: standardise from "Packaged Gross Weight" to "Packaged Weight"--> + <h3>Packaged Weight</h3><!--Suggestion: standardise from "Packaged Gross Weight" to "Packaged Weight"--> - <p>This field is required for freight calculations. It records the weight of the one of the item as packaged for dispatch. The freight calculation takes the higher of the freight costs based on the total weight of the order and the total volume of the order. Most freight companies use a conversion and charge the higher of the two. See the section on freight calculations.</p><!--Suggestion: add a link to the freight calculations section.--> + <p>Also called the gross weight. This field is required for freight calculations. It records the weight of the one of the item as packaged for dispatch. The freight calculation takes the higher of the freight costs based on the total weight of the order and the total volume of the order. Most freight companies use a conversion and charge the higher of the two. See the section on freight calculations.</p><!--Suggestion: add a link to the freight calculations section.--> <h3>Net Weight</h3><!--Question: Is it "net content"? (e.g. net kilograms, net litres, etc.)--> Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2014-12-05 04:04:44 UTC (rev 7014) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2014-12-05 14:14:54 UTC (rev 7015) @@ -9,7 +9,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-02 13:21-0600\n" -"PO-Revision-Date: 2014-08-14 18:50-0600\n" +"PO-Revision-Date: 2014-12-05 07:08-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Deutsch <web...@li...>\n" "Language: de_DE\n" @@ -16927,7 +16927,7 @@ #: MRP.php:600 msgid "Use Pan Size" -msgstr "Rundungsfaktoren verwenden" +msgstr "Verpackungseinheit verwenden" #: MRP.php:604 msgid "Use Shrinkage" @@ -16951,7 +16951,7 @@ #: MRP.php:650 msgid "Use Pan Size?" -msgstr "Rundungsfaktoren verwenden?" +msgstr "Verpackungseinheit verwenden?" #: MRP.php:654 msgid "Use Shrinkage?" @@ -17479,7 +17479,7 @@ #: MRPReport.php:188 msgid "Pan Size:" -msgstr "Rund.-Fakt.:" +msgstr "Verpackungseinheit:" #: MRPReport.php:190 msgid "On Order:" @@ -30141,7 +30141,7 @@ #: StockClone.php:250 Stocks.php:239 msgid "Pansize quantity must be numeric" -msgstr "Die Rundungsmenge muss numerisch sein" +msgstr "Die Verpackungseinheit muss numerisch sein" #: StockClone.php:256 Stocks.php:245 msgid "Shrinkage factor quantity must be numeric" @@ -30316,7 +30316,7 @@ #: StockClone.php:987 Stocks.php:1290 msgid "Pan Size" -msgstr "Rundungsmenge" +msgstr "Verpackungseinheit" #: StockClone.php:991 Stocks.php:1294 msgid "Shrinkage Factor" Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-05 04:04:44 UTC (rev 7014) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-05 14:14:54 UTC (rev 7015) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-02 13:21-0600\n" -"PO-Revision-Date: 2014-11-24 10:23-0600\n" +"PO-Revision-Date: 2014-12-05 07:13-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -16862,7 +16862,7 @@ #: MRP.php:600 msgid "Use Pan Size" -msgstr "Usar Tamaño Panorámico" +msgstr "Usar tamaño de lote" #: MRP.php:604 msgid "Use Shrinkage" @@ -16886,7 +16886,7 @@ #: MRP.php:650 msgid "Use Pan Size?" -msgstr "Usar Tamaño Pan?" +msgstr "¿Usar tamaño de lote?" #: MRP.php:654 msgid "Use Shrinkage?" @@ -17417,7 +17417,7 @@ #: MRPReport.php:188 msgid "Pan Size:" -msgstr "Tamaño Panorámico:" +msgstr "Tamaño de lote:" #: MRPReport.php:190 msgid "On Order:" @@ -29937,7 +29937,7 @@ #: StockClone.php:185 Stocks.php:174 Z_ImportStocks.php:149 msgid "The weight of the packaged item must be a positive number" -msgstr "El peso del artículo empaquetado debe ser un número positivo" +msgstr "El peso del artículo empacado debe ser un número positivo" #: StockClone.php:191 Stocks.php:180 msgid "The net weight of the item in Net Weight must be numeric" @@ -29945,7 +29945,7 @@ #: StockClone.php:197 Stocks.php:186 msgid "The net weight of the item must be a positive number" -msgstr "" +msgstr "El peso neto del artículo debe ser un número positivo" #: StockClone.php:203 Stocks.php:192 Z_ImportStocks.php:153 msgid "The economic order quantity must be numeric" @@ -30028,7 +30028,7 @@ #: StockClone.php:250 Stocks.php:239 msgid "Pansize quantity must be numeric" -msgstr "Las cantidad Pansize debe ser numérica" +msgstr "El tamaño de lote debe ser numérico" #: StockClone.php:256 Stocks.php:245 msgid "Shrinkage factor quantity must be numeric" @@ -30071,7 +30071,7 @@ #: StockClone.php:502 msgid "New cloned Item" -msgstr "" +msgstr "Nuevo artículo clonado" #: StockClone.php:503 msgid "We also attempted to setup item purchase data and pricing." @@ -30084,7 +30084,7 @@ #: StockClone.php:510 msgid "Review Item Prices" -msgstr "" +msgstr "Revisar precios del artículo" #: StockClone.php:514 msgid "" @@ -30102,7 +30102,7 @@ #: StockClone.php:518 msgid "Review Item Cost" -msgstr "" +msgstr "Revisar costo del artículo" #: StockClone.php:576 msgid "Cloned Item Code" @@ -30201,7 +30201,7 @@ #: StockClone.php:987 Stocks.php:1290 msgid "Pan Size" -msgstr "Tamaño Panorámico" +msgstr "Tamaño de lote" #: StockClone.php:991 Stocks.php:1294 msgid "Shrinkage Factor" @@ -31801,7 +31801,7 @@ #: Stocks.php:1291 msgid "Order multiple. It is the minimum packing quantity." -msgstr "" +msgstr "Múltiplo de pedido. Es la cantidad mínima de embalaje." #: Stocks.php:1401 msgid "" Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2014-12-05 04:04:44 UTC (rev 7014) +++ trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2014-12-05 14:14:54 UTC (rev 7015) @@ -9,7 +9,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-02 13:21-0600\n" -"PO-Revision-Date: 2014-08-30 18:36-0600\n" +"PO-Revision-Date: 2014-12-05 08:09-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: French <none>\n" "Language: fr_FR\n" @@ -16974,7 +16974,7 @@ #: MRP.php:600 msgid "Use Pan Size" -msgstr "" +msgstr "Taille du lot" #: MRP.php:604 msgid "Use Shrinkage" @@ -16998,7 +16998,7 @@ #: MRP.php:650 msgid "Use Pan Size?" -msgstr "" +msgstr "Utiliser taille du lot?" #: MRP.php:654 msgid "Use Shrinkage?" @@ -17547,7 +17547,7 @@ #: MRPReport.php:188 msgid "Pan Size:" -msgstr "" +msgstr "Taille du lot:" #: MRPReport.php:190 msgid "On Order:" @@ -30383,7 +30383,7 @@ #: StockClone.php:250 Stocks.php:239 msgid "Pansize quantity must be numeric" -msgstr "La quantité pansize doit être numérique" +msgstr "La taille du lot doit être numérique" #: StockClone.php:256 Stocks.php:245 msgid "Shrinkage factor quantity must be numeric" @@ -30553,7 +30553,7 @@ #: StockClone.php:987 Stocks.php:1290 msgid "Pan Size" -msgstr "Taille du plateau" +msgstr "Taille du lot" #: StockClone.php:991 Stocks.php:1294 msgid "Shrinkage Factor" @@ -32152,7 +32152,7 @@ #: Stocks.php:1291 msgid "Order multiple. It is the minimum packing quantity." -msgstr "" +msgstr "Multiple de commande. C'est la quantité minimale d'emballage." #: Stocks.php:1401 msgid "" @@ -51320,65 +51320,3 @@ #~ msgstr "" #~ "Impossible d'afficher la valeur de configuration " #~ "\"NumberOfMonthMustBeShown\"" - -# JDN -#~ msgid "" -#~ "The selected period range is more than 12 months - only graphs for a " -#~ "period less than 12 months can be created" -#~ msgstr "" -#~ "La période choisie est supérieure à 12 mois - Seuls des graphiques de " -#~ "période de moins de 12 mois peuvent être créés" - -#~ msgid "" -#~ "The quantity on work orders for this product cannot be retrieved because" -#~ msgstr "" -#~ "La quantité des commandes de travail pour ce produit ne peut pas être " -#~ "trouvé en raison" - -#~ msgid "The quantity on order for this product to be received into" -#~ msgstr "La quantité à la commande de ce produit pour être reçu dans" - -#~ msgid "The quantity on work orders for this product to be received into" -#~ msgstr "" -#~ "La quantité des commandes de travail pour ce produit d'être reçu dans" - -#~ msgid "HTML" -#~ msgstr "HTML" - -#~ msgid "PDF" -#~ msgstr "PDF" - -#~ msgid "Rates" -#~ msgstr "Taux" - -#~ msgid "Tax Groupings" -#~ msgstr "Groupes de taxes" - -#~ msgid "Tax Provinces" -#~ msgstr "Région(s)" - -#~ msgid "Edit/Review Tax Authorities" -#~ msgstr "Modifier / Afficher les autorités fiscales" - -#~ msgid "Edit/Review Tax Groupings" -#~ msgstr "Modifier / Examiner Groupements d'impôt" - -#~ msgid "Edit/Review Tax Categories" -#~ msgstr "Modifier / Examiner les catégories d'impôt" - -#~ msgid "Tax Authority To Report On:" -#~ msgstr "Administration fiscale à formuler sur:" - -#~ msgid "" -#~ "Adjustments for Tax paid to Customs, FBT, entertainments etc must also be " -#~ "entered" -#~ msgstr "" -#~ "Ajustements de la taxe payée à la douane, FBT, etc divertissements " -#~ "doivent aussi être indiqués" - -#~ msgid "" -#~ "This information excludes Tax on journal entries/payments/receipts all " -#~ "Tax should be entered through AR/AP" -#~ msgstr "" -#~ "Cette information ne comprend pas la taxe sur les entrées du journal / " -#~ "paiements / recettes fiscales devraient tous être entré par AR / AP" |
From: <rc...@us...> - 2014-12-06 02:40:57
|
Revision: 7016 http://sourceforge.net/p/web-erp/reponame/7016 Author: rchacon Date: 2014-12-06 02:40:48 +0000 (Sat, 06 Dec 2014) Log Message: ----------- Minor adjustements (Spanish translation and text fixes). Modified Paths: -------------- trunk/PDFRemittanceAdvice.php trunk/PDFWOPrint.php trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2014-12-05 14:14:54 UTC (rev 7015) +++ trunk/PDFRemittanceAdvice.php 2014-12-06 02:40:48 UTC (rev 7016) @@ -44,7 +44,7 @@ /*then print the report */ include('includes/PDFStarter.php'); - $pdf->addInfo('Title',_('Remmitance Advice')); + $pdf->addInfo('Title',_('Remittance Advice')); $pdf->addInfo('Subject',_('Remittance Advice') . ' - ' . _('suppliers from') . ' ' . $_POST['FromCriteria'] . ' ' . _('to') . ' ' . $_POST['ToCriteria'] . ' ' . _('and Paid On') . ' ' . $_POST['PaymentDate']); $line_height=12; Modified: trunk/PDFWOPrint.php =================================================================== --- trunk/PDFWOPrint.php 2014-12-05 14:14:54 UTC (rev 7015) +++ trunk/PDFWOPrint.php 2014-12-06 02:40:48 UTC (rev 7016) @@ -445,8 +445,8 @@ } //end if need a new page headed up } /*end if there are order details to show on the order - or its a preview*/ if($FooterPrintedInPage == 0){ - $LeftOvers = $pdf->addText($FormDesign->SignedDate->x,$Page_Height-$FormDesign->SignedDate->y,$FormDesign->SignedDate->FontSize, _('Date : ') . '______________'); - $LeftOvers = $pdf->addText($FormDesign->SignedBy->x,$Page_Height-$FormDesign->SignedBy->y,$FormDesign->SignedBy->FontSize, _('Signed for: ').'____________________________________'); + $LeftOvers = $pdf->addText($FormDesign->SignedDate->x,$Page_Height-$FormDesign->SignedDate->y,$FormDesign->SignedDate->FontSize, _('Date') . ' : ______________'); + $LeftOvers = $pdf->addText($FormDesign->SignedBy->x,$Page_Height-$FormDesign->SignedBy->y,$FormDesign->SignedBy->FontSize, _('Signed for: ') . '____________________________________'); $FooterPrintedInPage= 1; } Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-05 14:14:54 UTC (rev 7015) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-06 02:40:48 UTC (rev 7016) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-02 13:21-0600\n" -"PO-Revision-Date: 2014-12-05 07:13-0600\n" +"PO-Revision-Date: 2014-12-05 20:28-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -3873,7 +3873,7 @@ #: ConfirmDispatch_Invoice.php:250 msgid "Dispathed Quantity should not be more than order balanced quantity" -msgstr "" +msgstr "Cantidad despachada no debe ser más que el saldo del pedido" #: ConfirmDispatch_Invoice.php:250 msgid "To dispatch quantity is" @@ -18842,7 +18842,7 @@ #: PDFGrn.php:20 msgid "Goods Received Note" -msgstr "Nota de Bienes Recibidos" +msgstr "Nota de bienes recibidos" #: PDFGrn.php:75 PDFQALabel.php:53 msgid "Could not get the supplier of the selected GRN" @@ -19079,7 +19079,7 @@ #: PDFPeriodStockTransListing.php:169 SelectProduct.php:406 msgid "Location Transfers" -msgstr "Transferencias de Localidad" +msgstr "Transferencias de localidad" #: PDFPeriodStockTransListing.php:172 StockAdjustments.php:8 msgid "Stock Adjustments" @@ -19113,7 +19113,7 @@ #: PDFPickingList.php:22 msgid "Select Picking Lists" -msgstr "Seleccionar Listas de Recolección" +msgstr "Seleccionar listas de recolección" #: PDFPickingList.php:35 msgid "Create picking lists for all deliveries to be made on" @@ -19121,11 +19121,11 @@ #: PDFPickingList.php:39 msgid "From Warehouse" -msgstr "Del Almacén" +msgstr "Del almacén" #: PDFPickingList.php:49 includes/MainMenuLinksArray.php:37 msgid "Print Picking Lists" -msgstr "Imprimir Listas de Recolección" +msgstr "Imprimir listas de recolección" #: PDFPickingList.php:58 msgid "" @@ -19240,7 +19240,7 @@ #: PDFPriceList.php:320 PDFPrintLabel.php:328 msgid "For Currency" -msgstr "para la Moneda" +msgstr "para la moneda" #: PDFPriceList.php:331 msgid "Show Gross Profit %" @@ -19327,7 +19327,7 @@ #: PDFPrintLabel.php:350 msgid "Show Labels" -msgstr "Mostrar Etiquetas" +msgstr "Mostrar etiquetas" #: PDFQALabel.php:20 msgid "QA Label" @@ -19451,11 +19451,11 @@ #: PrintCheque.php:92 Suppliers.php:832 Suppliers.php:1078 #: includes/PDFStatementPageHeader.inc:27 msgid "Remittance Advice" -msgstr "Aviso para Envío de Remesa" +msgstr "Aviso de remesa" #: PDFRemittanceAdvice.php:48 SuppPaymentRun.php:31 msgid "suppliers from" -msgstr "Proveedor desde" +msgstr "proveedores desde" #: PDFRemittanceAdvice.php:48 msgid "and Paid On" @@ -19480,7 +19480,7 @@ #: PDFRemittanceAdvice.php:130 includes/MainMenuLinksArray.php:147 msgid "Remittance Advices" -msgstr "Avisos Remesa" +msgstr "Avisos de remesa" #: PDFRemittanceAdvice.php:168 msgid "Date Of Payment" @@ -19492,7 +19492,7 @@ #: PDFRemittanceAdvice.php:269 msgid "Our Code:" -msgstr "Nuestro Código:" +msgstr "Nuestro código:" #: PDFRemittanceAdvice.php:311 msgid "This Payment" @@ -19804,7 +19804,7 @@ #: PDFWOPrint.php:448 msgid "Date : " -msgstr "" +msgstr "Fecha :" #: PDFWOPrint.php:449 msgid "Signed for: " |