Add test to fetch lines

This commit is contained in:
Laurent Destailleur 2022-07-14 10:15:03 +02:00
parent bec9181d3f
commit 5a7652fd75

View File

@ -724,10 +724,13 @@ class Contrat extends CommonObject
// Retrieve all extrafields // Retrieve all extrafields
// fetch optionals attributes and labels // fetch optionals attributes and labels
$this->fetch_optionals(); $result = $this->fetch_optionals();
// Lines // Lines
if ($result >= 0 && !empty($this->table_element_line)) {
$result = $this->fetch_lines(); $result = $this->fetch_lines();
}
if ($result < 0) { if ($result < 0) {
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
return -3; return -3;