2
0
forked from Wavyzz/dolibarr

Debug modulebuilder for lines

This commit is contained in:
Laurent Destailleur
2019-05-19 16:21:11 +02:00
parent 2900f8828a
commit 2debffe170
4 changed files with 173 additions and 9 deletions

View File

@@ -644,6 +644,30 @@ class MyObject extends CommonObject
$this->initAsSpecimenCommon();
}
/**
* Create an array of lines
*
* @return array|int array of lines if OK, <0 if KO
*/
public function getLinesArray()
{
$this->lines=array();
$objectline = new BOMLine($this->db);
$result = $objectline->fetchAll('', '', 0, 0, array('fk_myobject'=>$this->id));
if (is_numeric($result))
{
$this->error = $this->error;
$this->errors = $this->errors;
return $result;
}
else
{
$this->lines = $result;
return $this->lines();
}
}
/**
* Action executed by scheduler