enhance invoice display

This commit is contained in:
ludo
2023-12-03 02:20:41 +01:00
parent ec509df665
commit b5da5fc881
12 changed files with 152 additions and 150 deletions

View File

@@ -1,37 +1,40 @@
{{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" id="id" value="{{ $invoice['id'] ?? false }}">
<div class="row">
<div class="col-6">
<div class="col-9">
<h5>
<a href="{{ route('Admin.Shop.Orders.edit', ['id' => $invoice['order_id']]) }}" class="btn btn-success">
<i class="fa fa-truck"></i>
</a>
Facture {{ $invoice['ref'] }}
du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
<span class="small">
du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
</span>
</h5>
</div>
<div class="col-6 text-right">
@include('components.form.buttons.button-save')
<div class="col-3 text-right">
<x-save />
</div>
</div>
<div class="row mb-3">
<div class="col-6">
<h3>
{{ $invoice['order']['customer']['last_name'] }}
<h5>
{{ $invoice['order']['customer']['first_name'] }}
</h3>
<div class="row">
<div class="col-12">
<h6>
@if ($invoice['order']['delivery_address'])
{{ $invoice['order']['delivery_address']['address'] }}<br />
@isset($invoice['order']['delivery_address']['address2'])
{{ $invoice['order']['delivery_address']['address2'] }}<br />
@endisset
{{ $invoice['order']['delivery_address']['zipcode'] }}
{{ $invoice['order']['delivery_address']['city'] }}<br />
@endif
</h6>
</div>
</div>
{{ $invoice['order']['customer']['last_name'] }}
@if ($invoice['order']['customer']['company'])
<br>
{{ $invoice['order']['customer']['company'] }}
@endif
</h5>
@if ($invoice['order']['delivery_address'])
<x-card title="Adresse de facturation" classBody="mt-3">
@include('components.address-view', [
'address' => $invoice['order']['delivery_address'],
])
</x-card>
@endif
</div>
<div class="col-6">
<div class="row mb-3">

View File

@@ -1,14 +1,14 @@
@extends('layout.index', [
'title' => __('shop.invoice_payments.title'),
'subtitle' => __('shop.invoice_payments.list'),
'breadcrumb' => [__('shop.invoice_payments.title')],
'title' => __('shop.invoices.title'),
'subtitle' => __('shop.invoices.list'),
'breadcrumb' => [__('shop.invoices.title')],
])
@section('content')
<x-card>
@include('components.datatable', [
'route' => route('Admin.Shop.InvoicePayments.index'),
'model' => 'invoice_payments',
'route' => route('Admin.Shop.Invoices.index'),
'model' => 'invoices',
])
</x-card>
@endsection