FIX api product with subproduct

This commit is contained in:
ptibogxiv 2022-02-06 22:55:37 +01:00 committed by GitHub
parent cd491280cf
commit b18b049dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);