invoice/bill label

This commit is contained in:
denisdulici
2017-12-11 10:03:58 +03:00
parent 9dec124834
commit 9d7ace396c
4 changed files with 62 additions and 28 deletions

View File

@@ -44,26 +44,13 @@
</thead>
<tbody>
@foreach($invoices as $item)
@php
switch ($item->status->code) {
case 'paid':
$label = 'label-success';
break;
case 'partial':
$label = 'label-warning';
break;
default:
$label = 'bg-aqua';
break;
}
@endphp
<tr>
<td><a href="{{ url('incomes/invoices/' . $item->id . ' ') }}">{{ $item->invoice_number }}</a></td>
<td>{{ $item->customer_name }}</td>
<td>@money($item->amount, $item->currency_code, true)</td>
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
<td><span class="label {{ $label }}">{{ $item->status->name }}</span></td>
<td><span class="label {{ $item->status->label }}">{{ $item->status->name }}</span></td>
<td class="text-center">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">