Close #15307 Encours dpassé with eldy suggestions
This commit is contained in:
parent
cee1b3cee4
commit
ff30021d35
@ -103,6 +103,8 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes
|
||||
$sql .= " AND s.entity IN (".getEntity('societe').")";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = $user->socid";
|
||||
$sql .= " AND s.outstanding_limit > 0";
|
||||
$sql .= " AND s.rowid IN (SELECT fk_soc from ".MAIN_DB_PREFIX."facture as f WHERE f.fk_statut = 1 and f.fk_soc = s.rowid)";
|
||||
$sql .= " ORDER BY s.tms DESC";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user