@@ -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 |
@@ -239,9 +239,12 @@ |
||
239 | 239 | <?php echo $langs->trans('La periode demandée n\'est pas cloturée.') ?> |
240 | 240 | </p> |
241 | 241 | <a class="butActionRefused" href="#">Générer</a> |
242 | - <?php else: ?> |
|
242 | + <?php else { |
|
243 | + : ?> |
|
243 | 244 | <button class="butAction" type="submit">Générer</button> |
244 | - <?php endif; ?> |
|
245 | + <?php endif; |
|
246 | +} |
|
247 | +?> |
|
245 | 248 | |
246 | 249 | </form> |
247 | 250 | </section> |
@@ -211,8 +211,11 @@ discard block |
||
211 | 211 | <?php if ($userWrite): ?> |
212 | 212 | <?php echo $formOther->select_percent($currentTask->progress, |
213 | 213 | sprintf('progression[%s]', $currentTask->id, false, 10)); ?> |
214 | - <?php else: ?> |
|
215 | - <span><?php echo $currentTask->progress; ?> %</span> |
|
214 | + <?php else { |
|
215 | + : ?> |
|
216 | + <span><?php echo $currentTask->progress; |
|
217 | +} |
|
218 | +?> %</span> |
|
216 | 219 | <?php endif; ?> |
217 | 220 | |
218 | 221 | </td> |
@@ -232,14 +235,17 @@ discard block |
||
232 | 235 | <?php echo !empty($flight->linkedObjectsIds) && in_array($currentTask->id, |
233 | 236 | $flight->linkedObjectsIds[$currentTask->table_element]) ? 'checked' : '' ?> |
234 | 237 | /> |
235 | - <?php else: ?> |
|
238 | + <?php else { |
|
239 | + : ?> |
|
236 | 240 | |
237 | 241 | <?php if (!empty($flight->linkedObjectsIds) && in_array($currentTask->id, |
238 | 242 | $flight->linkedObjectsIds[$currentTask->table_element])): ?> |
239 | 243 | <span class="fa fa-check"></span> |
240 | 244 | <?php else: ?> |
241 | 245 | <span class="fa fa-times"></span> |
242 | - <?php endif; ?> |
|
246 | + <?php endif; |
|
247 | +} |
|
248 | +?> |
|
243 | 249 | |
244 | 250 | <?php endif; ?> |
245 | 251 |
@@ -189,10 +189,12 @@ discard block |
||
189 | 189 | include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
190 | 190 | |
191 | 191 | // Purge search criteria |
192 | - if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers |
|
192 | + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) { |
|
193 | + // All tests are required to be compatible with all browsers |
|
193 | 194 | { |
194 | 195 | |
195 | 196 | $search_idBBC_vols = ''; |
197 | + } |
|
196 | 198 | $search_date = ''; |
197 | 199 | $search_lieuD = ''; |
198 | 200 | $search_lieuA = ''; |
@@ -799,7 +801,9 @@ discard block |
||
799 | 801 | { |
800 | 802 | print '<td>'.$flight->getNomUrl(0).'</td>'; |
801 | 803 | |
802 | - if (! $i) $totalarray['nbfield']++; |
|
804 | + if (! $i) { |
|
805 | + $totalarray['nbfield']++; |
|
806 | + } |
|
803 | 807 | } |
804 | 808 | if (! empty($arrayfields['t.date']['checked'])) |
805 | 809 | { |
@@ -807,113 +811,147 @@ discard block |
||
807 | 811 | print dol_print_date($db->jdate($obj->date), '%d-%m-%y'); |
808 | 812 | print '</td>'; |
809 | 813 | |
810 | - if (! $i) $totalarray['nbfield']++; |
|
814 | + if (! $i) { |
|
815 | + $totalarray['nbfield']++; |
|
816 | + } |
|
811 | 817 | } |
812 | 818 | if (! empty($arrayfields['t.lieuD']['checked'])) |
813 | 819 | { |
814 | 820 | print '<td>'.$obj->lieuD.'</td>'; |
815 | 821 | |
816 | - if (! $i) $totalarray['nbfield']++; |
|
822 | + if (! $i) { |
|
823 | + $totalarray['nbfield']++; |
|
824 | + } |
|
817 | 825 | } |
818 | 826 | if (! empty($arrayfields['t.lieuA']['checked'])) |
819 | 827 | { |
820 | 828 | print '<td>'.$obj->lieuA.'</td>'; |
821 | 829 | |
822 | - if (! $i) $totalarray['nbfield']++; |
|
830 | + if (! $i) { |
|
831 | + $totalarray['nbfield']++; |
|
832 | + } |
|
823 | 833 | } |
824 | 834 | if (! empty($arrayfields['t.heureD']['checked'])) |
825 | 835 | { |
826 | 836 | print '<td>'.$obj->heureD.'</td>'; |
827 | 837 | |
828 | - if (! $i) $totalarray['nbfield']++; |
|
838 | + if (! $i) { |
|
839 | + $totalarray['nbfield']++; |
|
840 | + } |
|
829 | 841 | } |
830 | 842 | if (! empty($arrayfields['t.heureA']['checked'])) |
831 | 843 | { |
832 | 844 | print '<td>'.$obj->heureA.'</td>'; |
833 | 845 | |
834 | - if (! $i) $totalarray['nbfield']++; |
|
846 | + if (! $i) { |
|
847 | + $totalarray['nbfield']++; |
|
848 | + } |
|
835 | 849 | } |
836 | 850 | if (! empty($arrayfields['t.BBC_ballons_idBBC_ballons']['checked'])) |
837 | 851 | { |
838 | 852 | print '<td>'.$obj->bal.'</td>'; |
839 | 853 | |
840 | - if (! $i) $totalarray['nbfield']++; |
|
854 | + if (! $i) { |
|
855 | + $totalarray['nbfield']++; |
|
856 | + } |
|
841 | 857 | } |
842 | 858 | if (! empty($arrayfields['t.nbrPax']['checked'])) |
843 | 859 | { |
844 | 860 | print '<td>'.$obj->nbrPax.'</td>'; |
845 | 861 | |
846 | - if (! $i) $totalarray['nbfield']++; |
|
862 | + if (! $i) { |
|
863 | + $totalarray['nbfield']++; |
|
864 | + } |
|
847 | 865 | } |
848 | 866 | if (! empty($arrayfields['t.remarque']['checked'])) |
849 | 867 | { |
850 | 868 | print '<td>'.$obj->remarque.'</td>'; |
851 | 869 | |
852 | - if (! $i) $totalarray['nbfield']++; |
|
870 | + if (! $i) { |
|
871 | + $totalarray['nbfield']++; |
|
872 | + } |
|
853 | 873 | } |
854 | 874 | if (! empty($arrayfields['t.incidents']['checked'])) |
855 | 875 | { |
856 | 876 | print '<td>'.$obj->incidents.'</td>'; |
857 | 877 | |
858 | - if (! $i) $totalarray['nbfield']++; |
|
878 | + if (! $i) { |
|
879 | + $totalarray['nbfield']++; |
|
880 | + } |
|
859 | 881 | } |
860 | 882 | if (! empty($arrayfields['t.fk_type']['checked'])) |
861 | 883 | { |
862 | 884 | print '<td>'.$obj->flight_type.'</td>'; |
863 | 885 | |
864 | - if (! $i) $totalarray['nbfield']++; |
|
886 | + if (! $i) { |
|
887 | + $totalarray['nbfield']++; |
|
888 | + } |
|
865 | 889 | } |
866 | 890 | if (! empty($arrayfields['t.fk_pilot']['checked'])) |
867 | 891 | { |
868 | 892 | print '<td>'.$obj->pilot.'</td>'; |
869 | 893 | |
870 | - if (! $i) $totalarray['nbfield']++; |
|
894 | + if (! $i) { |
|
895 | + $totalarray['nbfield']++; |
|
896 | + } |
|
871 | 897 | } |
872 | 898 | if (! empty($arrayfields['t.fk_organisateur']['checked'])) |
873 | 899 | { |
874 | 900 | print '<td>'.$obj->organisator.'</td>'; |
875 | 901 | |
876 | - if (! $i) $totalarray['nbfield']++; |
|
902 | + if (! $i) { |
|
903 | + $totalarray['nbfield']++; |
|
904 | + } |
|
877 | 905 | } |
878 | 906 | if (! empty($arrayfields['t.is_facture']['checked'])) |
879 | 907 | { |
880 | 908 | $flight->is_facture = $obj->is_facture; |
881 | 909 | print '<td>'.$flight->getLibStatut(3).'</td>'; |
882 | 910 | |
883 | - if (! $i) $totalarray['nbfield']++; |
|
911 | + if (! $i) { |
|
912 | + $totalarray['nbfield']++; |
|
913 | + } |
|
884 | 914 | } |
885 | 915 | if (! empty($arrayfields['t.kilometers']['checked'])) |
886 | 916 | { |
887 | 917 | if($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot){ |
888 | 918 | print '<td>'.$obj->kilometers.' KM</td>'; |
889 | - }else{ |
|
919 | + } else{ |
|
890 | 920 | print '<td> - Km</td>'; |
891 | 921 | } |
892 | 922 | |
893 | - if (! $i) $totalarray['nbfield']++; |
|
923 | + if (! $i) { |
|
924 | + $totalarray['nbfield']++; |
|
925 | + } |
|
894 | 926 | } |
895 | 927 | if (! empty($arrayfields['t.cost']['checked'])) |
896 | 928 | { |
897 | 929 | if(($user->rights->flightlog->vol->financial || $user->id == $flight->fk_pilot) && $obj->cost > 0){ |
898 | 930 | $nbrPax = $obj->nbrPax > 0 ? $obj->nbrPax : 1; |
899 | 931 | print sprintf('<td>%s - (%s/pax)</td>', price($obj->cost, 0, $langs, 0, 0, -1, $conf->currency), price($obj->cost/$nbrPax, 0, $langs, -1, -1, -1, $conf->currency)); |
900 | - }else{ |
|
932 | + } else{ |
|
901 | 933 | print '<td> - €</td>'; |
902 | 934 | } |
903 | 935 | |
904 | - if (! $i) $totalarray['nbfield']++; |
|
936 | + if (! $i) { |
|
937 | + $totalarray['nbfield']++; |
|
938 | + } |
|
905 | 939 | } |
906 | 940 | if (! empty($arrayfields['t.fk_receiver']['checked'])) |
907 | 941 | { |
908 | 942 | print '<td>'.$obj->receiver.'</td>'; |
909 | 943 | |
910 | - if (! $i) $totalarray['nbfield']++; |
|
944 | + if (! $i) { |
|
945 | + $totalarray['nbfield']++; |
|
946 | + } |
|
911 | 947 | } |
912 | 948 | if (! empty($arrayfields['t.justif_kilometers']['checked'])) |
913 | 949 | { |
914 | 950 | print '<td>'.$obj->justif_kilometers.'</td>'; |
915 | 951 | |
916 | - if (! $i) $totalarray['nbfield']++; |
|
952 | + if (! $i) { |
|
953 | + $totalarray['nbfield']++; |
|
954 | + } |
|
917 | 955 | } |
918 | 956 | |
919 | 957 | // Extra fields |
@@ -961,9 +999,11 @@ discard block |
||
961 | 999 | |
962 | 1000 | // Action column |
963 | 1001 | print '<td class="nowrap" align="center">'; |
964 | - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
1002 | + if ($massactionbutton || $massaction) { |
|
1003 | + // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined |
|
965 | 1004 | { |
966 | 1005 | $selected = 0; |
1006 | + } |
|
967 | 1007 | if (in_array($obj->idBBC_vols, $arrayofselected)) { |
968 | 1008 | $selected = 1; |
969 | 1009 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | if($query->isPilotsOnly()){ |
56 | 56 | $result->addPilot($pilotId, $pilotFirstname, $pilotLastname); |
57 | - }else{ |
|
57 | + } else{ |
|
58 | 58 | $result->addMission($obj->quartil, $pilotId, $pilotFirstname, $pilotLastname, |
59 | 59 | $obj->number_flights, $obj->total_kilometers); |
60 | 60 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | $msg = '<div class="ok">L\'ajout du vol du : ' . $_POST["reday"] . '/' . $_POST["remonth"] . '/' . $_POST["reyear"] . ' s\'est correctement effectue ! </div>'; |
72 | 72 | Header("Location: card.php?id=" . $vol->id); |
73 | - }catch (\Exception $e){ |
|
73 | + } catch (\Exception $e){ |
|
74 | 74 | $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . ($vol->error?:$e->getMessage()) . '! </div>'; |
75 | 75 | } |
76 | 76 |
@@ -239,7 +239,7 @@ |
||
239 | 239 | $handler->handle(new \flightlog\command\ClassifyFlight($id, GETPOST('projectid'))); |
240 | 240 | $object->fetch($id); |
241 | 241 | $action = 'show'; |
242 | - }catch(Exception $e){ |
|
242 | + } catch(Exception $e){ |
|
243 | 243 | setEventMessages($e->getMessage(), null, 'errors'); |
244 | 244 | } |
245 | 245 | } |
@@ -25,8 +25,10 @@ discard block |
||
25 | 25 | foreach ($dirsociete as $dirroot) |
26 | 26 | { |
27 | 27 | $res=dol_include_once($dirroot.$module.'.php'); |
28 | - if ($res) break; |
|
29 | -} |
|
28 | + if ($res) { |
|
29 | + break; |
|
30 | + } |
|
31 | + } |
|
30 | 32 | $modCodeClient = new $module; |
31 | 33 | // Load object modCodeFournisseur |
32 | 34 | $module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard'); |
@@ -38,8 +40,10 @@ discard block |
||
38 | 40 | foreach ($dirsociete as $dirroot) |
39 | 41 | { |
40 | 42 | $res=dol_include_once($dirroot.$module.'.php'); |
41 | - if ($res) break; |
|
42 | -} |
|
43 | + if ($res) { |
|
44 | + break; |
|
45 | + } |
|
46 | + } |
|
43 | 47 | $modCodeFournisseur = new $module; |
44 | 48 | |
45 | 49 | // Load translation files required by the page |
@@ -346,8 +350,11 @@ discard block |
||
346 | 350 | </script> |
347 | 351 | <a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.add.tva_intra.value);"><?php echo $langs->trans("VATIntraCheck"); ?></a> |
348 | 352 | <?php echo $html->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); ?> |
349 | - <?php else: ?> |
|
350 | - <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id); ?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a> |
|
353 | + <?php else { |
|
354 | + : ?> |
|
355 | + <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id); |
|
356 | +} |
|
357 | +?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a> |
|
351 | 358 | <?php endif; ?> |
352 | 359 | <?php endif; ?> |
353 | 360 | </td> |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | try{ |
127 | 127 | $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount, $nbrPax, $customerId); |
128 | 128 | $handler->handle($command); |
129 | - }catch (\Exception $e){ |
|
129 | + } catch (\Exception $e){ |
|
130 | 130 | dol_syslog($e->getMessage(),LOG_ERR); |
131 | 131 | dol_htmloutput_mesg("Facture non créée", '', 'error'); |
132 | 132 | } |
@@ -311,9 +311,12 @@ discard block |
||
311 | 311 | |
312 | 312 | <?php if (!$flightProduct || !$flight->hasReceiver()) : ?> |
313 | 313 | <a class="butActionRefused" href="#">Générer</a> |
314 | - <?php else: ?> |
|
314 | + <?php else { |
|
315 | + : ?> |
|
315 | 316 | <button class="butAction" type="submit">Générer</button> |
316 | - <?php endif; ?> |
|
317 | + <?php endif; |
|
318 | +} |
|
319 | +?> |
|
317 | 320 | |
318 | 321 | <a class="butAction" href="<?php echo DOL_URL_ROOT . '/flightlog/card.php?id=' . $flight->id; ?>">Retour au |
319 | 322 | vol</a> |