NEW : care grandchild (#31314)

* NEW_CARE_GRANDCHILD

* Update commonobject.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
IC-Mathieu
2024-10-13 21:10:42 +02:00
committed by GitHub
parent 820333b02f
commit 9c0704ee56

View File

@@ -3349,10 +3349,11 @@ abstract class CommonObject
if ($resql) {
$i = 0;
$num = $this->db->num_rows($resql);
$grandchild = getDolGlobalInt('MAIN_CARE_GRANDCHILD');
while ($i < $num) {
$row = $this->db->fetch_row($resql);
$rows[] = $row[0]; // Add parent line into array rows
$children = $this->getChildrenOfLine($row[0]);
$children = $this->getChildrenOfLine($row[0], $grandchild);
if (!empty($children)) {
foreach ($children as $child) {
array_push($rows, $child);