From 55c284ebb99012abd88f57f67441bd7b2391829f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Nov 2022 14:28:42 +0100 Subject: [PATCH] Fix filter on entity --- htdocs/compta/facture/class/facture.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index dd3c82a8578..4a4a02e87c4 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -136,7 +136,7 @@ class Facture extends CommonInvoice /** * @var int Date expected for delivery * @deprecated - * @see delivery_date + * @see $delivery_date */ public $date_livraison; @@ -148,7 +148,7 @@ class Facture extends CommonInvoice /** * @var string customer ref * @deprecated - * @see ref_customer + * @see $ref_customer */ public $ref_client; @@ -5470,11 +5470,11 @@ class Facture extends CommonInvoice $sql .= " WHERE f.paye = 0"; $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; - $sql .= " AND f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing) if (!empty($paymentmode) && $paymentmode != 'all') { $sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'"; } - // TODO Add filter to check there is no payment started + // TODO Add a filter to check there is no payment started yet $sql .= $this->db->order("date_lim_reglement", "ASC"); $resql = $this->db->query($sql);