@extends('billings.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal']) !!} @include('_version_02.billings.layouts.partials._alert')

{{App\Language::trans('Refunds')}}

{!! Form::label('type', App\Language::trans('Type'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('type', App\Setting::payment_received_type(), null, ['class'=>'form-control','autofocus','required','onchange'=>'init_payment_received_type_handle(this)']) !!} {!!$errors->first('type', '')!!}
{!! Form::label('customer_id', App\Language::trans('Customer'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('customer_id', App\Customer::combobox(), null, ['class'=>'form-control','autofocus','required','onchange'=>'init_customer_info(this)']) !!} {!!$errors->first('customer_id', '')!!}
{!! Form::label('phone_no', App\Language::trans('Amount'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('phone_no', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('phone_no', '')!!}
{!! Form::label('currency_id', App\Language::trans('Currency'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('currency_id', App\Currency::combobox(), null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('currency_id', '')!!}
{!! Form::label('currency_rate', App\Language::trans('Currency Rate'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('currency_rate', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('currency_rate', '')!!}
{!! Form::label('name', App\Language::trans('Account'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('name', null, ['class'=>'form-control','required']) !!} {!!$errors->first('name', '')!!}
{!! Form::label('payment_no', App\Language::trans('Payment No.'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('payment_no', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('payment_no', '')!!}
{!! Form::label('document_date', App\Language::trans('Document Date'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('document_date', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('document_date', '')!!}
{!! Form::label('payment_term_id', App\Language::trans('Payment Method'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('payment_term_id', App\Setting::payment_method(), null, ['class'=>'form-control','autofocus','required' , 'onchange'=>'change_payment_label_text_by_payment_method(this)']) !!} {!!$errors->first('payment_term_id', '')!!}
{!! Form::label('doc_payment_no_ref_no', App\Language::trans('Cheque No.'), ['id'=>'doc_payment_no_ref_no', 'class'=>'control-label col-md-4']) !!}
{!! Form::text('po_no', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('po_no', '')!!}
{!! Form::label('sales_person', App\Language::trans('Sales Person'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('sales_person', null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('sales_person', '')!!}
@include('_version_02.billings.refunds.partials.__list')
{!! Form::close() !!} @endsection @section('script') var customerInfoUrl = "{{action('CustomersController@getInfo')}}"; function init_customer_info(me) { $.get(customerInfoUrl, {customer_id:$(me).val()}, function(fdata){ for (var key in fdata.data) { console.log("key " + key + " has value " + fdata.data[key]); } },"json"); } $('#daterange-btn').daterangepicker( { ranges : { 'Today' : [moment(), moment()], 'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 'Last 7 Days' : [moment().subtract(6, 'days'), moment()], 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 'This Month' : [moment().startOf('month'), moment().endOf('month')], 'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] }, startDate: moment().subtract(29, 'days'), endDate : moment() }, function (start, end) { $('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')) } ) @endsection