diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 09d3351fb4d..baaed787023 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3584,7 +3584,7 @@ class Facture extends CommonInvoice * @param int $offset For pagination * @param string $sortfield Sort criteria * @param string $sortorder Sort order - * @return int -1 if KO, array with result if OK + * @return array|int -1 if KO, array with result if OK */ public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') { @@ -3655,7 +3655,7 @@ class Facture extends CommonInvoice * (Status validated or abandonned for a reason 'other') + not payed + no payment at all + not already replaced * * @param int $socid Id thirdparty - * @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) + * @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ public function list_replacable_invoices($socid = 0) { diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 53e85adcec1..ca3e927ef18 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -334,7 +334,8 @@ class Link extends CommonObject if($this->db->num_rows($resql) > 0) { $obj = $this->db->fetch_object($resql); - $this->id=$obj->rowid; + + $this->id = $obj->rowid; $this->entity = $obj->entity; $this->datea = $this->db->jdate($obj->datea); $this->url = $obj->url; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index daadfa913ec..7b8138f1f3a 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -279,7 +279,7 @@ $sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.tota $sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve, d.note_private, d.note_public,"; $sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attributes['expensereport']['type'] as $key => $val) $sql.=($extrafields->attribute_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