Fixed transaction missing type issue and fixed recurring vue exception..

This commit is contained in:
Cüneyt Şentürk
2023-06-16 14:18:52 +03:00
parent a411107a5f
commit 1d12f1115a
10 changed files with 40 additions and 14 deletions

View File

@ -63,9 +63,9 @@ class RecurringTransactions extends Controller
*/
public function create()
{
$type = request()->get('type', 'income-recurring');
$real_type = request()->get('real_type', $this->getRealTypeOfRecurringTransaction($type));
$contact_type = config('type.transaction.' . $real_type . '.contact_type');
$type = $this->getTypeRecurringTransaction(request()->get('type', 'income-recurring'));
$real_type = $this->getTypeTransaction(request()->get('real_type', $this->getRealTypeOfRecurringTransaction($type)));
$contact_type = config('type.transaction.' . $real_type . '.contact_type', 'customer');
$number = $this->getNextTransactionNumber('-recurring');
@ -139,8 +139,8 @@ class RecurringTransactions extends Controller
public function edit(Transaction $recurring_transaction)
{
$type = $recurring_transaction->type;
$real_type = request()->get('real_type', $this->getRealTypeOfRecurringTransaction($type));
$contact_type = config('type.transaction.' . $real_type . '.contact_type');
$real_type = $this->getTypeTransaction(request()->get('real_type', $this->getRealTypeOfRecurringTransaction($type)));
$contact_type = config('type.transaction.' . $real_type . '.contact_type', 'customer');
$number = $this->getNextTransactionNumber('-recurring');

View File

@ -98,7 +98,7 @@ class Transactions extends Controller
*/
public function create()
{
$type = request()->get('type', 'income');
$type = $this->getTypeTransaction(request()->get('type', 'income'));
$real_type = $this->getRealTypeTransaction($type);
$number = $this->getNextTransactionNumber($type);