Enable invoice emailing

This commit is contained in:
Deon George
2020-05-25 17:45:17 +10:00
parent cbffda959d
commit 32c562cf30
8 changed files with 351 additions and 78 deletions

View File

@@ -0,0 +1,25 @@
@component('mail::message',['site'=>$site,'heading'=>'Invoice: '.$invoice->id])
Hi {{ isset($user) ? $user->name.',' : '' }}
A new invoice has been generated on your account. A summary of that invoice is below.
@component('mail::table')
| # | ID | Name | Amount |
| -: | - |:-----| ------:|
@foreach ($invoice->products() as $po)
| {{ $po->count }} | {{ $po->product_id }} | {{ $po->name($invoice->account->user->language) }} | ${{ number_format($invoice->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$invoice->currency()->rounding) }} |
@endforeach
||| Sub Total | ${{ $invoice->sub_total }} |
||| Tax | ${{ $invoice->tax_total }} |
||| Total | ${{ $invoice->total }} |
@endcomponent
If you would like a PDF copy of that invoice, please click on the link below:
@component('mail::panel',['url'=>$invoice->download_link()])
Download PDF
@endcomponent
Thanks,<br>
{{ config('mail.from.name') }}
@endcomponent