@@ -61,8 +61,8 @@ |
||
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"; |
@@ -168,7 +168,7 @@ |
||
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 { |
@@ -81,9 +81,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -69,7 +69,7 @@ |
||
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 |
@@ -36,14 +36,14 @@ |
||
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 |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | |
137 | 137 | //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), |
138 | 138 | 't.datec' => array('label' => $langs->trans("DateCreationShort"), |
139 | - 'checked' => 0, |
|
140 | - 'position' => 500 |
|
139 | + 'checked' => 0, |
|
140 | + 'position' => 500 |
|
141 | 141 | ), |
142 | 142 | 't.tms' => array('label' => $langs->trans("DateModificationShort"), |
143 | - 'checked' => 0, |
|
144 | - 'position' => 500 |
|
143 | + 'checked' => 0, |
|
144 | + 'position' => 500 |
|
145 | 145 | ), |
146 | 146 | //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), |
147 | 147 | ); |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { |
150 | 150 | foreach ($extrafields->attribute_label as $key => $val) { |
151 | 151 | $arrayfields["ef." . $key] = array('label' => $extrafields->attribute_label[$key], |
152 | - 'checked' => $extrafields->attribute_list[$key], |
|
153 | - 'position' => $extrafields->attribute_pos[$key], |
|
154 | - 'enabled' => $extrafields->attribute_perms[$key] |
|
152 | + 'checked' => $extrafields->attribute_list[$key], |
|
153 | + 'position' => $extrafields->attribute_pos[$key], |
|
154 | + 'enabled' => $extrafields->attribute_perms[$key] |
|
155 | 155 | ); |
156 | 156 | } |
157 | 157 | } |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | $search_fk_type = GETPOST('search_fk_type', 'int'); |
51 | 51 | $search_fk_pilot = GETPOST('search_fk_pilot', 'int') ?: ($user->admin ? '' : $user->id); |
52 | 52 | $search_fk_organisateur = GETPOST('search_fk_organisateur', 'int'); |
53 | -$search_is_facture = GETPOST('search_is_facture', 'int') === ''? -1 : (int)GETPOST('search_is_facture', 'int'); |
|
54 | -if($search_is_facture === 0){ |
|
53 | +$search_is_facture = GETPOST('search_is_facture', 'int') === '' ? -1 : (int) GETPOST('search_is_facture', 'int'); |
|
54 | +if ($search_is_facture === 0) { |
|
55 | 55 | $search_is_facture = '<=0'; |
56 | 56 | } |
57 | 57 | $search_kilometers = GETPOST('search_kilometers', 'alpha'); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $parameters = array(); |
183 | 183 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, |
184 | - $action); // Note that $action and $object may have been modified by some hooks |
|
184 | + $action); // Note that $action and $object may have been modified by some hooks |
|
185 | 185 | if ($reshook < 0) { |
186 | 186 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
187 | 187 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | // Add fields from hooks |
279 | 279 | $parameters = array(); |
280 | 280 | $reshook = $hookmanager->executeHooks('printFieldListSelect', |
281 | - $parameters); // Note that $action and $object may have been modified by hook |
|
281 | + $parameters); // Note that $action and $object may have been modified by hook |
|
282 | 282 | $sql .= $hookmanager->resPrint; |
283 | 283 | $sql .= " FROM " . MAIN_DB_PREFIX . "bbc_vols as t"; |
284 | 284 | if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | |
293 | 293 | $sql .= " WHERE 1 = 1"; |
294 | 294 | |
295 | -if($search_all){ |
|
296 | - $sql .= natural_search(["idBBC_vols", "lieuD", "lieuA", "pilot.lastname", "pilot.firstname", "balloon.immat"], $search_all); |
|
295 | +if ($search_all) { |
|
296 | + $sql .= natural_search(["idBBC_vols", "lieuD", "lieuA", "pilot.lastname", "pilot.firstname", "balloon.immat"], $search_all); |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | if ($search_idBBC_vols) { |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | } |
338 | 338 | |
339 | 339 | if ($search_is_facture != -1) { |
340 | - $sql .= natural_search("is_facture", $search_is_facture,1); |
|
340 | + $sql .= natural_search("is_facture", $search_is_facture, 1); |
|
341 | 341 | } |
342 | 342 | if ($search_kilometers) { |
343 | 343 | $sql .= natural_search("kilometers", $search_kilometers, 1); |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | // Add where from hooks |
373 | 373 | $parameters = array(); |
374 | 374 | $reshook = $hookmanager->executeHooks('printFieldListWhere', |
375 | - $parameters); // Note that $action and $object may have been modified by hook |
|
375 | + $parameters); // Note that $action and $object may have been modified by hook |
|
376 | 376 | $sql .= $hookmanager->resPrint; |
377 | 377 | $sql .= $db->order($sortfield, $sortorder); |
378 | 378 | //$sql.= $db->plimit($conf->liste_limit+1, $offset); |
@@ -414,58 +414,58 @@ discard block |
||
414 | 414 | if ($limit > 0 && $limit != $conf->liste_limit) { |
415 | 415 | $param .= '&limit=' . $limit; |
416 | 416 | } |
417 | -if ($search_idBBC_vols != '') { |
|
417 | +if ($search_idBBC_vols != '') { |
|
418 | 418 | $param .= '&search_idBBC_vols=' . urlencode($search_idBBC_vols); |
419 | 419 | } |
420 | -if ($search_date != '') { |
|
420 | +if ($search_date != '') { |
|
421 | 421 | $param .= '&search_date=' . urlencode($search_date); |
422 | 422 | } |
423 | -if ($search_lieuD != '') { |
|
423 | +if ($search_lieuD != '') { |
|
424 | 424 | $param .= '&search_lieuD=' . urlencode($search_lieuD); |
425 | 425 | } |
426 | -if ($search_lieuA != '') { |
|
426 | +if ($search_lieuA != '') { |
|
427 | 427 | $param .= '&search_lieuA=' . urlencode($search_lieuA); |
428 | 428 | } |
429 | -if ($search_heureD != '') { |
|
429 | +if ($search_heureD != '') { |
|
430 | 430 | $param .= '&search_heureD=' . urlencode($search_heureD); |
431 | 431 | } |
432 | -if ($search_heureA != '') { |
|
432 | +if ($search_heureA != '') { |
|
433 | 433 | $param .= '&search_heureA=' . urlencode($search_heureA); |
434 | 434 | } |
435 | -if ($search_BBC_ballons_idBBC_ballons != '') { |
|
435 | +if ($search_BBC_ballons_idBBC_ballons != '') { |
|
436 | 436 | $param .= '&search_BBC_ballons_idBBC_ballons=' . urlencode($search_BBC_ballons_idBBC_ballons); |
437 | 437 | } |
438 | -if ($search_nbrPax != '') { |
|
438 | +if ($search_nbrPax != '') { |
|
439 | 439 | $param .= '&search_nbrPax=' . urlencode($search_nbrPax); |
440 | 440 | } |
441 | -if ($search_remarque != '') { |
|
441 | +if ($search_remarque != '') { |
|
442 | 442 | $param .= '&search_remarque=' . urlencode($search_remarque); |
443 | 443 | } |
444 | -if ($search_incidents != '') { |
|
444 | +if ($search_incidents != '') { |
|
445 | 445 | $param .= '&search_incidents=' . urlencode($search_incidents); |
446 | 446 | } |
447 | -if ($search_fk_type != '') { |
|
447 | +if ($search_fk_type != '') { |
|
448 | 448 | $param .= '&search_fk_type=' . urlencode($search_fk_type); |
449 | 449 | } |
450 | 450 | if ($search_fk_pilot != '') { |
451 | 451 | $param .= '&search_fk_pilot=' . urlencode($search_fk_pilot); |
452 | 452 | } |
453 | -if ($search_fk_organisateur != '') { |
|
453 | +if ($search_fk_organisateur != '') { |
|
454 | 454 | $param .= '&search_fk_organisateur=' . urlencode($search_fk_organisateur); |
455 | 455 | } |
456 | -if ($search_is_facture != -1) { |
|
456 | +if ($search_is_facture != -1) { |
|
457 | 457 | $param .= '&search_is_facture=' . urlencode($search_is_facture); |
458 | 458 | } |
459 | -if ($search_kilometers != '') { |
|
459 | +if ($search_kilometers != '') { |
|
460 | 460 | $param .= '&search_kilometers=' . urlencode($search_kilometers); |
461 | 461 | } |
462 | -if ($search_cost != '') { |
|
462 | +if ($search_cost != '') { |
|
463 | 463 | $param .= '&search_cost=' . urlencode($search_cost); |
464 | 464 | } |
465 | -if ($search_fk_receiver != '') { |
|
465 | +if ($search_fk_receiver != '') { |
|
466 | 466 | $param .= '&search_fk_receiver=' . urlencode($search_fk_receiver); |
467 | 467 | } |
468 | -if ($search_justif_kilometers != '') { |
|
468 | +if ($search_justif_kilometers != '') { |
|
469 | 469 | $param .= '&search_justif_kilometers=' . urlencode($search_justif_kilometers); |
470 | 470 | } |
471 | 471 | if ($search_all != '') { |
@@ -509,8 +509,8 @@ discard block |
||
509 | 509 | |
510 | 510 | |
511 | 511 | $moreHtml = ""; |
512 | -if($search_all !== ""){ |
|
513 | - $moreHtml = "<p>".$langs->trans(sprintf("La liste est en recherche globale sur : l'identifiant du vol, le nom du pilote, l'immat du ballon, le lieu de Décollage et le lieu d'atterissage : %s", $search_all))."</p>"; |
|
512 | +if ($search_all !== "") { |
|
513 | + $moreHtml = "<p>" . $langs->trans(sprintf("La liste est en recherche globale sur : l'identifiant du vol, le nom du pilote, l'immat du ballon, le lieu de Décollage et le lieu d'atterissage : %s", $search_all)) . "</p>"; |
|
514 | 514 | } |
515 | 515 | |
516 | 516 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | |
531 | 531 | $parameters = array(); |
532 | 532 | $reshook = $hookmanager->executeHooks('printFieldPreListTitle', |
533 | - $parameters); // Note that $action and $object may have been modified by hook |
|
533 | + $parameters); // Note that $action and $object may have been modified by hook |
|
534 | 534 | if (empty($reshook)) { |
535 | 535 | $moreforfilter .= $hookmanager->resPrint; |
536 | 536 | } else { |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | |
546 | 546 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
547 | 547 | $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, |
548 | - $varpage); // This also change content of $arrayfields |
|
548 | + $varpage); // This also change content of $arrayfields |
|
549 | 549 | |
550 | 550 | print '<div class="div-table-responsive">'; |
551 | 551 | print '<table class="tagtable liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | // Hook fields |
642 | 642 | $parameters = array('arrayfields' => $arrayfields); |
643 | 643 | $reshook = $hookmanager->executeHooks('printFieldListTitle', |
644 | - $parameters); // Note that $action and $object may have been modified by hook |
|
644 | + $parameters); // Note that $action and $object may have been modified by hook |
|
645 | 645 | print $hookmanager->resPrint; |
646 | 646 | if (!empty($arrayfields['t.datec']['checked'])) { |
647 | 647 | print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | |
711 | 711 | if (!empty($arrayfields['t.is_facture']['checked'])) { |
712 | 712 | print '<td class="liste_titre">'; |
713 | - print '<select name="search_is_facture"><option value="-1" '.($search_is_facture != 1 && $search_is_facture != 0 && $search_is_facture != '<=0'? 'selected' : '' ).'></option><option value="1" '.($search_is_facture == 1 ? 'selected' : '' ).'>Facturé</option><option value="0" '.($search_is_facture == 0 || $search_is_facture == '<=0' ? 'selected' : '' ).'>Ouvert</option></select>'; |
|
713 | + print '<select name="search_is_facture"><option value="-1" ' . ($search_is_facture != 1 && $search_is_facture != 0 && $search_is_facture != '<=0' ? 'selected' : '') . '></option><option value="1" ' . ($search_is_facture == 1 ? 'selected' : '') . '>Facturé</option><option value="0" ' . ($search_is_facture == 0 || $search_is_facture == '<=0' ? 'selected' : '') . '>Ouvert</option></select>'; |
|
714 | 714 | print '</td>'; |
715 | 715 | } |
716 | 716 | |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | // Fields from hook |
756 | 756 | $parameters = array('arrayfields' => $arrayfields); |
757 | 757 | $reshook = $hookmanager->executeHooks('printFieldListOption', |
758 | - $parameters); // Note that $action and $object may have been modified by hook |
|
758 | + $parameters); // Note that $action and $object may have been modified by hook |
|
759 | 759 | print $hookmanager->resPrint; |
760 | 760 | if (!empty($arrayfields['t.datec']['checked'])) { |
761 | 761 | // Date creation |
@@ -797,124 +797,124 @@ discard block |
||
797 | 797 | // Show here line of result |
798 | 798 | print '<tr ' . $bc[$var] . '>'; |
799 | 799 | |
800 | - if (! empty($arrayfields['t.idBBC_vols']['checked'])) |
|
800 | + if (!empty($arrayfields['t.idBBC_vols']['checked'])) |
|
801 | 801 | { |
802 | - print '<td>'.$flight->getNomUrl(0).'</td>'; |
|
802 | + print '<td>' . $flight->getNomUrl(0) . '</td>'; |
|
803 | 803 | |
804 | - if (! $i) $totalarray['nbfield']++; |
|
804 | + if (!$i) $totalarray['nbfield']++; |
|
805 | 805 | } |
806 | - if (! empty($arrayfields['t.date']['checked'])) |
|
806 | + if (!empty($arrayfields['t.date']['checked'])) |
|
807 | 807 | { |
808 | 808 | print '<td>'; |
809 | 809 | print dol_print_date($db->jdate($obj->date), '%d-%m-%y'); |
810 | 810 | print '</td>'; |
811 | 811 | |
812 | - if (! $i) $totalarray['nbfield']++; |
|
812 | + if (!$i) $totalarray['nbfield']++; |
|
813 | 813 | } |
814 | - if (! empty($arrayfields['t.lieuD']['checked'])) |
|
814 | + if (!empty($arrayfields['t.lieuD']['checked'])) |
|
815 | 815 | { |
816 | - print '<td>'.$obj->lieuD.'</td>'; |
|
816 | + print '<td>' . $obj->lieuD . '</td>'; |
|
817 | 817 | |
818 | - if (! $i) $totalarray['nbfield']++; |
|
818 | + if (!$i) $totalarray['nbfield']++; |
|
819 | 819 | } |
820 | - if (! empty($arrayfields['t.lieuA']['checked'])) |
|
820 | + if (!empty($arrayfields['t.lieuA']['checked'])) |
|
821 | 821 | { |
822 | - print '<td>'.$obj->lieuA.'</td>'; |
|
822 | + print '<td>' . $obj->lieuA . '</td>'; |
|
823 | 823 | |
824 | - if (! $i) $totalarray['nbfield']++; |
|
824 | + if (!$i) $totalarray['nbfield']++; |
|
825 | 825 | } |
826 | - if (! empty($arrayfields['t.heureD']['checked'])) |
|
826 | + if (!empty($arrayfields['t.heureD']['checked'])) |
|
827 | 827 | { |
828 | - print '<td>'.$obj->heureD.'</td>'; |
|
828 | + print '<td>' . $obj->heureD . '</td>'; |
|
829 | 829 | |
830 | - if (! $i) $totalarray['nbfield']++; |
|
830 | + if (!$i) $totalarray['nbfield']++; |
|
831 | 831 | } |
832 | - if (! empty($arrayfields['t.heureA']['checked'])) |
|
832 | + if (!empty($arrayfields['t.heureA']['checked'])) |
|
833 | 833 | { |
834 | - print '<td>'.$obj->heureA.'</td>'; |
|
834 | + print '<td>' . $obj->heureA . '</td>'; |
|
835 | 835 | |
836 | - if (! $i) $totalarray['nbfield']++; |
|
836 | + if (!$i) $totalarray['nbfield']++; |
|
837 | 837 | } |
838 | - if (! empty($arrayfields['t.BBC_ballons_idBBC_ballons']['checked'])) |
|
838 | + if (!empty($arrayfields['t.BBC_ballons_idBBC_ballons']['checked'])) |
|
839 | 839 | { |
840 | - print '<td>'.$obj->bal.'</td>'; |
|
840 | + print '<td>' . $obj->bal . '</td>'; |
|
841 | 841 | |
842 | - if (! $i) $totalarray['nbfield']++; |
|
842 | + if (!$i) $totalarray['nbfield']++; |
|
843 | 843 | } |
844 | - if (! empty($arrayfields['t.nbrPax']['checked'])) |
|
844 | + if (!empty($arrayfields['t.nbrPax']['checked'])) |
|
845 | 845 | { |
846 | - print '<td>'.$obj->nbrPax.'</td>'; |
|
846 | + print '<td>' . $obj->nbrPax . '</td>'; |
|
847 | 847 | |
848 | - if (! $i) $totalarray['nbfield']++; |
|
848 | + if (!$i) $totalarray['nbfield']++; |
|
849 | 849 | } |
850 | - if (! empty($arrayfields['t.remarque']['checked'])) |
|
850 | + if (!empty($arrayfields['t.remarque']['checked'])) |
|
851 | 851 | { |
852 | - print '<td>'.$obj->remarque.'</td>'; |
|
852 | + print '<td>' . $obj->remarque . '</td>'; |
|
853 | 853 | |
854 | - if (! $i) $totalarray['nbfield']++; |
|
854 | + if (!$i) $totalarray['nbfield']++; |
|
855 | 855 | } |
856 | - if (! empty($arrayfields['t.incidents']['checked'])) |
|
856 | + if (!empty($arrayfields['t.incidents']['checked'])) |
|
857 | 857 | { |
858 | - print '<td>'.$obj->incidents.'</td>'; |
|
858 | + print '<td>' . $obj->incidents . '</td>'; |
|
859 | 859 | |
860 | - if (! $i) $totalarray['nbfield']++; |
|
860 | + if (!$i) $totalarray['nbfield']++; |
|
861 | 861 | } |
862 | - if (! empty($arrayfields['t.fk_type']['checked'])) |
|
862 | + if (!empty($arrayfields['t.fk_type']['checked'])) |
|
863 | 863 | { |
864 | - print '<td>'.$obj->flight_type.'</td>'; |
|
864 | + print '<td>' . $obj->flight_type . '</td>'; |
|
865 | 865 | |
866 | - if (! $i) $totalarray['nbfield']++; |
|
866 | + if (!$i) $totalarray['nbfield']++; |
|
867 | 867 | } |
868 | - if (! empty($arrayfields['t.fk_pilot']['checked'])) |
|
868 | + if (!empty($arrayfields['t.fk_pilot']['checked'])) |
|
869 | 869 | { |
870 | - print '<td>'.$obj->pilot.'</td>'; |
|
870 | + print '<td>' . $obj->pilot . '</td>'; |
|
871 | 871 | |
872 | - if (! $i) $totalarray['nbfield']++; |
|
872 | + if (!$i) $totalarray['nbfield']++; |
|
873 | 873 | } |
874 | - if (! empty($arrayfields['t.fk_organisateur']['checked'])) |
|
874 | + if (!empty($arrayfields['t.fk_organisateur']['checked'])) |
|
875 | 875 | { |
876 | - print '<td>'.$obj->organisator.'</td>'; |
|
876 | + print '<td>' . $obj->organisator . '</td>'; |
|
877 | 877 | |
878 | - if (! $i) $totalarray['nbfield']++; |
|
878 | + if (!$i) $totalarray['nbfield']++; |
|
879 | 879 | } |
880 | - if (! empty($arrayfields['t.is_facture']['checked'])) |
|
880 | + if (!empty($arrayfields['t.is_facture']['checked'])) |
|
881 | 881 | { |
882 | 882 | $flight->is_facture = $obj->is_facture; |
883 | - print '<td>'.$flight->getLibStatut(3).'</td>'; |
|
883 | + print '<td>' . $flight->getLibStatut(3) . '</td>'; |
|
884 | 884 | |
885 | - if (! $i) $totalarray['nbfield']++; |
|
885 | + if (!$i) $totalarray['nbfield']++; |
|
886 | 886 | } |
887 | - if (! empty($arrayfields['t.kilometers']['checked'])) |
|
887 | + if (!empty($arrayfields['t.kilometers']['checked'])) |
|
888 | 888 | { |
889 | - if($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot){ |
|
890 | - print '<td>'.$obj->kilometers.' KM</td>'; |
|
891 | - }else{ |
|
889 | + if ($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot) { |
|
890 | + print '<td>' . $obj->kilometers . ' KM</td>'; |
|
891 | + } else { |
|
892 | 892 | print '<td> - Km</td>'; |
893 | 893 | } |
894 | 894 | |
895 | - if (! $i) $totalarray['nbfield']++; |
|
895 | + if (!$i) $totalarray['nbfield']++; |
|
896 | 896 | } |
897 | - if (! empty($arrayfields['t.cost']['checked'])) |
|
897 | + if (!empty($arrayfields['t.cost']['checked'])) |
|
898 | 898 | { |
899 | - if(($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot) && $obj->cost > 0){ |
|
900 | - print sprintf('<td>%s - (%s/pax)</td>', price($obj->cost, 0, $langs, 0, 0, -1, $conf->currency), price($obj->cost/$obj->nbrPax, 0, $langs, -1, -1, -1, $conf->currency)); |
|
901 | - }else{ |
|
899 | + if (($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot) && $obj->cost > 0) { |
|
900 | + print sprintf('<td>%s - (%s/pax)</td>', price($obj->cost, 0, $langs, 0, 0, -1, $conf->currency), price($obj->cost / $obj->nbrPax, 0, $langs, -1, -1, -1, $conf->currency)); |
|
901 | + } else { |
|
902 | 902 | print '<td> - €</td>'; |
903 | 903 | } |
904 | 904 | |
905 | - if (! $i) $totalarray['nbfield']++; |
|
905 | + if (!$i) $totalarray['nbfield']++; |
|
906 | 906 | } |
907 | - if (! empty($arrayfields['t.fk_receiver']['checked'])) |
|
907 | + if (!empty($arrayfields['t.fk_receiver']['checked'])) |
|
908 | 908 | { |
909 | - print '<td>'.$obj->receiver.'</td>'; |
|
909 | + print '<td>' . $obj->receiver . '</td>'; |
|
910 | 910 | |
911 | - if (! $i) $totalarray['nbfield']++; |
|
911 | + if (!$i) $totalarray['nbfield']++; |
|
912 | 912 | } |
913 | - if (! empty($arrayfields['t.justif_kilometers']['checked'])) |
|
913 | + if (!empty($arrayfields['t.justif_kilometers']['checked'])) |
|
914 | 914 | { |
915 | - print '<td>'.$obj->justif_kilometers.'</td>'; |
|
915 | + print '<td>' . $obj->justif_kilometers . '</td>'; |
|
916 | 916 | |
917 | - if (! $i) $totalarray['nbfield']++; |
|
917 | + if (!$i) $totalarray['nbfield']++; |
|
918 | 918 | } |
919 | 919 | |
920 | 920 | // Extra fields |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | // Fields from hook |
940 | 940 | $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj); |
941 | 941 | $reshook = $hookmanager->executeHooks('printFieldListValue', |
942 | - $parameters); // Note that $action and $object may have been modified by hook |
|
942 | + $parameters); // Note that $action and $object may have been modified by hook |
|
943 | 943 | print $hookmanager->resPrint; |
944 | 944 | // Date creation |
945 | 945 | if (!empty($arrayfields['t.datec']['checked'])) { |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | |
1010 | 1010 | $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); |
1011 | 1011 | $reshook = $hookmanager->executeHooks('printFieldListFooter', |
1012 | - $parameters); // Note that $action and $object may have been modified by hook |
|
1012 | + $parameters); // Note that $action and $object may have been modified by hook |
|
1013 | 1013 | print $hookmanager->resPrint; |
1014 | 1014 | |
1015 | 1015 | print '</table>' . "\n"; |
@@ -191,10 +191,12 @@ discard block |
||
191 | 191 | include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
192 | 192 | |
193 | 193 | // Purge search criteria |
194 | - if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers |
|
194 | + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) { |
|
195 | + // All tests are required to be compatible with all browsers |
|
195 | 196 | { |
196 | 197 | |
197 | 198 | $search_idBBC_vols = ''; |
199 | + } |
|
198 | 200 | $search_date = ''; |
199 | 201 | $search_lieuD = ''; |
200 | 202 | $search_lieuA = ''; |
@@ -801,7 +803,9 @@ discard block |
||
801 | 803 | { |
802 | 804 | print '<td>'.$flight->getNomUrl(0).'</td>'; |
803 | 805 | |
804 | - if (! $i) $totalarray['nbfield']++; |
|
806 | + if (! $i) { |
|
807 | + $totalarray['nbfield']++; |
|
808 | + } |
|
805 | 809 | } |
806 | 810 | if (! empty($arrayfields['t.date']['checked'])) |
807 | 811 | { |
@@ -809,112 +813,146 @@ discard block |
||
809 | 813 | print dol_print_date($db->jdate($obj->date), '%d-%m-%y'); |
810 | 814 | print '</td>'; |
811 | 815 | |
812 | - if (! $i) $totalarray['nbfield']++; |
|
816 | + if (! $i) { |
|
817 | + $totalarray['nbfield']++; |
|
818 | + } |
|
813 | 819 | } |
814 | 820 | if (! empty($arrayfields['t.lieuD']['checked'])) |
815 | 821 | { |
816 | 822 | print '<td>'.$obj->lieuD.'</td>'; |
817 | 823 | |
818 | - if (! $i) $totalarray['nbfield']++; |
|
824 | + if (! $i) { |
|
825 | + $totalarray['nbfield']++; |
|
826 | + } |
|
819 | 827 | } |
820 | 828 | if (! empty($arrayfields['t.lieuA']['checked'])) |
821 | 829 | { |
822 | 830 | print '<td>'.$obj->lieuA.'</td>'; |
823 | 831 | |
824 | - if (! $i) $totalarray['nbfield']++; |
|
832 | + if (! $i) { |
|
833 | + $totalarray['nbfield']++; |
|
834 | + } |
|
825 | 835 | } |
826 | 836 | if (! empty($arrayfields['t.heureD']['checked'])) |
827 | 837 | { |
828 | 838 | print '<td>'.$obj->heureD.'</td>'; |
829 | 839 | |
830 | - if (! $i) $totalarray['nbfield']++; |
|
840 | + if (! $i) { |
|
841 | + $totalarray['nbfield']++; |
|
842 | + } |
|
831 | 843 | } |
832 | 844 | if (! empty($arrayfields['t.heureA']['checked'])) |
833 | 845 | { |
834 | 846 | print '<td>'.$obj->heureA.'</td>'; |
835 | 847 | |
836 | - if (! $i) $totalarray['nbfield']++; |
|
848 | + if (! $i) { |
|
849 | + $totalarray['nbfield']++; |
|
850 | + } |
|
837 | 851 | } |
838 | 852 | if (! empty($arrayfields['t.BBC_ballons_idBBC_ballons']['checked'])) |
839 | 853 | { |
840 | 854 | print '<td>'.$obj->bal.'</td>'; |
841 | 855 | |
842 | - if (! $i) $totalarray['nbfield']++; |
|
856 | + if (! $i) { |
|
857 | + $totalarray['nbfield']++; |
|
858 | + } |
|
843 | 859 | } |
844 | 860 | if (! empty($arrayfields['t.nbrPax']['checked'])) |
845 | 861 | { |
846 | 862 | print '<td>'.$obj->nbrPax.'</td>'; |
847 | 863 | |
848 | - if (! $i) $totalarray['nbfield']++; |
|
864 | + if (! $i) { |
|
865 | + $totalarray['nbfield']++; |
|
866 | + } |
|
849 | 867 | } |
850 | 868 | if (! empty($arrayfields['t.remarque']['checked'])) |
851 | 869 | { |
852 | 870 | print '<td>'.$obj->remarque.'</td>'; |
853 | 871 | |
854 | - if (! $i) $totalarray['nbfield']++; |
|
872 | + if (! $i) { |
|
873 | + $totalarray['nbfield']++; |
|
874 | + } |
|
855 | 875 | } |
856 | 876 | if (! empty($arrayfields['t.incidents']['checked'])) |
857 | 877 | { |
858 | 878 | print '<td>'.$obj->incidents.'</td>'; |
859 | 879 | |
860 | - if (! $i) $totalarray['nbfield']++; |
|
880 | + if (! $i) { |
|
881 | + $totalarray['nbfield']++; |
|
882 | + } |
|
861 | 883 | } |
862 | 884 | if (! empty($arrayfields['t.fk_type']['checked'])) |
863 | 885 | { |
864 | 886 | print '<td>'.$obj->flight_type.'</td>'; |
865 | 887 | |
866 | - if (! $i) $totalarray['nbfield']++; |
|
888 | + if (! $i) { |
|
889 | + $totalarray['nbfield']++; |
|
890 | + } |
|
867 | 891 | } |
868 | 892 | if (! empty($arrayfields['t.fk_pilot']['checked'])) |
869 | 893 | { |
870 | 894 | print '<td>'.$obj->pilot.'</td>'; |
871 | 895 | |
872 | - if (! $i) $totalarray['nbfield']++; |
|
896 | + if (! $i) { |
|
897 | + $totalarray['nbfield']++; |
|
898 | + } |
|
873 | 899 | } |
874 | 900 | if (! empty($arrayfields['t.fk_organisateur']['checked'])) |
875 | 901 | { |
876 | 902 | print '<td>'.$obj->organisator.'</td>'; |
877 | 903 | |
878 | - if (! $i) $totalarray['nbfield']++; |
|
904 | + if (! $i) { |
|
905 | + $totalarray['nbfield']++; |
|
906 | + } |
|
879 | 907 | } |
880 | 908 | if (! empty($arrayfields['t.is_facture']['checked'])) |
881 | 909 | { |
882 | 910 | $flight->is_facture = $obj->is_facture; |
883 | 911 | print '<td>'.$flight->getLibStatut(3).'</td>'; |
884 | 912 | |
885 | - if (! $i) $totalarray['nbfield']++; |
|
913 | + if (! $i) { |
|
914 | + $totalarray['nbfield']++; |
|
915 | + } |
|
886 | 916 | } |
887 | 917 | if (! empty($arrayfields['t.kilometers']['checked'])) |
888 | 918 | { |
889 | 919 | if($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot){ |
890 | 920 | print '<td>'.$obj->kilometers.' KM</td>'; |
891 | - }else{ |
|
921 | + } else{ |
|
892 | 922 | print '<td> - Km</td>'; |
893 | 923 | } |
894 | 924 | |
895 | - if (! $i) $totalarray['nbfield']++; |
|
925 | + if (! $i) { |
|
926 | + $totalarray['nbfield']++; |
|
927 | + } |
|
896 | 928 | } |
897 | 929 | if (! empty($arrayfields['t.cost']['checked'])) |
898 | 930 | { |
899 | 931 | if(($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot) && $obj->cost > 0){ |
900 | 932 | print sprintf('<td>%s - (%s/pax)</td>', price($obj->cost, 0, $langs, 0, 0, -1, $conf->currency), price($obj->cost/$obj->nbrPax, 0, $langs, -1, -1, -1, $conf->currency)); |
901 | - }else{ |
|
933 | + } else{ |
|
902 | 934 | print '<td> - €</td>'; |
903 | 935 | } |
904 | 936 | |
905 | - if (! $i) $totalarray['nbfield']++; |
|
937 | + if (! $i) { |
|
938 | + $totalarray['nbfield']++; |
|
939 | + } |
|
906 | 940 | } |
907 | 941 | if (! empty($arrayfields['t.fk_receiver']['checked'])) |
908 | 942 | { |
909 | 943 | print '<td>'.$obj->receiver.'</td>'; |
910 | 944 | |
911 | - if (! $i) $totalarray['nbfield']++; |
|
945 | + if (! $i) { |
|
946 | + $totalarray['nbfield']++; |
|
947 | + } |
|
912 | 948 | } |
913 | 949 | if (! empty($arrayfields['t.justif_kilometers']['checked'])) |
914 | 950 | { |
915 | 951 | print '<td>'.$obj->justif_kilometers.'</td>'; |
916 | 952 | |
917 | - if (! $i) $totalarray['nbfield']++; |
|
953 | + if (! $i) { |
|
954 | + $totalarray['nbfield']++; |
|
955 | + } |
|
918 | 956 | } |
919 | 957 | |
920 | 958 | // Extra fields |
@@ -962,9 +1000,11 @@ discard block |
||
962 | 1000 | |
963 | 1001 | // Action column |
964 | 1002 | print '<td class="nowrap" align="center">'; |
965 | - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
1003 | + if ($massactionbutton || $massaction) { |
|
1004 | + // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
966 | 1005 | { |
967 | 1006 | $selected = 0; |
1007 | + } |
|
968 | 1008 | if (in_array($obj->idBBC_vols, $arrayofselected)) { |
969 | 1009 | $selected = 1; |
970 | 1010 | } |
@@ -149,9 +149,9 @@ |
||
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 |
@@ -337,7 +337,7 @@ discard block |
||
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 |
||
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 |
||
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>'; |
@@ -45,17 +45,17 @@ |
||
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 |
@@ -613,9 +613,12 @@ |
||
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 |