From: <dai...@us...> - 2010-11-04 06:18:02
|
Revision: 4138 http://web-erp.svn.sourceforge.net/web-erp/?rev=4138&view=rev Author: daintree Date: 2010-11-04 06:17:56 +0000 (Thu, 04 Nov 2010) Log Message: ----------- Poul PurchData find supplier name Modified Paths: -------------- trunk/PurchData.php trunk/api/api_branches.php trunk/api/api_customers.php Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/PurchData.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -257,7 +257,7 @@ suppliers.address1, suppliers.address2, suppliers.address3 - FROM suppliers WHERE suppliers.suppname " . LIKE ."'" . $SearchString . "'"; + FROM suppliers WHERE suppliers.suppname " . LIKE ."'%" . $SearchString . "%'"; } elseif (strlen($_POST['SupplierCode']) > 0) { $SQL = "SELECT suppliers.supplierid, suppliers.suppname, Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/api/api_branches.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -499,14 +499,12 @@ $DebtorNumber . '";'; $result = api_DB_query($sql, $db); if (DB_error_no($db) != 0) - $Errors[0] = DatabaseUpdateFailed; - else - { - $Errors[0] = 0; // Signal data may follow. - while ($myrow = DB_fetch_row($result)) - { - $Errors[] = $myrow[0]; - } + $Errors[0] = DatabaseUpdateFailed; + else { + $Errors[0] = 0; // Signal data may follow. + while ($myrow = DB_fetch_row($result)) { + $Errors[] = $myrow[0]; + } } return $Errors; @@ -528,15 +526,13 @@ } $sql='SELECT * FROM custbranch WHERE debtorno="'.$DebtorNumber.'" and branchcode="'.$BranchCode.'"'; $result = api_DB_Query($sql, $db); - if (DB_error_no($db) != 0 ) + if (DB_error_no($db) != 0 ) { $Errors[0] = DatabaseUpdateFailed; - else - { + } else { $Errors[0] = 0; if (DB_num_rows($result) > 0) $Errors += DB_fetch_array($result); } - return $Errors; } Modified: trunk/api/api_customers.php =================================================================== --- trunk/api/api_customers.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/api/api_customers.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -514,7 +514,7 @@ } $sql='SELECT * FROM debtorsmaster WHERE debtorno="'.$DebtorNumber.'"'; $result = DB_Query($sql, $db); - $Errors[0] = 0; // None found. + $Errors[0] = 0; // None found. $Errors[1] = DB_fetch_array($result); return $Errors; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |