Minor fix for invoice

This commit is contained in:
Deon George 2019-06-07 23:47:37 +10:00
parent 78d55fb423
commit d8b9bb9188
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 45 additions and 85 deletions

View File

@ -60,7 +60,6 @@ class EzypayImport extends Command
{
$this->info(sprintf('Ignoring INACTIVE: [%s] %s %s',$c->EzypayReferenceNumber,$c->Firstname,$c->Surname));
continue;
}
// Load Account Details from ReferenceId
@ -114,4 +113,4 @@ class EzypayImport extends Command
}
}
}
}

View File

@ -5,7 +5,7 @@
@endsection
@section('contentheader_title')
Invoice #
Invoice #{{ $o->id }}
@endsection
@section('contentheader_description')
{{ $o->invoice_account_id }}
@ -13,112 +13,75 @@
@section('main-content')
<!-- Main content -->
<section class="invoice">
<div class="invoice p-3 mb-3">
<!-- title row -->
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<div class="col-12">
<h4>
<i class="fa fa-globe"></i> {{ $so->site_name }}
<small class="pull-right">Date: {{ $o->invoice_date}}</small>
</h2>
</h4>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info">
<div class="col-sm-3 invoice-col">
<table class="table-condensed">
<tr>
<th>FROM:</th>
<td><strong>{{ $so->site_name }}</strong></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>{!! $so->address('html') !!}</td>
</tr>
<tr>
<th>Phone</th>
<td>{{ $so->site_phone }}</td>
</tr>
<tr>
<th>Email</th>
<td>{{ $so->site_email }}</td>
</tr>
</table>
<div class="col-sm-4 invoice-col">
FROM:
<address>
<strong>{{ $so->site_name }}</strong><br>
{!! $so->address('html') !!}<br>
<strong>Email:</strong> {{ $so->site_email }}<br>
<strong>Phone:</strong> {{ $so->site_phone }}
</address>
</div>
<div class="col-md-offset-1 col-sm-3 invoice-col">
<table class="table table-condensed">
<tr>
<th>TO:</th>
<td><strong>{{ $o->account->company }}</strong></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>{!! $o->account->address('html') !!}</td>
</tr>
<tr>
@if ($o->account->phone)
<th>Phone</th>
<td>{{ $so->site_phone }}</td>
@else
<td colspan="2>">&nbsp;</td>
@endif
</tr>
<tr>
<th>Email</th>
<td>{{ $o->account->email }}</td>
</tr>
<tr>
<th>Account</th>
<td>{{ $o->account->account_id }}</td>
</tr>
</table>
<div class="col-sm-4 invoice-col">
TO:
<address>
<strong>{{ $o->account->company }}</strong><br>
{!! $o->account->address('html') !!}<br>
<strong>Email:</strong> {{ $o->account->email }}<br>
@if ($o->account->phone)
<strong>Phone:</strong> {{ $o->account->phone }}<br>
@endif
<strong>Account:</strong> {{ $o->account->account_id }}
</address>
</div>
<div class="col-md-offset-2 col-sm-3 invoice-col">
<table class="table table-condensed">
<tr>
<th class="lead">Invoice #</th>
<td class="lead text-right"><strong>{{ $o->invoice_id }}</strong></td>
</tr>
<tr>
<th class="lead">Payment Due</th>
<td class="lead text-right"><strong>{{ $o->due_date->format('Y-m-d') }}</strong></td>
</tr>
<tr>
<th class="lead">Total</th>
<td class="lead text-right"><strong>${{ number_format($o->total,$o->currency()->rounding) }}</strong></td>
</tr>
</table>
<div class="col-sm-4 invoice-col">
Invoice <strong>{{ $o->invoice_id }}</strong><br>
<br>
Payment Due: <strong>{{ $o->due_date->format('Y-m-d') }}</strong><br>
Total: <strong>${{ number_format($o->total,$o->currency()->rounding) }}</strong>
</div>
</div>
<!-- /.row -->
<!-- Table row -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table id="restripe" class="table table-bordered table-striped" width="100%">
<div class="col-12 table-responsive">
<table id="restripe" class="table table-striped" width="100%">
<thead>
<tr>
<th class="col-sm-1 text-right">Qty</th>
<th class="col-sm-1">Product</th>
<th class="col-sm-8" colspan="2">Description</th>
<th class="col-sm-2 text-right" colspan="3">Subtotal</th>
<th>Qty</th>
<th>Product</th>
<th colspan="2">Description</th>
<th class="text-right" colspan="3">Subtotal</th>
</tr>
</thead>
<tbody>
@foreach ($o->products() as $po)
<tr id="invoice-services">
<td class="text-right">{{ $po->count }}</td>
<td>{{ $po->count }}</td>
<td>{{ $po->product_id }}</td>
<td colspan="2">{{ $po->name($o->account->user->language) }}</td>
<td colspan="2">&nbsp;</td>
<td class="text-right">${{ number_format($o->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$o->currency()->rounding) }}</td>
</tr>
@foreach ($o->product_services($po) as $so)
<tr id="invoice-service-items" class="invoice-services @if($o->products()->count() > 1) visible-print @endif">
<tr id="invoice-service-items" class="invoice-services @if($o->products()->count() > 1) visible-print @endif d-none">
<td colspan="2">&nbsp;</td>
<td colspan="2">Service: <strong>{{ $so->service_id }}: {{ $so->name }}</strong></td>
<td>&nbsp;</td>
@ -126,7 +89,7 @@
<td>&nbsp;</td>
</tr>
@foreach ($o->product_service_items($po,$so) as $io)
<tr class="invoice-service-items visible-print">
<tr class="invoice-service-items visible-print d-none">
<td colspan="2">&nbsp;</td>
<td width="5%">&nbsp;</td>
<td>{{ $io->item_type_name }}</td>
@ -145,7 +108,7 @@
<div class="row">
<!-- accepted payments column -->
<div class="col-xs-6">
<div class="col-6">
<p class="lead">Payment Methods:</p>
{{--
<img src="../../dist/img/credit/visa.png" alt="Visa">
@ -160,7 +123,7 @@
</div>
<!-- /.col -->
<div class="col-xs-offset-2 col-xs-4">
<div class="col-6">
<div class="table-responsive">
<table class="table">
<tr>
@ -199,7 +162,7 @@
<!-- this row will not appear when printing -->
<div class="row no-print">
<div class="col-xs-12">
<div class="col-12">
<a href="javascript:window.print();" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
<button type="button" class="btn btn-success pull-right"><i class="fa fa-credit-card"></i> Submit Payment</button>
<a href="{{ url(sprintf('u/invoice/%s/pdf',$o->id)) }}" class="btn btn-primary pull-right" style="margin-right: 5px;">
@ -207,10 +170,8 @@
</a>
</div>
</div>
</section>
</div>
<!-- /.content -->
<div class="clearfix"></div>
@endsection
@section('page-scripts')
@ -232,11 +193,11 @@
});
$('tr[id="invoice-services"]').click(function() {
$(".invoice-services").toggleClass("visible-print");
$(".invoice-services").toggleClass("d-none");
});
$('tr[id="invoice-service-items"]').click(function() {
$(".invoice-service-items").toggleClass("visible-print");
$(".invoice-service-items").toggleClass("d-none");
});
})
</script>