Passed
Pull Request — dev (#14)
by Rafael
51:23
created
public/htdocs/core/ajax/locationincoterms.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 // Security check
48 48
 if (!isModEnabled('incoterm')) {
49
-    httponly_accessforbidden("Module incoterm not enabled");    // This includes the exit.
49
+    httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit.
50 50
 }
51 51
 // There is no other permission on this component. Everybody connected can read content of the incoterm table
52 52
 
Please login to merge, or discard this patch.
public/htdocs/core/ajax/objectonoff.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 // Load object according to $id and $element
55 55
 $object = fetchObjectByElement($id, $element);
56 56
 if (!is_object($object)) {
57
-    httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found.");   // This includes the exit.
57
+    httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit.
58 58
 }
59 59
 
60 60
 $object->fields[$field] = array('type' => $format, 'enabled' => 1);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 if (!empty($user->socid)) {
73 73
     $socid = $user->socid;
74 74
     if (!empty($object->socid) && $socid != $object->socid) {
75
-        httponly_accessforbidden("Access on object not allowed for this external user.");   // This includes the exit.
75
+        httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit.
76 76
     }
77 77
 }
78 78
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
84 84
     restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid');
85 85
 } else {
86
-    httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported.");    // This includes the exit.
86
+    httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit.
87 87
 }
88 88
 
89 89
 
Please login to merge, or discard this patch.
htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public $name = 'Muguet';
59 59
 
60
-    public $prefix = 'PO';  // PO for "Purchase Order"
60
+    public $prefix = 'PO'; // PO for "Purchase Order"
61 61
 
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         $maxfilesizearray = getMaxFileSizeArray();
175 175
         $maxmin = $maxfilesizearray['maxmin'];
176 176
         if ($maxmin > 0) {
177
-            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
177
+            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
178 178
         }
179 179
         $texte .= ' <input type="file" name="uploadfile">';
180 180
         $texte .= '<input type="hidden" value="CONTRACT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
Please login to merge, or discard this patch.
public/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
         $maxfilesizearray = getMaxFileSizeArray();
165 165
         $maxmin = $maxfilesizearray['maxmin'];
166 166
         if ($maxmin > 0) {
167
-            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
167
+            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
168 168
         }
169 169
         $texte .= ' <input type="file" name="uploadfile">';
170 170
         $texte .= '<input type="hidden" value="TICKET_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
Please login to merge, or discard this patch.
htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         $maxfilesizearray = getMaxFileSizeArray();
200 200
         $maxmin = $maxfilesizearray['maxmin'];
201 201
         if ($maxmin > 0) {
202
-            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
202
+            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
203 203
         }
204 204
         $texte .= ' <input type="file" name="uploadfile">';
205 205
         $texte .= '<input type="hidden" value="USERGROUP_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
Please login to merge, or discard this patch.
public/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
         $maxfilesizearray = getMaxFileSizeArray();
172 172
         $maxmin = $maxfilesizearray['maxmin'];
173 173
         if ($maxmin > 0) {
174
-            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
174
+            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
175 175
         }
176 176
         $texte .= ' <input type="file" name="uploadfile">';
177 177
         $texte .= '<input type="hidden" value="PRODUCT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
Please login to merge, or discard this patch.
htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
         $maxfilesizearray = getMaxFileSizeArray();
171 171
         $maxmin = $maxfilesizearray['maxmin'];
172 172
         if ($maxmin > 0) {
173
-            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
173
+            $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
174 174
         }
175 175
         $texte .= ' <input type="file" name="uploadfile">';
176 176
         $texte .= '<input type="hidden" value="RECEPTION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
Please login to merge, or discard this patch.
public/htdocs/core/modules/facture/doc/pdf_octopus.modules.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3558,7 +3558,9 @@  discard block
 block discarded – undo
3558 3558
             $deja_regle = $invoice->getSommePaiement();
3559 3559
 
3560 3560
             $resteapayer = price2num($invoice->total_ttc - $deja_regle - $total_ttc_rg - $creditnoteamount - $depositsamount, 'MT');
3561
-            if ($invoice->paye) $resteapayer = 0;
3561
+            if ($invoice->paye) {
3562
+                $resteapayer = 0;
3563
+            }
3562 3564
 
3563 3565
             $y = 0;
3564 3566
 
@@ -3608,7 +3610,9 @@  discard block
 block discarded – undo
3608 3610
 
3609 3611
             if ($deja_regle > 0) {
3610 3612
                 $title = $outputlangs->transnoentities("PaymentsAlreadyDone");
3611
-                if ($invoice->type == 2) $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
3613
+                if ($invoice->type == 2) {
3614
+                    $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
3615
+                }
3612 3616
 
3613 3617
                 $pdf->SetFont('', '', $default_font_size - 3);
3614 3618
                 $pdf->SetXY($posx, $posy + $height * $index);
@@ -3671,7 +3675,9 @@  discard block
 block discarded – undo
3671 3675
                 if (!empty($this->tplidx)) {
3672 3676
                     $pdf->useTemplate($this->tplidx);
3673 3677
                 }
3674
-                if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
3678
+                if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
3679
+                    $this->_pagehead($pdf, $object, 0, $outputlangs);
3680
+                }
3675 3681
                 $pdf->setPage($pageposafter + 1);
3676 3682
                 $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
3677 3683
 
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * Dolibarr version of the loaded document
90 90
      * @var string
91 91
      */
92
-    public $version = 'disabled';   // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2.
92
+    public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2.
93 93
 
94 94
     /**
95 95
      * @var int height for info total
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                 $pdf->SetAutoPageBreak(1, 0);
423 423
 
424 424
                 // compute height for situation invoices
425
-                $this->heightforinfotot = 45;   // Height reserved to output the info and total part and payment part
425
+                $this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part
426 426
                 if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) {
427 427
                     $this->heightforinfotot += 4 * ($nbpayments + 3);
428 428
                 }
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
                 // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher
537 537
 
538 538
                 // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
539
-                $this->tab_top = 90 + $top_shift + $shipp_shift;        // top_shift is an addition for linked objects or addons (0 in most cases)
539
+                $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
540 540
                 $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
541 541
 
542 542
                 // You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
                         $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100;
1013 1013
                     }*/
1014 1014
 
1015
-                    $vatrate = (string)$object->lines[$i]->tva_tx;
1015
+                    $vatrate = (string) $object->lines[$i]->tva_tx;
1016 1016
 
1017 1017
                     // Retrieve type from database for backward compatibility with old records
1018 1018
                     if (
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
                     if (!isset($this->tva[$vatrate])) {
1049 1049
                         $this->tva[$vatrate] = 0;
1050 1050
                     }
1051
-                    $this->tva[$vatrate] += $tvaligne;  // ->tva is abandoned, we use now ->tva_array that is more complete
1051
+                    $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete
1052 1052
                     $vatcode = $object->lines[$i]->vat_src_code;
1053 1053
                     if (empty($this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['amount'])) {
1054 1054
                         $this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['amount'] = 0;
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
         $sql .= " re.description, re.fk_facture_source,";
1235 1235
         $sql .= " f.type, f.datef";
1236 1236
         $sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re, " . MAIN_DB_PREFIX . "facture as f";
1237
-        $sql .= " WHERE re.fk_facture_source = f.rowid AND re.fk_facture = " . ((int)$object->id);
1237
+        $sql .= " WHERE re.fk_facture_source = f.rowid AND re.fk_facture = " . ((int) $object->id);
1238 1238
         $resql = $this->db->query($sql);
1239 1239
         if ($resql) {
1240 1240
             $num = $this->db->num_rows($resql);
@@ -1280,7 +1280,7 @@  discard block
 block discarded – undo
1280 1280
         $sql .= " cp.code";
1281 1281
         $sql .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf, " . MAIN_DB_PREFIX . "paiement as p";
1282 1282
         $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_paiement as cp ON p.fk_paiement = cp.id";
1283
-        $sql .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = " . ((int)$object->id);
1283
+        $sql .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = " . ((int) $object->id);
1284 1284
         //$sql.= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = 1";
1285 1285
         $sql .= " ORDER BY p.datep";
1286 1286
 
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
             $posy = $pdf->GetY() + 4;
1349 1349
         }
1350 1350
 
1351
-        $posxval = 52;  // Position of values of properties shown on left side
1351
+        $posxval = 52; // Position of values of properties shown on left side
1352 1352
         $posxend = 110; // End of x for text on left side
1353 1353
         if ($this->page_largeur < 210) { // To work with US executive format
1354 1354
             $posxend -= 10;
@@ -1636,7 +1636,7 @@  discard block
 block discarded – undo
1636 1636
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
1637 1637
                 //{
1638 1638
                 foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
1639
-                    if (in_array((string)$localtax_type, array('1', '3', '5'))) {
1639
+                    if (in_array((string) $localtax_type, array('1', '3', '5'))) {
1640 1640
                         continue;
1641 1641
                     }
1642 1642
 
@@ -1670,7 +1670,7 @@  discard block
 block discarded – undo
1670 1670
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
1671 1671
                 //{
1672 1672
                 foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
1673
-                    if (in_array((string)$localtax_type, array('1', '3', '5'))) {
1673
+                    if (in_array((string) $localtax_type, array('1', '3', '5'))) {
1674 1674
                         continue;
1675 1675
                     }
1676 1676
 
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
                 $nblines = count($object->lines);
1706 1706
                 for ($i = 0; $i < $nblines; $i++) {
1707 1707
                     $tvaligne = $object->lines[$i]->total_tva;
1708
-                    $vatrate = (string)$object->lines[$i]->tva_tx;
1708
+                    $vatrate = (string) $object->lines[$i]->tva_tx;
1709 1709
 
1710 1710
                     if (($object->lines[$i]->info_bits & 0x01) == 0x01) {
1711 1711
                         $vatrate .= '*';
@@ -1748,7 +1748,7 @@  discard block
 block discarded – undo
1748 1748
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
1749 1749
                 //{
1750 1750
                 foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
1751
-                    if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1751
+                    if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1752 1752
                         continue;
1753 1753
                     }
1754 1754
 
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
1783 1783
                 //{
1784 1784
                 foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
1785
-                    if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1785
+                    if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1786 1786
                         continue;
1787 1787
                     }
1788 1788
 
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
             if (!$this->getColumnStatus($colKey)) {
1995 1995
                 continue;
1996 1996
             }
1997
-            $xstartpos = (int)($colDef['xStartPos'] ?? 0);
1997
+            $xstartpos = (int) ($colDef['xStartPos'] ?? 0);
1998 1998
             //is there any overtitle ?
1999 1999
             if (!empty($colDef['overtitle']) && is_array($colDef['overtitle'])) {
2000 2000
                 $overtitle_top = $tab_top - 4;
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
         $pdf->SetFont('', '', $default_font_size - 1);
2026 2026
 
2027 2027
         if (empty($hidetop)) {
2028
-            $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5);   // line prend une position y en 2eme param et 4eme param
2028
+            $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param
2029 2029
         }
2030 2030
     }
2031 2031
 
@@ -2783,7 +2783,7 @@  discard block
 block discarded – undo
2783 2783
 
2784 2784
         // Output Rect
2785 2785
         // KEEPTHIS => Affiche les bords extérieurs
2786
-        $this->printRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom);  // Rect prend une longueur en 3eme param et 4eme param
2786
+        $this->printRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
2787 2787
 
2788 2788
         $pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height);
2789 2789
         if (empty($hidetop)) {
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
 
2831 2831
         $i = -8;
2832 2832
         foreach ($form->cache_vatrates as $TVatInfo) {
2833
-            $tva_tx_formated = sprintf("%01.3f", (float)$TVatInfo['txtva']);
2833
+            $tva_tx_formated = sprintf("%01.3f", (float) $TVatInfo['txtva']);
2834 2834
             // print "<p>Un taux de tva ... $tva_tx_formated :: " . json_encode($this->TDataSituation['current'][$tva_tx_formated]) . "</p>";
2835 2835
             if (empty($this->TDataSituation['current'][$tva_tx_formated])) {
2836 2836
                 continue;
@@ -2893,7 +2893,7 @@  discard block
 block discarded – undo
2893 2893
 
2894 2894
             $i = -8;
2895 2895
             foreach ($form->cache_vatrates as $TVatInfo) {
2896
-                $tva_tx_formated = sprintf("%01.3f", (float)$TVatInfo['txtva']);
2896
+                $tva_tx_formated = sprintf("%01.3f", (float) $TVatInfo['txtva']);
2897 2897
                 if (empty($this->TDataSituation['current'][$tva_tx_formated])) {
2898 2898
                     continue;
2899 2899
                 }
@@ -2993,9 +2993,9 @@  discard block
 block discarded – undo
2993 2993
         $retenue_garantie_anterieure = 0;
2994 2994
         // Init tous les champs à 0
2995 2995
         $TDataSituation['cumul_anterieur'] = array(
2996
-            'HT' => 0,  //montant HT normal
2997
-            'TVA' => 0,   //montant de la TVA sur le HTnet
2998
-            'TTC' => 0,   //montant TTC (HTnet + TVA)
2996
+            'HT' => 0, //montant HT normal
2997
+            'TVA' => 0, //montant de la TVA sur le HTnet
2998
+            'TTC' => 0, //montant TTC (HTnet + TVA)
2999 2999
             'retenue_garantie' => 0,
3000 3000
             'travaux_sup' => 0,
3001 3001
             'HTnet' => 0, //montant HT
@@ -3031,7 +3031,7 @@  discard block
 block discarded – undo
3031 3031
 
3032 3032
                     $calc_ht = $l->total_ht;
3033 3033
                     //modification du format de TVA, cas particulier des imports ou autres qui peuvent avoir des 20.0000
3034
-                    $ltvatx = (float)sprintf("%01.3f", $l->tva_tx);
3034
+                    $ltvatx = (float) sprintf("%01.3f", $l->tva_tx);
3035 3035
 
3036 3036
                     //1ere ligne
3037 3037
                     $amounttva = $calc_ht * ($ltvatx / 100);
@@ -3181,7 +3181,7 @@  discard block
 block discarded – undo
3181 3181
         foreach ($facDerniereSituation->lines as $l) {
3182 3182
             if ($l->rowid == $current_line->fk_prev_id) {
3183 3183
                 // Recovery of total_ht without taking progress into account (for the "sums" column)
3184
-                $ltvatx = (float)sprintf("%01.3f", $l->tva_tx);
3184
+                $ltvatx = (float) sprintf("%01.3f", $l->tva_tx);
3185 3185
                 $tabprice = calcul_price_total($l->qty, $l->subprice, $l->remise_percent, $ltvatx, $l->localtax1_tx, $l->localtax2_tx, 0, 'HT', $l->info_bits, $l->product_type);
3186 3186
                 $total_ht = $tabprice[0];
3187 3187
                 $total_tva = $tabprice[1];
@@ -3252,10 +3252,10 @@  discard block
 block discarded – undo
3252 3252
         $facDerniereSituation = $TPreviousInvoices[0];
3253 3253
 
3254 3254
         $ret = array(
3255
-            'HT' => 0,  //montant HT normal
3255
+            'HT' => 0, //montant HT normal
3256 3256
             'HTnet' => 0, //montant HT
3257
-            'TVA' => 0,   //montant de la TVA sur le HTnet
3258
-            'TTC' => 0,   //montant TTC (HTnet + TVA)
3257
+            'TVA' => 0, //montant de la TVA sur le HTnet
3258
+            'TTC' => 0, //montant TTC (HTnet + TVA)
3259 3259
             'retenue_garantie' => 0,
3260 3260
             'travaux_sup' => 0,
3261 3261
             'total_a_payer' => 0 //montant "a payer" sur la facture
@@ -3274,7 +3274,7 @@  discard block
 block discarded – undo
3274 3274
             }
3275 3275
 
3276 3276
             // Modification of VAT format, special case of imports or others which may have 20.0000
3277
-            $ltvatx = (float)sprintf("%01.3f", $l->tva_tx);
3277
+            $ltvatx = (float) sprintf("%01.3f", $l->tva_tx);
3278 3278
 
3279 3279
             $ret[$ltvatx]['TVA'] += $l->total_tva;
3280 3280
             $ret[$ltvatx]['HT'] += $l->total_ht;
@@ -3400,7 +3400,7 @@  discard block
 block discarded – undo
3400 3400
 
3401 3401
             // Output Rect
3402 3402
             $pdf->SetDrawColor(128, 128, 128);
3403
-            $this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6);   // Rect prend une longueur en 3eme param et 4eme param
3403
+            $this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6); // Rect prend une longueur en 3eme param et 4eme param
3404 3404
 
3405 3405
             $posy += 4;
3406 3406
         } elseif (count($orders)) {
@@ -3435,7 +3435,7 @@  discard block
 block discarded – undo
3435 3435
 
3436 3436
         $force_to_zero = false;
3437 3437
 
3438
-        $idinv = 0;//count($previousinvoices);
3438
+        $idinv = 0; //count($previousinvoices);
3439 3439
         while ($idinv < count($previousinvoices)) {
3440 3440
             $invoice = $previousinvoices[$idinv];
3441 3441
 
@@ -3480,7 +3480,7 @@  discard block
 block discarded – undo
3480 3480
             $nblines = count($invoice->lines);
3481 3481
             for ($i = 0; $i < $nblines; $i++) {
3482 3482
                 $tvaligne = $invoice->lines[$i]->total_tva;
3483
-                $vatrate = (string)$invoice->lines[$i]->tva_tx;
3483
+                $vatrate = (string) $invoice->lines[$i]->tva_tx;
3484 3484
 
3485 3485
                 if (($invoice->lines[$i]->info_bits & 0x01) == 0x01) {
3486 3486
                     $vatrate .= '*';
@@ -3527,7 +3527,7 @@  discard block
 block discarded – undo
3527 3527
             $pdf->SetXY($posx + $width, $posy + $height * $index);
3528 3528
             $pdf->MultiCell($width2, $height, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
3529 3529
 
3530
-            $retainedWarrantyRate = (float)($object->retained_warranty ? price2num($object->retained_warranty) : price2num(getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT', 0)));
3530
+            $retainedWarrantyRate = (float) ($object->retained_warranty ? price2num($object->retained_warranty) : price2num(getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT', 0)));
3531 3531
 
3532 3532
             $total_ht_rg = 0;
3533 3533
             $total_ttc_rg = 0;
@@ -3540,8 +3540,8 @@  discard block
 block discarded – undo
3540 3540
                 $pdf->SetFillColor(241, 241, 241);
3541 3541
                 $pdf->MultiCell($width, $height, $outputlangs->transnoentities("RetainedWarrantyShort", $retainedWarrantyRate), $useborder, 'L', 1);
3542 3542
 
3543
-                $total_ht_rg = (float)price2num(price($total_ht * $retainedWarrantyRate / 100), 'MT');
3544
-                $total_ttc_rg = (float)price2num(price($total_ttc * $retainedWarrantyRate / 100), 'MT');
3543
+                $total_ht_rg = (float) price2num(price($total_ht * $retainedWarrantyRate / 100), 'MT');
3544
+                $total_ttc_rg = (float) price2num(price($total_ttc * $retainedWarrantyRate / 100), 'MT');
3545 3545
 
3546 3546
                 $pdf->SetXY($posx + $width, $posy + $height * $index);
3547 3547
                 $pdf->MultiCell($width2, $height, price(-$sign * $total_ht_rg, 0, $outputlangs), $useborder, 'R', 1);
Please login to merge, or discard this patch.