Merge pull request #24101 from Easya-Solutions/17.0_fix_entity_invoice_anterior_date
FIX: validation date for invoice was compared in all entities.
This commit is contained in:
commit
ac2befa41c
@ -5712,6 +5712,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture";
|
||||||
$sql .= " WHERE type = " . (int) $this->type ;
|
$sql .= " WHERE type = " . (int) $this->type ;
|
||||||
$sql .= " AND date_valid IS NOT NULL";
|
$sql .= " AND date_valid IS NOT NULL";
|
||||||
|
$sql .= " AND entity IN (".getEntity('invoice').")";
|
||||||
$sql .= " ORDER BY datef DESC LIMIT 1";
|
$sql .= " ORDER BY datef DESC LIMIT 1";
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user