From d7cfad76dd4430ec61e902fd1905282bde9430fc Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 3 Dec 2019 10:07:52 +0530 Subject: [PATCH 1/7] Update index.blade.php --- resources/views/banking/transactions/index.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index 71b61c88e..d8eec803d 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -46,7 +46,14 @@ {{ trans_choice('general.' . Str::plural($item->type), 1) }} {{ $item->category->name }} {{ $item->description }} - @money($item->amount, $item->currency_code, true) + @if(!is_null($item->bill_id)) + @else + + + @money($item->amount, $item->currency_code, true) + + + @endif @endforeach From a5fdf0ccc8ea2aa75c51c74bef0a3dc08d73089c Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 3 Dec 2019 10:13:16 +0530 Subject: [PATCH 2/7] Update Transactions.php --- app/Http/Controllers/Banking/Transactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Banking/Transactions.php b/app/Http/Controllers/Banking/Transactions.php index bfa13b243..338205248 100644 --- a/app/Http/Controllers/Banking/Transactions.php +++ b/app/Http/Controllers/Banking/Transactions.php @@ -28,7 +28,7 @@ class Transactions extends Controller $request_type = !request()->has('type') ? ['income', 'expense'] : request('type'); $categories = Category::enabled()->type($request_type)->orderBy('name')->pluck('name', 'id'); - $transactions = Transaction::with(['account', 'category', 'contact'])->collect(['paid_at'=> 'desc']); + $transactions = Transaction::with(['account', 'category', 'contact'])->with('bill:id')->collect(['paid_at'=> 'desc']); return view('banking.transactions.index', compact('transactions', 'accounts', 'types', 'categories')); } From ecfbbd0a0332b2160fe72f86265dac57849e1306 Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 3 Dec 2019 10:15:11 +0530 Subject: [PATCH 3/7] Update index.blade.php --- resources/views/banking/transactions/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index d8eec803d..a3596a6be 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -46,10 +46,10 @@ {{ trans_choice('general.' . Str::plural($item->type), 1) }} {{ $item->category->name }} {{ $item->description }} - @if(!is_null($item->bill_id)) + @if(!is_null(data_get($item, 'bill.id'))) @else - + @money($item->amount, $item->currency_code, true) From 087442adaaf4192ce6ca4f1245132d705bf984bd Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 3 Dec 2019 16:40:52 +0530 Subject: [PATCH 4/7] Update index.blade.php --- resources/views/banking/transactions/index.blade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index a3596a6be..e685caf89 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -46,7 +46,8 @@ {{ trans_choice('general.' . Str::plural($item->type), 1) }} {{ $item->category->name }} {{ $item->description }} - @if(!is_null(data_get($item, 'bill.id'))) + @if(is_null(data_get($item, 'bill.id'))) + @money($item->amount, $item->currency_code, true) @else From ff37a26ab78c57e6ac48a1d53c373d92a5daac9c Mon Sep 17 00:00:00 2001 From: sausin Date: Fri, 6 Dec 2019 15:53:21 +0530 Subject: [PATCH 5/7] Update Transactions.php --- app/Http/Controllers/Banking/Transactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Banking/Transactions.php b/app/Http/Controllers/Banking/Transactions.php index 338205248..ccb046f75 100644 --- a/app/Http/Controllers/Banking/Transactions.php +++ b/app/Http/Controllers/Banking/Transactions.php @@ -28,7 +28,7 @@ class Transactions extends Controller $request_type = !request()->has('type') ? ['income', 'expense'] : request('type'); $categories = Category::enabled()->type($request_type)->orderBy('name')->pluck('name', 'id'); - $transactions = Transaction::with(['account', 'category', 'contact'])->with('bill:id')->collect(['paid_at'=> 'desc']); + $transactions = Transaction::with(['account', 'category', 'contact', 'bill:id'])->collect(['paid_at'=> 'desc']); return view('banking.transactions.index', compact('transactions', 'accounts', 'types', 'categories')); } From 0ea1e9474e4cef580d31615a47f3ba98f3a94353 Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 10 Dec 2019 11:36:21 +0530 Subject: [PATCH 6/7] Update Transactions.php --- app/Http/Controllers/Banking/Transactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Banking/Transactions.php b/app/Http/Controllers/Banking/Transactions.php index ccb046f75..fcc639375 100644 --- a/app/Http/Controllers/Banking/Transactions.php +++ b/app/Http/Controllers/Banking/Transactions.php @@ -28,7 +28,7 @@ class Transactions extends Controller $request_type = !request()->has('type') ? ['income', 'expense'] : request('type'); $categories = Category::enabled()->type($request_type)->orderBy('name')->pluck('name', 'id'); - $transactions = Transaction::with(['account', 'category', 'contact', 'bill:id'])->collect(['paid_at'=> 'desc']); + $transactions = Transaction::with(['account', 'category', 'contact', 'bill:id', 'invoice.id'])->collect(['paid_at'=> 'desc']); return view('banking.transactions.index', compact('transactions', 'accounts', 'types', 'categories')); } From 68607051acf0d9cb67df61cf3270d91ebced1545 Mon Sep 17 00:00:00 2001 From: sausin Date: Tue, 10 Dec 2019 11:38:54 +0530 Subject: [PATCH 7/7] Update index.blade.php --- resources/views/banking/transactions/index.blade.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index e685caf89..7218078c9 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -46,14 +46,20 @@ {{ trans_choice('general.' . Str::plural($item->type), 1) }} {{ $item->category->name }} {{ $item->description }} - @if(is_null(data_get($item, 'bill.id'))) - @money($item->amount, $item->currency_code, true) - @else + @if(!is_null(data_get($item, 'bill.id'))) @money($item->amount, $item->currency_code, true) + @elseif(!is_null(data_get($item, 'invoice.id'))) + + + @money($item->amount, $item->currency_code, true) + + + @else + @money($item->amount, $item->currency_code, true) @endif @endforeach