@extends('admin.template.master') @section('stylesheets') {!! Html::style('assets/admin/bower_components/select2/dist/css/select2.min.css') !!} @endsection @section('title')

Voucher insert and update Voucher

@endsection @section('main-content')

Entry

{!! Form::open(['method' => 'POST', 'url' => '/admin/voucher-edit/' .$voucher->id]) !!}
{!! Form::label('Name') !!} {!! Form::text('voucher_name', $voucher->voucher_name, ['class' => 'form-control', 'placeholder' => 'Name','id' => 'voucher_name']) !!} @if ($errors->has('voucher_name')) {!! $errors->first('voucher_name') !!}@endif
{!! Form::label('Code') !!} {!! Form::text('voucher_code', $voucher->voucher_code, ['class' => 'form-control', 'placeholder' => 'Name','id' => 'voucher_code']) !!} @if ($errors->has('voucher_code')) {!! $errors->first('voucher_code') !!}@endif
{!! Form::label('Amount') !!} {!! Form::text('amount', $voucher->amount, ['class' => 'form-control', 'placeholder' => 'Amount']) !!} @if ($errors->has('amount')) {!! $errors->first('amount') !!}@endif
{!! Form::label('Amount Type') !!} {!! Form::select('amount_type', [''=>'Select Amount Type', 'Amount' => 'Amount','Percentage' => 'Percentage', ], isset($voucher->amount_type) ? $voucher->amount_type : null, ['class' => 'form-control']) !!}
{!! Form::label('Item Type') !!}

{{$voucherProducts[0]->item_type->item_type_name}}

{!! Form::select('item_type', $item_type, $voucherProducts[0]->item_type_id, ['class' => 'form-control','id' => 'item_type', 'placeholder' => 'Select Item Type']) !!} @if ($errors->has('item_type')) {!! $errors->first('item_type') !!}@endif
{!! Form::label('Brand') !!}

{{$voucherProducts[0]->brand->brand_name}}

{!! Form::select('brand', $brand, $voucherProducts[0]->brand_id, ['class' => 'form-control','id' => 'brand', 'placeholder' => 'Select Brand']) !!} @if ($errors->has('brand')) {!! $errors->first('brand') !!}@endif
{!! Form::label('Category') !!} {!! Form::select('category', $category, null, ['class' => 'form-control','id' => 'category','placeholder' => 'Select Category']) !!} @if ($errors->has('category')) {!! $errors->first('category') !!}@endif
Reset {!! Form::select('products[]',$product, null, ['class' => 'form-control','id' => 'products' ,'multiple' => 'multiple']) !!}
{!! Form::label('Note') !!} {!! Form::textarea('note', $voucher->note, ['class' => 'form-control', 'rows' => '3','placeholder' => 'Note', 'id' => 'note']) !!} @if ($errors->has('note')) {!! $errors->first('note') !!}@endif
{!! Form::label('From') !!} {!! Form::date('from', $voucher->start_date , ['class' => 'form-control']) !!}
{!! Form::label('To') !!} {!! Form::date('to', $voucher->end_date, ['class' => 'form-control']) !!}
{!! Form::label('Show') !!} {!! Form::select('is_show', ['Yes' => 'Yes','No' => 'No' ], isset($voucher->is_show) ? $voucher->is_show : null, ['class' => 'form-control']) !!}
{!! Form::label('Status') !!} {!! Form::select('is_exist', ['Active' => 'Active', 'Inactive' => 'Inactive'], isset($voucher->is_exist) ? $voucher->is_exist : null, ['class' => 'form-control']) !!}
{!! Form::close() !!}
@endsection @section('javascripts') {!! Html::script('assets/admin/bower_components/select2/dist/js/select2.full.min.js') !!} {!! Html::script('assets/admin/bower_components/ckeditor/ckeditor.js') !!} @endsection