@php $addExpenseCategoryPermission = user()->permission('manage_expense_category'); $approveExpensePermission = user()->permission('approve_expenses'); @endphp
@method('PUT')

@lang('app.expense') @lang('app.details')

@foreach ($currencies as $currency) @endforeach
@if (user()->permission('add_expenses') == 'all')
@else @endif
@if ($addExpenseCategoryPermission == 'all' || $addExpenseCategoryPermission == 'added') @endif
@if ( $approveExpensePermission != 'none' && ( $approveExpensePermission == 'all' || ($approveExpensePermission == 'added' && $expense->added_by == user()->id) || ($approveExpensePermission == 'owned' && $expense->user_id == user()->id) || ($approveExpensePermission == 'both' && ($expense->user_id == user()->id || $expense->added_by == user()->id)) ) )
@endif
@if (!is_null($expense->bill)) @endif
@if (isset($fields) && count($fields) > 0)
@foreach ($fields as $field)
@if ($field->type == 'text') @elseif($field->type == 'password') @elseif($field->type == 'number') @elseif($field->type == 'textarea') @elseif($field->type == 'radio')
@foreach ($field->values as $key => $value) @endforeach
@elseif($field->type == 'select')
{!! Form::select('custom_fields_data[' . $field->name . '_' . $field->id . ']', $field->values, isset($expense) ? $expense->custom_fields_data['field_' . $field->id] : '', ['class' => 'form-control select-picker']) !!}
@elseif($field->type == 'date') @elseif($field->type == 'checkbox')
@foreach ($field->values as $key => $value) @endforeach
@endif
@endforeach
@endif @lang('app.save') @lang('app.cancel')