diff --git a/app/Http/Controllers/Portal/Payments.php b/app/Http/Controllers/Portal/Payments.php
index 11a8cb95b..f9f308124 100644
--- a/app/Http/Controllers/Portal/Payments.php
+++ b/app/Http/Controllers/Portal/Payments.php
@@ -3,9 +3,7 @@
namespace App\Http\Controllers\portal;
use App\Abstracts\Http\Controller;
-use App\Models\Banking\Account;
use App\Models\Banking\Transaction;
-use App\Models\Setting\Category;
use App\Utilities\Modules;
class Payments extends Controller
@@ -18,17 +16,11 @@ class Payments extends Controller
*/
public function index()
{
- $payments = Transaction::type('income')->with(['account', 'category'])->where('contact_id', '=', user()->contact->id)->paginate();
+ $payments = Transaction::type('income')->where('contact_id', '=', user()->contact->id)->paginate();
$payment_methods = Modules::getPaymentMethods('all');
- $categories = collect(Category::type('income')->enabled()->pluck('name', 'id'))
- ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
-
- $accounts = collect(Account::enabled()->pluck('name', 'id'))
- ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), '');
-
- return view('portal.payments.index', compact('payments', 'payment_methods', 'categories', 'accounts'));
+ return view('portal.payments.index', compact('payments', 'payment_methods'));
}
/**
diff --git a/app/Http/Controllers/Portal/Transactions.php b/app/Http/Controllers/Portal/Transactions.php
deleted file mode 100644
index 9615eb9a3..000000000
--- a/app/Http/Controllers/Portal/Transactions.php
+++ /dev/null
@@ -1,23 +0,0 @@
-where('contact_id', user()->contact->id)->get();
-
- return view('portal.transactions.index', compact('transactions'));
- }
-}
diff --git a/app/Listeners/Menu/AddPortalItems.php b/app/Listeners/Menu/AddPortalItems.php
index caad2a3ad..608e22910 100644
--- a/app/Listeners/Menu/AddPortalItems.php
+++ b/app/Listeners/Menu/AddPortalItems.php
@@ -16,13 +16,10 @@ class AddPortalItems
{
$menu = $event->menu;
- // Dashboard
$menu->route('portal.dashboard', trans_choice('general.dashboards', 1), [], 1, ['icon' => 'fa fa-tachometer-alt']);
- // Invoices
- $menu->route('portal.invoices.index', trans_choice('general.invoices', 2), [], 2, ['icon' => 'fa fa-money-bill']);
+ $menu->route('portal.invoices.index', trans_choice('general.invoices', 2), [], 2, ['icon' => 'fa fa-file-signature']);
- // Payments
- $menu->route('portal.payments.index', trans_choice('general.payments', 2), [], 3, ['icon' => 'fa fa-shopping-cart']);
+ $menu->route('portal.payments.index', trans_choice('general.payments', 2), [], 3, ['icon' => 'fa fa-money-bill']);
}
}
diff --git a/app/Listeners/Update/V20/Version200.php b/app/Listeners/Update/V20/Version200.php
index 22c3d2bc4..ae67c8123 100644
--- a/app/Listeners/Update/V20/Version200.php
+++ b/app/Listeners/Update/V20/Version200.php
@@ -649,7 +649,6 @@ class Version200 extends Listener
'client-portal' => 'r',
'portal-invoices' => 'r,u',
'portal-payments' => 'r,u',
- 'portal-transactions' => 'r',
'portal-profile' => 'r,u',
],
]);
@@ -837,6 +836,8 @@ class Version200 extends Listener
'resources/assets/js/components/Example.vue',
'resources/assets/sass/_variables.scss',
'resources/assets/sass/app.scss',
+ 'resources/views/expenses/bills/bill.blade.php',
+ 'resources/views/incomes/invoices/invoice.blade.php',
'resources/views/layouts/customer.blade.php',
'resources/views/layouts/link.blade.php',
'resources/views/modules/token/create.blade.php',
diff --git a/database/seeds/Roles.php b/database/seeds/Roles.php
index ebd01b848..98ca30760 100644
--- a/database/seeds/Roles.php
+++ b/database/seeds/Roles.php
@@ -124,7 +124,6 @@ class Roles extends Seeder
'client-portal' => 'r',
'portal-invoices' => 'r,u',
'portal-payments' => 'r,u',
- 'portal-transactions' => 'r',
'portal-profile' => 'r,u',
],
];
diff --git a/resources/assets/js/views/portal/transactions.js b/resources/assets/js/views/portal/transactions.js
deleted file mode 100644
index f1b4f5619..000000000
--- a/resources/assets/js/views/portal/transactions.js
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/**
- * First we will load all of this project's JavaScript dependencies which
- * includes Vue and other libraries. It is a great starting point when
- * building robust, powerful web applications using Vue and Laravel.
- */
-
-require('./../../bootstrap');
-
-import Vue from 'vue';
-
-import Global from './../../mixins/global';
-
-import Form from './../../plugins/form';
-import BulkAction from './../../plugins/bulk-action';
-
-const app = new Vue({
- el: '#app',
-
- mixins: [
- Global
- ],
-
- data: function () {
- return {
- }
- }
-});
diff --git a/resources/views/portal/payments/index.blade.php b/resources/views/portal/payments/index.blade.php
index c0e4a7f3b..a7bc3ca87 100644
--- a/resources/views/portal/payments/index.blade.php
+++ b/resources/views/portal/payments/index.blade.php
@@ -1,6 +1,6 @@
@extends('layouts.portal')
-@section('title', trans_choice('general.payments', 1))
+@section('title', trans_choice('general.payments', 2))
@section('content')
@@ -28,8 +28,8 @@
@sortablelink('paid_at', trans('general.date')) |
@sortablelink('amount', trans('general.amount')) |
- @sortablelink('category.name', trans_choice('general.categories', 1)) |
@sortablelink('payment_method', trans_choice('general.payment_methods', 1)) |
+ @sortablelink('description', trans('general.description')) |
@@ -38,8 +38,8 @@
@date($item->paid_at) |
@money($item->amount, $item->currency_code, true) |
- {{ $item->category ? $item->category->name : trans('general.na') }} |
{{ $payment_methods[$item->payment_method] }} |
+ {{ $item->description }} |
@endforeach
diff --git a/resources/views/portal/payments/show.blade.php b/resources/views/portal/payments/show.blade.php
index 8699d755b..edd3b6d03 100644
--- a/resources/views/portal/payments/show.blade.php
+++ b/resources/views/portal/payments/show.blade.php
@@ -1,25 +1,16 @@
@extends('layouts.portal')
-@section('title', trans_choice('general.invoices', 1))
+@section('title', trans_choice('general.payments', 1))
@section('content')
-
-
-
{{ $payment->contact->name }}
-
-
-
{{ trans('general.date') }}: @date($payment->paid_at)
-
-
-
-
+
-
+
-
-
-
@@ -85,18 +68,16 @@
- {{ trans_choice('general.categories', 1) }} |
- {{ trans_choice('general.payment_methods', 1) }} |
- {{ trans('general.reference') }} |
{{ trans('general.amount') }} |
+ {{ trans_choice('general.payment_methods', 1) }} |
+ {{ trans('general.description') }} |
- {{ $payment->category->name }} |
- {{ $payment_methods[$payment->payment_method] }} |
- {{ $payment->reference }} |
@money($payment->amount, $payment->currency_code, true) |
+ {{ $payment_methods[$payment->payment_method] }} |
+ {{ $payment->description }} |
diff --git a/resources/views/portal/transactions/index.blade.php b/resources/views/portal/transactions/index.blade.php
deleted file mode 100644
index f89cf72c8..000000000
--- a/resources/views/portal/transactions/index.blade.php
+++ /dev/null
@@ -1,59 +0,0 @@
-@extends('layouts.portal')
-
-@section('title', trans_choice('general.transactions', 2))
-
-@section('content')
-
-
-
-
-
-
-
- @sortablelink('paid_at', trans('general.date')) |
- @sortablelink('account.name', trans('accounts.account_name')) |
- @sortablelink('type', trans_choice('general.types', 1)) |
- @sortablelink('category.name', trans_choice('general.categories', 1)) |
- @sortablelink('description', trans('general.description')) |
- @sortablelink('amount', trans('general.amount')) |
-
-
-
-
- @foreach($transactions as $item)
-
- @date($item->date) |
- {{ $item->account->name }} |
- {{ trans_choice('general.payments', 1) }} |
- {{ $item->category->name }} |
- {{ $item->description }} |
- @money($item->amount, $item->currency_code, true) |
-
- @endforeach
-
-
-
-
-
-
-@endsection
-
-@push('scripts_start')
-
-@endpush
diff --git a/routes/portal.php b/routes/portal.php
index 6b9349a7a..8681b8293 100644
--- a/routes/portal.php
+++ b/routes/portal.php
@@ -9,8 +9,6 @@ Route::group(['as' => 'portal.'], function () {
Route::resource('payments', 'Portal\Payments');
- Route::resource('transactions', 'Portal\Transactions');
-
Route::get('profile/read-invoices', 'Portal\Profile@readOverdueInvoices')->name('invoices.read');
Route::resource('profile', 'Portal\Profile');