@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.revenues', 1)])) @section('content') @if (($recurring = $revenue->recurring) && ($next = $recurring->next()))

{{ trans('recurring.recurring') }}

{{ trans('recurring.message', [ 'type' => mb_strtolower(trans_choice('general.revenues', 1)), 'date' => $next->format($date_format) ]) }}

@endif
{!! Form::model($revenue, [ 'method' => 'PATCH', 'files' => true, 'url' => ['incomes/revenues', $revenue->id], 'role' => 'form', 'class' => 'form-loading-button' ]) !!}
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '', 'autocomplete' => 'off'], Date::parse($revenue->paid_at)->toDateString()) }} {!! Form::hidden('currency_code', $revenue->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!} {!! Form::hidden('currency_rate', null, ['id' => 'currency_rate']) !!} {{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }} @stack('account_id_input_start')
{!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}
{!! Form::select('account_id', $accounts, null, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])])) !!}
{!! Form::text('currency', $revenue->currency_code, ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
@stack('account_id_input_end') {{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers, null, []) }} {{ Form::textareaGroup('description', trans('general.description')) }} {{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }} {{ Form::recurring('edit', $revenue) }} {{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods) }} {{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }} {{ Form::fileGroup('attachment', trans('general.attachment')) }}
@permission('update-incomes-revenues') @endpermission {!! Form::close() !!}
@endsection @push('js') @if (language()->getShortCode() != 'en') @endif @endpush @push('css') @endpush @push('scripts') @endpush