refs #451 Add format files;

Banking => Account,
Banking => Transfer,
Common => Items,
Expense => Payment,
Income => Revenue
This commit is contained in:
cuneytsenturk
2018-08-13 21:14:58 +03:00
parent 784d2fd6b1
commit e9d6cecf14
21 changed files with 1099 additions and 25 deletions

View File

@ -49,9 +49,53 @@
var text_no = '{{ trans('general.no') }}';
$(document).ready(function(){
$("#opening_balance").maskMoney({
thousands : '{{ $currency->thousands_separator }}',
decimal : '{{ $currency->decimal_mark }}',
precision : {{ $currency->precision }},
allowZero : true,
@if($currency->symbol_first)
prefix : '{{ $currency->symbol }}'
@else
suffix : '{{ $currency->symbol }}'
@endif
});
$("#opening_balance").focusout();
$("#currency_code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
});
});
$(document).on('change', '#currency_code', function (e) {
$.ajax({
url: '{{ url("settings/currencies/currency") }}',
type: 'GET',
dataType: 'JSON',
data: 'code=' + $(this).val(),
success: function(data) {
$('#currency').val(data.currency_code);
$('#currency_code').val(data.currency_code);
$('#currency_rate').val(data.currency_rate);
opening_balance = $('#opening_balance').maskMoney('unmasked')[0];
$("#opening_balance").maskMoney({
thousands : data.thousands_separator,
decimal : data.decimal_mark,
precision : data.precision,
allowZero : true,
prefix : (data.symbol_first) ? data.symbol : '',
suffix : (data.symbol_first) ? '' : data.symbol
});
$('#opening_balance').val(opening_balance);
$('#opening_balance').trigger('focus');
}
});
});
</script>
@endpush