Test Setup Failed
Push — dependabot/github_actions/mdew... ( 6edcb7 )
by
unknown
55:37
created
htdocs/accountancy/class/accountingjournal.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         return $this->LibType($this->nature, $mode);
338 338
     }
339 339
 
340
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
340
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
341 341
     /**
342 342
      *  Return type of an accounting journal
343 343
      *
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function LibType($nature, $mode = 0)
349 349
     {
350
-		// phpcs:enable
350
+        // phpcs:enable
351 351
         global $langs;
352 352
 
353 353
         $langs->loadLangs(array("accountancy"));
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -613,12 +613,12 @@  discard block
 block discarded – undo
613 613
                         }
614 614
                     } else { // $type == 'csv'
615 615
                         $blocks[] = array(
616
-                            $depreciation_date,                                     // Date
617
-                            $element_static->ref,                                   // Piece
618
-                            $account_infos['code_formatted_1'],                     // AccountAccounting
619
-                            $element_name_formatted_0 . ' - ' . $depreciation_ref,  // LabelOperation
620
-                            $mt < 0 ? price(-$mt) : '',                             // Debit
621
-                            $mt >= 0 ? price($mt) : '',                             // Credit
616
+                            $depreciation_date, // Date
617
+                            $element_static->ref, // Piece
618
+                            $account_infos['code_formatted_1'], // AccountAccounting
619
+                            $element_name_formatted_0 . ' - ' . $depreciation_ref, // LabelOperation
620
+                            $mt < 0 ? price(-$mt) : '', // Debit
621
+                            $mt >= 0 ? price($mt) : '', // Credit
622 622
                         );
623 623
                     }
624 624
                 }
@@ -734,12 +734,12 @@  discard block
 block discarded – undo
734 734
                                         }
735 735
                                     } else { // $type == 'csv'
736 736
                                         $blocks[] = array(
737
-                                            $disposal_date,                                    // Date
738
-                                            $element_static->ref,                              // Piece
739
-                                            $account_infos['code_formatted_1'],                // AccountAccounting
737
+                                            $disposal_date, // Date
738
+                                            $element_static->ref, // Piece
739
+                                            $account_infos['code_formatted_1'], // AccountAccounting
740 740
                                             $element_name_formatted_0 . ' - ' . $disposal_ref, // LabelOperation
741
-                                            $mt < 0 ? price(-$mt) : '',                        // Debit
742
-                                            $mt >= 0 ? price($mt) : '',                        // Credit
741
+                                            $mt < 0 ? price(-$mt) : '', // Debit
742
+                                            $mt >= 0 ? price($mt) : '', // Credit
743 743
                                         );
744 744
                                     }
745 745
                                 }
Please login to merge, or discard this patch.
htdocs/accountancy/class/bookkeeping.class.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1987,7 +1987,7 @@  discard block
 block discarded – undo
1987 1987
         return 1;
1988 1988
     }
1989 1989
 
1990
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1990
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1991 1991
     /**
1992 1992
      * Export bookkeeping
1993 1993
      *
@@ -1996,7 +1996,7 @@  discard block
 block discarded – undo
1996 1996
      */
1997 1997
     public function export_bookkeeping($model = 'ebp')
1998 1998
     {
1999
-		// phpcs:enable
1999
+        // phpcs:enable
2000 2000
         global $conf;
2001 2001
 
2002 2002
         $sql = "SELECT rowid, doc_date, doc_type,";
@@ -2179,7 +2179,7 @@  discard block
 block discarded – undo
2179 2179
         */
2180 2180
     }
2181 2181
 
2182
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2182
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2183 2183
     /**
2184 2184
      * Return list of accounts with label by chart of accounts
2185 2185
      *
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
      */
2195 2195
     public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '')
2196 2196
     {
2197
-		// phpcs:enable
2197
+        // phpcs:enable
2198 2198
         global $conf;
2199 2199
 
2200 2200
         require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -2291,7 +2291,7 @@  discard block
 block discarded – undo
2291 2291
         }
2292 2292
     }
2293 2293
 
2294
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2294
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2295 2295
     /**
2296 2296
      * Description of accounting account
2297 2297
      *
@@ -2300,7 +2300,7 @@  discard block
 block discarded – undo
2300 2300
      */
2301 2301
     public function get_compte_desc($account = null)
2302 2302
     {
2303
-		// phpcs:enable
2303
+        // phpcs:enable
2304 2304
         global $conf;
2305 2305
 
2306 2306
         $pcgver = getDolGlobalInt('CHARTOFACCOUNTS');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1731,7 +1731,7 @@
 block discarded – undo
1731 1731
         $sql = "DELETE";
1732 1732
         $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element . $mode;
1733 1733
         $sql .= " WHERE piece_num = " . (int) $piecenum;
1734
-        $sql .= " AND date_validated IS NULL";      // For security, exclusion of validated entries at the time of deletion
1734
+        $sql .= " AND date_validated IS NULL"; // For security, exclusion of validated entries at the time of deletion
1735 1735
         $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features
1736 1736
         $sql .= $sql_filter;
1737 1737
 
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancyexport.class.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2545,14 +2545,14 @@
 block discarded – undo
2545 2545
     }
2546 2546
 
2547 2547
     /**
2548
-    * Export format : iSuite Expert
2549
-    *
2550
-    * by OpenSolus [https://opensolus.fr]
2551
-    *
2548
+     * Export format : iSuite Expert
2549
+     *
2550
+     * by OpenSolus [https://opensolus.fr]
2551
+     *
2552 2552
      * @param   array       $objectLines            data
2553 2553
      * @param   resource    $exportFile             [=null] File resource to export or print if null
2554 2554
      * @return  void
2555
-    */
2555
+     */
2556 2556
     public function exportiSuiteExpert($objectLines, $exportFile = null)
2557 2557
     {
2558 2558
         $separator = ';';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
      */
336 336
     public function export(&$TData, $formatexportset, $withAttachment = 0, $downloadMode = 0, $outputMode = 0, $noouput = 0)
337 337
     {
338
-        global $db, $conf, $langs;  // The tpl file use $db
339
-        global $search_date_end;    // Used into /accountancy/tpl/export_journal.tpl.php
338
+        global $db, $conf, $langs; // The tpl file use $db
339
+        global $search_date_end; // Used into /accountancy/tpl/export_journal.tpl.php
340 340
 
341 341
         // Define name of file to save
342 342
         $filename = 'general_ledger-' . $this->getFormatCode($formatexportset);
@@ -2001,7 +2001,7 @@  discard block
 block discarded – undo
2001 2001
             // MOPM
2002 2002
             $tab[] = "";
2003 2003
             // BONP
2004
-            $tab[] =  "";
2004
+            $tab[] = "";
2005 2005
             // BQAF
2006 2006
             $tab[] = "";
2007 2007
             // ECES
@@ -2207,7 +2207,7 @@  discard block
 block discarded – undo
2207 2207
                 }
2208 2208
             } elseif ($line->doc_type == 'customer_invoice') {
2209 2209
                 if (($line->amount) < 0) {
2210
-                    $nature_piece = 'AC';       // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
2210
+                    $nature_piece = 'AC'; // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
2211 2211
                 } else {
2212 2212
                     $nature_piece = 'FC';
2213 2213
                 }
Please login to merge, or discard this patch.
htdocs/fichinter/class/api_interventions.class.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,18 +40,18 @@  discard block
 block discarded – undo
40 40
      * @var array   $FIELDS     Mandatory fields, checked when create and update object
41 41
      */
42 42
     public static $FIELDS = array(
43
-      'socid',
44
-      'fk_project',
45
-      'description',
43
+        'socid',
44
+        'fk_project',
45
+        'description',
46 46
     );
47 47
 
48 48
     /**
49 49
      * @var array   $FIELDS     Mandatory fields, checked when create and update object
50 50
      */
51 51
     public static $FIELDSLINE = array(
52
-      'description',
53
-      'date',
54
-      'duree',
52
+        'description',
53
+        'date',
54
+        'duree',
55 55
     );
56 56
 
57 57
     /**
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
     }
432 432
 
433 433
 
434
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
434
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
435 435
     /**
436 436
      * Clean sensible object datas
437 437
      *
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
      */
441 441
     protected function _cleanObjectDatas($object)
442 442
     {
443
-		// phpcs:enable
443
+        // phpcs:enable
444 444
         $object = parent::_cleanObjectDatas($object);
445 445
 
446 446
         unset($object->labelStatus);
Please login to merge, or discard this patch.
htdocs/fichinter/class/fichinterrec.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     }
350 350
 
351 351
 
352
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
352
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
353 353
     /**
354 354
      *  Load all lines of template of intervention into this->lines
355 355
      *
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function fetch_lines($sall = 0)
360 360
     {
361
-		// phpcs:enable
361
+        // phpcs:enable
362 362
         $this->lines = array();
363 363
 
364 364
         $sql = 'SELECT l.rowid, l.fk_product, l.product_type as product_type, l.label as custom_label, l.description,';
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
     }
589 589
 
590 590
 
591
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
591
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
592 592
     /**
593 593
      *  Rend la fichinter automatique
594 594
      *
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
      */
600 600
     public function set_auto($user, $freq, $courant)
601 601
     {
602
-		// phpcs:enable
602
+        // phpcs:enable
603 603
         if ($user->hasRight('fichinter', 'creer')) {
604 604
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter_rec ";
605 605
             $sql .= " SET frequency='" . $this->db->escape($freq) . "'";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -313,7 +313,7 @@
 block discarded – undo
313 313
                 $this->duration = $obj->duree;
314 314
                 $this->socid                = $obj->fk_soc;
315 315
                 $this->status = 0;
316
-                $this->statut = 0;  // deprecated
316
+                $this->statut = 0; // deprecated
317 317
                 $this->fk_project           = $obj->fk_projet;
318 318
                 $this->fk_contrat           = $obj->fk_contrat;
319 319
                 $this->note_private = $obj->note_private;
Please login to merge, or discard this patch.
htdocs/fichinter/class/fichinter.class.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
         return $this->LibStatut((isset($this->statut) ? $this->statut : $this->status), $mode);
836 836
     }
837 837
 
838
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
838
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
839 839
     /**
840 840
      *  Returns the label of a status
841 841
      *
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
      */
846 846
     public function LibStatut($status, $mode = 0)
847 847
     {
848
-		// phpcs:enable
848
+        // phpcs:enable
849 849
         // Init/load array of translation of status
850 850
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
851 851
             global $langs;
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
         }
1200 1200
     }
1201 1201
 
1202
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1202
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1203 1203
     /**
1204 1204
      *  Defines a delivery date of intervention
1205 1205
      *
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
      */
1210 1210
     public function set_date_delivery($user, $date_delivery)
1211 1211
     {
1212
-		// phpcs:enable
1212
+        // phpcs:enable
1213 1213
         if ($user->hasRight('ficheinter', 'creer')) {
1214 1214
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1215 1215
             $sql .= " SET datei = '" . $this->db->idate($date_delivery) . "'";
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
         return 0;
1230 1230
     }
1231 1231
 
1232
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1232
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1233 1233
     /**
1234 1234
      *  Define the label of the intervention
1235 1235
      *
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
      */
1240 1240
     public function set_description($user, $description)
1241 1241
     {
1242
-		// phpcs:enable
1242
+        // phpcs:enable
1243 1243
         if ($user->hasRight('ficheinter', 'creer')) {
1244 1244
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1245 1245
             $sql .= " SET description = '" . $this->db->escape($description) . "',";
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
     }
1261 1261
 
1262 1262
 
1263
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1263
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1264 1264
     /**
1265 1265
      *  Link intervention to a contract
1266 1266
      *
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
      */
1271 1271
     public function set_contrat($user, $contractid)
1272 1272
     {
1273
-		// phpcs:enable
1273
+        // phpcs:enable
1274 1274
         if ($user->hasRight('ficheinter', 'creer')) {
1275 1275
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1276 1276
             $sql .= " SET fk_contrat = " . ((int) $contractid);
@@ -1467,7 +1467,7 @@  discard block
 block discarded – undo
1467 1467
         return 1;
1468 1468
     }
1469 1469
 
1470
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1470
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1471 1471
     /**
1472 1472
      *  Load array lines ->lines
1473 1473
      *
@@ -1475,7 +1475,7 @@  discard block
 block discarded – undo
1475 1475
      */
1476 1476
     public function fetch_lines()
1477 1477
     {
1478
-		// phpcs:enable
1478
+        // phpcs:enable
1479 1479
         $this->lines = array();
1480 1480
 
1481 1481
         $sql = "SELECT rowid, fk_fichinter, description, duree, date, rang";
@@ -1898,7 +1898,7 @@  discard block
 block discarded – undo
1898 1898
         }
1899 1899
     }
1900 1900
 
1901
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1901
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1902 1902
     /**
1903 1903
      *  Update total duration into llx_fichinter
1904 1904
      *
@@ -1906,7 +1906,7 @@  discard block
 block discarded – undo
1906 1906
      */
1907 1907
     public function update_total()
1908 1908
     {
1909
-		// phpcs:enable
1909
+        // phpcs:enable
1910 1910
         global $conf;
1911 1911
 
1912 1912
         $this->db->begin();
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
     /*
198 198
      * No signature
199 199
      */
200
-    const STATUS_NO_SIGNATURE    = 0;
200
+    const STATUS_NO_SIGNATURE = 0;
201 201
 
202 202
     /*
203 203
      * Signed by sender
204 204
      */
205
-    const STATUS_SIGNED_SENDER   = 1;
205
+    const STATUS_SIGNED_SENDER = 1;
206 206
 
207 207
     /*
208 208
      * Signed by receiver
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     /*
213 213
      * Signed by all
214 214
      */
215
-    const STATUS_SIGNED_ALL      = 9; // To handle future kind of signature (ex: tripartite contract)
215
+    const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
216 216
 
217 217
     /**
218 218
      * Date delivery
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
             $line->fk_fichinter = $fichinterid;
1404 1404
             $line->desc         = $desc;
1405 1405
             $line->date         = $date_intervention;
1406
-            $line->datei        = $date_intervention;   // For backward compatibility
1406
+            $line->datei        = $date_intervention; // For backward compatibility
1407 1407
             $line->duration     = $duration;
1408 1408
 
1409 1409
             if (is_array($array_options) && count($array_options) > 0) {
@@ -1500,7 +1500,7 @@  discard block
 block discarded – undo
1500 1500
                 //For invoicing we calculing hours
1501 1501
                 $line->qty = round($objp->duree / 3600, 2);
1502 1502
                 $line->date = $this->db->jdate($objp->date);
1503
-                $line->datei = $this->db->jdate($objp->date);   // For backward compatibility
1503
+                $line->datei = $this->db->jdate($objp->date); // For backward compatibility
1504 1504
                 $line->rang = $objp->rang;
1505 1505
                 $line->product_type = 1;
1506 1506
                 $line->fetch_optionals();
@@ -1666,19 +1666,19 @@  discard block
 block discarded – undo
1666 1666
      */
1667 1667
     public $fk_fichinter;
1668 1668
 
1669
-    public $desc;       // Description ligne
1669
+    public $desc; // Description ligne
1670 1670
 
1671 1671
     /**
1672 1672
      * @var int Date of intervention
1673 1673
      */
1674
-    public $date;       // Date intervention
1674
+    public $date; // Date intervention
1675 1675
     /**
1676 1676
      * @var int Date of intervention
1677 1677
      * @deprecated
1678 1678
      */
1679
-    public $datei;      // Date intervention
1679
+    public $datei; // Date intervention
1680 1680
 
1681
-    public $duration;   // Duration of intervention
1681
+    public $duration; // Duration of intervention
1682 1682
     public $rang = 0;
1683 1683
     public $tva_tx;
1684 1684
     public $subprice;
@@ -1731,7 +1731,7 @@  discard block
 block discarded – undo
1731 1731
             $this->id               = $objp->rowid;
1732 1732
             $this->fk_fichinter     = $objp->fk_fichinter;
1733 1733
             $this->date = $this->db->jdate($objp->date);
1734
-            $this->datei = $this->db->jdate($objp->date);   // For backward compatibility
1734
+            $this->datei = $this->db->jdate($objp->date); // For backward compatibility
1735 1735
             $this->desc             = $objp->description;
1736 1736
             $this->duration         = $objp->duree;
1737 1737
             $this->rang             = $objp->rang;
Please login to merge, or discard this patch.
htdocs/website/class/websitepage.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
         return $this->LibStatut($this->status, $mode);
827 827
     }
828 828
 
829
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
829
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
830 830
     /**
831 831
      *  Return the label of a given status
832 832
      *
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
      */
837 837
     public function LibStatut($status, $mode = 0)
838 838
     {
839
-		// phpcs:enable
839
+        // phpcs:enable
840 840
         global $langs;
841 841
 
842 842
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public $fk_website;
71 71
 
72
-    public $fk_page;        // If translation of another page
72
+    public $fk_page; // If translation of another page
73 73
 
74 74
     public $pageurl;
75 75
     public $aliasalt;
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public $fk_object;
136 136
 
137
-    const STATUS_DRAFT = 0;         // offline
138
-    const STATUS_VALIDATED = 1;     // online
137
+    const STATUS_DRAFT = 0; // offline
138
+    const STATUS_VALIDATED = 1; // online
139 139
 
140 140
 
141 141
     /**
Please login to merge, or discard this patch.
htdocs/fourn/class/fournisseur.commande.class.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         }
607 607
     }
608 608
 
609
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
609
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
610 610
     /**
611 611
      * Load array lines
612 612
      *
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      */
616 616
     public function fetch_lines($only_product = 0)
617 617
     {
618
-		// phpcs:enable
618
+        // phpcs:enable
619 619
 
620 620
         $this->lines = array();
621 621
 
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
         return $this->LibStatut($this->statut, $mode, $this->billed);
881 881
     }
882 882
 
883
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
883
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
884 884
     /**
885 885
      *  Return label of a status
886 886
      *
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
      */
892 892
     public function LibStatut($status, $mode = 0, $billed = 0)
893 893
     {
894
-		// phpcs:enable
894
+        // phpcs:enable
895 895
         global $langs, $hookmanager;
896 896
 
897 897
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
         return $result;
1390 1390
     }
1391 1391
 
1392
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1392
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1393 1393
     /**
1394 1394
      *  Cancel an approved order.
1395 1395
      *  The cancellation is done after approval
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
      */
1401 1401
     public function Cancel($user, $idwarehouse = -1)
1402 1402
     {
1403
-		// phpcs:enable
1403
+        // phpcs:enable
1404 1404
         global $langs, $conf;
1405 1405
 
1406 1406
         $error = 0;
@@ -2537,7 +2537,7 @@  discard block
 block discarded – undo
2537 2537
         return $ret;
2538 2538
     }
2539 2539
 
2540
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2540
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2541 2541
     /**
2542 2542
      *  Set a delivery in database for this supplier order
2543 2543
      *
@@ -2549,7 +2549,7 @@  discard block
 block discarded – undo
2549 2549
      */
2550 2550
     public function Livraison($user, $date, $type, $comment)
2551 2551
     {
2552
-		// phpcs:enable
2552
+        // phpcs:enable
2553 2553
         global $conf, $langs;
2554 2554
 
2555 2555
         $result = 0;
@@ -2651,7 +2651,7 @@  discard block
 block discarded – undo
2651 2651
         return $result;
2652 2652
     }
2653 2653
 
2654
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2654
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2655 2655
     /**
2656 2656
      *  Set delivery date
2657 2657
      *
@@ -2663,7 +2663,7 @@  discard block
 block discarded – undo
2663 2663
      */
2664 2664
     public function set_date_livraison($user, $delivery_date, $notrigger = 0)
2665 2665
     {
2666
-		// phpcs:enable
2666
+        // phpcs:enable
2667 2667
         return $this->setDeliveryDate($user, $delivery_date, $notrigger);
2668 2668
     }
2669 2669
 
@@ -2723,7 +2723,7 @@  discard block
 block discarded – undo
2723 2723
         }
2724 2724
     }
2725 2725
 
2726
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2726
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2727 2727
     /**
2728 2728
      *  Set the id projet
2729 2729
      *
@@ -2734,7 +2734,7 @@  discard block
 block discarded – undo
2734 2734
      */
2735 2735
     public function set_id_projet($user, $id_projet, $notrigger = 0)
2736 2736
     {
2737
-		// phpcs:enable
2737
+        // phpcs:enable
2738 2738
         if ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")) {
2739 2739
             $error = 0;
2740 2740
 
@@ -3242,7 +3242,7 @@  discard block
 block discarded – undo
3242 3242
         }
3243 3243
     }
3244 3244
 
3245
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3245
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3246 3246
     /**
3247 3247
      *  Load indicators for dashboard (this->nbtodo and this->nbtodolate)
3248 3248
      *
@@ -3252,7 +3252,7 @@  discard block
 block discarded – undo
3252 3252
      */
3253 3253
     public function load_board($user, $mode = 'opened')
3254 3254
     {
3255
-		// phpcs:enable
3255
+        // phpcs:enable
3256 3256
         global $conf, $langs;
3257 3257
 
3258 3258
         $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date, c.total_ht";
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
             $this->ref_supplier = $obj->ref_supplier;
529 529
             $this->socid = $obj->fk_soc;
530 530
             $this->fourn_id = $obj->fk_soc;
531
-            $this->statut = $obj->status;   // deprecated
531
+            $this->statut = $obj->status; // deprecated
532 532
             $this->status = $obj->status;
533 533
             $this->billed = $obj->billed;
534 534
             $this->user_author_id = $obj->user_author_id;
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
             $this->fk_project = $obj->fk_project;
560 560
             $this->cond_reglement_id = $obj->fk_cond_reglement;
561 561
             $this->cond_reglement_code = $obj->cond_reglement_code;
562
-            $this->cond_reglement = $obj->cond_reglement_label;         // deprecated
562
+            $this->cond_reglement = $obj->cond_reglement_label; // deprecated
563 563
             $this->cond_reglement_label = $obj->cond_reglement_label;
564 564
             $this->cond_reglement_doc = $obj->cond_reglement_doc;
565 565
             $this->fk_account = $obj->fk_account;
@@ -692,10 +692,10 @@  discard block
 block discarded – undo
692 692
                     $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")";
693 693
                     $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product);
694 694
                     $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'";
695
-                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty);  // required to be qualified
696
-                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")";  // required to be qualified
695
+                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified
696
+                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified
697 697
                     $sqlsearchpackage .= " AND fk_soc = " . ((int) $this->socid);
698
-                    $sqlsearchpackage .= " ORDER BY packaging ASC";     // Take the smaller package first
698
+                    $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first
699 699
                     $sqlsearchpackage .= " LIMIT 1";
700 700
 
701 701
                     $resqlsearchpackage = $this->db->query($sqlsearchpackage);
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
             $sql .= " WHERE rowid = " . ((int) $this->id);
1365 1365
 
1366 1366
             if ($this->db->query($sql)) {
1367
-                $result = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
1367
+                $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
1368 1368
 
1369 1369
                 if ($error == 0) {
1370 1370
                     // Call trigger
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
             $sql .= " WHERE rowid = " . ((int) $this->id);
1417 1417
             dol_syslog(get_class($this) . "::cancel", LOG_DEBUG);
1418 1418
             if ($this->db->query($sql)) {
1419
-                $result = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
1419
+                $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
1420 1420
 
1421 1421
                 // Call trigger
1422 1422
                 $result = $this->call_trigger('ORDER_SUPPLIER_CANCEL', $user);
@@ -1631,10 +1631,10 @@  discard block
 block discarded – undo
1631 1631
                         $line->date_end,
1632 1632
                         $line->array_options,
1633 1633
                         $line->fk_unit,
1634
-                        $line->multicurrency_subprice,  // pu_ht_devise
1635
-                        $line->origin,     // origin
1636
-                        $line->origin_id,  // origin_id
1637
-                        $line->rang,       // rang
1634
+                        $line->multicurrency_subprice, // pu_ht_devise
1635
+                        $line->origin, // origin
1636
+                        $line->origin_id, // origin_id
1637
+                        $line->rang, // rang
1638 1638
                         $line->special_code
1639 1639
                     );
1640 1640
                     if ($result < 0) {
@@ -2007,7 +2007,7 @@  discard block
 block discarded – undo
2007 2007
             $this->db->begin();
2008 2008
 
2009 2009
             $product_type = $type;
2010
-            $label = '';    // deprecated
2010
+            $label = ''; // deprecated
2011 2011
 
2012 2012
             if ($fk_product > 0) {
2013 2013
                 if (getDolGlobalString('SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY')) { // Not the common case
@@ -2150,7 +2150,7 @@  discard block
 block discarded – undo
2150 2150
             $this->line->total_localtax2 = $total_localtax2;
2151 2151
             $this->line->total_ttc = $total_ttc;
2152 2152
             $this->line->product_type = $type;
2153
-            $this->line->special_code   = (!empty($special_code) ? $special_code : 0);
2153
+            $this->line->special_code = (!empty($special_code) ? $special_code : 0);
2154 2154
             $this->line->origin = $origin;
2155 2155
             $this->line->origin_id = $origin_id;
2156 2156
             $this->line->fk_unit = $fk_unit;
@@ -3357,7 +3357,7 @@  discard block
 block discarded – undo
3357 3357
         global $conf, $langs;
3358 3358
 
3359 3359
         if (!dol_strlen($modele)) {
3360
-            $modele = '';   // No doc template/generation by default
3360
+            $modele = ''; // No doc template/generation by default
3361 3361
 
3362 3362
             if (!empty($this->model_pdf)) {
3363 3363
                 $modele = $this->model_pdf;
@@ -3885,10 +3885,10 @@  discard block
 block discarded – undo
3885 3885
                     $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")";
3886 3886
                     $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product);
3887 3887
                     $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'";
3888
-                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty);  // required to be qualified
3889
-                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")";  // required to be qualified
3888
+                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified
3889
+                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified
3890 3890
                     $sqlsearchpackage .= " AND fk_soc = " . ((int) $objp->socid);
3891
-                    $sqlsearchpackage .= " ORDER BY packaging ASC";     // Take the smaller package first
3891
+                    $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first
3892 3892
                     $sqlsearchpackage .= " LIMIT 1";
3893 3893
 
3894 3894
                     $resqlsearchpackage = $this->db->query($sqlsearchpackage);
Please login to merge, or discard this patch.
htdocs/fourn/class/fournisseur.product.class.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $this->reputations = array('-1' => '', 'FAVORITE' => $langs->trans('Favorite'), 'NOTTHGOOD' => $langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER' => $langs->trans('DoNotOrderThisProductToThisSupplier'));
229 229
     }
230 230
 
231
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
231
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
232 232
     /**
233 233
      *    Remove all prices for this couple supplier-product
234 234
      *
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function remove_fournisseur($id_fourn)
239 239
     {
240
-		// phpcs:enable
240
+        // phpcs:enable
241 241
         $ok = 1;
242 242
 
243 243
         $this->db->begin();
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     }
263 263
 
264 264
 
265
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
265
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
266 266
     /**
267 267
      *  Remove a price for a couple supplier-product
268 268
      *
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      */
272 272
     public function remove_product_fournisseur_price($rowid)
273 273
     {
274
-		// phpcs:enable
274
+        // phpcs:enable
275 275
         global $conf, $user;
276 276
 
277 277
         $error = 0;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     }
308 308
 
309 309
 
310
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
310
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
311 311
     /**
312 312
      *    Modify the purchase price for a supplier
313 313
      *
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         $fk_barcode_type = 0,
364 364
         $options = array()
365 365
     ) {
366
-		// phpcs:enable
366
+        // phpcs:enable
367 367
         global $conf, $langs;
368 368
         //global $mysoc;
369 369
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
         }
668 668
     }
669 669
 
670
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
670
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
671 671
     /**
672 672
      *    Loads the price information of a provider
673 673
      *
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
      */
678 678
     public function fetch_product_fournisseur_price($rowid, $ignore_expression = 0)
679 679
     {
680
-		// phpcs:enable
680
+        // phpcs:enable
681 681
         global $conf;
682 682
 
683 683
         $sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.default_vat_code, pfp.info_bits as fourn_tva_npr, pfp.fk_availability,";
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
     }
763 763
 
764 764
 
765
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
765
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
766 766
     /**
767 767
      *    List all supplier prices of a product
768 768
      *
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
      */
778 778
     public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0, $socid = 0)
779 779
     {
780
-		// phpcs:enable
780
+        // phpcs:enable
781 781
         global $conf;
782 782
 
783 783
         $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id, p.ref as product_ref, p.tosell as status, p.tobuy as status_buy, ";
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
         }
878 878
     }
879 879
 
880
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
880
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
881 881
     /**
882 882
      *  Load properties for minimum price
883 883
      *
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
      */
890 890
     public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0)
891 891
     {
892
-		// phpcs:enable
892
+        // phpcs:enable
893 893
         global $conf;
894 894
 
895 895
         if (empty($prodid)) {
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
         return $thirdparty->getNomUrl($withpicto, $option, $maxlen, $notooltip);
1063 1063
     }
1064 1064
 
1065
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1065
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1066 1066
     /**
1067 1067
      *  Display price of product
1068 1068
      *
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
      */
1077 1077
     public function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array())
1078 1078
     {
1079
-		// phpcs:enable
1079
+        // phpcs:enable
1080 1080
         global $conf, $langs;
1081 1081
 
1082 1082
         $out = '';
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
         return $this->LibStatut($this->status, $mode);
1415 1415
     }
1416 1416
 
1417
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1417
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1418 1418
     /**
1419 1419
      *  Return the status
1420 1420
      *
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
      */
1426 1426
     public function LibStatut($status, $mode = 0, $type = 0)
1427 1427
     {
1428
-		// phpcs:enable
1428
+        // phpcs:enable
1429 1429
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
1430 1430
             global $langs;
1431 1431
             //$langs->load("mymodule@mymodule");
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public $fourn_remise;
139 139
 
140
-    public $fourn_charges;  // when getDolGlobalString('PRODUCT_CHARGES') is set
140
+    public $fourn_charges; // when getDolGlobalString('PRODUCT_CHARGES') is set
141 141
 
142 142
     /**
143 143
      * @var int     product-supplier id
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public $fk_availability;
158 158
 
159 159
     public $fourn_unitprice;
160
-    public $fourn_unitprice_with_discount;  // not saved into database
160
+    public $fourn_unitprice_with_discount; // not saved into database
161 161
     public $fourn_tva_tx;
162 162
     public $fourn_tva_npr;
163 163
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
             }
476 476
             $sql = "UPDATE " . MAIN_DB_PREFIX . "product_fournisseur_price";
477 477
             $sql .= " SET fk_user = " . ((int) $user->id) . " ,";
478
-            $sql .= " datec = '" . $this->db->idate($now) . "' ,";  // Note: Even if this is an update, we update the creation date as the log of each change is tracked into product_fournisseur_log.
478
+            $sql .= " datec = '" . $this->db->idate($now) . "' ,"; // Note: Even if this is an update, we update the creation date as the log of each change is tracked into product_fournisseur_log.
479 479
             $sql .= " ref_fourn = '" . $this->db->escape($ref_fourn) . "',";
480 480
             $sql .= " desc_fourn = '" . $this->db->escape($desc_fourn) . "',";
481 481
             $sql .= " price = " . ((float) $buyprice) . ",";
@@ -825,10 +825,10 @@  discard block
 block discarded – undo
825 825
                 $prodfourn->fourn_tva_tx = $record["tva_tx"];
826 826
                 $prodfourn->fourn_id = $record["fourn_id"];
827 827
                 $prodfourn->fourn_name = $record["supplier_name"];
828
-                $prodfourn->fk_availability         = $record["fk_availability"];
828
+                $prodfourn->fk_availability = $record["fk_availability"];
829 829
                 $prodfourn->delivery_time_days = $record["delivery_time_days"];
830 830
                 $prodfourn->id = $prodid;
831
-                $prodfourn->fourn_tva_npr                   = $record["info_bits"];
831
+                $prodfourn->fourn_tva_npr = $record["info_bits"];
832 832
                 $prodfourn->fk_supplier_price_expression = $record["fk_supplier_price_expression"];
833 833
                 $prodfourn->supplier_reputation = $record["supplier_reputation"];
834 834
                 $prodfourn->fourn_date_creation          = $this->db->jdate($record['datec']);
Please login to merge, or discard this patch.