removed invoice/bill status tables

This commit is contained in:
denisdulici
2020-01-11 16:57:32 +03:00
parent b5519004a0
commit 08eb8e75fc
69 changed files with 250 additions and 470 deletions

View File

@ -37,7 +37,7 @@
<th class="col-xs-4 col-sm-3 col-md-3 col-lg-3">@sortablelink('account_id', trans_choice('general.accounts', 1))</th>
<th class="col-lg-2 d-none d-lg-block">{{ trans('general.period') }}</th>
<th class="col-md-2 col-lg-2 d-none d-md-block text-right">@sortablelink('closing_balance', trans('reconciliations.closing_balance'))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1">@sortablelink('invoice_status_code', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1">@sortablelink('status', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>

View File

@ -30,7 +30,7 @@
<th class="col-xs-4 col-sm-2 col-md-2 text-right">@sortablelink('amount', trans('general.amount'))</th>
<th class="col-sm-3 col-md-3 d-none d-sm-block">@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
<th class="col-md-2 d-none d-md-block">@sortablelink('due_at', trans('invoices.due_date'))</th>
<th class="col-xs-4 col-sm-3 col-md-2 text-center">@sortablelink('status.name', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-3 col-md-2 text-center">@sortablelink('status', trans_choice('general.statuses', 1))</th>
</tr>
</thead>
@ -41,7 +41,7 @@
<td class="col-xs-4 col-sm-2 col-md-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 col-md-3 d-none d-sm-block">@date($item->invoiced_at)</td>
<td class="col-md-2 d-none d-md-block">@date($item->due_at)</td>
<td class="col-xs-4 col-sm-3 col-md-2 text-center"><span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('invoices.status.' . $item->status->code) }}</span></td>
<td class="col-xs-4 col-sm-3 col-md-2 text-center"><span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans('invoices.statuses.' . $item->status) }}</span></td>
</tr>
@endforeach
</tbody>

View File

@ -6,8 +6,8 @@
@stack('invoice_start')
<div class="card">
@stack('invoice_status_start')
<div class="card-header status-{{ $invoice->status->label }}">
<h3 class="text-white mb-0 float-right">{{ trans('invoices.status.' . $invoice->status->code) }}</h3>
<div class="card-header status-{{ $invoice->status_label }}">
<h3 class="text-white mb-0 float-right">{{ trans('invoices.statuses.' . $invoice->status) }}</h3>
</div>
@stack('invoice_status_end')
@ -278,7 +278,7 @@
@stack('button_pdf_end')
</div>
<div class="col-md-4">
@if($invoice->invoice_status_code != 'paid')
@if($invoice->status != 'paid')
@if ($payment_methods)
{!! Form::open([
'id' => 'invoice-payment',

View File

@ -8,8 +8,8 @@
@section('content')
<div class="card">
<div class="card-header status-{{ $invoice->status->label }}">
<h3 class="text-white mb-0 float-right pr-4">{{ trans('invoices.status.' . $invoice->status->code) }}</h3>
<div class="card-header status-{{ $invoice->status_label }}">
<h3 class="text-white mb-0 float-right pr-4">{{ trans('invoices.statuses.' . $invoice->status) }}</h3>
</div>
<div class="card-body">
@ -214,7 +214,7 @@
<div class="card-footer">
<div class="row">
<div class="col-md-4">
@if($invoice->invoice_status_code != 'paid')
@if($invoice->status != 'paid')
@if ($payment_methods)
{!! Form::open([
'id' => 'invoice-payment',

View File

@ -172,7 +172,7 @@
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
{{ Form::hidden('bill_status_code', old('bill_status_code', 'draft'), ['id' => 'bill_status_code', 'v-model' => 'form.bill_status_code']) }}
{{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }}
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
</div>
</div>

View File

@ -173,7 +173,7 @@
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
{{ Form::hidden('bill_status_code', old('bill_status_code', 'draft'), ['id' => 'bill_status_code', 'v-model' => 'form.bill_status_code']) }}
{{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }}
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
</div>
</div>

View File

@ -41,7 +41,7 @@
<th class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block text-right">@sortablelink('amount', trans('general.amount'))</th>
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('billed_at', trans('bills.bill_date'))</th>
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('due_at', trans('bills.due_date'))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1">@sortablelink('bill_status_code', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1">@sortablelink('status', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>
@ -57,7 +57,7 @@
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->billed_at)</td>
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->due_at)</td>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1">
<span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('bills.status.' . $item->status->code) }}</span>
<span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans('bills.statuses.' . $item->status) }}</span>
</td>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
<div class="dropdown">

View File

@ -22,7 +22,7 @@
@stack('recurring_message_end')
@stack('status_message_start')
@if ($bill->status->code == 'draft')
@if ($bill->status == 'draft')
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
<div class="alert alert-warning fade show" role="alert">
@ -38,7 +38,7 @@
@stack('status_message_end')
@stack('timeline_start')
@if ($bill->status->code != 'paid')
@if ($bill->status != 'paid')
@stack('timeline_body_start')
<div class="card">
<div class="card-body">
@ -82,7 +82,7 @@
@stack('timeline_body_receive_bill_head_end')
@stack('timeline_body_receive_bill_body_start')
@if ($bill->status->code == 'draft')
@if ($bill->status == 'draft')
@stack('timeline_body_receive_bill_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('bills.messages.status.receive.draft') }}</small>
@ -119,7 +119,7 @@
@stack('timeline_body_make_payment_body_start')
@stack('timeline_body_get_paid_body_message_start')
@if($bill->status->code != 'paid' && empty($bill->transactions->count()))
@if($bill->status != 'paid' && empty($bill->transactions->count()))
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('bills.messages.status.paid.await') }}</small>
@else
@ -149,8 +149,8 @@
@stack('bill_start')
<div class="card">
@stack('bill_status_start')
<div class="card-header status-{{ $bill->status->label }}">
<h3 class="text-white mb-0 float-right">{{ trans('bills.status.' . $bill->status->code) }}</h3>
<div class="card-header status-{{ $bill->status_label }}">
<h3 class="text-white mb-0 float-right">{{ trans('bills.statuses.' . $bill->status) }}</h3>
</div>
@stack('bill_status_end')
@ -430,12 +430,12 @@
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropdown-menu" role="menu">
@stack('button_pay_start')
@if($bill->status->code != 'paid')
@if($bill->status != 'paid')
@if(empty($bill->paid) || ($bill->paid != $bill->amount))
<a class="dropdown-item" href="#" id="button-payment">{{ trans('bills.add_payment') }}</a>
@endif
@permission('update-purchases-bills')
@if($bill->bill_status_code == 'draft')
@if($bill->status == 'draft')
<a class="dropdown-item" href="{{ route('bills.received', $bill->id) }}">{{ trans('bills.mark_received') }}</a></a>
@else
<button type="button" class="dropdown-item" disabled="disabled">{{ trans('bills.mark_received') }}</button>
@ -493,7 +493,7 @@
@foreach($bill->histories as $history)
<tr class="row align-items-center">
<td class="col-xs-4 col-sm-4">@date($history->created_at)</td>
<td class="col-xs-4 col-sm-4 text-center">{{ $history->status->name }}</td>
<td class="col-xs-4 col-sm-4 text-center">{{ trans('bills.statuses.' . $history->status) }}</td>
<td class="col-xs-4 col-sm-4 text-left long-texts">{{ $history->description }}</td>
</tr>
@endforeach

View File

@ -160,7 +160,7 @@
<td class="col-xs-4 col-sm-3">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-2 d-none d-sm-none">@date($item->billed_at)</td>
<td class="col-sm-2 d-none d-sm-none">@date($item->due_at)</td>
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('bills.status.' . $item->status->code) }}</span></td>
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans('bills.statuses.' . $item->status) }}</span></td>
</tr>
@endforeach
</tbody>

View File

@ -155,7 +155,7 @@
<td class="col-xs-4 col-sm-3">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-2 d-none d-sm-block">@date($item->invoiced_at)</td>
<td class="col-sm-2 d-none d-sm-block">@date($item->due_at)</td>
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('invoices.status.' . $item->status->code) }}</span></td>
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans('invoices.statuses.' . $item->status) }}</span></td>
</tr>
@endforeach
</tbody>

View File

@ -174,7 +174,7 @@
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
{{ Form::hidden('invoice_status_code', old('invoice_status_code', 'draft'), ['id' => 'invoice_status_code', 'v-model' => 'form.invoice_status_code']) }}
{{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }}
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
</div>
</div>

View File

@ -175,7 +175,7 @@
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
{{ Form::hidden('invoice_status_code', old('invoice_status_code', 'draft'), ['id' => 'invoice_status_code', 'v-model' => 'form.invoice_status_code']) }}
{{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }}
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
</div>
</div>

View File

@ -41,7 +41,7 @@
<th class="col-xs-4 col-sm-4 col-md-3 col-lg-1 col-xl-1 text-right">@sortablelink('amount', trans('general.amount'))</th>
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('due_at', trans('invoices.due_date'))</th>
<th class="col-lg-1 col-xl-1 d-none d-lg-block">@sortablelink('invoice_status_code', trans_choice('general.statuses', 1))</th>
<th class="col-lg-1 col-xl-1 d-none d-lg-block">@sortablelink('status', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center"><a>{{ trans('general.actions') }}</a></th>
</tr>
</thead>
@ -57,7 +57,7 @@
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->invoiced_at)</td>
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->due_at)</td>
<td class="col-lg-1 col-xl-1 d-none d-lg-block">
<span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('invoices.status.' . $item->status->code) }}</span>
<span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans('invoices.statuses.' . $item->status) }}</span>
</td>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
<div class="dropdown">

View File

@ -22,7 +22,7 @@
@stack('recurring_message_end')
@stack('status_message_start')
@if ($invoice->status->code == 'draft')
@if ($invoice->status == 'draft')
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning fade show" role="alert">
@ -38,7 +38,7 @@
@stack('status_message_end')
@stack('timeline_start')
@if ($invoice->status->code != 'paid')
@if ($invoice->status != 'paid')
@stack('timeline_body_start')
<div class="card">
<div class="card-body">
@ -82,7 +82,7 @@
@stack('timeline_body_send_invoice_head_end')
@stack('timeline_body_send_invoice_body_start')
@if ($invoice->status->code != 'sent' && $invoice->status->code != 'partial' && $invoice->status->code != 'viewed')
@if ($invoice->status != 'sent' && $invoice->status != 'partial' && $invoice->status != 'viewed')
@stack('timeline_body_send_invoice_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.send.draft') }}</small>
@ -91,7 +91,7 @@
<div class="mt-3">
@stack('timeline_body_send_invoice_body_button_sent_start')
@permission('update-sales-invoices')
@if($invoice->invoice_status_code == 'draft')
@if($invoice->status == 'draft')
<a href="{{ url('sales/invoices/' . $invoice->id . '/sent') }}" class="btn btn-white btn-sm header-button-top">{{ trans('invoices.mark_sent') }}</a>
@else
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
@ -111,7 +111,7 @@
@endif
@stack('timeline_body_send_invoice_body_button_email_end')
</div>
@elseif($invoice->status->code == 'viewed')
@elseif($invoice->status == 'viewed')
@stack('timeline_body_viewed_invoice_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.viewed') }}</small>
@ -140,7 +140,7 @@
@stack('timeline_body_get_paid_body_start')
@stack('timeline_body_get_paid_body_message_start')
@if($invoice->status->code != 'paid' && empty($invoice->transactions->count()))
@if($invoice->status != 'paid' && empty($invoice->transactions->count()))
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.paid.await') }}</small>
@else
@ -176,8 +176,8 @@
@stack('invoice_start')
<div class="card">
@stack('invoice_status_start')
<div class="card-header status-{{ $invoice->status->label }}">
<h3 class="text-white mb-0 float-right">{{ trans('invoices.status.' . $invoice->status->code) }}</h3>
<div class="card-header status-{{ $invoice->status_label }}">
<h3 class="text-white mb-0 float-right">{{ trans('invoices.statuses.' . $invoice->status) }}</h3>
</div>
@stack('invoice_status_end')
@ -459,7 +459,7 @@
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropdown-menu" role="menu">
@stack('button_pay_start')
@if($invoice->status->code != 'paid')
@if($invoice->status != 'paid')
@permission('update-sales-invoices')
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/pay') }}">{{ trans('invoices.mark_paid') }}</a>
@endpermission
@ -473,7 +473,7 @@
@stack('button_sent_start')
@permission('update-sales-invoices')
@if($invoice->invoice_status_code == 'draft')
@if($invoice->status == 'draft')
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/sent') }}">{{ trans('invoices.mark_sent') }}</a>
@else
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
@ -539,7 +539,7 @@
@foreach($invoice->histories as $history)
<tr class="row align-items-center">
<td class="col-xs-4 col-sm-4">@date($history->created_at)</td>
<td class="col-xs-4 col-sm-4 text-center">{{ $history->status->name }}</td>
<td class="col-xs-4 col-sm-4 text-center">{{ trans('invoices.statuses.' . $history->status) }}</td>
<td class="col-xs-4 col-sm-4 text-left long-texts">{{ $history->description }}</td>
</tr>
@endforeach