Completed
Push — feature/link_expense_note ( dad966...3db735 )
by Laurent
02:03
created
command/CreateExpenseNoteCommandHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $missions = $this->getMissionsQueryHandler->__invoke(new GetPilotsWithMissionsQuery($command->getYear(),
96 96
             $command->getQuartile()));
97 97
 
98
-        if(!$missions->hasMission()){
98
+        if (!$missions->hasMission()) {
99 99
             throw new NoMissionException();
100 100
         }
101 101
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 $isFlightInError = $this->addFlight($currentFlightForQuarter, $expenseNote) || $isFlightInError;
118 118
             }
119 119
 
120
-            if(!$isFlightInError){
120
+            if (!$isFlightInError) {
121 121
                 $expenseNote->fetch($expenseNoteId);
122 122
                 $expenseNote->setValidate($this->user);
123 123
                 $expenseNote->setApproved($this->user);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                 $expenseNote->setDocModel($this->user, "standard");
127 127
                 $error = $expenseNote->generateDocument($expenseNote->modelpdf, $this->langs) <= 0;
128 128
 
129
-                if(!$error){
129
+                if (!$error) {
130 130
                     dol_htmloutput_mesg(sprintf("Notes de frais crée pour %s", $currentMission->getPilotName()));
131 131
                     continue;
132 132
                 }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         $isError = $object_ligne->insert() <= 0;
202 202
 
203
-        if(!$isError){
203
+        if (!$isError) {
204 204
             $expenseReport->add_object_linked(self::FLIGHT_ELEMENT, $currentFlightForQuarter->getId());
205 205
         }
206 206
 
Please login to merge, or discard this patch.