@@ -169,15 +169,17 @@ |
||
169 | 169 | print '</tr>'; |
170 | 170 | } |
171 | 171 | // Date start |
172 | - if (GETPOST('datep', 'int', 1)) |
|
173 | - $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); |
|
172 | + if (GETPOST('datep', 'int', 1)) { |
|
173 | + $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); |
|
174 | + } |
|
174 | 175 | print '<tr><td width="30%" nowrap="nowrap"><span>Debut</span></td><td>'; |
175 | 176 | $form->select_date($datep, 'ap', 0, 0, 1, "readBalloon", 1, 1, 0, 0); |
176 | 177 | print '</td></tr>'; |
177 | 178 | |
178 | 179 | // Date end |
179 | - if (GETPOST('datef', 'int', 1)) |
|
180 | - $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); |
|
180 | + if (GETPOST('datef', 'int', 1)) { |
|
181 | + $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); |
|
182 | + } |
|
181 | 183 | print '<tr><td>Fin</span></td><td>'; |
182 | 184 | $form->select_date($datef, 'p2', 0, 0, 1, "readBalloon", 1, 1, 0, 0); |
183 | 185 | print '</td></tr>'; |
@@ -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 { |
@@ -171,7 +171,7 @@ |
||
171 | 171 | if($groupBy){ |
172 | 172 | $sql.= " , SUM(VOL.kilometers) as SUM"; |
173 | 173 | $sql.= " , COUNT(VOL.idBBC_vols) as nbrFlight"; |
174 | - }else{ |
|
174 | + } else{ |
|
175 | 175 | $sql.= " , VOL.*"; |
176 | 176 | } |
177 | 177 |
@@ -501,7 +501,9 @@ discard block |
||
501 | 501 | if ($withpicto) |
502 | 502 | { |
503 | 503 | $result.=($link.img_object(($notooltip?'':$label), 'label', ($notooltip?'':'class="classfortooltip"')).$linkend); |
504 | - if ($withpicto != 2) $result.=' '; |
|
504 | + if ($withpicto != 2) { |
|
505 | + $result.=' '; |
|
506 | + } |
|
505 | 507 | } |
506 | 508 | $result.= $link . $this->ref . $linkend; |
507 | 509 | return $result; |
@@ -532,33 +534,57 @@ discard block |
||
532 | 534 | if ($mode == 0) |
533 | 535 | { |
534 | 536 | $prefix=''; |
535 | - if ($status == 1) return $langs->trans('Enabled'); |
|
536 | - if ($status == 0) return $langs->trans('Disabled'); |
|
537 | + if ($status == 1) { |
|
538 | + return $langs->trans('Enabled'); |
|
539 | + } |
|
540 | + if ($status == 0) { |
|
541 | + return $langs->trans('Disabled'); |
|
542 | + } |
|
537 | 543 | } |
538 | 544 | if ($mode == 1) |
539 | 545 | { |
540 | - if ($status == 1) return $langs->trans('Enabled'); |
|
541 | - if ($status == 0) return $langs->trans('Disabled'); |
|
546 | + if ($status == 1) { |
|
547 | + return $langs->trans('Enabled'); |
|
548 | + } |
|
549 | + if ($status == 0) { |
|
550 | + return $langs->trans('Disabled'); |
|
551 | + } |
|
542 | 552 | } |
543 | 553 | if ($mode == 2) |
544 | 554 | { |
545 | - if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); |
|
546 | - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); |
|
555 | + if ($status == 1) { |
|
556 | + return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); |
|
557 | + } |
|
558 | + if ($status == 0) { |
|
559 | + return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); |
|
560 | + } |
|
547 | 561 | } |
548 | 562 | if ($mode == 3) |
549 | 563 | { |
550 | - if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4'); |
|
551 | - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5'); |
|
564 | + if ($status == 1) { |
|
565 | + return img_picto($langs->trans('Enabled'),'statut4'); |
|
566 | + } |
|
567 | + if ($status == 0) { |
|
568 | + return img_picto($langs->trans('Disabled'),'statut5'); |
|
569 | + } |
|
552 | 570 | } |
553 | 571 | if ($mode == 4) |
554 | 572 | { |
555 | - if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); |
|
556 | - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); |
|
573 | + if ($status == 1) { |
|
574 | + return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); |
|
575 | + } |
|
576 | + if ($status == 0) { |
|
577 | + return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); |
|
578 | + } |
|
557 | 579 | } |
558 | 580 | if ($mode == 5) |
559 | 581 | { |
560 | - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); |
|
561 | - if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); |
|
582 | + if ($status == 1) { |
|
583 | + return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); |
|
584 | + } |
|
585 | + if ($status == 0) { |
|
586 | + return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); |
|
587 | + } |
|
562 | 588 | } |
563 | 589 | } |
564 | 590 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | if($user->rights->flightLog->vol->detail){ |
52 | 52 | $search_fk_pilot = GETPOST('search_fk_pilot', 'int'); |
53 | -}else{ |
|
53 | +} else{ |
|
54 | 54 | $search_fk_pilot = $user->id; |
55 | 55 | } |
56 | 56 | |
@@ -193,10 +193,12 @@ discard block |
||
193 | 193 | include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
194 | 194 | |
195 | 195 | // Purge search criteria |
196 | - if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers |
|
196 | + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) { |
|
197 | + // All tests are required to be compatible with all browsers |
|
197 | 198 | { |
198 | 199 | |
199 | 200 | $search_idBBC_vols = ''; |
201 | + } |
|
200 | 202 | $search_date = ''; |
201 | 203 | $search_lieuD = ''; |
202 | 204 | $search_lieuA = ''; |
@@ -760,7 +762,9 @@ discard block |
||
760 | 762 | { |
761 | 763 | print '<td>'.$flight->getNomUrl(0).'</td>'; |
762 | 764 | |
763 | - if (! $i) $totalarray['nbfield']++; |
|
765 | + if (! $i) { |
|
766 | + $totalarray['nbfield']++; |
|
767 | + } |
|
764 | 768 | } |
765 | 769 | if (! empty($arrayfields['t.date']['checked'])) |
766 | 770 | { |
@@ -768,104 +772,138 @@ discard block |
||
768 | 772 | print dol_print_date($db->jdate($obj->date), '%d-%m-%y'); |
769 | 773 | print '</td>'; |
770 | 774 | |
771 | - if (! $i) $totalarray['nbfield']++; |
|
775 | + if (! $i) { |
|
776 | + $totalarray['nbfield']++; |
|
777 | + } |
|
772 | 778 | } |
773 | 779 | if (! empty($arrayfields['t.lieuD']['checked'])) |
774 | 780 | { |
775 | 781 | print '<td>'.$obj->lieuD.'</td>'; |
776 | 782 | |
777 | - if (! $i) $totalarray['nbfield']++; |
|
783 | + if (! $i) { |
|
784 | + $totalarray['nbfield']++; |
|
785 | + } |
|
778 | 786 | } |
779 | 787 | if (! empty($arrayfields['t.lieuA']['checked'])) |
780 | 788 | { |
781 | 789 | print '<td>'.$obj->lieuA.'</td>'; |
782 | 790 | |
783 | - if (! $i) $totalarray['nbfield']++; |
|
791 | + if (! $i) { |
|
792 | + $totalarray['nbfield']++; |
|
793 | + } |
|
784 | 794 | } |
785 | 795 | if (! empty($arrayfields['t.heureD']['checked'])) |
786 | 796 | { |
787 | 797 | print '<td>'.$obj->heureD.'</td>'; |
788 | 798 | |
789 | - if (! $i) $totalarray['nbfield']++; |
|
799 | + if (! $i) { |
|
800 | + $totalarray['nbfield']++; |
|
801 | + } |
|
790 | 802 | } |
791 | 803 | if (! empty($arrayfields['t.heureA']['checked'])) |
792 | 804 | { |
793 | 805 | print '<td>'.$obj->heureA.'</td>'; |
794 | 806 | |
795 | - if (! $i) $totalarray['nbfield']++; |
|
807 | + if (! $i) { |
|
808 | + $totalarray['nbfield']++; |
|
809 | + } |
|
796 | 810 | } |
797 | 811 | if (! empty($arrayfields['t.BBC_ballons_idBBC_ballons']['checked'])) |
798 | 812 | { |
799 | 813 | print '<td>'.$obj->bal.'</td>'; |
800 | 814 | |
801 | - if (! $i) $totalarray['nbfield']++; |
|
815 | + if (! $i) { |
|
816 | + $totalarray['nbfield']++; |
|
817 | + } |
|
802 | 818 | } |
803 | 819 | if (! empty($arrayfields['t.nbrPax']['checked'])) |
804 | 820 | { |
805 | 821 | print '<td>'.$obj->nbrPax.'</td>'; |
806 | 822 | |
807 | - if (! $i) $totalarray['nbfield']++; |
|
823 | + if (! $i) { |
|
824 | + $totalarray['nbfield']++; |
|
825 | + } |
|
808 | 826 | } |
809 | 827 | if (! empty($arrayfields['t.remarque']['checked'])) |
810 | 828 | { |
811 | 829 | print '<td>'.$obj->remarque.'</td>'; |
812 | 830 | |
813 | - if (! $i) $totalarray['nbfield']++; |
|
831 | + if (! $i) { |
|
832 | + $totalarray['nbfield']++; |
|
833 | + } |
|
814 | 834 | } |
815 | 835 | if (! empty($arrayfields['t.incidents']['checked'])) |
816 | 836 | { |
817 | 837 | print '<td>'.$obj->incidents.'</td>'; |
818 | 838 | |
819 | - if (! $i) $totalarray['nbfield']++; |
|
839 | + if (! $i) { |
|
840 | + $totalarray['nbfield']++; |
|
841 | + } |
|
820 | 842 | } |
821 | 843 | if (! empty($arrayfields['t.fk_type']['checked'])) |
822 | 844 | { |
823 | 845 | print '<td>'.$obj->flight_type.'</td>'; |
824 | 846 | |
825 | - if (! $i) $totalarray['nbfield']++; |
|
847 | + if (! $i) { |
|
848 | + $totalarray['nbfield']++; |
|
849 | + } |
|
826 | 850 | } |
827 | 851 | if (! empty($arrayfields['t.fk_pilot']['checked'])) |
828 | 852 | { |
829 | 853 | print '<td>'.$obj->pilot.'</td>'; |
830 | 854 | |
831 | - if (! $i) $totalarray['nbfield']++; |
|
855 | + if (! $i) { |
|
856 | + $totalarray['nbfield']++; |
|
857 | + } |
|
832 | 858 | } |
833 | 859 | if (! empty($arrayfields['t.fk_organisateur']['checked'])) |
834 | 860 | { |
835 | 861 | print '<td>'.$obj->organisator.'</td>'; |
836 | 862 | |
837 | - if (! $i) $totalarray['nbfield']++; |
|
863 | + if (! $i) { |
|
864 | + $totalarray['nbfield']++; |
|
865 | + } |
|
838 | 866 | } |
839 | 867 | if (! empty($arrayfields['t.is_facture']['checked'])) |
840 | 868 | { |
841 | 869 | $flight->is_facture = $obj->is_facture; |
842 | 870 | print '<td>'.$flight->getLibStatut(3).'</td>'; |
843 | 871 | |
844 | - if (! $i) $totalarray['nbfield']++; |
|
872 | + if (! $i) { |
|
873 | + $totalarray['nbfield']++; |
|
874 | + } |
|
845 | 875 | } |
846 | 876 | if (! empty($arrayfields['t.kilometers']['checked'])) |
847 | 877 | { |
848 | 878 | print '<td>'.$obj->kilometers.'</td>'; |
849 | 879 | |
850 | - if (! $i) $totalarray['nbfield']++; |
|
880 | + if (! $i) { |
|
881 | + $totalarray['nbfield']++; |
|
882 | + } |
|
851 | 883 | } |
852 | 884 | if (! empty($arrayfields['t.cost']['checked'])) |
853 | 885 | { |
854 | 886 | print '<td>'.$obj->cost.'</td>'; |
855 | 887 | |
856 | - if (! $i) $totalarray['nbfield']++; |
|
888 | + if (! $i) { |
|
889 | + $totalarray['nbfield']++; |
|
890 | + } |
|
857 | 891 | } |
858 | 892 | if (! empty($arrayfields['t.fk_receiver']['checked'])) |
859 | 893 | { |
860 | 894 | print '<td>'.$obj->receiver.'</td>'; |
861 | 895 | |
862 | - if (! $i) $totalarray['nbfield']++; |
|
896 | + if (! $i) { |
|
897 | + $totalarray['nbfield']++; |
|
898 | + } |
|
863 | 899 | } |
864 | 900 | if (! empty($arrayfields['t.justif_kilometers']['checked'])) |
865 | 901 | { |
866 | 902 | print '<td>'.$obj->justif_kilometers.'</td>'; |
867 | 903 | |
868 | - if (! $i) $totalarray['nbfield']++; |
|
904 | + if (! $i) { |
|
905 | + $totalarray['nbfield']++; |
|
906 | + } |
|
869 | 907 | } |
870 | 908 | |
871 | 909 | // Extra fields |
@@ -920,9 +958,11 @@ discard block |
||
920 | 958 | |
921 | 959 | // Action column |
922 | 960 | print '<td class="nowrap" align="center">'; |
923 | - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
961 | + if ($massactionbutton || $massaction) { |
|
962 | + // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
924 | 963 | { |
925 | 964 | $selected = 0; |
965 | + } |
|
926 | 966 | if (in_array($obj->idBBC_vols, $arrayofselected)) { |
927 | 967 | $selected = 1; |
928 | 968 | } |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | { |
45 | 45 | if(isset($_GET["ballon"])){ |
46 | 46 | $idBallon = $_GET['ballon']; |
47 | - }else{ |
|
47 | + } else{ |
|
48 | 48 | $idBallon =1; |
49 | 49 | } |
50 | 50 | |
51 | -}else{ |
|
51 | +} else{ |
|
52 | 52 | |
53 | 53 | //l'utilisateur n'a pas le choix du ballon |
54 | 54 | //il est titulaire d'un ballon |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $idBallon = ($obj->rowid); |
67 | 67 | } |
68 | 68 | } |
69 | - }else{ |
|
69 | + } else{ |
|
70 | 70 | //il n'est pas titulaire d'un ballon |
71 | 71 | accessforbidden("Vous n'êtes pas titulaire du ballon"); |
72 | 72 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | llxHeader('','Carnet de vol',''); |
104 | 104 | if($msg && $idBallon != -1){ |
105 | 105 | print $msg; |
106 | -}else{ |
|
106 | +} else{ |
|
107 | 107 | $form=new Form($db); |
108 | 108 | |
109 | 109 | print '<!-- debut cartouche rapport --> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | print '<tr><td>Ballon</td><td colspan="3">'; |
119 | 119 | if($user->rights->flightLog->vol->detail){ |
120 | 120 | select_balloons($idBallon); |
121 | - }else{ |
|
121 | + } else{ |
|
122 | 122 | print $ballon->immat; |
123 | 123 | } |
124 | 124 |