01-10-2014, 10:02 PM
In CustomerBranches.php line 343 we have the following:
$sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'";
and then in line 345 we have:
$SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'";
as you can see the variable names are different cases, so the second one wont get applied. So ,line 345 should read:
$sql .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'";
Maybe we should standardise throughout the code base on using either $SQL (that seems closer to the coding guidelines) or $sql as there are a lot of these sorts of error?
Just a note for developers, this kind of error can be found when you are developing by setting error_reporting to -1 in your config.php file.
Thanks
Tim
$sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'";
and then in line 345 we have:
$SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'";
as you can see the variable names are different cases, so the second one wont get applied. So ,line 345 should read:
$sql .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'";
Maybe we should standardise throughout the code base on using either $SQL (that seems closer to the coding guidelines) or $sql as there are a lot of these sorts of error?
Just a note for developers, this kind of error can be found when you are developing by setting error_reporting to -1 in your config.php file.
Thanks
Tim