Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2023-03-03 17:18:20 +01:00
commit 43826bde05

View File

@ -5712,6 +5712,7 @@ class Facture extends CommonInvoice
$sql .= " FROM ".MAIN_DB_PREFIX."facture";
$sql .= " WHERE type = " . (int) $this->type ;
$sql .= " AND date_valid IS NOT NULL";
$sql .= " AND entity IN (".getEntity('invoice').")";
$sql .= " ORDER BY datef DESC LIMIT 1";
$result = $this->db->query($sql);