Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0

This commit is contained in:
Laurent Destailleur 2021-10-23 23:58:00 +02:00
commit fc29aa7d3b
2 changed files with 6 additions and 2 deletions

View File

@ -6029,7 +6029,6 @@ abstract class CommonObject
} }
$sql .= ")"; $sql .= ")";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) { if (!$resql) {
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
@ -6283,6 +6282,11 @@ abstract class CommonObject
$this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]); $this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]);
} }
break; break;
case 'boolean':
if (empty($this->array_options["options_".$key])) {
$this->array_options["options_".$key] = null;
}
break;
/* /*
case 'link': case 'link':
$param_list = array_keys($attributeParam['options']); $param_list = array_keys($attributeParam['options']);

View File

@ -462,7 +462,7 @@ class Products extends DolibarrApi
$childsArbo = $this->product->getChildsArbo($id, 1); $childsArbo = $this->product->getChildsArbo($id, 1);
$keys = ['rowid', 'qty', 'fk_product_type', 'label', 'incdec']; $keys = ['rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref'];
$childs = []; $childs = [];
foreach ($childsArbo as $values) { foreach ($childsArbo as $values) {
$childs[] = array_combine($keys, $values); $childs[] = array_combine($keys, $values);