From 7b6488b1c79a9b1fdcd5d1a3cc9b5cadd27c2ace Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 27 Jan 2017 10:05:57 +0100 Subject: [PATCH 1/3] Fix numbering was disaplying technical error instead of error message --- htdocs/commande/class/commande.class.php | 3 ++- htdocs/compta/facture/class/facture.class.php | 3 ++- htdocs/fourn/class/fournisseur.facture.class.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e554990892c..268459a3c12 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -239,7 +239,8 @@ class Commande extends CommonOrder } else { - dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + $this->error=$obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f15526f34ba..623a355023e 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3003,7 +3003,8 @@ class Facture extends CommonInvoice * set up mask. */ if ($mode != 'last' && !$numref) { - dol_print_error($this->db,"Facture::getNextNumRef ".$obj->error); + $this->error=$obj->error; + //dol_print_error($this->db,"Facture::getNextNumRef ".$obj->error); return ""; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bc7f5bfdca6..27b7627f450 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1627,6 +1627,7 @@ class FactureFournisseur extends CommonInvoice } else { + $this->error=$obj->error; //dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); return false; } From c79137d14cae26a33711b0fc689c2172d547db00 Mon Sep 17 00:00:00 2001 From: arnaud Date: Mon, 30 Jan 2017 17:29:01 +0100 Subject: [PATCH 2/3] FIX Supplier Order list filter by project --- htdocs/fourn/commande/list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index c8d333f578d..33b9c81fd0c 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -77,6 +77,7 @@ $search_total_vat=GETPOST('search_total_vat','alpha'); $search_total_ttc=GETPOST('search_total_ttc','alpha'); $optioncss = GETPOST('optioncss','alpha'); $billed = GETPOST('billed','int'); +$search_project_ref=GETPOST('search_project_ref','alpha'); $page = GETPOST('page','int'); $sortorder = GETPOST('sortorder','alpha'); @@ -204,6 +205,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $deliverymonth=''; $deliveryyear=''; $billed=''; + $search_project_ref=''; $search_array_options=array(); } @@ -350,6 +352,7 @@ if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.elemen if ($search_total_ht != '') $sql.= natural_search('cf.total_ht', $search_total_ht, 1); if ($search_total_vat != '') $sql.= natural_search('cf.tva', $search_total_vat, 1); if ($search_total_ttc != '') $sql.= natural_search('cf.total_ttc', $search_total_ttc, 1); +if ($search_project_ref != '') $sql.= natural_search("p.ref",$search_project_ref); // Add where from extra fields foreach ($search_array_options as $key => $val) From 90e8f062e93c6ef1cdc294272fa158183d82cd6f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 31 Jan 2017 10:23:03 +0100 Subject: [PATCH 3/3] Fix : link to user in bank was wrong regarding expensereport payment --- .../expensereport/class/paymentexpensereport.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 4c9c5843a49..9b05313a581 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -527,13 +527,14 @@ class PaymentExpenseReport extends CommonObject { if ($mode == 'payment_expensereport') { - $euser = new User($this->db); - $euser->fetch($key); + $er = new ExpenseReport($this->db); + $er->fetch($key); + $er->fetch_user($er->fk_user_author); $result=$acc->add_url_line( $bank_line_id, - $euser->id, + $er->user->id, DOL_URL_ROOT.'/user/card.php?id=', - $euser->getFullName($langs), + $er->user->getFullName($langs), 'user' ); if ($result <= 0)