This commit is contained in:
Florian HENRY 2021-02-08 15:47:37 +01:00
parent c0c6047538
commit cb152b22df
2 changed files with 7 additions and 2 deletions

View File

@ -172,7 +172,11 @@ class pdf_standard extends ModelePDFProduct
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
$nblines = count($object->lines);
if (is_array($object->lines)) {
$nblines = count($object->lines);
} else {
$nblines = 0;
}
if ($conf->product->dir_output)
{

View File

@ -191,7 +191,8 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
'pricebasetype' => $outpricebasetype,
'tva_tx' => $outtva_tx,
'qty' => $outqty,
'discount' => $outdiscount);
'discount' => $outdiscount,
'array_option'=>$object->array_options);
}
echo json_encode($outjson);