@@ -31,7 +31,7 @@ |
||
31 | 31 | 'form' => new Form($this->db), |
32 | 32 | 'flight' => $flight |
33 | 33 | ]); |
34 | - }catch (\Exception $e){ |
|
34 | + } catch (\Exception $e){ |
|
35 | 35 | echo $e->getMessage(); |
36 | 36 | } |
37 | 37 | } |
@@ -37,29 +37,21 @@ discard block |
||
37 | 37 | |
38 | 38 | if ($objectType == 'facture') { |
39 | 39 | $classpath = 'compta/facture/class'; |
40 | - } |
|
41 | - elseif ($objectType == 'facturerec') { |
|
40 | + } elseif ($objectType == 'facturerec') { |
|
42 | 41 | $classpath = 'compta/facture/class'; |
43 | - } |
|
44 | - elseif ($objectType == 'propal') { |
|
42 | + } elseif ($objectType == 'propal') { |
|
45 | 43 | $classpath = 'comm/propal/class'; |
46 | - } |
|
47 | - elseif ($objectType == 'supplier_proposal') { |
|
44 | + } elseif ($objectType == 'supplier_proposal') { |
|
48 | 45 | $classpath = 'supplier_proposal/class'; |
49 | - } |
|
50 | - elseif ($objectType == 'shipping') { |
|
46 | + } elseif ($objectType == 'shipping') { |
|
51 | 47 | $classpath = 'expedition/class'; $subelement = 'expedition'; |
52 | - } |
|
53 | - elseif ($objectType == 'delivery') { |
|
48 | + } elseif ($objectType == 'delivery') { |
|
54 | 49 | $classpath = 'livraison/class'; $subelement = 'livraison'; |
55 | - } |
|
56 | - elseif ($objectType == 'invoice_supplier' || $objectType == 'order_supplier') { |
|
50 | + } elseif ($objectType == 'invoice_supplier' || $objectType == 'order_supplier') { |
|
57 | 51 | $classpath = 'fourn/class'; |
58 | - } |
|
59 | - elseif ($objectType == 'fichinter') { |
|
52 | + } elseif ($objectType == 'fichinter') { |
|
60 | 53 | $classpath = 'fichinter/class'; $subelement = 'fichinter'; |
61 | - } |
|
62 | - elseif ($objectType == 'subscription') { |
|
54 | + } elseif ($objectType == 'subscription') { |
|
63 | 55 | $classpath = 'adherents/class'; |
64 | 56 | } |
65 | 57 | |
@@ -68,20 +60,15 @@ discard block |
||
68 | 60 | |
69 | 61 | if ($objectType == 'order') { |
70 | 62 | $classfile = 'commande'; $classname = 'Commande'; |
71 | - } |
|
72 | - elseif ($objectType == 'invoice_supplier') { |
|
63 | + } elseif ($objectType == 'invoice_supplier') { |
|
73 | 64 | $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; |
74 | - } |
|
75 | - elseif ($objectType == 'order_supplier') { |
|
65 | + } elseif ($objectType == 'order_supplier') { |
|
76 | 66 | $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; |
77 | - } |
|
78 | - elseif ($objectType == 'supplier_proposal') { |
|
67 | + } elseif ($objectType == 'supplier_proposal') { |
|
79 | 68 | $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; |
80 | - } |
|
81 | - elseif ($objectType == 'facturerec') { |
|
69 | + } elseif ($objectType == 'facturerec') { |
|
82 | 70 | $classfile = 'facture-rec'; $classname = 'FactureRec'; |
83 | - } |
|
84 | - elseif ($objectType == 'subscription') { |
|
71 | + } elseif ($objectType == 'subscription') { |
|
85 | 72 | $classfile = 'subscription'; $classname = 'Subscription'; |
86 | 73 | } |
87 | 74 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | include $response->getTemplate(); |
105 | - }else{ |
|
105 | + } else{ |
|
106 | 106 | echo 'Route non trouvée.'; |
107 | 107 | } |
108 | 108 | ?> |
@@ -72,7 +72,7 @@ |
||
72 | 72 | exit; |
73 | 73 | } |
74 | 74 | |
75 | -}catch (\Exception $e){ |
|
75 | +} catch (\Exception $e){ |
|
76 | 76 | dol_syslog($e->getMessage(), LOG_ERR); |
77 | 77 | $response = new \FlightLog\Http\Web\Response\Response($e->getMessage()); |
78 | 78 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $handler->handle(new \flightlog\command\ClassifyFlight($id, GETPOST('projectid'))); |
319 | 319 | $object->fetch($id); |
320 | 320 | $action = 'show'; |
321 | - }catch(Exception $e){ |
|
321 | + } catch(Exception $e){ |
|
322 | 322 | setEventMessages($e->getMessage(), null, 'errors'); |
323 | 323 | } |
324 | 324 | } |
@@ -728,9 +728,12 @@ discard block |
||
728 | 728 | <a class="butAction" href="<?php echo sprintf('%s?id=%s&action=%s', $_SERVER["PHP_SELF"], $object->id, ACTION_TOGGLE_STATIC); ?>"> |
729 | 729 | <?php if(!$object->isStaticFlight()): ?> |
730 | 730 | <?php echo $langs->trans("Vol static") ?> |
731 | - <?php else: ?> |
|
731 | + <?php else { |
|
732 | + : ?> |
|
732 | 733 | <?php echo $langs->trans("Non static") ?> |
733 | - <?php endif; ?> |
|
734 | + <?php endif; |
|
735 | +} |
|
736 | +?> |
|
734 | 737 | </a> |
735 | 738 | </div> |
736 | 739 | <?php endif; ?> |
@@ -741,9 +744,12 @@ discard block |
||
741 | 744 | <a class="butAction" href="<?php echo sprintf('%s?id=%s&action=%s', $_SERVER["PHP_SELF"], $object->id, ACTION_TOGGLE_NIGHT); ?>"> |
742 | 745 | <?php if(!$object->isNightFlight()): ?> |
743 | 746 | <?php echo $langs->trans("Vol de nuit") ?> |
744 | - <?php else: ?> |
|
747 | + <?php else { |
|
748 | + : ?> |
|
745 | 749 | <?php echo $langs->trans("Non nuit") ?> |
746 | - <?php endif; ?> |
|
750 | + <?php endif; |
|
751 | +} |
|
752 | +?> |
|
747 | 753 | </a> |
748 | 754 | </div> |
749 | 755 | <?php endif; ?> |