Move email/ resources to mail/, added invoice generated email to admin, updated email template

This commit is contained in:
2024-08-03 10:06:25 +10:00
parent f8453ae391
commit 0469d64577
40 changed files with 439 additions and 213 deletions

View File

@@ -0,0 +1,25 @@
@component('mail::message',['site'=>$site,'heading'=>'Invoice: #'.$io->id,'subheading'=>sprintf('Due: <strong>%s</strong>',$io->due_at->format('Y-m-d'))])
Hi {{ isset($user) ? $user->name_full.',' : '' }}
A new invoice has been generated for <strong>{{ $io->account->name }}</strong>. A summary of that invoice is below:
@component('mail::table')
| ID | # | Name | Amount |
| -: | -: |:-----| ------:|
@foreach ($io->summary_products() as $item)
| {{ $item['product']->lid }} | {{ $item['services']->count() }} | {{ $item['product']->name }} | ${{ number_format($item['total'],2) }} |
@endforeach
||| Sub Total | ${{ number_format($io->sub_total,2) }} |
||| Tax | ${{ number_format($io->tax_total,2) }} |
||| **Total** | **${{ number_format($io->total,2) }}** |
@endcomponent
This invoice will be automatically emailed in {{ config('osb.invoice_review') }} days time.
@component('mail::button',['url'=>url('u/invoice',$io->id)])
Review
@endcomponent
Thanks,<br>
{{ config('mail.from.name') }}
@endcomponent

View File

@@ -0,0 +1,26 @@
@component('mail::message',['site'=>$site,'heading'=>'New Order'])
Please order the following...
@component('mail::table')
| Service | Details |
| :---------- | :---------------- |
| Logged User | {{ Auth::user() ? Auth::user()->id : '-' }} |
| Account | {{ $service->account->name }} |
| Service ID | {{ $service->sid }} |
| Product | {{ $service->product->name }} |
@switch($service->product->category)
@case('broadband')
| Address | {{ $service->type->service_address }} |
@break;
@case('phone')
| Number | {{ $service->type->service_number }} |
| Supplier Details | {{ $service->order_info->join(':') }} |
@break;
@endswitch
@endcomponent
**NOTES:** {{ $notes }}
Thanks,<br>
{{ config('app.name') }}
@endcomponent

View File

@@ -0,0 +1,25 @@
@component('mail::message',['site'=>$site])
# Your order was rejected.
@component('mail::table')
| Service | Details |
| :---------- | :---------------- |
| Account | {{ $service->account->name }} |
| Service ID | {{ $service->sid }} |
| Product | {{ $service->product->name }} |
@switch($service->product->category)
@case('broadband')
| Address | {{ is_object($service->type) ? $service->type->service_address : 'Not Supplied' }} |
@break;
@case('phone')
| Address | {{ is_object($service->type) ? $service->type->service_address : 'Not Supplied' }} |
| Supplier Details | {{ join(':',$service->order_info) }} |
@break;
@endswitch
@endcomponent
**REASON:** {{ $reason }}
Thanks,<br>
{{ config('app.name') }}
@endcomponent

View File

@@ -0,0 +1,26 @@
@component('mail::message',['site'=>$site,'heading'=>'Cancel Service Request'])
Please cancel the following...
@component('mail::table')
| Service | Details |
| :---------- | :---------------- |
| Logged User | {{ Auth::user()->id ?? 'System' }} |
| Account | {{ $service->account->name }} |
| Service ID | {{ $service->sid }} |
| Product | {{ $service->product->name }} |
@switch($service->product->category)
@case('broadband')
| Address | {{ $service->type->service_address }} |
@break;
@case('phone')
| Number | {{ $service->type->service_number }} |
| Supplier Details | {{ $service->order_info->join(':') }} |
@break;
@endswitch
@endcomponent
**NOTES:** {{ $notes }}
Thanks,<br>
{{ config('app.name') }}
@endcomponent

View File

@@ -0,0 +1,26 @@
@component('mail::message',['site'=>$site,'heading'=>'Change Service Request'])
Please change the following...
@component('mail::table')
| Service | Details |
| :---------- | :---------------- |
| Logged User | {{ Auth::user() ? Auth::user()->id : '-' }}
| Account | {{ $service->account->name }} |
| Service ID | {{ $service->sid }} |
| Product | {{ $service->product->name }} |
@switch($service->product->category)
@case('broadband')
| Address | {{ $service->type->service_address }} |
@break;
@case('phone')
| Number | {{ $service->type->service_number }} |
| Supplier Details | {{ $service->order_info->join(':') }} |
@break;
@endswitch
@endcomponent
**NOTES:** {{ $notes }}
Thanks,<br>
{{ config('app.name') }}
@endcomponent