Fix invoice emailing, and improved formatting
This commit is contained in:
parent
b065d15f60
commit
ffcab790fc
@ -11,7 +11,7 @@ use Illuminate\Support\Arr;
|
|||||||
use Leenooks\Traits\ScopeActive;
|
use Leenooks\Traits\ScopeActive;
|
||||||
|
|
||||||
use App\Interfaces\IDs;
|
use App\Interfaces\IDs;
|
||||||
use App\Traits\PushNew;
|
use App\Traits\{PushNew,SiteID};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Invoice
|
* Class Invoice
|
||||||
@ -34,7 +34,7 @@ use App\Traits\PushNew;
|
|||||||
*/
|
*/
|
||||||
class Invoice extends Model implements IDs
|
class Invoice extends Model implements IDs
|
||||||
{
|
{
|
||||||
use Compoships,PushNew,ScopeActive;
|
use Compoships,PushNew,ScopeActive,SiteID;
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'reminders'=>'json',
|
'reminders'=>'json',
|
||||||
|
@ -9,9 +9,9 @@ A new invoice has been generated on your account. A summary of that invoice is b
|
|||||||
@foreach ($invoice->products() as $po)
|
@foreach ($invoice->products() as $po)
|
||||||
| {{ $po->count }} | {{ $po->product_id }} | {{ $po->name }} | ${{ number_format($invoice->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$invoice->currency()->rounding) }} |
|
| {{ $po->count }} | {{ $po->product_id }} | {{ $po->name }} | ${{ number_format($invoice->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$invoice->currency()->rounding) }} |
|
||||||
@endforeach
|
@endforeach
|
||||||
||| Sub Total | ${{ $invoice->sub_total }} |
|
||| Sub Total | ${{ number_format($invoice->sub_total,2) }} |
|
||||||
||| Tax | ${{ $invoice->tax_total }} |
|
||| Tax | ${{ number_format($invoice->tax_total,2) }} |
|
||||||
||| Total | ${{ $invoice->total }} |
|
||| Total | ${{ number_format($invoice->total,2) }} |
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
If you would like a PDF copy of that invoice, please click on the link below:
|
If you would like a PDF copy of that invoice, please click on the link below:
|
||||||
|
Loading…
Reference in New Issue
Block a user