fix: refacto condition
This commit is contained in:
parent
e595c7e145
commit
e66af8dc92
1 changed files with 1 additions and 18 deletions
|
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
{{-- SENT_ACCOUNTING_DATE --}}
|
||||
<div class="col-12 col-sm-6 col-md-4 pe-md-3 p-0">
|
||||
@if ($invoiceModel->status === \App\Enums\Invoices\InvoiceStatusEnum::opened and !$invoiceModel->sent_accounting_date)
|
||||
@if ($invoiceModel->status === \App\Enums\Invoices\InvoiceStatusEnum::opened)
|
||||
@include('bo.partials.inputs.date', [
|
||||
'id' => 'invoiceSentaccountingdate',
|
||||
'label' => __('Date d\'envoi du :model à la comptabilité', [
|
||||
|
|
@ -73,23 +73,6 @@
|
|||
'model' => $invoiceModel ?? null,
|
||||
'helper' => __('Doît être une date réelle et existante.'),
|
||||
])
|
||||
@elseif ($invoiceModel->sent_accounting_date)
|
||||
@can('isAdmin')
|
||||
@include('bo.partials.inputs.date', [
|
||||
'id' => 'invoiceSentaccountingdate',
|
||||
'label' => __('Date d\'envoi du :model à la comptabilité', [
|
||||
'model' => __('models.classes.invoices'),
|
||||
]),
|
||||
'name' => 'sent_accounting_date',
|
||||
'defaultValue' => false,
|
||||
'required' => true,
|
||||
'model' => $invoiceModel ?? null,
|
||||
'helper' => __('Doît être une date réelle et existante.'),
|
||||
])
|
||||
@endcan
|
||||
<p class="fw-bold m-0 text-center">
|
||||
{{ __('Envoyé à la comptabilité le :date', ['date' => \Carbon\Carbon::parse($invoiceModel->sent_accounting_date)->format('d/m/Y') ?? 'xxx']) }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
{{-- STATUS --}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue