close #608 Fixed: Empty category broken list pages

This commit is contained in:
Cüneyt Şentürk 2018-11-08 23:59:56 +03:00
parent 8ce45705cc
commit fd457483a6
5 changed files with 7 additions and 7 deletions

View File

@ -37,7 +37,7 @@
<tr> <tr>
<td><a href="{{ url('customers/payments/' . $item->id) }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td> <td><a href="{{ url('customers/payments/' . $item->id) }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
<td>@money($item->amount, $item->currency_code, true)</td> <td>@money($item->amount, $item->currency_code, true)</td>
<td>{{ $item->category->name }}</td> <td>{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td>{{ $payment_methods[$item->payment_method] }}</td> <td>{{ $payment_methods[$item->payment_method] }}</td>
</tr> </tr>
@endforeach @endforeach

View File

@ -54,7 +54,7 @@
@endif @endif
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ !empty($item->vendor->name) ? $item->vendor->name : trans('general.na') }}</td> <td class="hidden-xs">{{ !empty($item->vendor->name) ? $item->vendor->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
<td class="text-center"> <td class="text-center">
@if ($item->category->id != $transfer_cat_id) @if ($item->category->id != $transfer_cat_id)

View File

@ -139,7 +139,7 @@
<tr> <tr>
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td> <td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
</tr> </tr>
@endforeach @endforeach
@ -194,7 +194,7 @@
<tr> <tr>
<td><a href="{{ url('expenses/payments/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td> <td><a href="{{ url('expenses/payments/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
</tr> </tr>
@endforeach @endforeach

View File

@ -140,7 +140,7 @@
<tr> <tr>
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td> <td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
</tr> </tr>
@endforeach @endforeach
@ -196,7 +196,7 @@
<tr> <tr>
<td><a href="{{ url('incomes/revenues/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td> <td><a href="{{ url('incomes/revenues/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
</tr> </tr>
@endforeach @endforeach

View File

@ -54,7 +54,7 @@
@endif @endif
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td> <td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
<td class="hidden-xs">{{ !empty($item->customer->name) ? $item->customer->name : trans('general.na') }}</td> <td class="hidden-xs">{{ !empty($item->customer->name) ? $item->customer->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->category->name }}</td> <td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="hidden-xs">{{ $item->account->name }}</td> <td class="hidden-xs">{{ $item->account->name }}</td>
<td class="text-center"> <td class="text-center">
@if ($item->category->id != $transfer_cat_id) @if ($item->category->id != $transfer_cat_id)