From 3da96500032b9f6b3ceca4692e24fc264a98ddea Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 10 Dec 2018 16:06:11 +0100 Subject: [PATCH 1/4] FIX if qty is 0 --- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 72bd20fc25c..1e408c697f7 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3035,7 +3035,7 @@ 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).','; From d1eed144889d2a60be57eecfdd027738ee33f504 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Tue, 11 Dec 2018 13:25:33 +0100 Subject: [PATCH 2/4] FIX: #10218 Bad redirection after deleting a user or group --- htdocs/user/card.php | 4 ++-- htdocs/user/group/card.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a7282783166..6dfcf3ae7c0 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 @@ -152,7 +152,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 47a5a5df9eb..d5f7a5b8570 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 From 22c34bd656f86a1223cf2138385e9ae9d72044be Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 12 Dec 2018 12:09:07 +0100 Subject: [PATCH 3/4] Fix: MenuBankCash Translation is in english in es_ES --- htdocs/langs/es_ES/banks.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/es_ES/banks.lang b/htdocs/langs/es_ES/banks.lang index 8add13345b2..e5e289f0c4b 100644 --- a/htdocs/langs/es_ES/banks.lang +++ b/htdocs/langs/es_ES/banks.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - banks Bank=Banco -MenuBankCash=Bank | Cash +MenuBankCash=Bancos | Cajas MenuVariousPayment=Pagos varios MenuNewVariousPayment=Nuevo pago varios BankName=Nombre del banco From 6ad106d14a3b1db17ee3c096e747d48541202474 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Dec 2018 19:56:22 +0100 Subject: [PATCH 4/4] Update fournisseur.facture.class.php --- htdocs/fourn/class/fournisseur.facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1e408c697f7..086f154184d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3035,10 +3035,10 @@ class SupplierInvoiceLine extends CommonObjectLine $sql.= " ".$this->product_type.","; $sql.= " ".price2num($this->remise_percent).","; $sql.= " ".price2num($this->subprice).","; - $sql.= " ".!empty($this->qty)?price2num($this->total_ttc/$this->qty):price2num($this->total_ttc).","; + $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)."',";