@extends('layouts.app') @section('title', __('transaction.detail').' #'.$transaction->id) @section('content')
{{ __('transaction.id') }}#{{ $transaction->id }}
{{ __('time.day_name') }} / {{ __('time.date') }} {!! $transaction->date_alert !!} {{ $transaction->day_name }}, {{ $transaction->date_only.'-'.$transaction->month_name.'-'.$transaction->year }}
{{ __('app.type') }}{{ $transaction->type }}
{{ __('partner.partner') }} @if ($transaction->partner) @php $partnerRoute = route('partners.show', [ $transaction->partner_id, 'start_date' => $transaction->date, 'end_date' => $transaction->date, ]); @endphp {{ $transaction->partner->name }} @endif
{{ __('category.category') }} @if ($transaction->category) @php $categoryRoute = route('categories.show', [ $transaction->category_id, 'start_date' => $transaction->date, 'end_date' => $transaction->date, ]); @endphp {!! $transaction->category->name_label !!} @endif
{{ __('book.book') }}{{ $transaction->book->name }}
{{ __('transaction.origin_destination') }} {{ $transaction->bankAccount->name }}
{{ __('transaction.amount') }} {{ config('money.currency_code') }} {{ $transaction->amount_string }}
{{ __('app.description') }}{!! nl2br(htmlentities($transaction->description)) !!}
{{ __('app.created_by') }}{{ $transaction->creator->name }}
{{ __('app.created_at') }}{{ $transaction->created_at }}
{{ __('app.updated_at') }}{{ $transaction->updated_at }}
@if ($isDiskFull) @endif

{{ __('transaction.files') }} @if (!$transaction->files->isEmpty()) ({{ $transaction->files->count() }}) @endif

@can('update', $transaction) @can('manage-transactions', auth()->activeBook()) {!! link_to_route( 'transactions.show', __('transaction.upload_files'), [$transaction, 'action' => 'upload_files'], [ 'id' => 'upload_files-transaction-'.$transaction->id, 'class' => 'btn btn-success mr-2'. ($isDiskFull ? ' disabled' : ''), 'aria-disabled' => $isDiskFull ? 'true' : null, 'onclick' => $isDiskFull ? 'return false;' : null, ] ) !!} @endcan @endcan
@foreach ($transaction->files as $file) @if (in_array($file->type_code, ['raw_image', 'image']))
@if ($file->title)

{{ $file->title }}

@endif
{{ $file->description }}
@can('update', $transaction) @can('manage-transactions', auth()->activeBook())
{!! FormField::delete( ['route' => ['transactions.files.destroy', [$transaction, $file->id]], 'onsubmit' => __('app.delete_confirm')], ' '.__('app.delete'), ['class' => 'btn btn-danger btn-sm', 'id' => 'delete-file-'.$file->id], ['file_id' => $file->id] ) !!}
@endcan @endcan
@endif @endforeach
@if(Request::has('action')) @include('transactions._show_forms') @endif @endsection @push('scripts') @endpush