fixed print transaction type issue

This commit is contained in:
Cihan Şentürk 2025-05-15 13:25:42 +03:00 committed by GitHub
parent 56ac86ad3c
commit 1e3b2ffc91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -333,7 +333,9 @@ class Transactions extends Controller
{ {
event(new TransactionPrinting($transaction)); event(new TransactionPrinting($transaction));
$view = view('banking.transactions.print_default', compact('transaction')); $real_type = $this->getRealTypeTransaction($transaction->type);
$view = view('banking.transactions.print_default', compact('transaction', 'real_type'));
return mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8'); return mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
} }
@ -351,7 +353,9 @@ class Transactions extends Controller
$currency_style = true; $currency_style = true;
$view = view('banking.transactions.print_default', compact('transaction', 'currency_style'))->render(); $real_type = $this->getRealTypeTransaction($transaction->type);
$view = view('banking.transactions.print_default', compact('transaction', 'currency_style', 'real_type'))->render();
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8'); $html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
$pdf = app('dompdf.wrapper'); $pdf = app('dompdf.wrapper');

View File

@ -4,6 +4,6 @@
</x-slot> </x-slot>
<x-slot name="content"> <x-slot name="content">
<x-transactions.template.ddefault type="{{ $transaction->type }}" :transaction="$transaction" /> <x-transactions.template.ddefault type="{{ $real_type }}" :transaction="$transaction" />
</x-slot> </x-slot>
</x-layout-print> </x-layout-print>