diff --git a/app/Models/Product/Host.php b/app/Models/Product/Host.php index 5351513..570aeba 100644 --- a/app/Models/Product/Host.php +++ b/app/Models/Product/Host.php @@ -47,11 +47,13 @@ final class Host extends Type implements ProductItem public function allowance_string(): string { // TODO: Implement allowance_string() method. + return ''; } public function getCostAttribute(): float { // TODO: Implement getCostAttribute() method. + return 0; } public function getSupplierAttribute() diff --git a/resources/views/theme/backend/adminlte/a/product/report.blade.php b/resources/views/theme/backend/adminlte/a/product/report.blade.php index 852a2bb..33e9690 100644 --- a/resources/views/theme/backend/adminlte/a/product/report.blade.php +++ b/resources/views/theme/backend/adminlte/a/product/report.blade.php @@ -21,9 +21,10 @@ ID Service Product - Monthly - Cost - Traffic + Monthly + Cost + Traffic (GB) + Supplier @@ -31,11 +32,12 @@ @foreach (\App\Models\Service::active()->get() as $o) {{ $o->id }} - {{ $o->sname }} + {{ $o->name }} {{ $o->product->name }} - {{ number_format($o->billing_monthly_price,2) }} - {{ $o->product->type ? number_format($o->product->type->cost,2) : 'NO TYPE' }} - {{ $o->product->type ? $o->product->type->allowance_string() : '-' }} + {{ number_format($o->billing_monthly_price,2) }} + {{ number_format(\App\Models\Tax::tax_calc(($s=$o->supplied)->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,1),$o->account->taxes),2) }} + {{ $o->category == 'broadband' ? number_format($o->type->usage_summary(0)->sum()/1000,1) : '-' }} + {{ $o->product->supplier->name }} @endforeach diff --git a/resources/views/theme/backend/adminlte/service/widget/broadband/usagegraph.blade.php b/resources/views/theme/backend/adminlte/service/widget/broadband/usagegraph.blade.php index de5c9a3..4d9db5a 100644 --- a/resources/views/theme/backend/adminlte/service/widget/broadband/usagegraph.blade.php +++ b/resources/views/theme/backend/adminlte/service/widget/broadband/usagegraph.blade.php @@ -1,32 +1,25 @@ -
-
-

Broadband Traffic

+
+
+ + + + + + + + + @foreach ($o->usage_summary(6) as $key => $oo) + + + + + @endforeach + +
PeriodTraffic (GB)
{{ $key }}{{ number_format($oo/1024,2) }}
-
-
-
- - - - - - - - - @foreach ($o->usage_summary(6) as $key => $oo) - - - - - @endforeach - -
PeriodTraffic (GB)
{{ $key }}{{ number_format($oo/1024,2) }}
-
-
-
-
-
+
+
diff --git a/routes/web.php b/routes/web.php index 3152266..9c0c472 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,7 +14,8 @@ use App\Http\Controllers\{AdminController, SearchController, ServiceController, SupplierController, - WelcomeController}; + WelcomeController, + Wholesale\ReportController}; use App\Models\Supplier; /* @@ -94,7 +95,7 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'pref ->whereIn('type',Supplier::offeringTypeKeys()->toArray()) ->where('oo','[0-9]+'); - //Route::get('report/products','Wholesale\ReportController@products'); + Route::get('report/products',[ReportController::class,'products']); // Charges - @todo This should probably go to resellers Route::match(['get','post'],'charge/addedit/{o?}',[AdminController::class,'charge_addedit']); Route::get('charge/unprocessed',[AdminController::class,'charge_unprocessed']);