Completed
Push — master ( 789f1c...5594ea )
by Laurent
16:13 queued 13:09
created
listFact.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@
 block discarded – undo
61 61
 $form = new Form($db);
62 62
 print '<!-- debut cartouche rapport -->
63 63
 	<div class="tabs">
64
-	    <a  id="'.($viewSelection == 1 ? 'active' : '').'" class="tab" href="listFact.php?view=1">Facturation</a>
65
-	    <a  id="'.($viewSelection == 2 ? 'active' : '').'" class="tab" href="listFact.php?view=2">AVIABEL</a>
64
+	    <a  id="'.($viewSelection == 1 ? 'active' : '') . '" class="tab" href="listFact.php?view=1">Facturation</a>
65
+	    <a  id="'.($viewSelection == 2 ? 'active' : '') . '" class="tab" href="listFact.php?view=2">AVIABEL</a>
66 66
 	</div>';
67 67
 print '<div class="tabBar">';
68 68
 print "<form name='listFact' action=\"listFact.php\" method=\"get\">\n";
Please login to merge, or discard this patch.
generateExpenseNote.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 
169 169
         if ($result > 0) {
170 170
             dol_htmloutput_mesg("Notes de frais créées");
171
-        }else{
171
+        } else{
172 172
             dol_htmloutput_errors("Note de frais non créée");
173 173
         }
174 174
     } else {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
         $missions = bbcKilometersByQuartil($year);
83 83
 
84
-        foreach($missions as $currentMissionUserId => $currentMission){
84
+        foreach ($missions as $currentMissionUserId => $currentMission) {
85 85
 
86
-            if($currentMission["quartil"][$quarter]["km"] == 0 && $currentMission["quartil"][$quarter]["flight"] == 0){
86
+            if ($currentMission["quartil"][$quarter]["km"] == 0 && $currentMission["quartil"][$quarter]["flight"] == 0) {
87 87
                 continue;
88 88
             }
89 89
 
@@ -97,18 +97,18 @@  discard block
 block discarded – undo
97 97
             $object->fk_statut = 1;
98 98
             $object->fk_user_validator = GETPOST("fk_user_validator", 'int');
99 99
             $object->note_public = GETPOST('public_note', 'alpha');
100
-            $object->note_private = GETPOST('private_note','alpha');
100
+            $object->note_private = GETPOST('private_note', 'alpha');
101 101
 
102 102
             $expenseNoteId = $object->create($expenseNoteUser);
103
-            if($expenseNoteId < 0){
104
-                dol_htmloutput_errors("Erreur lors de la création de la note de frais" , $object->errors);
103
+            if ($expenseNoteId < 0) {
104
+                dol_htmloutput_errors("Erreur lors de la création de la note de frais", $object->errors);
105 105
                 continue;
106 106
             }
107 107
 
108 108
 
109 109
             $flightsForQuarter = findFlightByPilotAndQuarter($currentMissionUserId, $year, $quarter);
110 110
 
111
-            foreach($flightsForQuarter as $currentFlightForQuarter) {
111
+            foreach ($flightsForQuarter as $currentFlightForQuarter) {
112 112
 
113 113
                 // Kilometers
114 114
                 $object_ligne = new ExpenseReportLine($db);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         if ($result > 0) {
170 170
             dol_htmloutput_mesg("Notes de frais créées");
171
-        }else{
171
+        } else {
172 172
             dol_htmloutput_errors("Note de frais non créée");
173 173
         }
174 174
     } else {
@@ -187,15 +187,15 @@  discard block
 block discarded – undo
187 187
 $form = new Form($db);
188 188
 
189 189
 $tabLinks = [];
190
-foreach($flightYears as $currentFlightYear){
190
+foreach ($flightYears as $currentFlightYear) {
191 191
     $tabLinks[] = [
192
-        DOL_URL_ROOT."/flightlog/generateExpenseNote.php?year=".$currentFlightYear,
192
+        DOL_URL_ROOT . "/flightlog/generateExpenseNote.php?year=" . $currentFlightYear,
193 193
         $currentFlightYear,
194
-        "tab_".$currentFlightYear
194
+        "tab_" . $currentFlightYear
195 195
     ];
196 196
 }
197 197
 
198
-dol_fiche_head($tabLinks, "tab_".$year);
198
+dol_fiche_head($tabLinks, "tab_" . $year);
199 199
 
200 200
 ?>
201 201
     <form method="POST">
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         <select name="quarter" id="field_quarter">
212 212
             <option value="1" <?= ($year == $currentYear && $currentQuarter <= 1) ? 'disabled="disabled"' : "" ?>>1</option>
213 213
             <option value="2" <?= ($year == $currentYear && $currentQuarter <= 2) ? 'disabled="disabled"' : "" ?>>2</option>
214
-            <option value="3" <?= ($year == $currentYear && $currentQuarter <= 3) ? 'disabled="disabled"': "" ?>>3</option>
214
+            <option value="3" <?= ($year == $currentYear && $currentQuarter <= 3) ? 'disabled="disabled"' : "" ?>>3</option>
215 215
             <option value="4" <?= ($year == $currentYear && $currentQuarter <= 4) ? 'disabled="disabled"' : "" ?>>4</option>
216 216
         </select>
217 217
         <br/>
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         <label><?= $langs->trans("Validateur de la note de frais")?></label><br/>
221 221
         <?php
222 222
             $include_users = $object->fetch_users_approver_expensereport();
223
-            print $form->select_dolusers($user->id,"fk_user_validator",1,"",0,$include_users);
223
+            print $form->select_dolusers($user->id, "fk_user_validator", 1, "", 0, $include_users);
224 224
         ?>
225 225
         <br/>
226 226
 
Please login to merge, or discard this patch.
class/YearGraphicalData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $result = [$this->year];
70 70
 
71 71
         foreach ($this->graphData as $typeId => $data) {
72
-            if(!in_array($typeId, [1,2,3,6])){
72
+            if (!in_array($typeId, [1, 2, 3, 6])) {
73 73
                 continue;
74 74
             }
75 75
 
Please login to merge, or discard this patch.
class/GraphicalValueType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@
 block discarded – undo
36 36
     /**
37 37
      * @param GraphicalValue $value
38 38
      */
39
-    public function addValue(GraphicalValue $value){
39
+    public function addValue(GraphicalValue $value) {
40 40
         $this->counter = $this->counter->add($value);
41 41
     }
42 42
 
43 43
     /**
44 44
      * @return int
45 45
      */
46
-    public function getValue(){
46
+    public function getValue() {
47 47
         return $this->counter->getValue();
48 48
     }
49 49
 
Please login to merge, or discard this patch.
class/GraphicalData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function addValue($year, GraphicalValue $value)
42 42
     {
43
-        if(!isset($this->data[$year])){
43
+        if (!isset($this->data[$year])) {
44 44
             throw new \Exception("Year is not defined");
45 45
         }
46 46
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $result = [];
56 56
 
57
-        foreach($this->data as $year){
57
+        foreach ($this->data as $year) {
58 58
             $result[] = $year->export();
59 59
         }
60 60
 
Please login to merge, or discard this patch.
lib/flightLog.lib.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,9 +149,9 @@
 block discarded – undo
149 149
 }
150 150
 
151 151
 /**
152
- * @param null $year
153
- * @param null $pilotId
154
- * @param null $quarter
152
+ * @param integer $year
153
+ * @param integer $pilotId
154
+ * @param integer $quarter
155 155
  * @param bool $groupBy
156 156
  *
157 157
  * @return string
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     $totalQ4 = 0;
338 338
 
339 339
     $curMonth = date("m", time());
340
-    $curQuarter = ceil($curMonth/3);
340
+    $curQuarter = ceil($curMonth / 3);
341 341
     $disableColor = 'style="background-color: lightyellow;" title="N/A" data-toggle="tooltip"';
342 342
 
343 343
     foreach ($kmByQuartil as $id => $rembKm) {
@@ -371,29 +371,29 @@  discard block
 block discarded – undo
371 371
         print '<td>' . $name . '</td>';
372 372
         print '<td>' . $firstname . '</td>';
373 373
 
374
-        print '<td'.($curQuarter < 1 ? $disableColor: '').'>' . ($flightsQ1) . '</td>';
375
-        print '<td'.($curQuarter < 1 ? $disableColor: '').'>' . ($flightsQ1 * $unitPriceMission) . '€</td>';
376
-        print '<td'.($curQuarter < 1 ? $disableColor: '').'>' . $sumQ1 . '</td>';
377
-        print '<td'.($curQuarter < 1 ? $disableColor: '').'>' . ($sumQ1 * $tauxRemb) . '</td>';
378
-        print '<td'.($curQuarter < 1 ? $disableColor: '').'><b>' . $amoutQ1 . '€</b></td>';
379
-
380
-        print '<td '.($curQuarter < 2 ? $disableColor: '').'>' . ($flightsQ2) . '</td>';
381
-        print '<td '.($curQuarter < 2 ? $disableColor: '').'>' . ($flightsQ2 * $unitPriceMission) . '€</td>';
382
-        print '<td '.($curQuarter < 2 ? $disableColor: '').'>' . $sumQ2 . '</td>';
383
-        print '<td '.($curQuarter < 2 ? $disableColor: '').'>' . ($sumQ2 * $tauxRemb) . '</td>';
384
-        print '<td '.($curQuarter < 2 ? $disableColor: '').'><b>' . $amoutQ2 . '€</b></td>';
385
-
386
-        print '<td '.($curQuarter < 3 ? $disableColor: '').'>' . ($flightsQ3) . '</td>';
387
-        print '<td '.($curQuarter < 3 ? $disableColor: '').'>' . ($flightsQ3 * $unitPriceMission) . '€</td>';
388
-        print '<td '.($curQuarter < 3 ? $disableColor: '').'>' . $sumQ3 . '</td>';
389
-        print '<td '.($curQuarter < 3 ? $disableColor: '').'>' . ($sumQ3 * $tauxRemb) . '</td>';
390
-        print '<td '.($curQuarter < 3 ? $disableColor: '').'><b>' . $amoutQ3 . '€</b></td>';
391
-
392
-        print '<td '.($curQuarter < 4 ? $disableColor: '').'>' . ($flightsQ4) . '</td>';
393
-        print '<td '.($curQuarter < 4 ? $disableColor: '').'>' . ($flightsQ4 * $unitPriceMission) . '€</td>';
394
-        print '<td '.($curQuarter < 4 ? $disableColor: '').'>' . $sumQ4 . '</td>';
395
-        print '<td '.($curQuarter < 4 ? $disableColor: '').'>' . ($sumQ4 * $tauxRemb) . '</td>';
396
-        print '<td '.($curQuarter < 4 ? $disableColor: '').'><b>' . $amoutQ4 . '€</b></td>';
374
+        print '<td' . ($curQuarter < 1 ? $disableColor : '') . '>' . ($flightsQ1) . '</td>';
375
+        print '<td' . ($curQuarter < 1 ? $disableColor : '') . '>' . ($flightsQ1 * $unitPriceMission) . '€</td>';
376
+        print '<td' . ($curQuarter < 1 ? $disableColor : '') . '>' . $sumQ1 . '</td>';
377
+        print '<td' . ($curQuarter < 1 ? $disableColor : '') . '>' . ($sumQ1 * $tauxRemb) . '</td>';
378
+        print '<td' . ($curQuarter < 1 ? $disableColor : '') . '><b>' . $amoutQ1 . '€</b></td>';
379
+
380
+        print '<td ' . ($curQuarter < 2 ? $disableColor : '') . '>' . ($flightsQ2) . '</td>';
381
+        print '<td ' . ($curQuarter < 2 ? $disableColor : '') . '>' . ($flightsQ2 * $unitPriceMission) . '€</td>';
382
+        print '<td ' . ($curQuarter < 2 ? $disableColor : '') . '>' . $sumQ2 . '</td>';
383
+        print '<td ' . ($curQuarter < 2 ? $disableColor : '') . '>' . ($sumQ2 * $tauxRemb) . '</td>';
384
+        print '<td ' . ($curQuarter < 2 ? $disableColor : '') . '><b>' . $amoutQ2 . '€</b></td>';
385
+
386
+        print '<td ' . ($curQuarter < 3 ? $disableColor : '') . '>' . ($flightsQ3) . '</td>';
387
+        print '<td ' . ($curQuarter < 3 ? $disableColor : '') . '>' . ($flightsQ3 * $unitPriceMission) . '€</td>';
388
+        print '<td ' . ($curQuarter < 3 ? $disableColor : '') . '>' . $sumQ3 . '</td>';
389
+        print '<td ' . ($curQuarter < 3 ? $disableColor : '') . '>' . ($sumQ3 * $tauxRemb) . '</td>';
390
+        print '<td ' . ($curQuarter < 3 ? $disableColor : '') . '><b>' . $amoutQ3 . '€</b></td>';
391
+
392
+        print '<td ' . ($curQuarter < 4 ? $disableColor : '') . '>' . ($flightsQ4) . '</td>';
393
+        print '<td ' . ($curQuarter < 4 ? $disableColor : '') . '>' . ($flightsQ4 * $unitPriceMission) . '€</td>';
394
+        print '<td ' . ($curQuarter < 4 ? $disableColor : '') . '>' . $sumQ4 . '</td>';
395
+        print '<td ' . ($curQuarter < 4 ? $disableColor : '') . '>' . ($sumQ4 * $tauxRemb) . '</td>';
396
+        print '<td ' . ($curQuarter < 4 ? $disableColor : '') . '><b>' . $amoutQ4 . '€</b></td>';
397 397
 
398 398
         print '<td>' . (($sumFlights * $unitPriceMission) + ($sumKm * $tauxRemb)) . '€</td>';
399 399
 
@@ -401,13 +401,13 @@  discard block
 block discarded – undo
401 401
     }
402 402
 
403 403
     print "<td colspan='6'></td>";
404
-    print "<td>".price($totalQ1)."€</td>";
404
+    print "<td>" . price($totalQ1) . "€</td>";
405 405
     print "<td colspan='4'></td>";
406
-    print "<td>".price($totalQ2)."€</td>";
406
+    print "<td>" . price($totalQ2) . "€</td>";
407 407
     print "<td colspan='4'></td>";
408
-    print "<td>".price($totalQ3)."€</td>";
408
+    print "<td>" . price($totalQ3) . "€</td>";
409 409
     print "<td colspan='4'></td>";
410
-    print "<td>".price($totalQ4)."€</td>";
410
+    print "<td>" . price($totalQ4) . "€</td>";
411 411
     print "<td></td>";
412 412
 
413 413
     print '</table>';
Please login to merge, or discard this patch.
class/card/TabCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@
 block discarded – undo
45 45
      *
46 46
      * @return TabCollection
47 47
      */
48
-    public function addTab(Tab $tab){
48
+    public function addTab(Tab $tab) {
49 49
         $this->tabs[] = $tab;
50 50
     }
51 51
 
52 52
     /**
53 53
      * @return array
54 54
      */
55
-    public function toArray(){
55
+    public function toArray() {
56 56
         $tabAsArray = [];
57 57
 
58
-        foreach ($this->tabs as $tab){
58
+        foreach ($this->tabs as $tab) {
59 59
             $tabAsArray[] = $tab->toArray();
60 60
         }
61 61
 
Please login to merge, or discard this patch.
generateBilling.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -613,9 +613,12 @@
 block discarded – undo
613 613
 
614 614
         <?php if ($year >= $currentYear || !$t1->service || !$t2->service || !$t3->service || !$t4->service || !$t5->service || !$t6->service || !$t7->service) : ?>
615 615
             <a class="butActionRefused" href="#">Générer</a>
616
-        <?php else: ?>
616
+        <?php else {
617
+    : ?>
617 618
             <button class="butAction" type="submit">Générer</button>
618
-        <?php endif; ?>
619
+        <?php endif;
620
+}
621
+?>
619 622
 
620 623
     </form>
621 624
 
Please login to merge, or discard this patch.
bbcvols/tpl/linkedobjectblock.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
     <tr <?php echo $GLOBALS['bc'][$var]; ?> >
52 52
         <td><?php echo $langs->trans("Vol"); ?></td>
53 53
         <td><?= $flight->getNomUrl()?></td>
54
-        <td align="center"><?= sprintf("%s à %s ", $flight->lieuD, $flight->lieuA);?></td>
54
+        <td align="center"><?= sprintf("%s à %s ", $flight->lieuD, $flight->lieuA); ?></td>
55 55
         <td align="center"><?= dol_print_date($flight->date, '%d-%m-%Y') ?></td>
56
-        <td align="right"><?= $flight->cost?:'N/A' ?></td>
56
+        <td align="right"><?= $flight->cost ?: 'N/A' ?></td>
57 57
         <td align="right"><?= $flight->getLibStatut(3)?></td>
58 58
         <td align="right"><a
59 59
                     href="<?php echo $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&dellinkid=' . $key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a>
Please login to merge, or discard this patch.