fixed #321
This commit is contained in:
parent
f4d7c00c00
commit
26d25f41ae
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('css')
|
@push('css')
|
||||||
@ -47,7 +48,8 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#transferred_at').datepicker({
|
$('#transferred_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#from_account_id").select2({
|
$("#from_account_id").select2({
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('css')
|
@push('css')
|
||||||
@ -53,7 +54,8 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#transferred_at').datepicker({
|
$('#transferred_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#from_account_id").select2({
|
$("#from_account_id").select2({
|
||||||
|
@ -128,6 +128,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||||
@ -186,13 +187,15 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#billed_at').datepicker({
|
$('#billed_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#due_at').datepicker({
|
$('#due_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".tax-select2").select2({
|
$(".tax-select2").select2({
|
||||||
|
@ -136,6 +136,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||||
@endpush
|
@endpush
|
||||||
@ -194,13 +195,15 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#billed_at').datepicker({
|
$('#billed_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#due_at').datepicker({
|
$('#due_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".tax-select2").select2({
|
$(".tax-select2").select2({
|
||||||
|
@ -69,257 +69,259 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('css')
|
@push('css')
|
||||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#paid_at').datepicker({
|
$('#paid_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#account_id").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#category_id").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#vendor_id").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#payment_method").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#attachment').fancyfile({
|
||||||
|
text : '{{ trans('general.form.select.file') }}',
|
||||||
|
style : 'btn-default',
|
||||||
|
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('change', '#account_id', function (e) {
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ url("settings/currencies/currency") }}',
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'JSON',
|
||||||
|
data: 'account_id=' + $(this).val(),
|
||||||
|
success: function(data) {
|
||||||
|
$('#currency').val(data.currency_code);
|
||||||
|
$('#currency_code').val(data.currency_code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#account_id").select2({
|
function createVendor() {
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
$('#modal-create-vendor').remove();
|
||||||
});
|
|
||||||
|
|
||||||
$("#category_id").select2({
|
modal = '<div class="modal fade" id="modal-create-vendor" style="display: none;">';
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
modal += ' <div class="modal-dialog modal-lg">';
|
||||||
});
|
modal += ' <div class="modal-content">';
|
||||||
|
modal += ' <div class="modal-header">';
|
||||||
|
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]) }}</h4>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-body">';
|
||||||
|
modal += ' {!! Form::open(['id' => 'form-create-vendor', 'role' => 'form']) !!}';
|
||||||
|
modal += ' <div class="row">';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans('general.email') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-envelope"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.email') }}" name="email" type="text" id="email">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6">';
|
||||||
|
modal += ' <label for="tax_number" class="control-label">{{ trans('general.tax_number') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-percent"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.tax_number') }}" name="tax_number" type="text" id="tax_number">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans_choice('general.currencies', 1) }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||||
|
modal += ' <select class="form-control" required="required" id="currency_code" name="currency_code">';
|
||||||
|
modal += ' <option value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}</option>';
|
||||||
|
@foreach($currencies as $currency_code => $currency_name)
|
||||||
|
modal += ' <option value="{{ $currency_code }}" {{ (setting('general.default_currency') == $currency_code) ? 'selected' : '' }}>{{ $currency_name }}</option>';
|
||||||
|
@endforeach
|
||||||
|
modal += ' </select>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-12">';
|
||||||
|
modal += ' <label for="address" class="control-label">{{ trans('general.address') }}</label>';
|
||||||
|
modal += ' <textarea class="form-control" placeholder="{{ trans('general.address') }}" rows="3" name="address" cols="50" id="address"></textarea>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::close() !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-footer">';
|
||||||
|
modal += ' <div class="pull-left">';
|
||||||
|
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-vendor', 'class' => 'btn btn-success']) !!}';
|
||||||
|
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += '</div>';
|
||||||
|
|
||||||
$("#vendor_id").select2({
|
$('body').append(modal);
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#payment_method").select2({
|
$("#modal-create-vendor #currency_code").select2({
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#attachment').fancyfile({
|
$('#modal-create-vendor').modal('show');
|
||||||
text : '{{ trans('general.form.select.file') }}',
|
}
|
||||||
style : 'btn-default',
|
|
||||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
$(document).on('click', '#button-create-vendor', function (e) {
|
||||||
});
|
$('#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
$(document).on('change', '#account_id', function (e) {
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("settings/currencies/currency") }}',
|
url: '{{ url("expenses/vendors/vendor") }}',
|
||||||
type: 'GET',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: 'account_id=' + $(this).val(),
|
data: $("#form-create-vendor").serialize(),
|
||||||
|
beforeSend: function () {
|
||||||
|
$(".form-group").removeClass("has-error");
|
||||||
|
$(".help-block").remove();
|
||||||
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('#currency').val(data.currency_code);
|
$('#span-loading').remove();
|
||||||
$('#currency_code').val(data.currency_code);
|
|
||||||
|
$('#modal-create-vendor').modal('hide');
|
||||||
|
|
||||||
|
$("#vendor_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
|
$("#vendor_id").select2('refresh');
|
||||||
|
},
|
||||||
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
if (error.responseJSON.name) {
|
||||||
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.email) {
|
||||||
|
$("input[name='email']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.currency_code) {
|
||||||
|
$("select[name='currency_code']").parent().parent().addClass('has-error');
|
||||||
|
$("select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
function createVendor() {
|
function createCategory() {
|
||||||
$('#modal-create-vendor').remove();
|
$('#modal-create-category').remove();
|
||||||
|
|
||||||
modal = '<div class="modal fade" id="modal-create-vendor" style="display: none;">';
|
modal = '<div class="modal fade" id="modal-create-category" style="display: none;">';
|
||||||
modal += ' <div class="modal-dialog modal-lg">';
|
modal += ' <div class="modal-dialog modal-lg">';
|
||||||
modal += ' <div class="modal-content">';
|
modal += ' <div class="modal-content">';
|
||||||
modal += ' <div class="modal-header">';
|
modal += ' <div class="modal-header">';
|
||||||
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]) }}</h4>';
|
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}</h4>';
|
||||||
modal += ' </div>';
|
modal += ' </div>';
|
||||||
modal += ' <div class="modal-body">';
|
modal += ' <div class="modal-body">';
|
||||||
modal += ' {!! Form::open(['id' => 'form-create-vendor', 'role' => 'form']) !!}';
|
modal += ' {!! Form::open(['id' => 'form-create-category', 'role' => 'form']) !!}';
|
||||||
modal += ' <div class="row">';
|
modal += ' <div class="row">';
|
||||||
modal += ' <div class="form-group col-md-6 required">';
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
||||||
modal += ' <div class="input-group">';
|
modal += ' <div class="input-group">';
|
||||||
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
||||||
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
||||||
modal += ' </div>';
|
modal += ' </div>';
|
||||||
modal += ' </div>';
|
modal += ' </div>';
|
||||||
modal += ' <div class="form-group col-md-6">';
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
modal += ' <label for="email" class="control-label">{{ trans('general.email') }}</label>';
|
modal += ' <label for="color" class="control-label">{{ trans('general.color') }}</label>';
|
||||||
modal += ' <div class="input-group">';
|
modal += ' <div id="category-color-picker" class="input-group colorpicker-component">';
|
||||||
modal += ' <div class="input-group-addon"><i class="fa fa-envelope"></i></div>';
|
modal += ' <div class="input-group-addon"><i></i></div>';
|
||||||
modal += ' <input class="form-control" placeholder="{{ trans('general.email') }}" name="email" type="text" id="email">';
|
modal += ' <input class="form-control" value="#00a65a" placeholder="{{ trans('general.color') }}" required="required" name="color" type="text" id="color">';
|
||||||
modal += ' </div>';
|
modal += ' </div>';
|
||||||
modal += ' </div>';
|
modal += ' </div>';
|
||||||
modal += ' <div class="form-group col-md-6">';
|
modal += ' {!! Form::hidden('type', 'expense', []) !!}';
|
||||||
modal += ' <label for="tax_number" class="control-label">{{ trans('general.tax_number') }}</label>';
|
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
||||||
modal += ' <div class="input-group">';
|
modal += ' </div>';
|
||||||
modal += ' <div class="input-group-addon"><i class="fa fa-percent"></i></div>';
|
modal += ' {!! Form::close() !!}';
|
||||||
modal += ' <input class="form-control" placeholder="{{ trans('general.tax_number') }}" name="tax_number" type="text" id="tax_number">';
|
modal += ' </div>';
|
||||||
modal += ' </div>';
|
modal += ' <div class="modal-footer">';
|
||||||
modal += ' </div>';
|
modal += ' <div class="pull-left">';
|
||||||
modal += ' <div class="form-group col-md-6 required">';
|
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-category', 'class' => 'btn btn-success']) !!}';
|
||||||
modal += ' <label for="email" class="control-label">{{ trans_choice('general.currencies', 1) }}</label>';
|
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
||||||
modal += ' <div class="input-group">';
|
modal += ' </div>';
|
||||||
modal += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
modal += ' </div>';
|
||||||
modal += ' <select class="form-control" required="required" id="currency_code" name="currency_code">';
|
modal += ' </div>';
|
||||||
modal += ' <option value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}</option>';
|
modal += ' </div>';
|
||||||
@foreach($currencies as $currency_code => $currency_name)
|
modal += '</div>';
|
||||||
modal += ' <option value="{{ $currency_code }}" {{ (setting('general.default_currency') == $currency_code) ? 'selected' : '' }}>{{ $currency_name }}</option>';
|
|
||||||
@endforeach
|
|
||||||
modal += ' </select>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' <div class="form-group col-md-12">';
|
|
||||||
modal += ' <label for="address" class="control-label">{{ trans('general.address') }}</label>';
|
|
||||||
modal += ' <textarea class="form-control" placeholder="{{ trans('general.address') }}" rows="3" name="address" cols="50" id="address"></textarea>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' {!! Form::close() !!}';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' <div class="modal-footer">';
|
|
||||||
modal += ' <div class="pull-left">';
|
|
||||||
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-vendor', 'class' => 'btn btn-success']) !!}';
|
|
||||||
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += '</div>';
|
|
||||||
|
|
||||||
$('body').append(modal);
|
$('body').append(modal);
|
||||||
|
|
||||||
$("#modal-create-vendor #currency_code").select2({
|
$('#category-color-picker').colorpicker();
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
|
||||||
|
$('#modal-create-category').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#button-create-category', function (e) {
|
||||||
|
$('#modal-create-category .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 10em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ url("settings/categories/category") }}',
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'JSON',
|
||||||
|
data: $("#form-create-category").serialize(),
|
||||||
|
beforeSend: function () {
|
||||||
|
$(".form-group").removeClass("has-error");
|
||||||
|
$(".help-block").remove();
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
$('#modal-create-category').modal('hide');
|
||||||
|
|
||||||
|
$("#category_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
|
$("#category_id").select2('refresh');
|
||||||
|
},
|
||||||
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
if (error.responseJSON.name) {
|
||||||
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.color) {
|
||||||
|
$("input[name='color']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='color']").parent().after('<p class="help-block">' + error.responseJSON.color + '</p>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
$('#modal-create-vendor').modal('show');
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on('click', '#button-create-vendor', function (e) {
|
|
||||||
$('#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ url("expenses/vendors/vendor") }}',
|
|
||||||
type: 'POST',
|
|
||||||
dataType: 'JSON',
|
|
||||||
data: $("#form-create-vendor").serialize(),
|
|
||||||
beforeSend: function () {
|
|
||||||
$(".form-group").removeClass("has-error");
|
|
||||||
$(".help-block").remove();
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
$('#span-loading').remove();
|
|
||||||
|
|
||||||
$('#modal-create-vendor').modal('hide');
|
|
||||||
|
|
||||||
$("#vendor_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$("#vendor_id").select2('refresh');
|
|
||||||
},
|
|
||||||
error: function(error, textStatus, errorThrown) {
|
|
||||||
$('#span-loading').remove();
|
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
|
||||||
$("input[name='name']").parent().parent().addClass('has-error');
|
|
||||||
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.email) {
|
|
||||||
$("input[name='email']").parent().parent().addClass('has-error');
|
|
||||||
$("input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.currency_code) {
|
|
||||||
$("select[name='currency_code']").parent().parent().addClass('has-error');
|
|
||||||
$("select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function createCategory() {
|
|
||||||
$('#modal-create-category').remove();
|
|
||||||
|
|
||||||
modal = '<div class="modal fade" id="modal-create-category" style="display: none;">';
|
|
||||||
modal += ' <div class="modal-dialog modal-lg">';
|
|
||||||
modal += ' <div class="modal-content">';
|
|
||||||
modal += ' <div class="modal-header">';
|
|
||||||
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}</h4>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' <div class="modal-body">';
|
|
||||||
modal += ' {!! Form::open(['id' => 'form-create-category', 'role' => 'form']) !!}';
|
|
||||||
modal += ' <div class="row">';
|
|
||||||
modal += ' <div class="form-group col-md-6 required">';
|
|
||||||
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
|
||||||
modal += ' <div class="input-group">';
|
|
||||||
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
|
||||||
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' <div class="form-group col-md-6 required">';
|
|
||||||
modal += ' <label for="color" class="control-label">{{ trans('general.color') }}</label>';
|
|
||||||
modal += ' <div id="category-color-picker" class="input-group colorpicker-component">';
|
|
||||||
modal += ' <div class="input-group-addon"><i></i></div>';
|
|
||||||
modal += ' <input class="form-control" value="#00a65a" placeholder="{{ trans('general.color') }}" required="required" name="color" type="text" id="color">';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' {!! Form::hidden('type', 'expense', []) !!}';
|
|
||||||
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' {!! Form::close() !!}';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' <div class="modal-footer">';
|
|
||||||
modal += ' <div class="pull-left">';
|
|
||||||
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-category', 'class' => 'btn btn-success']) !!}';
|
|
||||||
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += ' </div>';
|
|
||||||
modal += '</div>';
|
|
||||||
|
|
||||||
$('body').append(modal);
|
|
||||||
|
|
||||||
$('#category-color-picker').colorpicker();
|
|
||||||
|
|
||||||
$('#modal-create-category').modal('show');
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on('click', '#button-create-category', function (e) {
|
|
||||||
$('#modal-create-category .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 10em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ url("settings/categories/category") }}',
|
|
||||||
type: 'POST',
|
|
||||||
dataType: 'JSON',
|
|
||||||
data: $("#form-create-category").serialize(),
|
|
||||||
beforeSend: function () {
|
|
||||||
$(".form-group").removeClass("has-error");
|
|
||||||
$(".help-block").remove();
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
$('#span-loading').remove();
|
|
||||||
|
|
||||||
$('#modal-create-category').modal('hide');
|
|
||||||
|
|
||||||
$("#category_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$("#category_id").select2('refresh');
|
|
||||||
},
|
|
||||||
error: function(error, textStatus, errorThrown) {
|
|
||||||
$('#span-loading').remove();
|
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
|
||||||
$("input[name='name']").parent().parent().addClass('has-error');
|
|
||||||
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.color) {
|
|
||||||
$("input[name='color']").parent().parent().addClass('has-error');
|
|
||||||
$("input[name='color']").parent().after('<p class="help-block">' + error.responseJSON.color + '</p>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -69,83 +69,85 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('css')
|
@push('css')
|
||||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#paid_at').datepicker({
|
$('#paid_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
});
|
language: '{{ language()->getShortCode() }}'
|
||||||
|
});
|
||||||
|
|
||||||
$("#account_id").select2({
|
$("#account_id").select2({
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#category_id").select2({
|
$("#category_id").select2({
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#vendor_id").select2({
|
$("#vendor_id").select2({
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#payment_method").select2({
|
$("#payment_method").select2({
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#attachment').fancyfile({
|
||||||
|
text : '{{ trans('general.form.select.file') }}',
|
||||||
|
style : 'btn-default',
|
||||||
|
@if($payment->attachment)
|
||||||
|
placeholder : '<?php echo $payment->attachment->basename; ?>'
|
||||||
|
@else
|
||||||
|
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||||
|
@endif
|
||||||
|
});
|
||||||
|
|
||||||
$('#attachment').fancyfile({
|
|
||||||
text : '{{ trans('general.form.select.file') }}',
|
|
||||||
style : 'btn-default',
|
|
||||||
@if($payment->attachment)
|
@if($payment->attachment)
|
||||||
placeholder : '<?php echo $payment->attachment->basename; ?>'
|
attachment_html = '<span class="attachment">';
|
||||||
@else
|
attachment_html += ' <a href="{{ url('uploads/' . $payment->attachment->id . '/download') }}">';
|
||||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
attachment_html += ' <span id="download-attachment" class="text-primary">';
|
||||||
|
attachment_html += ' <i class="fa fa-file-{{ $payment->attachment->aggregate_type }}-o"></i> {{ $payment->attachment->basename }}';
|
||||||
|
attachment_html += ' </span>';
|
||||||
|
attachment_html += ' </a>';
|
||||||
|
attachment_html += ' {!! Form::open(['id' => 'attachment-' . $payment->attachment->id, 'method' => 'DELETE', 'url' => [url('uploads/' . $payment->attachment->id)], 'style' => 'display:inline']) !!}';
|
||||||
|
attachment_html += ' <a id="remove-attachment" href="javascript:void();">';
|
||||||
|
attachment_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
||||||
|
attachment_html += ' </a>';
|
||||||
|
attachment_html += ' {!! Form::close() !!}';
|
||||||
|
attachment_html += '</span>';
|
||||||
|
|
||||||
|
$('.fancy-file .fake-file').append(attachment_html);
|
||||||
|
|
||||||
|
$(document).on('click', '#remove-attachment', function (e) {
|
||||||
|
confirmDelete("#attachment-{!! $payment->attachment->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $payment->attachment->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
|
||||||
|
});
|
||||||
@endif
|
@endif
|
||||||
});
|
|
||||||
|
|
||||||
@if($payment->attachment)
|
$(document).on('change', '#account_id', function (e) {
|
||||||
attachment_html = '<span class="attachment">';
|
$.ajax({
|
||||||
attachment_html += ' <a href="{{ url('uploads/' . $payment->attachment->id . '/download') }}">';
|
url: '{{ url("settings/currencies/currency") }}',
|
||||||
attachment_html += ' <span id="download-attachment" class="text-primary">';
|
type: 'GET',
|
||||||
attachment_html += ' <i class="fa fa-file-{{ $payment->attachment->aggregate_type }}-o"></i> {{ $payment->attachment->basename }}';
|
dataType: 'JSON',
|
||||||
attachment_html += ' </span>';
|
data: 'account_id=' + $(this).val(),
|
||||||
attachment_html += ' </a>';
|
success: function(data) {
|
||||||
attachment_html += ' {!! Form::open(['id' => 'attachment-' . $payment->attachment->id, 'method' => 'DELETE', 'url' => [url('uploads/' . $payment->attachment->id)], 'style' => 'display:inline']) !!}';
|
$('#currency').val(data.currency_code);
|
||||||
attachment_html += ' <a id="remove-attachment" href="javascript:void();">';
|
$('#currency_code').val(data.currency_code);
|
||||||
attachment_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
}
|
||||||
attachment_html += ' </a>';
|
});
|
||||||
attachment_html += ' {!! Form::close() !!}';
|
|
||||||
attachment_html += '</span>';
|
|
||||||
|
|
||||||
$('.fancy-file .fake-file').append(attachment_html);
|
|
||||||
|
|
||||||
$(document).on('click', '#remove-attachment', function (e) {
|
|
||||||
confirmDelete("#attachment-{!! $payment->attachment->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $payment->attachment->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
|
|
||||||
});
|
|
||||||
@endif
|
|
||||||
|
|
||||||
$(document).on('change', '#account_id', function (e) {
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ url("settings/currencies/currency") }}',
|
|
||||||
type: 'GET',
|
|
||||||
dataType: 'JSON',
|
|
||||||
data: 'account_id=' + $(this).val(),
|
|
||||||
success: function(data) {
|
|
||||||
$('#currency').val(data.currency_code);
|
|
||||||
$('#currency_code').val(data.currency_code);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
</script>
|
||||||
</script>
|
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -129,6 +129,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||||
@ -187,13 +188,15 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#invoiced_at').datepicker({
|
$('#invoiced_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#due_at').datepicker({
|
$('#due_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".tax-select2").select2({
|
$(".tax-select2").select2({
|
||||||
|
@ -135,6 +135,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||||
@endpush
|
@endpush
|
||||||
@ -193,13 +194,15 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#invoiced_at').datepicker({
|
$('#invoiced_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
//Date picker
|
//Date picker
|
||||||
$('#due_at').datepicker({
|
$('#due_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".tax-select2").select2({
|
$(".tax-select2").select2({
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
@ -86,7 +87,8 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#paid_at').datepicker({
|
$('#paid_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#account_id").select2({
|
$("#account_id").select2({
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@ -84,7 +85,8 @@
|
|||||||
//Date picker
|
//Date picker
|
||||||
$('#paid_at').datepicker({
|
$('#paid_at').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
language: '{{ language()->getShortCode() }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#account_id").select2({
|
$("#account_id").select2({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user