PERF: hidden var to limit list of invoices for credit note list (#33839)

* PERF: hidden var to limit list of invoices for credit note list

* Update facture.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Eric - CAP-REL
2025-04-14 20:12:19 +02:00
committed by GitHub
parent e62f9cce4a
commit a89a917adc

View File

@@ -5244,6 +5244,11 @@ class Facture extends CommonInvoice
}
$sql .= " ORDER BY f.ref";
if (getDolGlobalInt('LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED') > 0) {
$sql .= " DESC"; //order by
$sql .= " LIMIT " . getDolGlobalInt('LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED');
}
dol_syslog(get_class($this)."::list_qualified_avoir_invoices", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {