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

@@ -45,6 +45,20 @@
@push('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#amount").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
});
$("#amount").focusout();
//Date picker
$('#transferred_at').datepicker({
format: 'yyyy-mm-dd',
@@ -65,5 +79,35 @@
placeholder: "{{ trans_choice('general.payment_methods', 1) }}"
});
});
$(document).on('change', '#from_account_id', function (e) {
$.ajax({
url: '{{ url("banking/accounts/currency") }}',
type: 'GET',
dataType: 'JSON',
data: 'account_id=' + $(this).val(),
success: function(data) {
$('#currency').val(data.currency_code);
$('#currency_code').val(data.currency_code);
$('#currency_rate').val(data.currency_rate);
amount = $('#amount').maskMoney('unmasked')[0];
$("#amount").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
});
$('#amount').val(amount);
$('#amount').trigger('focus');
}
});
});
</script>
@endpush