refs #451 Add format files;
Banking => Account, Banking => Transfer, Common => Items, Expense => Payment, Income => Revenue
This commit is contained in:
@@ -43,6 +43,20 @@
|
||||
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();
|
||||
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
@@ -51,5 +65,35 @@
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -67,6 +67,33 @@
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#sale_price").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
|
||||
});
|
||||
|
||||
$("#purchase_price").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
|
||||
});
|
||||
|
||||
$("#sale_price").focusout();
|
||||
$("#purchase_price").focusout();
|
||||
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
@@ -59,6 +59,33 @@
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#sale_price").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
|
||||
});
|
||||
|
||||
$("#purchase_price").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
|
||||
});
|
||||
|
||||
$("#sale_price").focusout();
|
||||
$("#purchase_price").focusout();
|
||||
|
||||
$("#tax_id").select2({
|
||||
placeholder: {
|
||||
id: '-1', // the value of the option
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
url: '{{ url("banking/accounts/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
|
||||
@@ -86,6 +86,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').trigger('focus');
|
||||
|
||||
$('#account_id').trigger('change');
|
||||
|
||||
//Date picker
|
||||
@@ -133,6 +147,21 @@
|
||||
|
||||
$('#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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -84,6 +84,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').trigger('focus');
|
||||
|
||||
$('#account_id').trigger('change');
|
||||
|
||||
//Date picker
|
||||
@@ -156,6 +170,21 @@
|
||||
|
||||
$('#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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
url: '{{ url("banking/accounts/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
|
||||
@@ -86,6 +86,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').trigger('focus');
|
||||
|
||||
$('#account_id').trigger('change');
|
||||
|
||||
//Date picker
|
||||
@@ -133,6 +147,21 @@
|
||||
|
||||
$('#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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -84,6 +84,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').trigger('focus');
|
||||
|
||||
$('#account_id').trigger('change');
|
||||
|
||||
//Date picker
|
||||
@@ -156,6 +170,21 @@
|
||||
|
||||
$('#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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,9 +52,10 @@
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/fastclick/fastclick.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
|
||||
<!-- Mask Money -->
|
||||
<script src="{{ asset('public/js/jquery/jquery.maskMoney.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
|
||||
<!-- Mask Money -->
|
||||
<script src="{{ asset('public/js/jquery/jquery.maskMoney.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user