Update list.php

This commit is contained in:
Frédéric FRANCE 2019-10-14 21:36:38 +02:00 committed by GitHub
parent 0d4866c38c
commit b88059433c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,7 @@ if (empty($reshook))
{
$fk_parent_line = 0;
}
$result = $object->addline(
$result = $object->addline(
$desc,
$lines[$i]->subprice,
$lines[$i]->qty,
@ -492,7 +492,9 @@ $sql.= ' cf.date_creation as date_creation, cf.tms as date_update,';
$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,";
$sql.= " u.firstname, u.lastname, u.photo, u.login, u.email as user_email";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
}
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook