Clean code
This commit is contained in:
parent
b8de0358c0
commit
9b7fee42e3
2 changed files with 3 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ if ($action == 'add') {
|
|||
$sql = "SELECT fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user_param";
|
||||
$sql .= " WHERE param = 'MAIN_BOXES_".$db->escape($pos)."' AND value = '1'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$sql .= " AND entity = ".((int) $conf->entity);
|
||||
dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
|
|
|||
|
|
@ -233,7 +233,8 @@ if ($socid > 0) {
|
|||
|
||||
print '<br>';
|
||||
|
||||
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,";
|
||||
// TODO Remove the DISTINCT
|
||||
$sql = "SELECT DISTINCT s.nom, s.rowid as socid, s.code_client,";
|
||||
$sql .= " f.rowid as facid, f.ref, f.total_ht,";
|
||||
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
||||
$sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive
|
||||
|
|
|
|||
Loading…
Reference in a new issue