Completed
Push — master ( 3bfafa...8acc04 )
by Laurent
03:05
created
card_tab_follow.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 $id = GETPOST('id', 'int') ?: GETPOST('idBBC_vols', 'int');
45 45
 $action = GETPOST('action', 'alpha');
46
-$permissiondellink=$user->rights->flightlog->vol->financial;
46
+$permissiondellink = $user->rights->flightlog->vol->financial;
47 47
 
48 48
 $object = new Bbcvols($db);
49 49
 $extrafields = new ExtraFields($db);
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
63 63
 
64 64
 // Load object
65
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php';  // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
66
-include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
65
+include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
66
+include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
67 67
 
68 68
 // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
69 69
 $hookmanager->initHooks(array('bbcvols'));
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 print '<div class="tabsAction">' . "\n";
100 100
 print '</div>' . "\n";
101 101
 
102
-if($user->rights->flightlog->vol->financial){
102
+if ($user->rights->flightlog->vol->financial) {
103 103
     print '<div class="fichecenter"><div class="fichehalfleft">';
104 104
     $form->showLinkedObjectBlock($object);
105 105
     print '</div></div>';
Please login to merge, or discard this patch.
core/triggers/interface_50001_modFlightLog_mailOnIncident.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  */
17 17
 
18 18
 
19
-require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
19
+require_once DOL_DOCUMENT_ROOT . '/core/triggers/dolibarrtriggers.class.php';
20 20
 dol_include_once('/flightlog/class/bbcvols.class.php');
21 21
 dol_include_once('/core/class/CMailFile.class.php');
22 22
 
@@ -78,23 +78,23 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
80 80
 	{
81
-        if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)){
81
+        if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)) {
82 82
             return 0;
83 83
         }
84 84
 
85
-        if(empty($conf->global->WORKFLOW_BBC_FLIGHTLOG_SEND_MAIL_ON_INCIDENT)){
85
+        if (empty($conf->global->WORKFLOW_BBC_FLIGHTLOG_SEND_MAIL_ON_INCIDENT)) {
86 86
             return 0;
87 87
         }
88 88
 
89
-        if($action !== 'BBC_FLIGHT_LOG_ADD_FLIGHT'){
89
+        if ($action !== 'BBC_FLIGHT_LOG_ADD_FLIGHT') {
90 90
             return 0;
91 91
         }
92 92
 
93
-        if(empty(trim($object->incidents)) && empty(trim($object->remarque))){
93
+        if (empty(trim($object->incidents)) && empty(trim($object->remarque))) {
94 94
             return 0;
95 95
         }
96 96
 
97
-        if(!empty($conf->global->MAIN_DISABLE_ALL_MAILS)){
97
+        if (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
98 98
             return 0;
99 99
         }
100 100
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         );
128 128
 
129 129
 
130
-        if (! $mailfile->sendfile())
130
+        if (!$mailfile->sendfile())
131 131
         {
132 132
             dol_syslog("Error while sending mail in flight log module : incident", LOG_ERR);
133 133
         }
Please login to merge, or discard this patch.
core/modules/modFlightLog.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -341,7 +341,7 @@
 block discarded – undo
341 341
      */
342 342
     private function initPermissions()
343 343
     {
344
-        $this->rights = array();        // Permission array used by this module
344
+        $this->rights = array(); // Permission array used by this module
345 345
         $r = 0;
346 346
 
347 347
         $this->rights[$r][0] = 9993;
Please login to merge, or discard this patch.
admin/vol.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
  * Actions
26 26
  */
27 27
 // Save
28
-if($action === ACTION_SAVE){
29
-    foreach($services as $flightTypeId => $serviceId){
28
+if ($action === ACTION_SAVE) {
29
+    foreach ($services as $flightTypeId => $serviceId) {
30 30
         $res = $flightType->fetch($flightTypeId);
31
-        if($res > 0 ){
31
+        if ($res > 0) {
32 32
             $flightType->fkService = $serviceId;
33 33
             $flightType->update($user);
34 34
         }
35 35
 
36
-        dolibarr_set_const($db, 'BBC_POINTS_BONUS_'.$flightTypeId, GETPOST('points_bonus_'.$flightTypeId), 'chaine', 0, 'Points pour le vol T'.$flightTypeId, $conf->entity);
36
+        dolibarr_set_const($db, 'BBC_POINTS_BONUS_' . $flightTypeId, GETPOST('points_bonus_' . $flightTypeId), 'chaine', 0, 'Points pour le vol T' . $flightTypeId, $conf->entity);
37 37
     }
38 38
 
39 39
     dolibarr_set_const($db, 'BBC_FLIGHT_TYPE_CUSTOMER', GETPOST('customer_product'), 'chaine', 0, '', $conf->entity);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 <tr class="<?= $flightTypeLine->id % 2 == 0 ? "pair" : "impair" ?>">
72 72
                     <td>(T<?= $flightTypeLine->numero ?>) - <?= $flightTypeLine->nom ?></td>
73 73
                     <td>
74
-                        <?php $form->select_produits($flightTypeLine->fkService, 'idprod['.$flightTypeLine->id.']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?>
74
+                        <?php $form->select_produits($flightTypeLine->fkService, 'idprod[' . $flightTypeLine->id . ']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?>
75 75
                     </td>
76 76
                 </tr>
77 77
             <?php endforeach; ?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 </td>
84 84
                 <td>
85 85
                     <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product',
86
-                        $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?>
86
+                        $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?>
87 87
                 </td>
88 88
             </tr>
89 89
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     <label for="points_bonus_<?php echo $flightTypeLine->numero; ?>">
107 107
                         (T<?php echo $flightTypeLine->numero ?>) - <?php echo $flightTypeLine->nom ?>
108 108
                     </label>
109
-                    <?php $prop = 'BBC_POINTS_BONUS_'.$flightTypeLine->numero; ?>
109
+                    <?php $prop = 'BBC_POINTS_BONUS_' . $flightTypeLine->numero; ?>
110 110
                     <input type="number" id="points_bonus_<?php echo $flightTypeLine->numero; ?>" name="points_bonus_<?php echo $flightTypeLine->numero; ?>" value="<?php echo $conf->global->$prop?>" />
111 111
                     <br/>
112 112
                 <?php endforeach; ?>
Please login to merge, or discard this patch.
facture.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -127,12 +127,12 @@
 block discarded – undo
127 127
  * Put here all code to do according to value of "action" parameter
128 128
  */
129 129
 if ($action == EXPENSE_REPORT_GENERATOR_ACTION_GENERATE) {
130
-    try{
131
-        $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount);
130
+    try {
131
+        $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote, $bankAccount);
132 132
         $handler->handle($command);
133 133
         Header("Location: card.php?id=" . $flight->getId());
134
-    }catch (\Exception $e){
135
-        dol_syslog($e->getMessage(),LOG_ERR);
134
+    } catch (\Exception $e) {
135
+        dol_syslog($e->getMessage(), LOG_ERR);
136 136
         dol_htmloutput_mesg("Facture non créée", '', 'error');
137 137
     }
138 138
 }
Please login to merge, or discard this patch.
command/CreateFlightBillCommandHandlerFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/CreateFlightBillCommandHandler.php';
4
-require_once __DIR__.'/CreateFlightBillTransactionalCommandHandler.php';
3
+require_once __DIR__ . '/CreateFlightBillCommandHandler.php';
4
+require_once __DIR__ . '/CreateFlightBillTransactionalCommandHandler.php';
5 5
 
6 6
 /**
7 7
  * @author Laurent De Coninck <[email protected]>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     /**
12 12
      * @return CreateFlightBillCommandHandler
13 13
      */
14
-    public static function factory($db, $conf, $user, $langs){
14
+    public static function factory($db, $conf, $user, $langs) {
15 15
         return new CreateFlightBillTransactionalCommandHandler($db, $conf, $user, $langs);
16 16
     }
17 17
 
Please login to merge, or discard this patch.
generateMonthlyBilling.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 if ($action == EXPENSE_REPORT_GENERATOR_ACTION_GENERATE) {
96 96
     try {
97 97
 
98
-        $command = new CreateMonthBillCommand( $type, $publicNote, $privateNote, $year, $month);
98
+        $command = new CreateMonthBillCommand($type, $publicNote, $privateNote, $year, $month);
99 99
         $handler->handle($command);
100 100
         dol_htmloutput_mesg('Génération : OK');
101 101
     } catch (Exception $e) {
Please login to merge, or discard this patch.
core/cron/BbcMonthlyFlightsBillCron.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         try {
55 55
 
56
-            if(date('d')>=15){
56
+            if (date('d') >= 15) {
57 57
                 dol_syslog('Monthly bill generation : date over');
58 58
                 return -2;
59 59
             }
Please login to merge, or discard this patch.
readFlights.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 print '<td>' . $totalT3 . '</td>';
275 275
 print '<td></td>';
276 276
 
277
-print '<td>' . $totalT4. '</td>';
277
+print '<td>' . $totalT4 . '</td>';
278 278
 print '<td></td>';
279 279
 
280 280
 print '<td>' . $totalT5 . '</td>';
Please login to merge, or discard this patch.