@extends('commons.layouts.admin') @section('content')
{!!Form::model($model, array("url"=>null,"method"=>"post","class"=>"form-horizontal","files"=>true))!!} @include('commons.layouts.partials._alert')

{{App\Language::trans('Company Logo')}}

@if($model->logo_photo_path)
@endif

{{App\Language::trans('Detail Form')}}

{!!Form::file("logo_photo_path", array("id"=>"logo_photo_path","class"=>"form-control"))!!} {!!$errors->first('logo_photo_path', ':message')!!}
{!! Form::label('name', App\Language::trans('Name'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('name', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('name', '')!!}

{{App\Language::trans('Address Information')}}

{!! Form::label('address', App\Language::trans('Address'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('address', null, ['class'=>'form-control']) !!} {!!$errors->first('address', '')!!}
{!! Form::label('postcode', App\Language::trans('Postcode'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('postcode', null, ['class'=>'form-control']) !!} {!!$errors->first('postcode', '')!!}
{!! Form::label('country_id', App\Language::trans('Country'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('country_id', App\Country::combobox(), null, ['class'=>'form-control select2','onchange'=>'init_state_selectbox(this)']) !!} {!!$errors->first('country_id', '')!!}
{!! Form::label('state_id', App\Language::trans('State'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('state_id', App\State::combobox(old('country_id') ? old('country_id'):$model->country_id), null, ['class'=>'form-control','onchange'=>'init_city_selectbox(this)']) !!} {!!$errors->first('state_id', '')!!}
{!! Form::label('city_id', App\Language::trans('City'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('city_id', App\City::combobox(old('state_id') ? old('state_id'):$model->state_id), null, ['class'=>'form-control']) !!} {!!$errors->first('city_id', '')!!}

{{App\Language::trans('Contact Information')}}

{!! Form::label('contact_person', App\Language::trans('Contact Person'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('contact_person', null, ['class'=>'form-control']) !!} {!!$errors->first('contact_person', '')!!}
{!! Form::label('email', App\Language::trans('Email'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('email', null, ['class'=>'form-control']) !!} {!!$errors->first('email', '')!!}
{!! Form::label('tel', App\Language::trans('Tel'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('tel', null, ['class'=>'form-control']) !!} {!!$errors->first('tel', '')!!}
{!! Form::label('mobile', App\Language::trans('Mobile'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('mobile', null, ['class'=>'form-control']) !!} {!!$errors->first('mobile', '')!!}
{!! Form::label('website', App\Language::trans('Website'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('website', null, ['class'=>'form-control']) !!} {!!$errors->first('website', '')!!}
{!! Form::close() !!}
{!! Form::model($model, ['class'=>'form-horizontal']) !!} @include('commons.layouts.partials._alert')

{{App\Language::trans('Credit Form')}}

{!! Form::label('is_min_credit', App\Language::trans('Min. Credit ?'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_min_credit', '')!!}
{!! Form::label('min_credit', App\Language::trans('Min. Credit'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('min_credit', null, ['class'=>'form-control','step'=>'.01','min'=>'0']) !!} {!!$errors->first('min_credit', '')!!}
{!! Form::label('is_transaction_charge', App\Language::trans('Transaction Charge ?'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_transaction_charge', '')!!}
{!! Form::label('transaction_percent', App\Language::trans('Transaction Percent'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('transaction_percent', null, ['class'=>'form-control','step'=>'.01','min'=>'0']) !!} %
{!!$errors->first('transaction_percent', '')!!}
{!! Form::label('is_prepaid', App\Language::trans('Payment setting'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_prepaid', '')!!}
{!! Form::label('is_mobile_app_allow_payment', App\Language::trans('Is Mobile Apps Allow Payment'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_mobile_app_allow_payment', '')!!}
{!! Form::label('is_inclusive', App\Language::trans('SST Setting'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_inclusive', '')!!}
{!! Form::label('is_inclusive', App\Language::trans('Mobile App Usage Display Setting'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_inclusive', '')!!}
{!! Form::label('due_date_duration', App\Language::trans('Due Date Duration'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('due_date_duration', null, ['class'=>'form-control','min'=>'0']) !!} {!!$errors->first('due_date_duration', '')!!}
{!! Form::label('monthly_cut_off_day', App\Language::trans('Monthly cut off date'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('monthly_cut_off_day', null, ['class'=>'form-control','min'=>'0']) !!} {!!$errors->first('monthly_cut_off_day', '')!!}
{!! Form::label('system_live_date', App\Language::trans('System Live Date'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('system_live_date', null, ['class'=>'form-control']) !!} {!!$errors->first('system_live_date', '')!!}
{!!Form::close()!!}
@stop @section('script') init_daterange_leaf_ui("input[name=system_live_date]"); @if(!$model->is_min_credit) $("input[name=min_credit]").closest(".form-group").hide(); @endif $("#is_min_credit_on").on("click", function(){ $("input[name=min_credit]").closest(".form-group").show("slow"); }) $("#is_min_credit_off").on("click", function(){ $("input[name=min_credit]").closest(".form-group").hide("slow"); }) @if(!$model->is_transaction_charge) $("input[name=transaction_percent]").closest(".form-group").hide(); @endif $("#is_transaction_charge_on").on("click", function(){ $("input[name=transaction_percent]").closest(".form-group").show("slow"); }) $("#is_transaction_charge_off").on("click", function(){ $("input[name=transaction_percent]").closest(".form-group").hide("slow"); }) @stop