ldc-supportweb/resources/views/bo/pages/invoices/show.blade.php

122 lines
7.1 KiB
PHP

@extends('layout.app', ['brParam' => $invoiceModel])
@section('title', __('Aperçu d\'un :model', ['model' => __('models.classes.invoices')]))
@section('description', __('Aperçu d\'un :model déjà existant', ['model' => __('models.classes.invoices')]))
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-3">
<div class="d-flex flex-row align-items-start">
<a href="{{ route('bo.invoices.index', ['status' => \App\Enums\Invoices\InvoiceStatusEnum::opened]) }}"
class="btn btn-primary text-decoration-none m-0 me-2"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ __('crud.helpers.list_all', ['model' => __('models.classes.invoices')]) }}">
<i class="fa-solid fa-arrow-left"></i>
</a>
@include('breadcrumbs.breadcrumb-body', ['brParam' => $invoiceModel])
</div>
<div class="mb-2 mb-md-0">
<div class="btn-group" role="group">
<a class="btn btn-primary"
href="{{ route('bo.invoices.edit', ['invoice' => $invoiceModel->id]) }}"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ __('crud.helpers.update_model', ['model' => __('models.classes.invoices')]) }}">
<i class="fa-solid fa-pencil"></i>
</a>
</div>
</div>
</div>
<table class="table table-hover table-borderless">
<tbody>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.ref')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->ref }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.firstname')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->firstname }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.lastname')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->lastname }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.object')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->object }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.tasks')) }}</td>
<td class="text-center align-middle py-0 pe-0">
<table class="table table-hover table-borderless m-0">
<tbody>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ __('Commentaire') }}</td>
<td class="text-center align-middle">{{ __('Type') }}</td>
<td class="text-center align-middle">{{ __('Jours') }}</td>
<td class="text-center align-middle">{{ __('Montant') }}</td>
</tr>
@foreach ($invoiceModel->tasks as $task)
<tr class="list-item @if(!$loop->last) border-bottom @endif">
<td class="text-center align-middle">{{ $task['desc'] }}</td>
<td class="text-center align-middle">{{ $task['type'] }}</td>
<td class="text-center align-middle">{{ $task['days'] }}</td>
<td class="text-center align-middle">{{ $task['amount'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.total')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->total }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.total_days')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->total_days }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.comment')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->comment }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.show_days')) }}</td>
<td class="text-center align-middle">{{ ($invoiceModel->show_days) ? "oui" : "non" }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.signed_date')) }}</td>
<td class="text-center align-middle"><span class="badge bg-info">{{ $invoiceModel->signed_date }}</span></td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.sent_client_date')) }}</td>
<td class="text-center align-middle"><span class="badge bg-info">{{ $invoiceModel->sent_client_date }}</span></td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.sent_accounting_date')) }}</td>
<td class="text-center align-middle"><span class="badge bg-info">{{ $invoiceModel->sent_accounting_date }}</span></td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.sites')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->site->name }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.company_id')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->company->name }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.invoiced_to_id')) }}</td>
<td class="text-center align-middle">{{ $invoiceModel->companyInvoiced->name }}</td>
</tr>
<tr class="list-item border-bottom">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.created_at')) }}</td>
<td class="text-center align-middle"><span class="badge bg-info">{{ $invoiceModel->created_at }}</span></td>
</tr>
<tr class="list-item">
<td class="text-center align-middle">{{ Str::ucfirst(__('validation.attributes.updated_at')) }}</td>
<td class="text-center align-middle"><span class="badge bg-info">{{ $invoiceModel->updated_at }}</span></td>
</tr>
</tbody>
</table>
@endsection