Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/fourn/facture/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     $socid = $user->socid;
50 50
 }
51 51
 $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
52
-$hookmanager->initHooks(array('invoicesuppliercardcontact','invoicesuppliercontactcard', 'globalcard'));
52
+$hookmanager->initHooks(array('invoicesuppliercardcontact', 'invoicesuppliercontactcard', 'globalcard'));
53 53
 
54 54
 $object = new FactureFournisseur($db);
55 55
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/list-rec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 $search_date_endday = GETPOSTINT('search_date_endday');
85 85
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
86 86
 $search_date_endyear = GETPOSTINT('search_date_endyear');
87
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
87
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
88 88
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
89 89
 $search_date_when_startday = GETPOSTINT('search_date_when_startday');
90 90
 $search_date_when_startmonth = GETPOSTINT('search_date_when_startmonth');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 $search_date_when_endday = GETPOSTINT('search_date_when_endday');
93 93
 $search_date_when_endmonth = GETPOSTINT('search_date_when_endmonth');
94 94
 $search_date_when_endyear = GETPOSTINT('search_date_when_endyear');
95
-$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear);   // Use tzserver
95
+$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver
96 96
 $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear);
97 97
 $search_recurring = GETPOST('search_recurring', 'intcomma');
98 98
 $search_frequency = GETPOST('search_frequency', 'alpha');
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 $object->fields = dol_sort_array($object->fields, 'position');
165 165
 $arrayfields = dol_sort_array($arrayfields, 'position');
166
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
166
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
167 167
 
168 168
 if ($socid > 0) {
169 169
     $tmpthirdparty = new Societe($db);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 $massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge")));
539 539
 
540 540
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
541
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
541
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
542 542
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
543 543
 //$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
544 544
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/paiement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -312,14 +312,14 @@  discard block
 block discarded – undo
312 312
 
313 313
             // Creation of payment line
314 314
             $paiement = new PaiementFourn($db);
315
-            $paiement->datepaye     = $datepaye;
315
+            $paiement->datepaye = $datepaye;
316 316
 
317 317
             $correctedAmounts = [];
318 318
             foreach ($amounts as $key => $value) {
319 319
                 $correctedAmounts[$key] = (float) $value;
320 320
             }
321 321
 
322
-            $paiement->amounts      = $correctedAmounts; // Array of amounts
322
+            $paiement->amounts = $correctedAmounts; // Array of amounts
323 323
             $paiement->multicurrency_amounts = $multicurrency_amounts;
324 324
             $paiement->multicurrency_code = $multicurrency_code; // Array with all currency of payments dispatching
325 325
             $paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
                         $total = 0;
611 611
                         $total_ttc = 0;
612 612
                         $totalrecu = 0;
613
-                        $totalrecucreditnote = 0;   // PHP Warning:  Undefined variable $totalrecucreditnote
614
-                        $totalrecudeposits = 0;     // PHP Warning:  Undefined variable $totalrecudeposits
613
+                        $totalrecucreditnote = 0; // PHP Warning:  Undefined variable $totalrecucreditnote
614
+                        $totalrecudeposits = 0; // PHP Warning:  Undefined variable $totalrecudeposits
615 615
                         while ($i < $num) {
616 616
                             $objp = $db->fetch_object($resql);
617 617
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha');
87 87
 $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
88 88
 $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
89
-$search_status = GETPOST('search_status', 'intcomma');  // Can be '' or a numeric
89
+$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric
90 90
 $search_paymentmode = GETPOST('search_paymentmode', 'intcomma');
91 91
 $search_paymentcond = GETPOST('search_paymentcond', 'intcomma');
92 92
 $search_town = GETPOST('search_town', 'alpha');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
 $object->fields = dol_sort_array($object->fields, 'position');
220 220
 $arrayfields = dol_sort_array($arrayfields, 'position');
221
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
221
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
222 222
 
223 223
 if (!isModEnabled('supplier_invoice')) {
224 224
     accessforbidden();
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 }
1076 1076
 
1077 1077
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1078
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1078
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1079 1079
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1080 1080
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1081 1081
 
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
                 $totalarray['pos'][$totalarray['nbfield']] = 'totalam';
1930 1930
             }
1931 1931
             if (empty($totalarray['val']['totalam'])) {
1932
-                $totalarray['val']['totalam'] = 0;      // avoid PHP Warning:  Undefined array key "totalam" on line 1891
1932
+                $totalarray['val']['totalam'] = 0; // avoid PHP Warning:  Undefined array key "totalam" on line 1891
1933 1933
             }
1934 1934
             $totalarray['val']['totalam'] += $totalpay;
1935 1935
         }
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/card-rec.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
     $page = 0;
88 88
 }     // If $page is not defined, or '' or -1
89 89
 $offset = $limit * $page;
90
-if (! $sortorder) {
90
+if (!$sortorder) {
91 91
     $sortorder = 'DESC';
92 92
 }
93
-if (! $sortfield) {
93
+if (!$sortfield) {
94 94
     $sortfield = 'f.titre';
95 95
 }
96 96
 $pageprev = $page - 1;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 $object = new FactureFournisseurRec($db);
100 100
 if (($id > 0 || $title) && $action != 'create' && $action != 'add') {
101 101
     $ret = $object->fetch($id, $title);
102
-    if (! $ret) {
102
+    if (!$ret) {
103 103
         setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors');
104 104
     }
105 105
 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     $action = 'list';
144 144
     $massaction = '';
145 145
 }
146
-if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
146
+if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
147 147
     $massaction = '';
148 148
 }
149 149
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     // Create predefined invoice
172 172
     if ($action == 'add') {
173
-        if (! GETPOST('title', 'alphanohtml')) {
173
+        if (!GETPOST('title', 'alphanohtml')) {
174 174
             setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Title")), null, 'errors');
175 175
             $action = "create";
176 176
             $error++;
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
             }
194 194
         }
195 195
 
196
-        if (! $error) {
196
+        if (!$error) {
197 197
             $object->subtype               = GETPOSTINT('subtype');
198 198
             $object->title                 = GETPOST('title', 'alphanohtml');
199
-            $object->libelle               = GETPOST('libelle', 'alpha');   // deprecated
199
+            $object->libelle               = GETPOST('libelle', 'alpha'); // deprecated
200 200
             $object->label                 = GETPOST('libelle', 'alpha');
201 201
             $object->fk_project            = GETPOSTINT('projectid');
202 202
             $object->ref_supplier          = GETPOST('ref_supplier', 'alphanohtml');
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                 $action = "create";
243 243
             }
244 244
 
245
-            if (! $error) {
245
+            if (!$error) {
246 246
                 $db->commit();
247 247
 
248 248
                 header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         $result = $object->setValueFrom('titre', $title, '', null, 'text', '', $user);
293 293
 
294 294
         if ($result > 0) {
295
-            $object->titre = $title;    // deprecated
295
+            $object->titre = $title; // deprecated
296 296
             $object->title = $title;
297 297
             $object->ref = $object->title;
298 298
         } else {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             $error++;
340 340
         }
341 341
 
342
-        if (! $error) {
342
+        if (!$error) {
343 343
             $db->commit();
344 344
         } else {
345 345
             $db->rollback();
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $error++;
357 357
         }
358 358
 
359
-        if (! $error) {
359
+        if (!$error) {
360 360
             $db->commit();
361 361
         } else {
362 362
             $db->rollback();
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
             $error++;
416 416
         }
417 417
 
418
-        if (! $error) {
418
+        if (!$error) {
419 419
             $result = $object->insertExtraFields('BILLREC_MODIFY');
420 420
             if ($result < 0) {
421 421
                 setEventMessages($object->error, $object->errors, 'errors');
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
             setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors');
467 467
             $error++;
468 468
         }
469
-        if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (! ($price_ht >= 0) || $price_ht == '')) {    // Unit price can be 0 but not ''
469
+        if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (!($price_ht >= 0) || $price_ht == '')) {    // Unit price can be 0 but not ''
470 470
             setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors');
471 471
             $error++;
472 472
         }
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
             }
516 516
         }
517 517
 
518
-        if (! $error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
518
+        if (!$error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
519 519
             $ret = $object->fetch($id);
520 520
             if ($ret < 0) {
521 521
                 dol_print_error($db, $object->error);
@@ -731,8 +731,8 @@  discard block
 block discarded – undo
731 731
                 $action = '';
732 732
             }
733 733
         }
734
-    } elseif ($action == 'updateline' && $usercancreate && ! GETPOST('cancel', 'alpha')) {
735
-        if (! $object->fetch($id) > 0) {
734
+    } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) {
735
+        if (!$object->fetch($id) > 0) {
736 736
             dol_print_error($db);
737 737
         }
738 738
         $object->fetch_thirdparty();
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 
784 784
         // Define special_code for special lines
785 785
         $special_code = GETPOSTINT('special_code');
786
-        if (! GETPOST('qty', 'alpha')) {
786
+        if (!GETPOST('qty', 'alpha')) {
787 787
             $special_code = 3;
788 788
         }
789 789
 
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
         $date_end_fill = !empty(GETPOSTINT('date_end_fill')) ? GETPOSTINT('date_end_fill') : 'NULL';
830 830
 
831 831
         // Update line
832
-        if (! $error) {
832
+        if (!$error) {
833 833
             $result = $object->updateline(GETPOSTINT('lineid'), GETPOSTINT('productid'), $ref_fourn, $label, $description, $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax1_rate, 'HT', $type, $date_start_fill, $date_end_fill, $info_bits, $special_code, -1);
834 834
             if ($result >= 0) {
835 835
                 $object->fetch($object->id); // Reload lines
@@ -1488,8 +1488,8 @@  discard block
 block discarded – undo
1488 1488
             print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $usercancreate, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached');
1489 1489
         }
1490 1490
         //var_dump(dol_print_date($object->date_when+60, 'dayhour').' - '.dol_print_date($now, 'dayhour'));
1491
-        if (! $object->isMaxNbGenReached()) {
1492
-            if (! $object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) {
1491
+        if (!$object->isMaxNbGenReached()) {
1492
+            if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) {
1493 1493
                 print img_warning($langs->trans("Late"));
1494 1494
             }
1495 1495
         } else {
Please login to merge, or discard this patch.
public/htdocs/fourn/paiement/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 // Load object
56 56
 include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
57 57
 
58
-$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', '');    // This also test permission on read invoice
58
+$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice
59 59
 
60 60
 // Security check
61 61
 if ($user->socid) {
Please login to merge, or discard this patch.
public/htdocs/fourn/paiement/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 $search_date_endday     = GETPOSTINT('search_date_endday');
63 63
 $search_date_endmonth   = GETPOSTINT('search_date_endmonth');
64 64
 $search_date_endyear    = GETPOSTINT('search_date_endyear');
65
-$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);  // Use tzserver
65
+$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
66 66
 $search_date_end        = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
67 67
 $search_company         = GETPOST('search_company', 'alpha');
68 68
 $search_payment_type    = GETPOST('search_payment_type', 'alpha');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     'p.amount'          => array('label' => "Amount", 'checked' => 1, 'position' => 70),
111 111
 );
112 112
 $arrayfields = dol_sort_array($arrayfields, 'position');
113
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
113
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
114 114
 
115 115
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
116 116
 $hookmanager->initHooks(array('paymentsupplierlist'));
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
208 208
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON s.rowid = f.fk_soc';
209 209
 
210
-$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')';       // TODO We should use p.entity that does not exists yet in this table
210
+$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')'; // TODO We should use p.entity that does not exists yet in this table
211 211
 if ($socid > 0) {
212 212
     $sql .= " AND EXISTS (SELECT f.fk_soc FROM " . MAIN_DB_PREFIX . "facture_fourn as f, " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as pf";
213 213
     $sql .= " WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = " . ((int) $socid) . ")";
Please login to merge, or discard this patch.
public/htdocs/fourn/class/fournisseur.facture-rec.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
         return $this->fetch_lines();
700 700
     }
701 701
 
702
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
702
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
703 703
     /**
704 704
      *  Get lines of template invoices into this->lines
705 705
      *
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function fetch_lines()
709 709
     {
710
-		// phpcs:enable
710
+        // phpcs:enable
711 711
         $this->lines = array();
712 712
 
713 713
         // Retrieve all extrafield for line
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
         return $this->LibStatut($this->frequency ? 1 : 0, $this->suspended, $mode, $alreadypaid, empty($this->type) ? 0 : $this->type);
1513 1513
     }
1514 1514
 
1515
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1515
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1516 1516
     /**
1517 1517
      *  Return label of a status
1518 1518
      *
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
      */
1526 1526
     public function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0)
1527 1527
     {
1528
-		// phpcs:enable
1528
+        // phpcs:enable
1529 1529
         global $langs;
1530 1530
         $langs->load('bills');
1531 1531
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -351,13 +351,13 @@  discard block
 block discarded – undo
351 351
             $sql .= ", '" . $this->db->idate($now) . "'";
352 352
             $sql .= ", " . ((int) $this->suspended);
353 353
             $sql .= ", '" . $this->db->escape($this->libelle) . "'";
354
-            $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0');                              // amount
354
+            $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0'); // amount
355 355
             $sql .= ", " . ((int) $user->id);
356 356
             $sql .= ", " . (!empty($this->fk_project) ? ((int) $this->fk_project) : 'NULL');
357 357
             $sql .= ", " . (!empty($facfourn_src->fk_account) ? ((int) $facfourn_src->fk_account) : 'NULL');
358 358
             $sql .= ", " . ($this->cond_reglement_id > 0 ? (int) $this->cond_reglement_id : 'NULL');
359 359
             $sql .= ", " . ($this->mode_reglement_id > 0 ? (int) $this->mode_reglement_id : 'NULL');
360
-            $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL');      // date_lim_reglement
360
+            $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL'); // date_lim_reglement
361 361
             $sql .= ", " . (!empty($this->note_private) ? "'" . $this->db->escape($this->note_private) . "'" : 'NULL');
362 362
             $sql .= ", " . (!empty($this->note_public) ? "'" . $this->db->escape($this->note_public) . "'" : 'NULL');
363 363
             $sql .= ", " . (!empty($this->model_pdf) ? "'" . $this->db->escape($this->model_pdf) . "'" : 'NULL');
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
         $error = 0;
513 513
 
514 514
         $sql = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_rec SET";
515
-        $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "'," ;
515
+        $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "',";
516 516
         $sql .= " subtype=" . (isset($this->subtype) ? $this->db->escape($this->subtype) : "null") . ",";
517 517
         $sql .= " ref_supplier = '" . (!empty($this->ref_supplier) ? $this->db->escape($this->ref_supplier) : "") . "',";
518 518
         $sql .= " entity = " . (!empty($this->entity) ? ((int) $this->entity) : 1) . ',';
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
                 $this->id                       = $obj->rowid;
631 631
                 $this->titre                    = $obj->title;
632 632
                 $this->title                    = $obj->title;
633
-                $this->subtype                        = $obj->subtype;
633
+                $this->subtype = $obj->subtype;
634 634
                 $this->ref                      = $obj->title;
635 635
                 $this->ref_supplier             = $obj->ref_supplier;
636 636
                 $this->entity                   = $obj->entity;
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
                 $line->product_type             = $objp->product_type;
789 789
                 $line->date_start               = $objp->date_start;
790 790
                 $line->date_end                 = $objp->date_end;
791
-                $line->info_bits                = $objp->info_bits  ;
791
+                $line->info_bits                = $objp->info_bits;
792 792
                 $line->special_code             = $objp->special_code;
793 793
                 $line->rang                     = $objp->rang;
794 794
                 $line->fk_unit                  = $objp->fk_unit;
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
             }
872 872
             // End call triggers
873 873
         }
874
-        if (! $error) {
874
+        if (!$error) {
875 875
             $this->db->commit();
876 876
             return 1;
877 877
         } else {
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
             $sql .= ', fk_user_author';
1016 1016
             $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc';
1017 1017
             $sql .= ') VALUES (';
1018
-            $sql .= ' ' . (int) $facid;   // source supplier invoice id
1018
+            $sql .= ' ' . (int) $facid; // source supplier invoice id
1019 1019
             $sql .= ', ' . (!empty($fk_product) ? "'" . $this->db->escape($fk_product) . "'" : 'null');
1020 1020
             $sql .= ', ' . (!empty($ref) ? "'" . $this->db->escape($ref) . "'" : 'null');
1021 1021
             $sql .= ', ' . (!empty($label) ? "'" . $this->db->escape($label) . "'" : 'null');
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
 
1357 1357
                     $new_fac_fourn->type = self::TYPE_STANDARD;
1358 1358
                     $new_fac_fourn->subtype = $facturerec->subtype;
1359
-                    $new_fac_fourn->statut = self::STATUS_DRAFT;    // deprecated
1359
+                    $new_fac_fourn->statut = self::STATUS_DRAFT; // deprecated
1360 1360
                     $new_fac_fourn->status = self::STATUS_DRAFT;
1361 1361
                     $new_fac_fourn->date = empty($facturerec->date_when) ? $now : $facturerec->date_when; // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
1362 1362
                     $new_fac_fourn->socid = $facturerec->socid;
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
                     $new_fac_fourn->model_pdf = $facturerec->model_pdf;
1366 1366
                     $new_fac_fourn->fk_project = $facturerec->fk_project;
1367 1367
                     $new_fac_fourn->label = $facturerec->label;
1368
-                    $new_fac_fourn->libelle = $facturerec->label;   // deprecated
1368
+                    $new_fac_fourn->libelle = $facturerec->label; // deprecated
1369 1369
 
1370 1370
                     $invoiceidgenerated = $new_fac_fourn->create($user);
1371 1371
                     $laststep = "Create invoiceidgenerated $invoiceidgenerated";
@@ -2072,8 +2072,8 @@  discard block
 block discarded – undo
2072 2072
         $error = 0;
2073 2073
         $this->db->begin();
2074 2074
 
2075
-        if (! $error) {
2076
-            if (! $notrigger) {
2075
+        if (!$error) {
2076
+            if (!$notrigger) {
2077 2077
                 // Call triggers
2078 2078
                 $result = $this->call_trigger('LINESUPPLIERBILLREC_DELETE', $user);
2079 2079
                 if ($result < 0) {
@@ -2083,14 +2083,14 @@  discard block
 block discarded – undo
2083 2083
             }
2084 2084
         }
2085 2085
 
2086
-        if (! $error) {
2086
+        if (!$error) {
2087 2087
             $result = $this->deleteExtraFields();
2088 2088
             if ($result < 0) {
2089 2089
                 $error++;
2090 2090
             }
2091 2091
         }
2092 2092
 
2093
-        if (! $error) {
2093
+        if (!$error) {
2094 2094
             $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . ' WHERE rowid=' . (int) $this->id;
2095 2095
 
2096 2096
             $res = $this->db->query($sql);
Please login to merge, or discard this patch.
public/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   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             $this->ref_supplier = $obj->ref_supplier;
521 521
             $this->socid = $obj->fk_soc;
522 522
             $this->fourn_id = $obj->fk_soc;
523
-            $this->statut = $obj->status;   // deprecated
523
+            $this->statut = $obj->status; // deprecated
524 524
             $this->status = $obj->status;
525 525
             $this->billed = $obj->billed;
526 526
             $this->user_author_id = $obj->user_author_id;
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
             $this->fk_project = $obj->fk_project;
552 552
             $this->cond_reglement_id = $obj->fk_cond_reglement;
553 553
             $this->cond_reglement_code = $obj->cond_reglement_code;
554
-            $this->cond_reglement = $obj->cond_reglement_label;         // deprecated
554
+            $this->cond_reglement = $obj->cond_reglement_label; // deprecated
555 555
             $this->cond_reglement_label = $obj->cond_reglement_label;
556 556
             $this->cond_reglement_doc = $obj->cond_reglement_doc;
557 557
             $this->fk_account = $obj->fk_account;
@@ -684,10 +684,10 @@  discard block
 block discarded – undo
684 684
                     $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")";
685 685
                     $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product);
686 686
                     $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'";
687
-                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty);  // required to be qualified
688
-                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")";  // required to be qualified
687
+                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified
688
+                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified
689 689
                     $sqlsearchpackage .= " AND fk_soc = " . ((int) $this->socid);
690
-                    $sqlsearchpackage .= " ORDER BY packaging ASC";     // Take the smaller package first
690
+                    $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first
691 691
                     $sqlsearchpackage .= " LIMIT 1";
692 692
 
693 693
                     $resqlsearchpackage = $this->db->query($sqlsearchpackage);
@@ -1623,10 +1623,10 @@  discard block
 block discarded – undo
1623 1623
                         $line->date_end,
1624 1624
                         $line->array_options,
1625 1625
                         $line->fk_unit,
1626
-                        $line->multicurrency_subprice,  // pu_ht_devise
1627
-                        $line->origin,     // origin
1628
-                        $line->origin_id,  // origin_id
1629
-                        $line->rang,       // rang
1626
+                        $line->multicurrency_subprice, // pu_ht_devise
1627
+                        $line->origin, // origin
1628
+                        $line->origin_id, // origin_id
1629
+                        $line->rang, // rang
1630 1630
                         $line->special_code
1631 1631
                     );
1632 1632
                     if ($result < 0) {
@@ -2000,7 +2000,7 @@  discard block
 block discarded – undo
2000 2000
             $this->db->begin();
2001 2001
 
2002 2002
             $product_type = $type;
2003
-            $label = '';    // deprecated
2003
+            $label = ''; // deprecated
2004 2004
 
2005 2005
             if ($fk_product > 0) {
2006 2006
                 if (getDolGlobalString('SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY')) { // Not the common case
@@ -2143,7 +2143,7 @@  discard block
 block discarded – undo
2143 2143
             $this->line->total_localtax2 = $total_localtax2;
2144 2144
             $this->line->total_ttc = $total_ttc;
2145 2145
             $this->line->product_type = $type;
2146
-            $this->line->special_code   = (!empty($special_code) ? $special_code : 0);
2146
+            $this->line->special_code = (!empty($special_code) ? $special_code : 0);
2147 2147
             $this->line->origin = $origin;
2148 2148
             $this->line->origin_id = $origin_id;
2149 2149
             $this->line->fk_unit = $fk_unit;
@@ -3350,7 +3350,7 @@  discard block
 block discarded – undo
3350 3350
         global $conf, $langs;
3351 3351
 
3352 3352
         if (!dol_strlen($modele)) {
3353
-            $modele = '';   // No doc template/generation by default
3353
+            $modele = ''; // No doc template/generation by default
3354 3354
 
3355 3355
             if (!empty($this->model_pdf)) {
3356 3356
                 $modele = $this->model_pdf;
@@ -3892,10 +3892,10 @@  discard block
 block discarded – undo
3892 3892
                     $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")";
3893 3893
                     $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product);
3894 3894
                     $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'";
3895
-                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty);  // required to be qualified
3896
-                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")";  // required to be qualified
3895
+                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified
3896
+                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified
3897 3897
                     $sqlsearchpackage .= " AND fk_soc = " . ((int) $objp->socid);
3898
-                    $sqlsearchpackage .= " ORDER BY packaging ASC";     // Take the smaller package first
3898
+                    $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first
3899 3899
                     $sqlsearchpackage .= " LIMIT 1";
3900 3900
 
3901 3901
                     $resqlsearchpackage = $this->db->query($sqlsearchpackage);
Please login to merge, or discard this patch.