diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 98ff1c45194..f87a73b5288 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies','propal','compta','bills','orders','products','deliveries')); +$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'categories')); $socid=GETPOST('socid','int'); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 6b0164058c2..2ea640915c2 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -50,7 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; // Load translation files required by the page -$langs->loadLangs(array('bills', 'companies', 'products')); +$langs->loadLangs(array('bills', 'companies', 'products', 'categories')); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 237b82f78d5..bb8f9497969 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array("companies", "suppliers")); +$langs->loadLangs(array("companies", "suppliers", "categories")); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index a4b89edff42..28c20af9371 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3125,10 +3125,10 @@ class SupplierInvoiceLine extends CommonObjectLine $sql.= " ".$this->product_type.","; $sql.= " ".price2num($this->remise_percent).","; $sql.= " ".price2num($this->subprice).","; - $sql.= " ".price2num($this->total_ttc/$this->qty).","; + $sql.= " ".(! empty($this->qty)?price2num($this->total_ttc / $this->qty):price2num($this->total_ttc)).","; $sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").","; $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").","; - $sql.= ' '.(!empty($this->fk_code_ventilation)?$this->fk_code_ventilation:0).','; + $sql.= ' '.(! empty($this->fk_code_ventilation)?$this->fk_code_ventilation:0).','; $sql.= ' '.$this->rang.','; $sql.= ' '.$this->special_code.','; $sql.= " '".$this->db->escape($this->info_bits)."',"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index b4aed9f7844..9c3c51590a7 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2018 Regis Houssin * Copyright (C) 2005 Lionel Cousteix * Copyright (C) 2011 Herve Prot - * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2012-2018 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2015-2017 Jean-François Ferry @@ -154,7 +154,7 @@ if (empty($reshook)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorUserCannotBeDelete"), null, 'errors'); } else { - header("Location: index.php?restore_lastsearch_values=1"); + header("Location: ".DOL_URL_ROOT."/user/list.php?restore_lastsearch_values=1"); exit; } } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index f4b484a72e0..1be76e8fb4d 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Florian Henry + * Copyright (C) 2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -110,7 +111,7 @@ if (empty($reshook)) { { $object->fetch($id); $object->delete(); - header("Location: index.php?restore_lastsearch_values=1"); + header("Location: ".DOL_URL_ROOT."/user/group/list.php?restore_lastsearch_values=1"); exit; } else