Passed
Push — main ( 324b47...7af4bb )
by Rafael
43:55
created
htdocs/projet/tasks/time.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -352,10 +352,10 @@  discard block
 block discarded – undo
352 352
 }
353 353
 
354 354
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
355
-    $object->fetchTimeSpent(GETPOSTINT('lineid'));    // load properties like $object->timespent_xxx
355
+    $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx
356 356
 
357 357
     if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
358
-        $result = $object->delTimeSpent($user);    // delete line with $object->timespent_id
358
+        $result = $object->delTimeSpent($user); // delete line with $object->timespent_id
359 359
 
360 360
         if ($result < 0) {
361 361
             $langs->load("errors");
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                 $arrayoftasks = array();
480 480
                 foreach ($toselect as $key => $value) {
481 481
                     // Get userid, timepent
482
-                    $object->fetchTimeSpent($value);    // $value is ID of 1 line in timespent table
482
+                    $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
483 483
                     $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
484 484
                     $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
485 485
                 }
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                 $arrayoftasks = array();
672 672
                 foreach ($toselect as $key => $value) {
673 673
                     // Get userid, timepent
674
-                    $object->fetchTimeSpent($value);        // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
674
+                    $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
675 675
                     // $object->id is now the task id
676 676
                     $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
677 677
                     $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
         }
1133 1133
 
1134 1134
         $param = ($withproject ? '&withproject=1' : '');
1135
-        $param .= ($param ? '&' : '') . 'id=' . $object->id;        // ID of task
1135
+        $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task
1136 1136
         $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
1137 1137
 
1138 1138
         if (!GETPOST('withproject') || empty($projectstatic->id)) {
@@ -1267,10 +1267,10 @@  discard block
 block discarded – undo
1267 1267
         // Definition of fields for list
1268 1268
         $arrayfields = array();
1269 1269
         $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1);
1270
-        $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1);
1270
+        $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1);
1271 1271
         $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1');
1272 1272
         if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
1273
-            if (! empty($allprojectforuser)) {
1273
+            if (!empty($allprojectforuser)) {
1274 1274
                 $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1];
1275 1275
                 $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1];
1276 1276
             }
Please login to merge, or discard this patch.
htdocs/projet/tasks/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $search_date_endday = GETPOSTINT('search_date_endday');
94 94
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
95 95
 $search_date_endyear = GETPOSTINT('search_date_endyear');
96
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
96
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
97 97
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
98 98
 $search_datelimit_startday = GETPOSTINT('search_datelimit_startday');
99 99
 $search_datelimit_startmonth = GETPOSTINT('search_datelimit_startmonth');
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 // Direct jump if only one record found
589 589
 if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) {
590 590
     $obj = $db->fetch_object($resql);
591
-    $id = $obj->id;     // in select, task id has been aliases into 'id'
591
+    $id = $obj->id; // in select, task id has been aliases into 'id'
592 592
     header("Location: " . DOL_URL_ROOT . '/projet/tasks/task.php?id=' . $id . '&withproject=1');
593 593
     exit;
594 594
 }
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 // Output page
598 598
 // --------------------------------------------------------------------
599 599
 
600
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
600
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
601 601
 
602 602
 $arrayofselected = is_array($toselect) ? $toselect : array();
603 603
 
Please login to merge, or discard this patch.
htdocs/projet/tasks/task.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
 
229 229
 $title = $object->ref;
230 230
 if (!empty($withproject)) {
231
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
231
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
232 232
 }
233 233
 $help_url = '';
234 234
 
Please login to merge, or discard this patch.
htdocs/projet/tasks/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 
120 120
 $title = $object->ref . ' - ' . $langs->trans("Notes");
121 121
 if (!empty($withproject)) {
122
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
122
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
123 123
 }
124 124
 $help_url = '';
125 125
 
Please login to merge, or discard this patch.
htdocs/projet/tasks/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 
126 126
 $title = $object->ref . ' - ' . $langs->trans("Documents");
127 127
 if (!empty($withproject)) {
128
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
128
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
129 129
 }
130 130
 $help_url = '';
131 131
 
Please login to merge, or discard this patch.
htdocs/projet/tasks/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 
150 150
 $title = $object->ref . ' - ' . $langs->trans("Contacts");
151 151
 if (!empty($withproject)) {
152
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
152
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
153 153
 }
154 154
 $help_url = '';
155 155
 
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/knowledgerecord_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search
46 46
 $backtopage = GETPOST('backtopage', 'alpha');
47 47
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
48
-$lineid   = GETPOSTINT('lineid');
48
+$lineid = GETPOSTINT('lineid');
49 49
 
50 50
 // Initialize technical objects
51 51
 $object = new KnowledgeRecord($db);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
     print '<table class="border centpercent tableforfield">' . "\n";
427 427
 
428 428
     // Common attributes
429
-    $keyforbreak = 'fk_c_ticket_category';    // We change column just before this field
429
+    $keyforbreak = 'fk_c_ticket_category'; // We change column just before this field
430 430
     //unset($object->fields['fk_project']);             // Hide field already shown in banner
431 431
     //unset($object->fields['fk_soc']);                 // Hide field already shown in banner
432 432
     $object->fields['answer']['enabled'] = 0;
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/knowledgerecord_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 // Default sort order (if not yet defined by previous GETPOST)
86 86
 if (!$sortfield) {
87
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
87
+    reset($object->fields); // Reset is required to avoid key() to return null.
88 88
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
89 89
 }
90 90
 if (!$sortorder) {
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
616 616
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
617 617
     }
618
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
618
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
619 619
     if (!empty($arrayfields['t.' . $key]['checked'])) {
620 620
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
621 621
         $totalarray['nbfield']++;
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
             if (!empty($arrayfields['t.' . $key]['checked'])) {
720 720
                 print '<td' . ($cssforfield ? ' class="' . $cssforfield . (preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '') . '"' : '');
721 721
                 if (preg_match('/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) {
722
-                    print ' title="' . dol_escape_htmltag(dol_nl2br($object->$key, 1)) . '"';   // We add dol_nl2br for the question and answer fields
722
+                    print ' title="' . dol_escape_htmltag(dol_nl2br($object->$key, 1)) . '"'; // We add dol_nl2br for the question and answer fields
723 723
                 }
724 724
                 print '>';
725 725
                 if ($key == 'status') {
Please login to merge, or discard this patch.
htdocs/takepos/invoice.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
  */
173 173
 
174 174
 $parameters = array();
175
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
175
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
176 176
 if ($reshook < 0) {
177 177
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
178 178
 }
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
             $bankaccount = GETPOSTINT('accountid');
188 188
         } else {
189 189
             if ($pay == 'LIQ') {
190
-                $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH' . $_SESSION["takeposterminal"]);            // For backward compatibility
190
+                $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH' . $_SESSION["takeposterminal"]); // For backward compatibility
191 191
             } elseif ($pay == "CHQ") {
192
-                $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE' . $_SESSION["takeposterminal"]);    // For backward compatibility
192
+                $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE' . $_SESSION["takeposterminal"]); // For backward compatibility
193 193
             } else {
194 194
                 $accountname = "CASHDESK_ID_BANKACCOUNT_" . $pay . $_SESSION["takeposterminal"];
195 195
                 $bankaccount = getDolGlobalInt($accountname);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $creditnote->socid = $invoice->socid;
352 352
         $creditnote->date = dol_now();
353 353
         $creditnote->module_source = 'takepos';
354
-        $creditnote->pos_source =  isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
354
+        $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '';
355 355
         $creditnote->type = Facture::TYPE_CREDIT_NOTE;
356 356
         $creditnote->fk_facture_source = $placeid;
357 357
         //$creditnote->remise_absolue = $invoice->remise_absolue;
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
     // If we add a line and no invoice yet, we create the invoice
503 503
     if (($action == "addline" || $action == "freezone") && $placeid == 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) {
504 504
         $invoice->socid = getDolGlobalInt($constforcompanyid);
505
-        $invoice->date = dol_now('tzuserrel');      // We use the local date, only the day will be saved.
505
+        $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved.
506 506
         $invoice->module_source = 'takepos';
507
-        $invoice->pos_source =  isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
507
+        $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '';
508 508
         $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity;
509 509
 
510 510
         if ($invoice->socid <= 0) {
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 
680 680
             // complete line by hook
681 681
             $parameters = array('prod' => $prod, 'line' => $line);
682
-            $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action);    // Note that $action and $line may have been modified by some hooks
682
+            $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks
683 683
             if ($reshook < 0) {
684 684
                 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
685 685
             }
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
                     }
869 869
                     if (!$permissiontoupdateline) {
870 870
                         dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos") . ' - No permission to updateprice', null, 1);
871
-                    } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT')  == 1) {
871
+                    } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) {
872 872
                         $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
873 873
                     } else {
874 874
                         $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
 
1555 1555
 // Complete header by hook
1556 1556
 $parameters = array();
1557
-$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1557
+$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1558 1558
 if ($reshook < 0) {
1559 1559
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1560 1560
 }
@@ -1716,7 +1716,7 @@  discard block
 block discarded – undo
1716 1716
 
1717 1717
                 // complete line by hook
1718 1718
                 $parameters = array('line' => $line);
1719
-                $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1719
+                $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1720 1720
                 if ($reshook < 0) {
1721 1721
                     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1722 1722
                 }
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
 
1813 1813
                 // complete line by hook
1814 1814
                 $parameters = array('line' => $line);
1815
-                $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1815
+                $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1816 1816
                 if ($reshook < 0) {
1817 1817
                     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1818 1818
                 }
Please login to merge, or discard this patch.