{{ Form::model($coupon, array('route' => array('admin.coupon.update', $coupon->id), 'method' => 'POST','files'=>true)) }}
{!! Form::hidden('id', $coupon->id) !!}
{{ Form::text('code', $coupon->code, array('id'=>'code','autocomplete'=>'off','class' => "form-control ".APFrmErrHelp::hasError($errors, 'code')." ",'placeholder' => 'Enter code')) }}
{!! APFrmErrHelp::showErrors($errors, 'code') !!}
{!! Form::select('type',['' => __('Select Discount Type'),'flat' => __('Flat'),'percentage' => __('Percentage')], $coupon->type, array('class'=>"form-control ".APFrmErrHelp::hasError($errors, 'type')." ", 'id'=>'type')) !!}
{!! APFrmErrHelp::showErrors($errors, 'type') !!}
{{ Form::text('amount', $coupon->amount, array('id'=>'amount','autocomplete'=>'off','maxlength' => 13,'onkeypress'=>"return /[0-9]/.test(String.fromCharCode(((event||window.event).which||(event||window.event).which)))",'class' => "form-control ".APFrmErrHelp::hasError($errors, 'amount')." ",'placeholder' => 'Enter amount')) }}
{!! APFrmErrHelp::showErrors($errors, 'amount') !!}
{{ Form::text('usage_limit',$coupon->usage_limit, array('id'=>'usage_limit','autocomplete'=>'off','class' => "form-control ".APFrmErrHelp::hasError($errors, 'usage_limit')." ",'placeholder' => 'Enter usage limit (per user)')) }}
{!! APFrmErrHelp::showErrors($errors, 'usage_limit') !!}
{{ Form::date('start_date', $coupon->start_date, array('id'=>'start_date','autocomplete'=>'off','class' => "form-control ".APFrmErrHelp::hasError($errors, 'start_date')." ",'placeholder' => 'Enter start date')) }}
{!! APFrmErrHelp::showErrors($errors, 'start_date') !!}
{{ Form::date('end_date', $coupon->end_date, array('id'=>'end_date','autocomplete'=>'off','class' => "form-control ".APFrmErrHelp::hasError($errors, 'end_date')." ",'placeholder' => 'Enter end date')) }}
{!! APFrmErrHelp::showErrors($errors, 'end_date') !!}
status=='1') checked @endif value="1"> Active
status=='0') checked @endif value="0"> Inactive
{{ Form::close() }}