From e05dd6dad048d821f0321d58d3db0ffa00787057 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Mon, 24 Jun 2024 12:48:29 +0200 Subject: [PATCH] try fix phan --- htdocs/bom/class/bom.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index d1dbf5d4d67eb..133c7d241fa18 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1576,7 +1576,7 @@ public function getNetNeedsTree(&$TNetNeeds = array(), $qty = 0, $level = 0) // When using nested level (or not), the qty for needs must always use the same unit to be able to be cumulated. // So if unit in bom is not the same than default, we must recalculate qty after units comparisons. $TNetNeeds[$this->id]['product'][$line->fk_product]['fk_unit'] = $line->fk_unit; - if (isset($TNetNeeds[$this->id]['product']) && isset($TNetNeeds[$this->id]['product'][$line->fk_product]['qty'])) { + if (isset($TNetNeeds[$this->id]) && isset($TNetNeeds[$this->id]['product'][$line->fk_product]['qty'])) { $TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] += $line->qty * $qty; } else { $TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] = $line->qty * $qty;