@@ -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 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $msg = '<div class="ok">L\'ajout du vol du : ' . $_POST["reday"] . '/' . $_POST["remonth"] . '/' . $_POST["reyear"] . ' s\'est correctement effectue ! </div>'; |
71 | 71 | Header("Location: card.php?id=" . $vol->id); |
72 | - }catch (\Exception $e){ |
|
72 | + } catch (\Exception $e){ |
|
73 | 73 | $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . $vol->error . '! </div>'; |
74 | 74 | } |
75 | 75 |
@@ -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 |
@@ -302,8 +306,11 @@ discard block |
||
302 | 306 | </script> |
303 | 307 | <a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.add.tva_intra.value);"><?php echo $langs->trans("VATIntraCheck"); ?></a> |
304 | 308 | <?php echo $html->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); ?> |
305 | - <?php else: ?> |
|
306 | - <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id); ?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a> |
|
309 | + <?php else { |
|
310 | + : ?> |
|
311 | + <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id); |
|
312 | +} |
|
313 | +?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a> |
|
307 | 314 | <?php endif; ?> |
308 | 315 | <?php endif; ?> |
309 | 316 | </td> |
@@ -101,7 +101,7 @@ |
||
101 | 101 | if(!$object->isLinkedToOrder()){ |
102 | 102 | print '<tr><td class="fieldrequired">' . $langs->trans("Fieldcost") . '</td><td>' . $object->cost . " " . $langs->getCurrencySymbol($conf->currency) . '</td></tr>'; |
103 | 103 | print '<tr><td class="fieldrequired">' . $langs->trans("Fieldfk_receiver") . '</td><td>' . $receiver->getNomUrl(1) . '</td></tr>'; |
104 | -}else{ |
|
104 | +} else{ |
|
105 | 105 | print '<tr><td class="fieldrequired">' . $langs->trans("Order") . '</td><td>' . $object->getOrder()->getNomUrl(1). '</td></tr>'; |
106 | 106 | } |
107 | 107 | print '</table>'; |
@@ -347,7 +347,7 @@ |
||
347 | 347 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), |
348 | 348 | $langs->trans('êtes-vous sure de vouloir supprimer ce vol ?'), 'confirm_delete', '', 0, 1); |
349 | 349 | print $formconfirm; |
350 | - }elseif ($user->rights->flightlog->vol->financial && !$object->isBilled() && $action == ACTION_FLAG_BILLED) { |
|
350 | + } elseif ($user->rights->flightlog->vol->financial && !$object->isBilled() && $action == ACTION_FLAG_BILLED) { |
|
351 | 351 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Marque comme facturé'), |
352 | 352 | $langs->trans('Ce vol va être marqué comme facturé, est-ce bien le cas ?'), ACTION_CONFIRM_FLAG_BILLED, '', 0, 1); |
353 | 353 | print $formconfirm; |
@@ -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 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount, $nbrPax); |
129 | 129 | $handler->handle($command); |
130 | 130 | Header("Location: card.php?id=" . $flight->getId()); |
131 | - }catch (\Exception $e){ |
|
131 | + } catch (\Exception $e){ |
|
132 | 132 | dol_syslog($e->getMessage(),LOG_ERR); |
133 | 133 | dol_htmloutput_mesg("Facture non créée", '', 'error'); |
134 | 134 | } |
@@ -269,9 +269,12 @@ discard block |
||
269 | 269 | |
270 | 270 | <?php if (!$flightProduct || !$flight->hasReceiver()) : ?> |
271 | 271 | <a class="butActionRefused" href="#">Générer</a> |
272 | - <?php else: ?> |
|
272 | + <?php else { |
|
273 | + : ?> |
|
273 | 274 | <button class="butAction" type="submit">Générer</button> |
274 | - <?php endif; ?> |
|
275 | + <?php endif; |
|
276 | +} |
|
277 | +?> |
|
275 | 278 | |
276 | 279 | <a class="butAction" href="<?php echo DOL_URL_ROOT . '/flightlog/card.php?id=' . $flight->id; ?>">Retour au |
277 | 280 | vol</a> |