diff --git a/app/Http/Controllers/Wholesale/ReportController.php b/app/Http/Controllers/Wholesale/ReportController.php
index 5135100..20f8c50 100644
--- a/app/Http/Controllers/Wholesale/ReportController.php
+++ b/app/Http/Controllers/Wholesale/ReportController.php
@@ -11,6 +11,11 @@ class ReportController extends Controller
return view('account/report');
}
+ public function products()
+ {
+ return view('product/report');
+ }
+
public function services()
{
return view('service/report');
diff --git a/resources/views/theme/backend/adminlte/product/report.blade.php b/resources/views/theme/backend/adminlte/product/report.blade.php
new file mode 100644
index 0000000..96367ef
--- /dev/null
+++ b/resources/views/theme/backend/adminlte/product/report.blade.php
@@ -0,0 +1,92 @@
+@extends('adminlte::layouts.app')
+
+@section('htmlheader_title')
+ Product List
+@endsection
+@section('page_title')
+ Product List
+@endsection
+
+@section('contentheader_title')
+ Product List
+@endsection
+@section('contentheader_description')
+@endsection
+
+@section('main-content')
+
+
+
+
+
+
+ ID |
+ Type |
+ Product |
+ Services |
+
+
+
+
+ @foreach (\App\Models\Service::active()->with(['product.translate'])->get()->groupBy('product_id') as $s)
+
+ {{ $x->id }} |
+ {{ $x->category_name }} |
+ {{ $x->product->name }} |
+ {{ $s->count() }} |
+
+ @endforeach
+
+
+
+
+
+@endsection
+
+@section('page-scripts')
+ @css(datatables,bootstrap4|fixedheader|responsive|rowgroup|buttons)
+ @js(datatables,bootstrap4|fixedheader|responsive|rowgroup|buttons)
+
+
+
+
+@append
\ No newline at end of file
diff --git a/resources/views/theme/backend/adminlte/service/report.blade.php b/resources/views/theme/backend/adminlte/service/report.blade.php
index 1dacc84..d4ebe90 100644
--- a/resources/views/theme/backend/adminlte/service/report.blade.php
+++ b/resources/views/theme/backend/adminlte/service/report.blade.php
@@ -15,34 +15,38 @@
@section('main-content')
-
-
-
- ID |
- Service |
- Product |
- Monthly |
- Cost |
- Traffic (GB) |
- Supplier |
-
-
+
+
+
+
+
+ ID |
+ Service |
+ Product |
+ Monthly |
+ Cost |
+ Traffic (GB) |
+ Supplier |
+
+
-
- {{-- @todo This query is expensive still --}}
- @foreach (\App\Models\Service::active()->with(['type','product.type.supplied.supplier_detail.supplier','product.translate'])->get() as $o)
-
- {{ $o->id }} |
- {{ $o->name }} |
- {{ $o->product->name }} |
- {{ number_format($o->billing_monthly_price,2) }} |
- {{ number_format($o->product->cost_normalized(),2) }} |
- {{ $o->category == 'broadband' ? number_format($o->type->usage_summary(0)->sum()/1000,1) : '-' }} |
- {{ $o->product->supplier->name }} |
-
- @endforeach
-
-
+
+ {{-- @todo This query is expensive still --}}
+ @foreach (\App\Models\Service::active()->with(['type','product.type.supplied.supplier_detail.supplier','product.translate'])->get() as $o)
+
+ {{ $o->id }} |
+ {{ $o->name }} |
+ {{ $o->product->name }} |
+ {{ number_format($o->billing_monthly_price,2) }} |
+ {{ number_format($o->product->cost_normalized(),2) }} |
+ {{ $o->category == 'broadband' ? number_format($o->type->usage_summary(0)->sum()/1000,1) : '-' }} |
+ {{ $o->product->supplier->name }} |
+
+ @endforeach
+
+
+
+
@endsection
diff --git a/resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php b/resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php
index e4df00b..3d6750e 100644
--- a/resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php
+++ b/resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php
@@ -119,8 +119,8 @@
-