2018-08-01 07:09:38 +00:00
|
|
|
@extends('adminlte::layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
2021-06-29 06:36:34 +00:00
|
|
|
Invoice #{{ $o->lid }}
|
|
|
|
@endsection
|
|
|
|
@section('page_title')
|
|
|
|
{{ $o->sid }}
|
2018-08-01 07:09:38 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('contentheader_title')
|
2021-06-29 06:36:34 +00:00
|
|
|
Tax Invoice <strong>#{{ $o->lid }}</strong>
|
2018-08-01 07:09:38 +00:00
|
|
|
@endsection
|
|
|
|
@section('contentheader_description')
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('main-content')
|
|
|
|
<!-- Main content -->
|
2019-06-07 13:47:37 +00:00
|
|
|
<div class="invoice p-3 mb-3">
|
2018-08-01 07:09:38 +00:00
|
|
|
<!-- title row -->
|
|
|
|
<div class="row">
|
2021-06-29 06:36:34 +00:00
|
|
|
<div class="col-8">
|
|
|
|
<h2>
|
2021-07-01 23:12:34 +00:00
|
|
|
<img src="{{ $site->site_logo }}">
|
2021-06-29 06:36:34 +00:00
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-4 text-right">
|
|
|
|
<h1 class="text-uppercase">Tax Invoice</h1>
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- info row -->
|
|
|
|
<div class="row invoice-info">
|
2020-04-02 06:34:22 +00:00
|
|
|
<div class="col-4 invoice-col">
|
2019-06-07 13:47:37 +00:00
|
|
|
FROM:
|
|
|
|
<address>
|
2021-07-01 23:12:34 +00:00
|
|
|
<strong>{{ $site->site_name }}</strong><br>
|
|
|
|
{!! join('<br>',$site->address) !!}
|
2020-01-11 02:36:11 +00:00
|
|
|
<br>
|
2021-07-01 23:12:34 +00:00
|
|
|
<strong>Email:</strong> {{ $site->site_email }}<br>
|
|
|
|
<strong>Phone:</strong> {{ $site->site_phone }}
|
2019-06-07 13:47:37 +00:00
|
|
|
</address>
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
|
2020-04-02 06:34:22 +00:00
|
|
|
<div class="col-4 invoice-col">
|
2019-06-07 13:47:37 +00:00
|
|
|
TO:
|
|
|
|
<address>
|
|
|
|
<strong>{{ $o->account->company }}</strong><br>
|
2021-07-01 23:12:34 +00:00
|
|
|
{!! join('<br>',$o->account->address) !!}
|
2020-01-11 02:36:11 +00:00
|
|
|
<br>
|
2021-07-07 07:45:16 +00:00
|
|
|
<strong>Email:</strong> {{ $o->account->user->email }}<br>
|
2019-06-07 13:47:37 +00:00
|
|
|
@if ($o->account->phone)
|
|
|
|
<strong>Phone:</strong> {{ $o->account->phone }}<br>
|
|
|
|
@endif
|
|
|
|
</address>
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
|
2020-05-27 06:09:03 +00:00
|
|
|
<div class="ml-auto col-3">
|
2019-06-08 12:33:03 +00:00
|
|
|
<table class="table table-borderless text-right" style="font-size: 1.1rem;">
|
2020-01-11 02:36:11 +00:00
|
|
|
<tr >
|
2021-06-29 06:36:34 +00:00
|
|
|
<td class="p-0">Issue Date:</td><td class="p-0"><strong>{{ $o->invoice_date->format('Y-m-d') }}</strong></td>
|
2020-01-11 02:36:11 +00:00
|
|
|
</tr>
|
2019-06-08 12:33:03 +00:00
|
|
|
<tr >
|
2021-06-29 06:36:34 +00:00
|
|
|
<td class="p-0">Account:</td><td class="p-0"><strong>{{ $o->account->sid }}</strong></td>
|
|
|
|
</tr>
|
|
|
|
<tr >
|
|
|
|
<td class="p-0">Invoice:</td><td class="p-0"><strong>{{ $o->lid }}</strong></td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="p-0">Payment Due:</td><td class="p-0"><strong>{{ $o->due_date->format('Y-m-d') }}</strong></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
<td class="p-0">This Invoice Due:</td><td class="p-0"><strong>${{ number_format($o->total,$o->currency()->rounding) }}</strong></td>
|
|
|
|
</tr>
|
|
|
|
{{--
|
|
|
|
<!-- @todo -->
|
|
|
|
<tr>
|
|
|
|
<td class="p-0">Total Account Due:</td><td class="p-0"><strong>${{ number_format($o->account->due,$o->currency()->rounding) }}</strong></td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
--}}
|
2019-06-08 12:33:03 +00:00
|
|
|
</table>
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
|
|
|
<!-- Table row -->
|
|
|
|
<div class="row">
|
2019-06-07 13:47:37 +00:00
|
|
|
<div class="col-12 table-responsive">
|
2021-06-29 06:36:34 +00:00
|
|
|
<table class="table table-striped table-hover">
|
2018-08-01 07:09:38 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-06-07 13:47:37 +00:00
|
|
|
<th>Qty</th>
|
|
|
|
<th>Product</th>
|
|
|
|
<th colspan="2">Description</th>
|
|
|
|
<th class="text-right" colspan="3">Subtotal</th>
|
2018-08-01 07:09:38 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2019-07-04 04:55:05 +00:00
|
|
|
|
2018-08-01 07:09:38 +00:00
|
|
|
<tbody>
|
|
|
|
@foreach ($o->products() as $po)
|
|
|
|
<tr id="invoice-services">
|
2019-06-07 13:47:37 +00:00
|
|
|
<td>{{ $po->count }}</td>
|
2021-06-29 06:36:34 +00:00
|
|
|
<td>#{{ $po->lid }}</td>
|
2018-08-01 07:09:38 +00:00
|
|
|
<td colspan="2">{{ $po->name($o->account->user->language) }}</td>
|
2019-06-08 12:33:03 +00:00
|
|
|
<td colspan="3" class="text-right">${{ number_format($o->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$o->currency()->rounding) }}</td>
|
2018-08-01 07:09:38 +00:00
|
|
|
</tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
|
2018-08-01 07:09:38 +00:00
|
|
|
@foreach ($o->product_services($po) as $so)
|
2021-06-29 06:36:34 +00:00
|
|
|
<tr id="invoice-service-items" class="invoice-services @if($o->products()->count() > 1) d-print-table-row @endif">
|
2018-08-01 07:09:38 +00:00
|
|
|
<td colspan="2"> </td>
|
2021-06-29 06:36:34 +00:00
|
|
|
<td colspan="2">Service: <strong>{{ $so->sid }}: {{ $so->name }}</strong></td>
|
2018-08-01 07:09:38 +00:00
|
|
|
<td> </td>
|
|
|
|
<td class="text-right">${{ number_format($o->product_service_items($po,$so)->sum('total'),$o->currency()->rounding) }}</td>
|
|
|
|
<td> </td>
|
|
|
|
</tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
|
2018-08-01 07:09:38 +00:00
|
|
|
@foreach ($o->product_service_items($po,$so) as $io)
|
2021-06-29 06:36:34 +00:00
|
|
|
<tr class="invoice-service-items d-print-table-row">
|
2018-08-01 07:09:38 +00:00
|
|
|
<td colspan="2"> </td>
|
|
|
|
<td width="5%"> </td>
|
|
|
|
<td>{{ $io->item_type_name }}</td>
|
|
|
|
<td class="text-right">${{ number_format($io->total,$o->currency()->rounding) }}</td>
|
|
|
|
<td colspan="2"> </td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
@endforeach
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
2021-06-29 06:36:34 +00:00
|
|
|
<!-- padding -->
|
|
|
|
<div class="row pb-5"></div>
|
|
|
|
|
2018-08-01 07:09:38 +00:00
|
|
|
<div class="row">
|
|
|
|
<!-- accepted payments column -->
|
2019-06-07 13:47:37 +00:00
|
|
|
<div class="col-6">
|
2018-08-01 07:09:38 +00:00
|
|
|
<p class="lead">Payment Methods:</p>
|
|
|
|
{{--
|
|
|
|
<img src="../../dist/img/credit/visa.png" alt="Visa">
|
|
|
|
<img src="../../dist/img/credit/mastercard.png" alt="Mastercard">
|
|
|
|
<img src="../../dist/img/credit/american-express.png" alt="American Express">
|
|
|
|
<img src="../../dist/img/credit/paypal2.png" alt="Paypal">
|
|
|
|
--}}
|
|
|
|
|
|
|
|
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
2020-05-27 06:09:03 +00:00
|
|
|
{!! $o->invoice_text !!}
|
2018-08-01 07:09:38 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- /.col -->
|
2020-05-27 06:09:03 +00:00
|
|
|
<div class="ml-auto col-4">
|
2020-01-11 02:36:11 +00:00
|
|
|
<table class="table">
|
2019-06-08 12:33:03 +00:00
|
|
|
<tr>
|
2021-07-23 07:25:26 +00:00
|
|
|
<th colspan="3" style="width:50%">Subtotal:</th>
|
|
|
|
<td colspan="2" class="text-right">${{ number_format($o->total_sub,$o->currency()->rounding) }}</td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>Tax (GST 10%)</th>
|
2021-07-23 07:25:26 +00:00
|
|
|
<td colspan="2" class="text-right">${{ number_format($o->total_tax,$o->currency()->rounding) }}</td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>Other Charges:</th>
|
2021-06-29 06:36:34 +00:00
|
|
|
<!-- @todo -->
|
2021-07-23 07:25:26 +00:00
|
|
|
<td colspan="2" class="text-right">$0.00</td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">Total:</th>
|
2021-07-23 07:25:26 +00:00
|
|
|
<td colspan="2" class="text-right">${{ number_format($o->total,$o->currency()->rounding) }}</td>
|
2019-06-08 12:33:03 +00:00
|
|
|
</tr>
|
2019-07-04 04:55:05 +00:00
|
|
|
@if($o->id)
|
2020-07-27 04:49:59 +00:00
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>Payments To Clear:</th>
|
2021-07-23 07:25:26 +00:00
|
|
|
<td colspan="2" class="text-right">${{ number_format($o->paid_pending,$o->currency()->rounding) }}</td>
|
2020-07-27 04:49:59 +00:00
|
|
|
</tr>
|
2019-07-04 04:55:05 +00:00
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>Payments:</th>
|
2021-07-23 07:25:26 +00:00
|
|
|
<td>#{{ $o->payments->pluck('id')->join(', #') }}</td>
|
2019-07-04 04:55:05 +00:00
|
|
|
<td class="text-right">${{ number_format($o->paid,$o->currency()->rounding) }}</td>
|
|
|
|
</tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
<tr style="font-size: 145%">
|
|
|
|
<th colspan="2">Invoice Due:</th>
|
2021-07-23 07:25:26 +00:00
|
|
|
<td colspan="2" class="text-right">${{ number_format($o->due,$o->currency()->rounding) }}</td>
|
2019-07-04 04:55:05 +00:00
|
|
|
</tr>
|
|
|
|
@endif
|
2019-06-08 12:33:03 +00:00
|
|
|
</table>
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
|
|
|
<!-- this row will not appear when printing -->
|
2019-06-08 12:33:03 +00:00
|
|
|
<div class="row d-print-none">
|
2019-06-07 13:47:37 +00:00
|
|
|
<div class="col-12">
|
2021-06-29 06:36:34 +00:00
|
|
|
<a href="javascript:window.print();" class="btn btn-default"><i class="fas fa-print"></i> Print</a>
|
2019-07-04 04:55:05 +00:00
|
|
|
@if($o->id)
|
2020-07-27 04:49:59 +00:00
|
|
|
<a href="{{ url('u/invoice/cart',$o->id) }}" class="btn btn-success float-right">
|
2021-06-29 06:36:34 +00:00
|
|
|
<i class="fas fa-credit-card"></i> Pay
|
2020-07-27 04:49:59 +00:00
|
|
|
</a>
|
|
|
|
<a href="{{ url(sprintf('u/invoice/%s/pdf',$o->id)) }}" class="btn btn-primary float-right mr-2">
|
2021-06-29 06:36:34 +00:00
|
|
|
<i class="fas fa-download"></i> Download PDF
|
2019-07-04 04:55:05 +00:00
|
|
|
</a>
|
|
|
|
@endif
|
2018-08-01 07:09:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-07 13:47:37 +00:00
|
|
|
</div>
|
2018-08-01 07:09:38 +00:00
|
|
|
<!-- /.content -->
|
2019-06-08 12:33:03 +00:00
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
2021-06-29 06:36:34 +00:00
|
|
|
@endsection
|