|
15 | 15 | use DoctrineBatchUtils\BatchProcessing\SimpleBatchIteratorAggregate;
|
16 | 16 | use Exception;
|
17 | 17 | use Kontrolgruppen\CoreBundle\Entity\Process;
|
| 18 | +use Kontrolgruppen\CoreBundle\Entity\ProcessClientPerson; |
18 | 19 | use Kontrolgruppen\CoreBundle\Entity\ProcessStatus;
|
19 | 20 | use Kontrolgruppen\CoreBundle\Export\AbstractExport;
|
20 | 21 | use Kontrolgruppen\CoreBundle\Service\EconomyService;
|
@@ -174,12 +175,17 @@ private function getNewRow(Process $process, $serviceName)
|
174 | 175 | $forwardedTo = $process->getForwardedToAuthorities();
|
175 | 176 | $forwardedTo = \count($forwardedTo) > 0 ? $forwardedTo[0] : null;
|
176 | 177 |
|
| 178 | + $client = $process->getProcessClient(); |
| 179 | + $clientHasOwnCompany = $client instanceof ProcessClientPerson |
| 180 | + ? $client->getHasOwnCompany() |
| 181 | + : null; |
| 182 | + |
177 | 183 | return [
|
178 | 184 | 'caseNumber' => $process->getCaseNumber(),
|
179 | 185 | 'channel' => $process->getChannel() ? $process->getChannel()->getName() : null,
|
180 | 186 | 'processType' => $process->getProcessType() ? $process->getProcessType()->getName() : null,
|
181 | 187 | 'service' => $serviceName,
|
182 |
| - 'clientHasOwnCompany' => $this->formatBooleanYesNoNull($process->getProcessClient()->getHasOwnCompany()), |
| 188 | + 'clientHasOwnCompany' => $this->formatBooleanYesNoNull($clientHasOwnCompany), |
183 | 189 | 'performedCompanyCheck' => $this->formatBooleanYesNoNull($process->getPerformedCompanyCheck()),
|
184 | 190 | 'repaymentSum' => 0.0,
|
185 | 191 | 'futureSavingsSum' => 0.0,
|
|
0 commit comments