From b18b049dcac108e2b518dbf532ff86c7ec6d140f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 6 Feb 2022 22:55:37 +0100 Subject: [PATCH] FIX api product with subproduct --- htdocs/product/class/api_products.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 91edbe5eaff..ec735da3865 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -479,7 +479,7 @@ class Products extends DolibarrApi $childsArbo = $this->product->getChildsArbo($id, 1); - $keys = array('rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref'); + $keys = array('rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref', 'fk_association', 'rang'); $childs = array(); foreach ($childsArbo as $values) { $childs[] = array_combine($keys, $values); @@ -2049,7 +2049,7 @@ class Products extends DolibarrApi if ($includesubproducts) { $childsArbo = $this->product->getChildsArbo($id, 1); - $keys = array('rowid', 'qty', 'fk_product_type', 'label', 'incdec'); + $keys = array('rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref', 'fk_association', 'rang'); $childs = array(); foreach ($childsArbo as $values) { $childs[] = array_combine($keys, $values);