]> _ Git - cubeextranet.git/commitdiff
#extranet : fix euro symbol in titles and descriptions
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 26 Feb 2016 10:28:43 +0000 (10:28 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 26 Feb 2016 10:28:43 +0000 (10:28 +0000)
@0:10

inc/extranet/Metier/class.extranet.document.php

index eb93d5d71beac404a783d179be9eaad55ffa3473..5e7648d86f1f7c6aec0bd53d51770c268871a5de 100644 (file)
@@ -34,7 +34,7 @@ abstract class extranetDocument extends cubeMetier {
                $template = ROOT . '/images/extranet/docs/';\r
 \r
 \r
-               $this->euro = ' ' . chr(128);\r
+               $this->euro = chr(128);\r
 \r
                $this->pdf = new FPDI();\r
                $this->pdf->SetAutoPageBreak(false);\r
@@ -130,7 +130,7 @@ abstract class extranetDocument extends cubeMetier {
                        $this->pdf->SetXY(170, $y);\r
                        $ligne['montant'] = trim($ligne['montant']);\r
                        if (is_numeric($ligne['montant'])) {\r
-                               $this->pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . $this->euro, 0, 0, 'R');\r
+                               $this->pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) .' '. $this->euro, 0, 0, 'R');\r
                        } else {\r
                                $this->pdf->Cell(33, 4, self::escape($ligne['montant']), 0, 0, 'R');\r
                        }\r
@@ -169,14 +169,14 @@ abstract class extranetDocument extends cubeMetier {
                        $this->pdf->SetXY(170, 218);\r
                        $space = 9.7;\r
                }\r
-               $this->pdf->Cell(32, $space, cubePrices::formatAmount($this->total_ht, $this->client->lang) . $this->euro, 0, 1, 'R');\r
+               $this->pdf->Cell(32, $space, cubePrices::formatAmount($this->total_ht, $this->client->lang) .' '. $this->euro, 0, 1, 'R');\r
                $this->pdf->SetX(170);\r
                $this->pdf->setFont('KlavikaLight', '', 10);\r
                // Affichage du taux de tva et du montant des taxes\r
                $this->pdf->Cell(32, $space, $tva_text, 0, 1, 'R');\r
                $this->pdf->SetX(170);\r
                if ($tva) {\r
-                       $this->pdf->Cell(32, $space, $taxes . $this->euro, 0, 1, 'R');\r
+                       $this->pdf->Cell(32, $space, $taxes . ' '.$this->euro, 0, 1, 'R');\r
                } else {\r
                        $this->pdf->Cell(32, $space, '-', 0, 1, 'R');\r
                }\r
@@ -184,7 +184,7 @@ abstract class extranetDocument extends cubeMetier {
 \r
                $this->pdf->SetTextColor(255, 255, 255);\r
                $this->pdf->setFont('KlavikaLight', 'B', 10);\r
-               $this->pdf->Cell(32, $space + 1, $ttcf . $this->euro, 0, 1, 'R');\r
+               $this->pdf->Cell(32, $space + 1, $ttcf .' '. $this->euro, 0, 1, 'R');\r
 \r
                if (isset($notes)) {\r
                        $this->pdf->setXY(8, 268);\r
@@ -221,7 +221,7 @@ abstract class extranetDocument extends cubeMetier {
                        $pdf->SetXY(170, $y);\r
                        $ligne['montant'] = trim($ligne['montant']);\r
                        if (is_numeric($ligne['montant'])) {\r
-                               $pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . $this->euro, 0, 0, 'R');\r
+                               $pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) .' '. $this->euro, 0, 0, 'R');\r
                        } else {\r
                                $pdf->Cell(33, 4, self::escape($ligne['montant']), 0, 0, 'R');\r
                        }\r
@@ -275,7 +275,7 @@ abstract class extranetDocument extends cubeMetier {
                        }\r
                }\r
 \r
-               $pages=max(count($cesures),$pages);\r
+               $pages = max(count($cesures), $pages);\r
 \r
                if (!isset($cesures[$pages - 1])) {\r
                        $cesures[$pages - 1] = $nb_lines - 1;\r
@@ -289,7 +289,9 @@ abstract class extranetDocument extends cubeMetier {
 \r
        protected function escape($str) {\r
                $str = cubeText::removeOddStuff($str);\r
-               return utf8_decode($str);\r
+               $str= utf8_decode($str);\r
+               $str = str_replace(utf8_decode('€'), $this->euro, $str);\r
+               return $str;\r
        }\r
 \r
        abstract protected function documentTitre();\r