From 2c3e9e92b40525a74bd9aaa68f155acf8b797375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 12 Sep 2018 22:59:15 +0200 Subject: [PATCH] Update expedition.class.php --- htdocs/expedition/class/expedition.class.php | 33 ++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index ec55363a483..bd575511d61 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -10,7 +10,8 @@ * Copyright (C) 2014-2017 Francis Appels * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2016 Ferran Marcet - * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Frédéric France * * 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 @@ -1623,32 +1624,32 @@ class Expedition extends CommonObject if ($mode==0) { if ($statut==0) return $langs->trans($this->statuts[$statut]); - if ($statut==1) return $langs->trans($this->statuts[$statut]); - if ($statut==2) return $langs->trans($this->statuts[$statut]); + elseif ($statut==1) return $langs->trans($this->statuts[$statut]); + elseif ($statut==2) return $langs->trans($this->statuts[$statut]); } - if ($mode==1) + elseif ($mode==1) { if ($statut==0) return $langs->trans($this->statutshorts[$statut]); - if ($statut==1) return $langs->trans($this->statutshorts[$statut]); - if ($statut==2) return $langs->trans($this->statutshorts[$statut]); + elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]); + elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]); } - if ($mode == 3) + elseif ($mode == 3) { if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0'); - if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4'); - if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6'); + elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4'); + elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6'); } - if ($mode == 4) + elseif ($mode == 4) { if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); - if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); - if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); + elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); } - if ($mode == 5) + elseif ($mode == 5) { if ($statut==0) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0'); - if ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4'); - if ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6'); + elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4'); + elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6'); } } @@ -2264,7 +2265,7 @@ class Expedition extends CommonObject * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0,$moreparams=null)