FIX drafts are now implemented for stats

This commit is contained in:
atm-arnaud 2020-01-08 11:27:52 +01:00
parent 7350331865
commit ae4554af65

View File

@ -79,7 +79,7 @@ class FactureStats extends Stats
$this->field_line='total_ht';
}
$this->where = " f.fk_statut > 0";
$this->where = " f.fk_statut >= 0";
$this->where.= " AND f.entity IN (".getEntity('invoice').")";
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($mode == 'customer') $this->where.=" AND (f.fk_statut <> 3 OR f.close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons)