Merge pull request #3291 from CihanSenturk/fix-transaction-print-and-download-type-issue

Fixed print transaction type issue
This commit is contained in:
Cihan Şentürk 2025-05-15 13:27:43 +03:00 committed by GitHub
commit d252b8bfd3
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));
$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');
}
@ -351,7 +353,9 @@ class Transactions extends Controller
$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');
$pdf = app('dompdf.wrapper');

View File

@ -4,6 +4,6 @@
</x-slot>
<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-layout-print>