@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $pdf = new SturaPDF(); |
| 42 | 42 | $pdf->setAuthor('StuRa FSU Jena'); |
| 43 | - $pdf->setTitle('Zahlungsauftrag #'.$paymentOrder->getId()); |
|
| 43 | + $pdf->setTitle('Zahlungsauftrag #' . $paymentOrder->getId()); |
|
| 44 | 44 | $pdf->setSubject('Zahlungsauftrag'); |
| 45 | 45 | $pdf->SetAutoPageBreak(false); |
| 46 | 46 | |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | $pdf->setY(80); |
| 50 | 50 | $pdf->setMargins(25, 10); |
| 51 | 51 | |
| 52 | - $pdf->writeHTML('<h1>Zahlungsauftrag '.$paymentOrder->getIDString().'</h1><br>'); |
|
| 52 | + $pdf->writeHTML('<h1>Zahlungsauftrag ' . $paymentOrder->getIDString() . '</h1><br>'); |
|
| 53 | 53 | |
| 54 | 54 | $this->writeRow($pdf, 'Name Auftraggeber*in', $paymentOrder->getFullName()); |
| 55 | 55 | $this->writeRow($pdf, 'Struktur / Organisation', $paymentOrder->getDepartment()->getName()); |
| 56 | 56 | $this->writeRow($pdf, 'Projektbezeichnung', $paymentOrder->getProjectName()); |
| 57 | - $this->writeRow($pdf, 'Betrag', $paymentOrder->getAmountString().' €'); |
|
| 57 | + $this->writeRow($pdf, 'Betrag', $paymentOrder->getAmountString() . ' €'); |
|
| 58 | 58 | $this->writeRow($pdf, 'Mittelfreigabe / Finanzantrag', !empty($paymentOrder->getFundingId()) ? $paymentOrder->getFundingId() : '<i>Nicht angegeben</i>'); |
| 59 | 59 | $this->writeRow($pdf, 'FSR-Kom Umbuchung', $paymentOrder->isFsrKomResolution() ? 'Ja' : 'Nein'); |
| 60 | 60 | $formatter = new IntlDateFormatter('de_DE', IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->writeRow($pdf, 'Kontoinhaber*in', $paymentOrder->getBankInfo()->getAccountOwner()); |
| 66 | 66 | $this->writeRow($pdf, 'Straße/Nr.', $paymentOrder->getBankInfo()->getStreet()); |
| 67 | - $this->writeRow($pdf, 'PLZ/Ort', $paymentOrder->getBankInfo()->getZipCode().' '.$paymentOrder->getBankInfo()->getCity()); |
|
| 67 | + $this->writeRow($pdf, 'PLZ/Ort', $paymentOrder->getBankInfo()->getZipCode() . ' ' . $paymentOrder->getBankInfo()->getCity()); |
|
| 68 | 68 | $this->writeRow($pdf, 'IBAN', $paymentOrder->getBankInfo()->getIban()); |
| 69 | 69 | $this->writeRow($pdf, 'BIC', $paymentOrder->getBankInfo()->getBic()); |
| 70 | 70 | $this->writeRow($pdf, 'Bank', $paymentOrder->getBankInfo()->getBankName()); |
@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | private function addSignatureField(TCPDF $pdf, string $content, bool $ln = true, string $align = 'L'): void |
| 91 | 91 | { |
| 92 | - $pdf->writeHTML('_____________________________________________<br><small>'.$content.'</small>', $ln, false, false, false, $align); |
|
| 92 | + $pdf->writeHTML('_____________________________________________<br><small>' . $content . '</small>', $ln, false, false, false, $align); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | private function writeRow(TCPDF $pdf, string $property, string $value): void |
| 96 | 96 | { |
| 97 | - $pdf->MultiCell(80, 5, '<b>'.$property.':</b>', 0, 'L', 0, 0, '', '', true, 0, true); |
|
| 97 | + $pdf->MultiCell(80, 5, '<b>' . $property . ':</b>', 0, 'L', 0, 0, '', '', true, 0, true); |
|
| 98 | 98 | $pdf->MultiCell(0, 5, $value, 0, 'L', 0, 1, '', '', true, 0, true); |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | public function Header() |
| 31 | 31 | { |
| 32 | - $image_file = dirname(__DIR__, 3).'/assets/StuRa.png'; |
|
| 32 | + $image_file = dirname(__DIR__, 3) . '/assets/StuRa.png'; |
|
| 33 | 33 | |
| 34 | 34 | //$image_file = 'C:\Users\janhb\Documents\Projekte\PHP\stura\assets\StuRa.png'; |
| 35 | 35 | |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $this->SetFont('helvetica', 'I', 8); |
| 55 | 55 | // Page number |
| 56 | - $this->Cell(0, 10, 'Seite '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'L'); |
|
| 56 | + $this->Cell(0, 10, 'Seite ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'L'); |
|
| 57 | 57 | |
| 58 | 58 | $formatter = new IntlDateFormatter('de-DE', IntlDateFormatter::SHORT, IntlDateFormatter::MEDIUM); |
| 59 | 59 | |
| 60 | - $this->Cell(0, 10, 'Erzeugt '.$formatter->format(new DateTime()), 0, false, 'R'); |
|
| 60 | + $this->Cell(0, 10, 'Erzeugt ' . $formatter->format(new DateTime()), 0, false, 'R'); |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | $prefix = ''; |
| 108 | 108 | } else { |
| 109 | 109 | $prefix = $payment_order->getDepartment() |
| 110 | - ->getReferencesExportPrefix().'_'; |
|
| 110 | + ->getReferencesExportPrefix() . '_'; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - $data[$prefix.$payment_order->getIDString().'.'.$extension] = $path; |
|
| 113 | + $data[$prefix . $payment_order->getIDString() . '.' . $extension] = $path; |
|
| 114 | 114 | |
| 115 | 115 | if ($this->isGranted('ROLE_EXPORT_PAYMENT_ORDERS_REFERENCES')) { |
| 116 | 116 | //Set exported status |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | return ZIPBinaryFileResponseFacade::createZIPResponseFromFiles( |
| 127 | 127 | $data, |
| 128 | - 'Belege_'.date('Y-m-d_H-i-s').'.zip'); |
|
| 128 | + 'Belege_' . date('Y-m-d_H-i-s') . '.zip'); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | public function configureCrud(Crud $crud): Crud |
@@ -294,32 +294,32 @@ discard block |
||
| 294 | 294 | ]); |
| 295 | 295 | |
| 296 | 296 | $emailAction = Action::new('sendEmail', 'payment_order.action.email', 'fas fa-envelope') |
| 297 | - ->linkToUrl(function (PaymentOrder $paymentOrder) { |
|
| 297 | + ->linkToUrl(function(PaymentOrder $paymentOrder) { |
|
| 298 | 298 | return $this->mailToGenerator->generateContactMailLink($paymentOrder); |
| 299 | 299 | }) |
| 300 | 300 | ->setCssClass('text-dark'); |
| 301 | 301 | |
| 302 | 302 | //Hide action if no contact emails are associated with department |
| 303 | - $emailAction->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 303 | + $emailAction->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 304 | 304 | return null !== $this->mailToGenerator->generateContactMailLink($paymentOrder); |
| 305 | 305 | }); |
| 306 | 306 | |
| 307 | 307 | $hhv_action = Action::new('contactHHV', 'payment_order.action.contact_hhv', 'fas fa-comment-dots') |
| 308 | - ->linkToUrl(function (PaymentOrder $paymentOrder) { |
|
| 308 | + ->linkToUrl(function(PaymentOrder $paymentOrder) { |
|
| 309 | 309 | return $this->mailToGenerator->getHHVMailLink($paymentOrder); |
| 310 | 310 | }) |
| 311 | 311 | ->setCssClass('mr-2 text-dark'); |
| 312 | 312 | |
| 313 | 313 | $resend_confirmation_action = Action::new('resendConfirmation', 'payment_order.action.resend_confirmation', 'fas fa-redo') |
| 314 | 314 | ->linkToCrudAction('resendConfirmationEmail') |
| 315 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 315 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 316 | 316 | return $this->isGranted('ROLE_EDIT_PAYMENT_ORDERS') && !$paymentOrder->isConfirmed(); |
| 317 | 317 | }) |
| 318 | 318 | ->setCssClass('mr-2 text-dark'); |
| 319 | 319 | |
| 320 | 320 | $mathematically_correct_action = Action::new('mathematicallyCorrect', 'payment_order.action.mathematically_correct', 'fas fa-check') |
| 321 | 321 | ->linkToCrudAction('checkMathematicallyCorrect') |
| 322 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 322 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 323 | 323 | return $this->isGranted('ROLE_PO_MATHEMATICALLY') |
| 324 | 324 | && $paymentOrder->isConfirmed() |
| 325 | 325 | && !$paymentOrder->isMathematicallyCorrect(); |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | |
| 329 | 329 | $factually_correct_action = Action::new('factuallyCorrect', 'payment_order.action.factually_correct', 'fas fa-check') |
| 330 | 330 | ->linkToCrudAction('checkFactuallyCorrect') |
| 331 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 331 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 332 | 332 | return $this->isGranted('ROLE_PO_FACTUALLY') |
| 333 | 333 | && $paymentOrder->isConfirmed() |
| 334 | 334 | && !$paymentOrder->isFactuallyCorrect() |
@@ -338,12 +338,12 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | $manual_confirmation = Action::new('manual_confirmation', 'payment_order.action.manual_confirmation', 'fas fa-exclamation-triangle') |
| 340 | 340 | ->setCssClass('mr-1 text-dark') |
| 341 | - ->linkToRoute('payment_order_manual_confirm', function (PaymentOrder $paymentOrder) { |
|
| 341 | + ->linkToRoute('payment_order_manual_confirm', function(PaymentOrder $paymentOrder) { |
|
| 342 | 342 | return [ |
| 343 | 343 | 'id' => $paymentOrder->getId(), |
| 344 | 344 | ]; |
| 345 | 345 | }) |
| 346 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 346 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 347 | 347 | return $this->isGranted('ROLE_MANUAL_CONFIRMATION') |
| 348 | 348 | && !$paymentOrder->isConfirmed(); |
| 349 | 349 | }); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | |
| 357 | 357 | $actions->disable(Crud::PAGE_NEW); |
| 358 | 358 | |
| 359 | - if(!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) { |
|
| 359 | + if (!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) { |
|
| 360 | 360 | $actions->disable('batchDelete'); |
| 361 | 361 | } |
| 362 | 362 | |