Merge pull request #20003 from ptibogxiv/patch-2
FIX api product with subproduct
This commit is contained in:
commit
7cd9c6b7ba
@ -479,7 +479,7 @@ class Products extends DolibarrApi
|
|||||||
|
|
||||||
$childsArbo = $this->product->getChildsArbo($id, 1);
|
$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();
|
$childs = array();
|
||||||
foreach ($childsArbo as $values) {
|
foreach ($childsArbo as $values) {
|
||||||
$childs[] = array_combine($keys, $values);
|
$childs[] = array_combine($keys, $values);
|
||||||
@ -2049,7 +2049,7 @@ class Products extends DolibarrApi
|
|||||||
if ($includesubproducts) {
|
if ($includesubproducts) {
|
||||||
$childsArbo = $this->product->getChildsArbo($id, 1);
|
$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();
|
$childs = array();
|
||||||
foreach ($childsArbo as $values) {
|
foreach ($childsArbo as $values) {
|
||||||
$childs[] = array_combine($keys, $values);
|
$childs[] = array_combine($keys, $values);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user