@if(request()->all())

@lang('reports::reports.cost_center')

{{ $data['companyName'] }}

@lang('from') {{$data['dates']['from']}} @lang('to') {{$data['dates']['to']}}

@foreach($data['selectedCostCenters'] as $costCenter) @endforeach @foreach($data['categorizedAccounts'] as $categoryName => $subCategories) @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @foreach($subCategories as $subCategoryName => $accounts) @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @foreach($accounts as $account) @continue(! isset($account['id'])) @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @isset($account['childs']) @if(request('show_sub_accounts')) @foreach($account['childs'] as $key => $childAccount) @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @endforeach @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @endif @endisset @endforeach @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @endforeach @foreach($data['selectedCostCenters'] as $costCenter) @endforeach @endforeach @foreach($data['selectedCostCenters'] as $costCenter) @endforeach
{{($costCenter['code']?$costCenter['code'] . "-":"") . $costCenter['name_' . app()->getLocale()]}}
{{$categoryName}}
{{$subCategoryName}}
{{ data_get($account,'code','CODE') . ' - ' . data_get($account,'name','NAME') }} {{ isset( $data['mainAccountsTotalValues'][$account['id']][$costCenter['id']] ) ? floatval($data['mainAccountsTotalValues'][$account['id']][$costCenter['id']]) < 0 ? "(" .number_format(floatval($data['mainAccountsTotalValues'][$account['id']][$costCenter['id']])* -1,2) .")" : number_format(floatval($data['mainAccountsTotalValues'][$account['id']][$costCenter['id']]),2) : 0.00 }}
{{ $childAccount['code'] . ' - ' . $childAccount['name'] }} {{ isset( $data['subAccountsTotalValues'][$childAccount['id']][$costCenter['id']] ) ? floatval($data['subAccountsTotalValues'][$childAccount['id']][$costCenter['id']]) < 0 ? "(" .number_format(floatval($data['subAccountsTotalValues'][$childAccount['id']][$costCenter['id']])* -1,2) .")" : number_format(floatval($data['subAccountsTotalValues'][$childAccount['id']][$costCenter['id']]),2) : 0 }}
@lang('reports::reports.total cost center') {{$account['name']}} {{ isset( $data['mainAccountsTotalValuesSubAccountIncluded'][$account['id']][$costCenter['id']] ) ? floatval($data['mainAccountsTotalValuesSubAccountIncluded'][$account['id']][$costCenter['id']]) < 0 ? "(" .number_format( floatval( $data['mainAccountsTotalValuesSubAccountIncluded'][$account['id']][$costCenter['id']] )* -1,2) .")" : number_format(floatval( $data['mainAccountsTotalValuesSubAccountIncluded'][$account['id']][$costCenter['id']] ),2) : 0.00 }}
@lang('reports::reports.total cost center') {{$subCategoryName}} {{ isset( $data['subCategoriesTotalValues'][$subCategoryName][$costCenter['id']] ) ? $data['subCategoriesTotalValues'][$subCategoryName][$costCenter['id']] < 0 ? "(" .number_format(floatval($data['subCategoriesTotalValues'][$subCategoryName][$costCenter['id']]) * -1 ,2) .")" : number_format(floatval($data['subCategoriesTotalValues'][$subCategoryName][$costCenter['id']]),2) : 0 }}
@lang('reports::reports.total cost center') {{$categoryName}} {{ isset( $data['CategoriesTotalValues'][$categoryName][$costCenter['id']] ) ? $data['CategoriesTotalValues'][$categoryName][$costCenter['id']] < 0 ? "(" .number_format(floatval($data['CategoriesTotalValues'][$categoryName][$costCenter['id']] ) * -1 ,2) .")" : number_format(floatval($data['CategoriesTotalValues'][$categoryName][$costCenter['id']]),2) : 0 }}
@lang('reports::reports.trial_balance.total') {{ isset( $data['totalCategoriesRecords'][$costCenter['id']] ) ? $data['totalCategoriesRecords'][$costCenter['id']] <= 0 ? "(" .number_format(floatval($data['totalCategoriesRecords'][$costCenter['id']] ) * -1 ,2) .")" : number_format(floatval($data['totalCategoriesRecords'][$costCenter['id']]),2) : 0 }}
@endif