From: <ex...@us...> - 2014-06-26 03:33:09
|
Revision: 6779 http://sourceforge.net/p/web-erp/reponame/6779 Author: exsonqu Date: 2014-06-26 03:33:05 +0000 (Thu, 26 Jun 2014) Log Message: ----------- 26/06/14 Exson: Fixed the bug that Select Customers search result inconsistence with Customer receipt search result in SelectCustomer.php. Modified Paths: -------------- trunk/SelectCustomer.php Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2014-06-24 20:33:25 UTC (rev 6778) +++ trunk/SelectCustomer.php 2014-06-26 03:33:05 UTC (rev 6779) @@ -135,11 +135,11 @@ ON debtorsmaster.debtorno = custbranch.debtorno WHERE debtorsmaster.name " . LIKE . " '%" . $SearchKeywords . "%' AND debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' - AND custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' + AND (custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' OR custbranch.phoneno IS NULL) AND (debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%' OR debtorsmaster.address2 " . LIKE . " '%" . $_POST['CustAdd'] . "%' OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%' - OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%')"; + OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%')";//If there is no custbranch set, the phoneno in custbranch will be null, so we add IS NULL condition otherwise those debtors without custbranches setting will be no searchable and it will make a inconsistence with customer receipt interface. if (mb_strlen($_POST['CustType']) > 0 AND $_POST['CustType'] != 'ALL') { $SQL .= " AND debtortype.typename = '" . $_POST['CustType'] . "'"; |