Skip to content

Commit

Permalink
fix case objecttmp is an invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-greg committed Jul 3, 2019
1 parent ef27e32 commit 2f5b9cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/class/html.form.class.php
Expand Up @@ -5558,7 +5558,8 @@ function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
$confkeyforautocompletemode=strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT

$fieldstoshow='t.ref';
if (DOL_VERSION < 10 && $objecttmp->element == 'facture') $fieldstoshow = 't.facnumber';
else $fieldstoshow='t.ref';
if (! empty($objecttmp->fields)) // For object that declare it, it is better to use declared fields ( like societe, contact, ...)
{
$tmpfieldstoshow='';
Expand Down

0 comments on commit 2f5b9cc

Please sign in to comment.