From: <dai...@us...> - 2010-11-07 02:59:06
|
Revision: 4152 http://web-erp.svn.sourceforge.net/web-erp/?rev=4152&view=rev Author: daintree Date: 2010-11-07 02:59:00 +0000 (Sun, 07 Nov 2010) Log Message: ----------- API getprices method needs to refer to start and end dates - set method not modified but needs work! Modified Paths: -------------- trunk/SuppShiptChgs.php trunk/api/api_stock.php trunk/api/api_xml-rpc.php trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/SuppShiptChgs.php =================================================================== --- trunk/SuppShiptChgs.php 2010-11-07 02:24:38 UTC (rev 4151) +++ trunk/SuppShiptChgs.php 2010-11-07 02:59:00 UTC (rev 4152) @@ -39,12 +39,14 @@ $InputError = False; if ($_POST['ShiptRef'] == ""){ $_POST['ShiptRef'] = $_POST['ShiptSelection']; + } else { + $result = DB_query("SELECT shiptref FROM shipments WHERE shiptref='". $_POST['ShiptRef'] . "'",$db); + if (DB_num_rows($result)==0) { + prnMsg(_('The shipment entered manually is not a valid shipment reference. If you do not know the shipment reference, select it from the list'),'error'); + $InputError = True; + } } - if (!is_numeric($_POST['ShiptRef'])){ - prnMsg(_('The shipment reference must be numeric') . '. ' . _('This shipment charge cannot be added to the invoice'),'error'); - $InputError = True; - } - + if (!is_numeric($_POST['Amount'])){ prnMsg(_('The amount entered is not numeric') . '. ' . _('This shipment charge cannot be added to the invoice'),'error'); $InputError = True; Modified: trunk/api/api_stock.php =================================================================== --- trunk/api/api_stock.php 2010-11-07 02:24:38 UTC (rev 4151) +++ trunk/api/api_stock.php 2010-11-07 02:59:00 UTC (rev 4152) @@ -715,19 +715,24 @@ if (sizeof($Errors)!=0) { return $Errors; } - $sql = 'SELECT COUNT(*) FROM prices - WHERE stockid="'.$StockID.'" - and typeabbrev="'.$SalesType.'" - and currabrev="'.$Currency.'"'; + $sql = "SELECT COUNT(*) FROM prices + WHERE stockid='" .$StockID. "' + AND typeabbrev='" .$SalesType. "' + AND currabrev='".$Currency. "' + AND startdate>='". Date('Y-m-d') . "' + (AND enddate<='" . Date('Y-m-d') . "' OR enddate='0000-00-00')"; $result = DB_Query($sql, $db); $myrow = DB_fetch_row($result); if ($myrow[0]==0) { $Errors[0] = NoPricesSetup; return $Errors; } else { - $sql='SELECT price FROM prices WHERE stockid="'.$StockID.'" - and typeabbrev="'.$SalesType.'" - and currabrev="'.$Currency.'"'; + $sql="SELECT price FROM prices + WHERE stockid='" .$StockID. "' + AND typeabbrev='" .$SalesType. "' + AND currabrev='".$Currency. "' + AND startdate>='". Date('Y-m-d') . "' + (AND enddate<='" . Date('Y-m-d') . "' OR enddate='0000-00-00')"; } $result = DB_Query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2010-11-07 02:24:38 UTC (rev 4151) +++ trunk/api/api_xml-rpc.php 2010-11-07 02:59:00 UTC (rev 4152) @@ -29,8 +29,8 @@ function xmlrpc_Login($xmlrpcmsg) { ob_start('ob_file_callback'); $rtn = new xmlrpcresp(php_xmlrpc_encode(LoginAPI($xmlrpcmsg->getParam(0)->scalarval(), - $xmlrpcmsg->getParam(1)->scalarval(), - $xmlrpcmsg->getParam(2)->scalarval()))); + $xmlrpcmsg->getParam(1)->scalarval(), + $xmlrpcmsg->getParam(2)->scalarval()))); ob_end_flush(); return $rtn; } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-11-07 02:24:38 UTC (rev 4151) +++ trunk/doc/Change.log.html 2010-11-07 02:59:00 UTC (rev 4152) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>06/11/10 Phil: ShiptChgs.php - made a check to ensure a shipment reference entered manully actually exists before it is added - otherwise a nasty error occurs on commital of the invoice <p>06/11/10 Paul T: InputSerialItemsSequential.php - Bug# 3080130 - Add new FormID to form. (and minor cleanup)</p> <p>06/11/10 Tim: ReorderLevelLocation.php - Remove fixed assets from selections</p> <p>06/11/10 Tim: ReorderLevel.php - Remove fixed assets from selections</p> Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-11-07 02:24:38 UTC (rev 4151) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-11-07 02:59:00 UTC (rev 4152) @@ -435,5 +435,5 @@ ALTER TABLE `reportfields` CHANGE `fieldname` `fieldname` VARCHAR( 80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT ''; ALTER TABLE `stockcatproperties` ADD `maximumvalue` DOUBLE NOT NULL DEFAULT 999999999 AFTER `defaultvalue` , -ADD `minimumvalue` DOUBLE NOT NULL DEFAULT -999999999 AFTER `maximumvalue` , -ADD `numericvalue` TINYINT NOT NULL AFTER `minimumvalue`; +ADD `minimumvalue` DOUBLE NOT NULL DEFAULT -999999999, +ADD `numericvalue` TINYINT NOT NULL DEFAULT 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |