refs #451 Add format files;
Banking => Account, Banking => Transfer, Common => Items, Expense => Payment, Income => Revenue
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,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',
 | 
			
		||||
@@ -71,5 +85,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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user