@extends('Layouts/dashboard') @section('submenu') @if (isset($company) && $company) @include('Plugins/Payment/Views/Elements/Order/company_list_submenu') @else @include('Plugins/Payment/Views/Elements/Order/list_submenu') @endif {{-- @include('Elements/Venue/submenu') --}} @endsection @section('content') {!! Form::open([ 'data-toggle' => 'validator' ]) !!}

{{ __('Coupon') }}

{!! Form::label('data[Coupon][name]', t('Name')) !!} {!! Form::text( 'data[Coupon][name]', (isset($data->Coupon->name) ? $data->Coupon->name : null), [ 'data-error' => t('This field is required'), 'class' => 'form-control', 'required' ] ) !!}
@if (isset($errors->Coupon->name)) {{ $errors->Coupon->name[0] }} @endif
{!! Form::label('data[Coupon][code]', t('Coupon Code')) !!} {!! Form::text( 'data[Coupon][code]', (isset($data->Coupon->code) ? $data->Coupon->code : null), [ 'data-error' => t('This field is required'), 'class' => 'form-control', 'required' ] ) !!}
@if (isset($errors->Coupon->code)) {{ $errors->Coupon->code[0] }} @endif
{!! Form::label('data[Coupon][type]', t('Discount Type')) !!} {!! Form::select( 'data[Coupon][type]', [ 'fixed' => __('Fixed'), 'fixed-person' => __('Fixed per person'), 'percentage' => __('Percentage'), 'qty' => __('Qty') ], (isset($data->Coupon->type) ? $data->Coupon->type : null), [ 'class' => 'form-control', 'required' ] ) !!}
@if (isset($errors->Coupon->type)) {{ $errors->Coupon->type[0] }} @endif
{!! Form::label('data[Coupon][discount]', t('Discount')) !!} {!! Form::number( 'data[Coupon][discount]', (isset($data->Coupon->discount) ? $data->Coupon->discount : null), [ 'data-error' => t('This field is required'), 'class' => 'form-control', 'required', 'step' => '0.01', 'min' => 0 ] ) !!}
@if (isset($errors->Coupon->discount)) {{ $errors->Coupon->discount[0] }} @endif

{{ __('Limitations') }}

{!! Form::label('data[Coupon][start]', t('Start from')) !!} {!! Form::text( 'data[Coupon][start]', (isset($data->Coupon->start) ? $data->Coupon->start : null), [ 'placeholder' => t('Date'), 'class' => 'form-control datepicker', ] ) !!}
@if (isset($errors->Coupon->start)) {{ $errors->Coupon->start[0] }} @endif
{!! Form::label('data[Coupon][end]', t('Valid until')) !!} {!! Form::text( 'data[Coupon][end]', (isset($data->Coupon->end) ? $data->Coupon->end : null), [ 'placeholder' => t('Date'), 'class' => 'form-control datepicker', ] ) !!}
@if (isset($errors->Coupon->end)) {{ $errors->Coupon->end[0] }} @endif
{!! Form::label('data[Coupon][total]', t('Total Coupons')) !!} {!! Form::number( 'data[Coupon][total]', (isset($data->Coupon->total) ? $data->Coupon->total : null), [ 'placeholder' => __('Unlimited'), 'class' => 'form-control', 'step' => '1', 'min' => 1 ] ) !!}
@if (isset($errors->Coupon->total)) {{ $errors->Coupon->total[0] }} @endif
{!! Form::label('data[Coupon][total_per_user]', t('Uses per user')) !!} {!! Form::number( 'data[Coupon][total_per_user]', (isset($data->Coupon->total_per_user) ? $data->Coupon->total_per_user : null), [ 'placeholder' => __('Unlimited'), 'class' => 'form-control', 'step' => '1', 'min' => 1 ] ) !!}
@if (isset($errors->Coupon->total_per_user)) {{ $errors->Coupon->total_per_user[0] }} @endif
{!! Form::label('data[Coupon][min_amount]', t('Min Amount')) !!} {!! Form::number( 'data[Coupon][min_amount]', (isset($data->Coupon->min_amount) ? $data->Coupon->min_amount : null), [ 'placeholder' => __('No minimum'), 'class' => 'form-control', 'step' => '0.01', 'min' => 0 ] ) !!}
@if (isset($errors->Coupon->min_amount)) {{ $errors->Coupon->min_amount[0] }} @endif
{!! Form::submit( __('Submit'), ['class' => 'btn btn-pink btn-wider'] ) !!}
{!! Form::close() !!} @if (isset($has_codes) && $has_codes)

{{ __( 'Warning, this coupon has codes and usage limits (How many times can be used) and (uses per user) doesn\'t take effect.' ) }}
{{ __('See coupon codes')}} {{ __('here') }}

@endif @endsection