@extends('layouts.main') @section('title') {{ __('Create Contract') }} @endsection @section('page-title')

@yield('title')

@endsection @section('content') {!! Form::open(['route' => 'contracts.store', 'data-parsley-validate', 'id' => 'myForm']) !!}

{{ Form::label('property_id', __('Propiedad'), ['class' => 'form-label col-12 ']) }} {{ Form::text('property_id', '', [ 'class' => 'form-control ', 'placeholder' => 'Ingresa id de la propiedad', 'required' => 'true', 'id' => 'property', ]) }}
{{ Form::label('customer_phone', __('Numero de telefono del cliente'), ['class' => 'form-label col-12 ']) }} {{ Form::text('customer_phone', '', [ 'class' => 'form-control ', 'placeholder' => 'Ingresa el numero de telefono del cliente', 'required' => 'true', 'id' => 'customer_phone', ]) }}
{{ Form::label('duration', __('Duracion en meses'), ['class' => 'form-label col-12 ']) }} {{ Form::select('duration', ['6' => '6 meses', '12' => '12 meses'], null, [ 'class' => 'form-control', 'placeholder' => 'Selecciona la duración del contrato', 'required' => 'true', 'id' => 'duration', ]) }}
@php $opciones = []; @endphp @if (checkdate(date('m'), 5, date('Y')) && now()->format('j') <= 5) @php $opciones[now()->format('Y-m-05')] = '5 de ' . __(now()->format('F')); @endphp @endif @if (now()->format('j') <= 20) @php $opciones[now()->format('Y-m-20')] = '20 de ' . __(now()->format('F')); @endphp @endif @php $opciones[now()->subMonths(3)->format('Y-m-05')] = '5 de ' . __(now()->subMonths(3)->format('F')); $opciones[now()->subMonths(3)->format('Y-m-20')] = '20 de ' . __(now()->subMonths(3)->format('F')); $opciones[now()->subMonths(2)->format('Y-m-05')] = '5 de ' . __(now()->subMonths(2)->format('F')); $opciones[now()->subMonths(2)->format('Y-m-20')] = '20 de ' . __(now()->subMonths(2)->format('F')); $opciones[now()->subMonths(1)->format('Y-m-05')] = '5 de ' . __(now()->subMonths(1)->format('F')); $opciones[now()->subMonths(1)->format('Y-m-20')] = '20 de ' . __(now()->subMonths(1)->format('F')); $opciones[now()->format('Y-m-05')] = '5 de ' . __(now()->format('F')); $opciones[now()->format('Y-m-20')] = '20 de ' . __(now()->format('F')); $opciones[now()->addMonths(1)->format('Y-m-05')] = '5 de ' . __(now()->addMonths(1)->format('F')); $opciones[now()->addMonths(1)->format('Y-m-20')] = '20 de ' . __(now()->addMonths(1)->format('F')); $opciones[now()->addMonths(2)->format('Y-m-05')] = '5 de ' . __(now()->addMonths(2)->format('F')); $opciones[now()->addMonths(2)->format('Y-m-20')] = '20 de ' . __(now()->addMonths(2)->format('F')); $opciones[now()->addMonths(3)->format('Y-m-05')] = '5 de ' . __(now()->addMonths(3)->format('F')); $opciones[now()->addMonths(3)->format('Y-m-20')] = '20 de ' . __(now()->addMonths(3)->format('F')); @endphp {{ Form::label('init_date', __('Selecciona una fecha'), ['class' => 'form-label col-12 ']) }} {{ Form::select('init_date', $opciones, null, [ 'class' => 'form-control', 'required' => 'true', 'id' => 'init_date', ]) }}
   
{!! Form::close() !!} @endsection @section('script') @endsection