@@ -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 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $project_name = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $project_name); |
| 130 | 130 | $project_name = mb_ereg_replace("([\.]{2,})", '', $project_name); |
| 131 | 131 | //Format: "ZA000001 Project Name.pdf" |
| 132 | - $filename = $prefix.$payment_order->getIDString().' '.$project_name.'.'.$extension; |
|
| 132 | + $filename = $prefix . $payment_order->getIDString() . ' ' . $project_name . '.' . $extension; |
|
| 133 | 133 | |
| 134 | 134 | $data[$filename] = $path; |
| 135 | 135 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | return ZIPBinaryFileResponseFacade::createZIPResponseFromFiles( |
| 148 | 148 | $data, |
| 149 | - 'Belege_'.date('Y-m-d_H-i-s').'.zip'); |
|
| 149 | + 'Belege_' . date('Y-m-d_H-i-s') . '.zip'); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | public function configureCrud(Crud $crud): Crud |
@@ -315,32 +315,32 @@ discard block |
||
| 315 | 315 | ]); |
| 316 | 316 | |
| 317 | 317 | $emailAction = Action::new('sendEmail', 'payment_order.action.email', 'fas fa-envelope') |
| 318 | - ->linkToUrl(function (PaymentOrder $paymentOrder) { |
|
| 318 | + ->linkToUrl(function(PaymentOrder $paymentOrder) { |
|
| 319 | 319 | return $this->mailToGenerator->generateContactMailLink($paymentOrder); |
| 320 | 320 | }) |
| 321 | 321 | ->setCssClass('text-dark'); |
| 322 | 322 | |
| 323 | 323 | //Hide action if no contact emails are associated with department |
| 324 | - $emailAction->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 324 | + $emailAction->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 325 | 325 | return null !== $this->mailToGenerator->generateContactMailLink($paymentOrder); |
| 326 | 326 | }); |
| 327 | 327 | |
| 328 | 328 | $hhv_action = Action::new('contactHHV', 'payment_order.action.contact_hhv', 'fas fa-comment-dots') |
| 329 | - ->linkToUrl(function (PaymentOrder $paymentOrder) { |
|
| 329 | + ->linkToUrl(function(PaymentOrder $paymentOrder) { |
|
| 330 | 330 | return $this->mailToGenerator->getHHVMailLink($paymentOrder); |
| 331 | 331 | }) |
| 332 | 332 | ->setCssClass('mr-2 text-dark'); |
| 333 | 333 | |
| 334 | 334 | $resend_confirmation_action = Action::new('resendConfirmation', 'payment_order.action.resend_confirmation', 'fas fa-redo') |
| 335 | 335 | ->linkToCrudAction('resendConfirmationEmail') |
| 336 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 336 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 337 | 337 | return $this->isGranted('ROLE_EDIT_PAYMENT_ORDERS') && !$paymentOrder->isConfirmed(); |
| 338 | 338 | }) |
| 339 | 339 | ->setCssClass('mr-2 text-dark'); |
| 340 | 340 | |
| 341 | 341 | $mathematically_correct_action = Action::new('mathematicallyCorrect', 'payment_order.action.mathematically_correct', 'fas fa-check') |
| 342 | 342 | ->linkToCrudAction('checkMathematicallyCorrect') |
| 343 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 343 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 344 | 344 | return $this->isGranted('ROLE_PO_MATHEMATICALLY') |
| 345 | 345 | && $paymentOrder->isConfirmed() |
| 346 | 346 | && !$paymentOrder->isMathematicallyCorrect(); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | $factually_correct_action = Action::new('factuallyCorrect', 'payment_order.action.factually_correct', 'fas fa-check') |
| 351 | 351 | ->linkToCrudAction('checkFactuallyCorrect') |
| 352 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 352 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 353 | 353 | return $this->isGranted('ROLE_PO_FACTUALLY') |
| 354 | 354 | && $paymentOrder->isConfirmed() |
| 355 | 355 | && !$paymentOrder->isFactuallyCorrect() |
@@ -359,12 +359,12 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | $manual_confirmation = Action::new('manual_confirmation', 'payment_order.action.manual_confirmation', 'fas fa-exclamation-triangle') |
| 361 | 361 | ->setCssClass('mr-1 text-dark') |
| 362 | - ->linkToRoute('payment_order_manual_confirm', function (PaymentOrder $paymentOrder) { |
|
| 362 | + ->linkToRoute('payment_order_manual_confirm', function(PaymentOrder $paymentOrder) { |
|
| 363 | 363 | return [ |
| 364 | 364 | 'id' => $paymentOrder->getId(), |
| 365 | 365 | ]; |
| 366 | 366 | }) |
| 367 | - ->displayIf(function (PaymentOrder $paymentOrder) { |
|
| 367 | + ->displayIf(function(PaymentOrder $paymentOrder) { |
|
| 368 | 368 | return $this->isGranted('ROLE_MANUAL_CONFIRMATION') |
| 369 | 369 | && !$paymentOrder->isConfirmed(); |
| 370 | 370 | }); |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | |
| 378 | 378 | $actions->disable(Crud::PAGE_NEW); |
| 379 | 379 | |
| 380 | - if(!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) { |
|
| 380 | + if (!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) { |
|
| 381 | 381 | $actions->disable('batchDelete'); |
| 382 | 382 | } |
| 383 | 383 | |