diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 6774c2af275..c135e33016c 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -128,7 +128,7 @@ $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND s.fk_pays = cp.rowid"; if (! empty($date_start) && ! empty($date_end)) $sql .= " AND f.datec >= '" . $db->idate($date_start) . "' AND f.datec <= '" . $db->idate($date_end) . "'"; -$sql .= " AND f.entity IN (".getEntity('invoice').")"; +$sql .= " AND f.entity IN (".getEntity('invoice',0).")"; if ($socid) $sql .= " AND f.fk_soc = " . $socid; $sql .= " GROUP BY name";