diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index afbcd3f..59e17a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,6 @@ variables: cache: paths: - vendor/ - - node_modules/ # This is a basic example for a gem or script which doesn't use # services such as redis or postgres diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 00fbc3c..9fef49a 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -117,7 +117,9 @@ class OrderController extends Controller $options->save(); } - Mail::to('help@graytech.net.au')->queue((new OrderRequest($so,$request->input('options.notes')))->onQueue('email')); //@todo Get email from DB. + Mail::to('help@graytech.net.au') + ->queue((new OrderRequest($so,$request->input('options.notes')))->onQueue('email')); //@todo Get email from DB. + return view('order_received',['o'=>$so]); } } \ No newline at end of file diff --git a/app/Mail/OrderRequest.php b/app/Mail/OrderRequest.php index 90f1466..13dcd54 100644 --- a/app/Mail/OrderRequest.php +++ b/app/Mail/OrderRequest.php @@ -37,10 +37,12 @@ class OrderRequest extends Mailable { switch (get_class($this->service->type)) { - case 'App\Models\Service\Adsl': $subject = sprintf('NBN: %s',$this->service->type->service_address); + case 'App\Models\Service\Adsl': + $subject = sprintf('NBN: %s',$this->service->type->service_address); break; - case 'App\Models\Service\Voip': $subject = sprintf('VOIP: %s',$this->service->type->service_number); + case 'App\Models\Service\Voip': + $subject = sprintf('VOIP: %s',$this->service->type->service_number); break; default: diff --git a/app/User.php b/app/User.php index 35a017f..afa9b3c 100644 --- a/app/User.php +++ b/app/User.php @@ -133,6 +133,16 @@ class User extends Authenticatable ->with(['account','product','invoices.items.tax','type']); } + /** + * The site this user is configured to access + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function site() + { + return $this->belongsTo(Site::class); + } + /** * This users supplier/reseller * diff --git a/resources/theme/backend/adminlte/r/invoice/widget/next.blade.php b/resources/theme/backend/adminlte/r/invoice/widget/next.blade.php new file mode 100644 index 0000000..f1c0a8a --- /dev/null +++ b/resources/theme/backend/adminlte/r/invoice/widget/next.blade.php @@ -0,0 +1,30 @@ +
{{ $oo->first()->product->name }} | +${{ number_format($oo->sum('total'),2) }} | +|||
---|---|---|---|---|
{{ $ooo->first()->service->sid }} | +{{ $ooo->first()->service->sname }}: {{ $ooo->first()->service->sdesc }} | +|||
+ | + | {{ $io->item_type_name }} | +${{ number_format($io->total,2) }} | +|
TOTAL | +${{ number_format($x->sum('total'),2) }} | +