@extends('app') @section('content')

Cash Operacional / {{ $account->name }}

{!! Form::open([ 'class' => 'form-datos', 'action' => ['OperationalCashController@store', $account], ]) !!}
@if($account->periodicity === 'daily')
{!! Form::label('date', 'Fecha', ['class' => 'control-label']) !!} {!! Form::date('date', Carbon\Carbon::today()->format('Y-m-d'), ['class' => 'form-control', 'required' => 'required', 'autofocus' => 'autofocus']) !!} {{ $errors->first('date') }}
@else @php $months = []; $date = \Carbon\Carbon::today()->startOfMonth(); while(count($months) < 18) { $months[$date->format('Y-m')] = ucfirst($date->formatLocalized('%B %Y')); $date->subMonth(); } @endphp
{!! Form::label('date', 'Mostrar información del mes') !!} {!! Form::select('date', $months, \Carbon\Carbon::today()->format('Y-m'), ['class' => 'form-control']) !!}
@endif
@foreach($categories as $category) @if($category->formula)
{!! Form::label($category->slug, $category->name, ['class' => 'control-label']) !!}
$
{!! Form::text($category->slug, null, ['class' => 'form-control js-calculated', 'readonly' => 'readonly', 'data-formula' => $category->formula ]) !!}
@else
{!! Form::label($category->slug, $category->name, ['class' => 'control-label']) !!}
$
{!! Form::text($category->slug, null, ['class' => 'form-control', 'required' => 'required']) !!}
{{ $errors->first($category->slug) }}
@endif @endforeach
{!! Form::close() !!}
@endsection @section('script') @endsection