Passed
Push — main ( 324b47...7af4bb )
by Rafael
43:55
created
htdocs/website/websiteaccount_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,9 +91,9 @@
 block discarded – undo
91 91
 } else {
92 92
     $permissiontocreate = isModEnabled('website') && $user->hasRight('website', 'write') || isModEnabled('webportal') && $user->hasRight('webportal', 'write');
93 93
 }
94
-$permissionnote    = $permissiontocreate;   //  Used by the include of actions_setnotes.inc.php
95
-$permissiondellink = $permissiontocreate;   //  Used by the include of actions_dellink.inc.php
96
-$permissiontoadd   = $permissiontocreate;   //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
94
+$permissionnote    = $permissiontocreate; //  Used by the include of actions_setnotes.inc.php
95
+$permissiondellink = $permissiontocreate; //  Used by the include of actions_dellink.inc.php
96
+$permissiontoadd   = $permissiontocreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
97 97
 
98 98
 // check access from type of site on create, edit, delete (other than view)
99 99
 $site_type_js = '';
Please login to merge, or discard this patch.
htdocs/website/index.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 if ($sortorder) {
420 420
     $backtopage .= '&sortorder=' . urlencode($sortorder);
421 421
 }
422
-include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';  // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
422
+include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
423 423
 
424 424
 $backtopage = $savbacktopage;
425 425
 //var_dump($backtopage);
@@ -1546,7 +1546,7 @@  discard block
 block discarded – undo
1546 1546
                     $error++;
1547 1547
                     setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1548 1548
                 }
1549
-                if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1549
+                if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1550 1550
                     $error++;
1551 1551
                     setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1552 1552
                 }
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
                 if (!GETPOSTISSET('updateandstay')) {   // If we click on "Save And Stay", we don not make the redirect
1559 1559
                     $action = 'preview';
1560 1560
                     if ($backtopage) {
1561
-                        $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);    // Clean backtopage url
1561
+                        $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1562 1562
                         header("Location: " . $backtopage);
1563 1563
                         exit;
1564 1564
                     }
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1592 1592
 
1593 1593
             // Security analysis
1594
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1594
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1595 1595
 
1596 1596
             if (!$errorphpcheck) {
1597 1597
                 $htmlheadercontent = '';
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1630 1630
 
1631 1631
             // Security analysis
1632
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1632
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1633 1633
 
1634 1634
             if (!$errorphpcheck) {
1635 1635
                 $csscontent = '';
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1673 1673
 
1674 1674
             // Security analysis
1675
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1675
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1676 1676
 
1677 1677
             if (!$errorphpcheck) {
1678 1678
                 $jscontent = '';
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1711 1711
 
1712 1712
             // Security analysis
1713
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1713
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1714 1714
 
1715 1715
             if (!$errorphpcheck) {
1716 1716
                 $robotcontent = '';
@@ -1748,7 +1748,7 @@  discard block
 block discarded – undo
1748 1748
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1749 1749
 
1750 1750
             // Security analysis
1751
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1751
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1752 1752
 
1753 1753
             if (!$errorphpcheck) {
1754 1754
                 $htaccesscontent = '';
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1773 1773
 
1774 1774
             // Security analysis
1775
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1775
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1776 1776
 
1777 1777
             if (!$errorphpcheck) {
1778 1778
                 $manifestjsoncontent = '';
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1811 1811
 
1812 1812
             // Security analysis
1813
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1813
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1814 1814
 
1815 1815
             if (!$errorphpcheck) {
1816 1816
                 $readmecontent = '';
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1849 1849
 
1850 1850
             // Security analysis
1851
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1851
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1852 1852
 
1853 1853
             if (!$errorphpcheck) {
1854 1854
                 $licensecontent = '';
@@ -1890,7 +1890,7 @@  discard block
 block discarded – undo
1890 1890
             if (!GETPOSTISSET('updateandstay')) {   // If we click on "Save And Stay", we don not make the redirect
1891 1891
                 $action = 'preview';
1892 1892
                 if ($backtopage) {
1893
-                    $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);    // Clean backtopage url
1893
+                    $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1894 1894
                     header("Location: " . $backtopage);
1895 1895
                     exit;
1896 1896
                 }
@@ -1909,7 +1909,7 @@  discard block
 block discarded – undo
1909 1909
 
1910 1910
     $object->fk_default_home = $pageid;
1911 1911
     $res = $object->update($user);
1912
-    if (! ($res > 0)) {
1912
+    if (!($res > 0)) {
1913 1913
         $error++;
1914 1914
         setEventMessages($object->error, $object->errors, 'errors');
1915 1915
     }
@@ -2523,7 +2523,7 @@  discard block
 block discarded – undo
2523 2523
                 $fileofzip = '';
2524 2524
                 if (GETPOSTISSET('templateuserfile')) {
2525 2525
                     // Case we selected one template
2526
-                    $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha');  // $fileofzip will be sanitized later into the importWebSite()
2526
+                    $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2527 2527
                 } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) {
2528 2528
                     // Case we upload a new template
2529 2529
                     if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2605,7 +2605,7 @@  discard block
 block discarded – undo
2605 2605
     if ($website->virtualhost) {
2606 2606
         $domainname = $website->virtualhost;
2607 2607
     }
2608
-    if (! preg_match('/^http/i', $domainname)) {
2608
+    if (!preg_match('/^http/i', $domainname)) {
2609 2609
         $domainname = 'https://' . $domainname;
2610 2610
     }
2611 2611
 
@@ -2671,7 +2671,7 @@  discard block
 block discarded – undo
2671 2671
                 $url->appendChild($lastmod);
2672 2672
                 // Add suggested frequency for refresh
2673 2673
                 if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2674
-                    $changefreq = $domtree->createElement('changefreq', 'weekly');  // TODO Manage other values
2674
+                    $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2675 2675
                     $url->appendChild($changefreq);
2676 2676
                 }
2677 2677
                 // Add higher priority for home page
@@ -2776,7 +2776,7 @@  discard block
 block discarded – undo
2776 2776
                 $url->appendChild($lastmod);
2777 2777
                 // Add suggested frequency for refresh
2778 2778
                 if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2779
-                    $changefreq = $domtree->createElement('changefreq', 'weekly');  // TODO Manage other values
2779
+                    $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2780 2780
                     $url->appendChild($changefreq);
2781 2781
                 }
2782 2782
 
@@ -3537,7 +3537,7 @@  discard block
 block discarded – undo
3537 3537
                 } else {
3538 3538
                     $disabled = '';
3539 3539
                     $title = '';
3540
-                    $url = $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref);    // action=delete for webpage, deletesite for website
3540
+                    $url = $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website
3541 3541
                 }
3542 3542
                 print '<a href="' . $url . '" class="button buttonDelete bordertransp' . ($disabled ? ' disabled' : '') . '"' . $disabled . ' title="' . dol_escape_htmltag($title) . '">' . img_picto('', 'delete', 'class=""') . '<span class="hideonsmartphone paddingleft">' . $langs->trans("Delete") . '</span></a>';
3543 3543
                 print '</span>';
@@ -3757,7 +3757,7 @@  discard block
 block discarded – undo
3757 3757
         // Clean the php htaccesscontent file to remove php code and get only html part
3758 3758
         $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent);
3759 3759
     } else {
3760
-        $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');   // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3760
+        $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3761 3761
     }
3762 3762
     if (!trim($htaccesscontent)) {
3763 3763
         $htaccesscontent .= "# Order allow,deny\n";
@@ -3859,7 +3859,7 @@  discard block
 block discarded – undo
3859 3859
     $maxfilesizearray = getMaxFileSizeArray();
3860 3860
     $maxmin = $maxfilesizearray['maxmin'];
3861 3861
     if ($maxmin > 0) {
3862
-        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
3862
+        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
3863 3863
     }
3864 3864
     print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
3865 3865
 
@@ -4116,7 +4116,7 @@  discard block
 block discarded – undo
4116 4116
         $maxfilesizearray = getMaxFileSizeArray();
4117 4117
         $maxmin = $maxfilesizearray['maxmin'];
4118 4118
         if ($maxmin > 0) {
4119
-            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
4119
+            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
4120 4120
         }
4121 4121
         print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
4122 4122
         print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="' . dol_escape_htmltag($langs->trans("Upload")) . '">';
@@ -4647,7 +4647,7 @@  discard block
 block discarded – undo
4647 4647
 
4648 4648
 
4649 4649
     $module = 'medias';
4650
-    $formalreadyopen = 2;   // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4650
+    $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4651 4651
     if (empty($url)) {
4652 4652
         $url = DOL_URL_ROOT . '/website/index.php'; // Must be an url without param
4653 4653
     }
@@ -4878,7 +4878,7 @@  discard block
 block discarded – undo
4878 4878
             print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
4879 4879
             print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
4880 4880
             print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4881
-            print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";      // Date last modif
4881
+            print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif
4882 4882
             print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4883 4883
             print getTitleFieldOfList($selectedfields, 0, $_SERVER['PHP_SELF'], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ') . "\n";
4884 4884
             print '</tr>';
Please login to merge, or discard this patch.
htdocs/fourn/facture/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha');
85 85
 $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
86 86
 $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
87
-$search_status = GETPOST('search_status', 'intcomma');  // Can be '' or a numeric
87
+$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric
88 88
 $search_paymentmode = GETPOSTINT('search_paymentmode');
89 89
 $search_paymentcond = GETPOSTINT('search_paymentcond');
90 90
 $search_town = GETPOST('search_town', 'alpha');
Please login to merge, or discard this patch.
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.
htdocs/fourn/facture/card-rec.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
     $page = 0;
85 85
 }     // If $page is not defined, or '' or -1
86 86
 $offset = $limit * $page;
87
-if (! $sortorder) {
87
+if (!$sortorder) {
88 88
     $sortorder = 'DESC';
89 89
 }
90
-if (! $sortfield) {
90
+if (!$sortfield) {
91 91
     $sortfield = 'f.titre';
92 92
 }
93 93
 $pageprev = $page - 1;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 $object = new FactureFournisseurRec($db);
97 97
 if (($id > 0 || $title) && $action != 'create' && $action != 'add') {
98 98
     $ret = $object->fetch($id, $title);
99
-    if (! $ret) {
99
+    if (!$ret) {
100 100
         setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors');
101 101
     }
102 102
 }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     $action = 'list';
141 141
     $massaction = '';
142 142
 }
143
-if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
143
+if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
144 144
     $massaction = '';
145 145
 }
146 146
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     // Create predefined invoice
169 169
     if ($action == 'add') {
170
-        if (! GETPOST('title', 'alphanohtml')) {
170
+        if (!GETPOST('title', 'alphanohtml')) {
171 171
             setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Title")), null, 'errors');
172 172
             $action = "create";
173 173
             $error++;
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             }
191 191
         }
192 192
 
193
-        if (! $error) {
193
+        if (!$error) {
194 194
             $object->titre = GETPOST('title', 'alphanohtml'); // deprecated
195 195
             $object->title = GETPOST('title', 'alphanohtml');
196 196
             $object->libelle = GETPOST('libelle', 'alpha'); // deprecated
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                 $action = "create";
240 240
             }
241 241
 
242
-            if (! $error) {
242
+            if (!$error) {
243 243
                 $db->commit();
244 244
 
245 245
                 header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $result = $object->setValueFrom('titre', $title, '', null, 'text', '', $user);
290 290
 
291 291
         if ($result > 0) {
292
-            $object->titre = $title;    // deprecated
292
+            $object->titre = $title; // deprecated
293 293
             $object->title = $title;
294 294
             $object->ref = $object->title;
295 295
         } else {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
             $error++;
337 337
         }
338 338
 
339
-        if (! $error) {
339
+        if (!$error) {
340 340
             $db->commit();
341 341
         } else {
342 342
             $db->rollback();
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             $error++;
354 354
         }
355 355
 
356
-        if (! $error) {
356
+        if (!$error) {
357 357
             $db->commit();
358 358
         } else {
359 359
             $db->rollback();
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $error++;
413 413
         }
414 414
 
415
-        if (! $error) {
415
+        if (!$error) {
416 416
             $result = $object->insertExtraFields('BILLREC_MODIFY');
417 417
             if ($result < 0) {
418 418
                 setEventMessages($object->error, $object->errors, 'errors');
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
             setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors');
464 464
             $error++;
465 465
         }
466
-        if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (! ($price_ht >= 0) || $price_ht == '')) {    // Unit price can be 0 but not ''
466
+        if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (!($price_ht >= 0) || $price_ht == '')) {    // Unit price can be 0 but not ''
467 467
             setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors');
468 468
             $error++;
469 469
         }
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             }
513 513
         }
514 514
 
515
-        if (! $error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
515
+        if (!$error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
516 516
             $ret = $object->fetch($id);
517 517
             if ($ret < 0) {
518 518
                 dol_print_error($db, $object->error);
@@ -728,8 +728,8 @@  discard block
 block discarded – undo
728 728
                 $action = '';
729 729
             }
730 730
         }
731
-    } elseif ($action == 'updateline' && $usercancreate && ! GETPOST('cancel', 'alpha')) {
732
-        if (! $object->fetch($id) > 0) {
731
+    } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) {
732
+        if (!$object->fetch($id) > 0) {
733 733
             dol_print_error($db);
734 734
         }
735 735
         $object->fetch_thirdparty();
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 
781 781
         // Define special_code for special lines
782 782
         $special_code = GETPOSTINT('special_code');
783
-        if (! GETPOST('qty', 'alpha')) {
783
+        if (!GETPOST('qty', 'alpha')) {
784 784
             $special_code = 3;
785 785
         }
786 786
 
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
         $date_end_fill = !empty(GETPOSTINT('date_end_fill')) ? GETPOSTINT('date_end_fill') : 'NULL';
827 827
 
828 828
         // Update line
829
-        if (! $error) {
829
+        if (!$error) {
830 830
             $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);
831 831
             if ($result >= 0) {
832 832
                 $object->fetch($object->id); // Reload lines
@@ -1456,8 +1456,8 @@  discard block
 block discarded – undo
1456 1456
             print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $usercancreate, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached');
1457 1457
         }
1458 1458
         //var_dump(dol_print_date($object->date_when+60, 'dayhour').' - '.dol_print_date($now, 'dayhour'));
1459
-        if (! $object->isMaxNbGenReached()) {
1460
-            if (! $object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) {
1459
+        if (!$object->isMaxNbGenReached()) {
1460
+            if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) {
1461 1461
                 print img_warning($langs->trans("Late"));
1462 1462
             }
1463 1463
         } else {
Please login to merge, or discard this patch.
htdocs/fourn/facture/list-rec.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 $search_date_endday = GETPOSTINT('search_date_endday');
82 82
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
83 83
 $search_date_endyear = GETPOSTINT('search_date_endyear');
84
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
84
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
85 85
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
86 86
 $search_date_when_startday = GETPOSTINT('search_date_when_startday');
87 87
 $search_date_when_startmonth = GETPOSTINT('search_date_when_startmonth');
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 $search_date_when_endday = GETPOSTINT('search_date_when_endday');
90 90
 $search_date_when_endmonth = GETPOSTINT('search_date_when_endmonth');
91 91
 $search_date_when_endyear = GETPOSTINT('search_date_when_endyear');
92
-$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear);   // Use tzserver
92
+$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver
93 93
 $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear);
94 94
 $search_recurring = GETPOSTINT('search_recurring');
95 95
 $search_frequency = GETPOST('search_frequency', 'alpha');
Please login to merge, or discard this patch.
htdocs/fourn/facture/card.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
             $error++;
777 777
         }
778 778
 
779
-        $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');   // If we enter the 02 january, we need to save the 02 january for server
779
+        $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
780 780
         $datedue = dol_mktime(0, 0, 0, GETPOSTINT('echmonth'), GETPOSTINT('echday'), GETPOSTINT('echyear'), 'tzserver');
781 781
         //var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour'));
782 782
         //var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour'));
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
                 $object->ref                = GETPOST('ref', 'alphanohtml');
1059 1059
                 $object->ref_supplier       = GETPOST('ref_supplier', 'alphanohtml');
1060 1060
                 $object->socid              = GETPOSTINT('socid');
1061
-                $object->libelle            = GETPOST('label', 'alphanohtml');  // deprecated
1061
+                $object->libelle            = GETPOST('label', 'alphanohtml'); // deprecated
1062 1062
                 $object->label              = GETPOST('label', 'alphanohtml');
1063 1063
                 $object->date               = $dateinvoice;
1064 1064
                 $object->date_echeance      = $datedue;
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
         // Edit line
1415 1415
         $db->begin();
1416 1416
 
1417
-        if (! $object->fetch($id) > 0) {
1417
+        if (!$object->fetch($id) > 0) {
1418 1418
             dol_print_error($db);
1419 1419
         }
1420 1420
         $object->fetch_thirdparty();
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
             $idprod = GETPOSTINT('idprod');
1559 1559
         }
1560 1560
 
1561
-        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);      // Can be '1.2' or '1.2 (CODE)'
1561
+        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
1562 1562
 
1563 1563
         $price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
1564 1564
         $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -2257,7 +2257,7 @@  discard block
 block discarded – undo
2257 2257
     print '<form name="add" action="' . $_SERVER['PHP_SELF'] . '" method="post">';
2258 2258
     print '<input type="hidden" name="token" value="' . newToken() . '">';
2259 2259
     print '<input type="hidden" name="action" value="add">';
2260
-    print '<input type="hidden" name="changecompany" value="0">';   // will be set to 1 by javascript so we know post is done after a company change
2260
+    print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
2261 2261
 
2262 2262
     if (!empty($societe->id) && $societe->id > 0) {
2263 2263
         print '<input type="hidden" name="socid" value="' . $societe->id . '">' . "\n";
@@ -4147,7 +4147,7 @@  discard block
 block discarded – undo
4147 4147
                 }
4148 4148
 
4149 4149
                 // Clone as predefined / Create template
4150
-                if (($object->type ==  FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4150
+                if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4151 4151
                     if (!$objectidnext && count($object->lines) > 0) {
4152 4152
                         print '<a class="butAction" href="' . DOL_URL_ROOT . '/fourn/facture/card-rec.php?facid=' . $object->id . '&amp;action=create">' . $langs->trans("ChangeIntoRepeatableInvoice") . '</a>';
4153 4153
                     }
Please login to merge, or discard this patch.
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.
htdocs/fourn/paiement/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 $search_date_endday     = GETPOSTINT('search_date_endday');
61 61
 $search_date_endmonth   = GETPOSTINT('search_date_endmonth');
62 62
 $search_date_endyear    = GETPOSTINT('search_date_endyear');
63
-$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);  // Use tzserver
63
+$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
64 64
 $search_date_end        = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65 65
 $search_company         = GETPOST('search_company', 'alpha');
66 66
 $search_payment_type    = GETPOST('search_payment_type');
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
205 205
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON s.rowid = f.fk_soc';
206 206
 
207
-$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')';       // TODO We should use p.entity that does not exists yet in this table
207
+$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')'; // TODO We should use p.entity that does not exists yet in this table
208 208
 if ($socid > 0) {
209 209
     $sql .= " AND EXISTS (SELECT f.fk_soc FROM " . MAIN_DB_PREFIX . "facture_fourn as f, " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as pf";
210 210
     $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.