Fixed transfer and split transaction show/create pages real_type issue ( #3qec0xc )

This commit is contained in:
Cüneyt Şentürk
2022-10-31 00:43:30 +03:00
parent 6bb35cf3a3
commit 083ea42aa6
4 changed files with 25 additions and 13 deletions

View File

@ -86,8 +86,9 @@ class Transactions extends Controller
public function show(Transaction $transaction)
{
$title = $transaction->isIncome() ? trans_choice('general.receipts', 1) : trans('transactions.payment_made');
$real_type = $this->getRealTypeTransaction($transaction->type);
return view('banking.transactions.show', compact('transaction', 'title'));
return view('banking.transactions.show', compact('transaction', 'title', 'real_type'));
}
/**
@ -98,6 +99,7 @@ class Transactions extends Controller
public function create()
{
$type = request()->get('type', 'income');
$real_type = $this->getRealTypeTransaction($type);
$number = $this->getNextTransactionNumber();
@ -109,6 +111,7 @@ class Transactions extends Controller
return view('banking.transactions.create', compact(
'type',
'real_type',
'number',
'contact_type',
'account_currency_code',