Merge pull request #7621 from atm-ph/fix_distinct_credit_note

Fix distinct credit note select list
This commit is contained in:
Laurent Destailleur 2017-10-13 13:32:04 +02:00 committed by GitHub
commit 5f22afa450

View File

@ -1225,6 +1225,12 @@ class Form
$disabled=' disabled';
}
if (!empty($conf->global->MAIN_SHOW_FACNUMBER_IN_DISCOUNT_LIST) && !empty($obj->fk_facture_source))
{
$tmpfac = new Facture($this->db);
if ($tmpfac->fetch($obj->fk_facture_source) > 0) $desc=$desc.' - '.$tmpfac->ref;
}
print '<option value="'.$obj->rowid.'"'.$selectstring.$disabled.'>'.$desc.' ('.price($obj->amount_ht).' '.$langs->trans("HT").' - '.price($obj->amount_ttc).' '.$langs->trans("TTC").')</option>';
$i++;
}