@extends('companyuser::layouts.master') @section('title', __('products::cost_center.Show cost center details')) @push('account-view-style') @endpush @push('account-view-scripts') @endpush @section('breadcrumb') @endsection @section('content')
{{-- tree hierarchy --}}

@lang('products::cost_center.Cost Center Hierarchy')

@lang('products::cost_center.List Name'): {{$costCenter->name}}

@if($parent)

@lang('products::cost_center.Parent Center'): {{$parent->name}}

@endif

@lang('products::cost_center.Code'): {{$costCenter->code}}

@if($parent)

@lang('products::cost_center.Parent Center Code'): {{$parent->code}}

@endif @if($costCenter->physical_address)

@lang('products::cost_center.physical_address'): {{$costCenter->physical_address}}

@endif @if($costCenter->custom_fields)
@php $customFields = json_decode($costCenter->custom_fields, true) @endphp

{{ __('purchases::purchase_bills.additional_fields') }}

@foreach($customFields as $key=>$field)
@if($field['type']=='checkbox') @else @endif
@endforeach @endif

@lang('products::cost_center.Transactions')

@foreach($transactions as $transaction) @endforeach
@lang('products::cost_center.Date') @lang('products::cost_center.Id') @lang('products::product.Type')
{{ $transaction['creation_date'] }} {{ $transaction['reference'] }} {{ $transaction['transaction'] }}

@lang('products::cost_center.Activity Log')

@foreach($logs as $row) @endforeach
@lang('products::cost_center.Date') @lang('products::cost_center.username') @lang('products::cost_center.Action') @lang('products::cost_center.Details')
{{ $row->formatDateTime($row->created_at) }} {{$row->user->uname}} {{ trans($row->event) }} @if($row->event!='created') @foreach($row->new_values as $key => $change) @if($key != 'updated_at') @if($key == 'name_en') {{__('products::cost_center.name_en') . ' '. __('products::cost_center.changed to') .' '.$change}}
@elseif($key == 'name_ar') {{__('products::cost_center.name_ar') . ' '. __('products::cost_center.changed to') .' '.$change}}
@endif @endif @endforeach @endif
@endsection @section('extra_scripts') @endsection