From 55410a55ef0f83f294783275fb6d12350746b592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 4 Oct 2019 00:45:57 +0200 Subject: [PATCH 1/4] Update list.php --- htdocs/expensereport/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 0014cb7999c..699276ed683 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -272,7 +272,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 ($extralabels 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 From 37f6aa3395316006f239a1dceec8ebc718960552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 6 Oct 2019 15:52:33 +0200 Subject: [PATCH 2/4] Update list.php --- htdocs/expensereport/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 699276ed683..db36aacf542 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -272,7 +272,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 ($extralabels 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 From 8c024b3786eb34537fd7c662063fd9dd3dee4419 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Mon, 7 Oct 2019 11:26:10 +0200 Subject: [PATCH 3/4] FIX : missing "$this->id" in "fetch" function --- htdocs/core/class/link.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 8413725ab11..db2c1009a3f 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -334,6 +334,7 @@ class Link extends CommonObject if($this->db->num_rows($resql) > 0) { $obj = $this->db->fetch_object($resql); + $this->id = $obj->rowid; $this->entity = $obj->entity; $this->datea = $this->db->jdate($obj->datea); $this->url = $obj->url; From 0c8331b6d798eb83a1ad3c05059dcc0c79803102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 9 Oct 2019 18:47:25 +0200 Subject: [PATCH 4/4] doxygen --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index e4140357370..adf00d69d82 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3506,7 +3506,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 */ function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC') { @@ -3577,7 +3577,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) */ function list_replacable_invoices($socid=0) {