Change currency money group issue solved.
This commit is contained in:
26
resources/assets/js/mixins/global.js
vendored
26
resources/assets/js/mixins/global.js
vendored
@ -43,6 +43,7 @@ export default {
|
||||
data: function () {
|
||||
return {
|
||||
component: '',
|
||||
currency: null,
|
||||
}
|
||||
},
|
||||
|
||||
@ -183,16 +184,30 @@ export default {
|
||||
this.form.currency_code = response.data.currency_code;
|
||||
this.form.currency_rate = response.data.currency_rate;
|
||||
|
||||
this.money.decimal = response.data.decimal_mark;
|
||||
this.money.thousands = response.data.thousands_separator;
|
||||
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.precision = response.data.precision;
|
||||
this.currency = response.data;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
// Change currency get money
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.currency = response.data;
|
||||
|
||||
this.form.currency_code = response.data.code;
|
||||
this.form.currency_rate = response.data.rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
// Pages limit change
|
||||
onChangePaginationLimit(event) {
|
||||
let path = '';
|
||||
|
||||
@ -232,6 +247,7 @@ export default {
|
||||
window.location.href = path;
|
||||
},
|
||||
|
||||
// Dynamic component get path view and show it.
|
||||
onDynamicComponent(path)
|
||||
{
|
||||
axios.get(path)
|
||||
|
7
resources/assets/js/plugins/bulk-action.js
vendored
7
resources/assets/js/plugins/bulk-action.js
vendored
@ -1,4 +1,3 @@
|
||||
import axios from "axios";
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import NProgressAxios from './nprogress-axios';
|
||||
@ -78,7 +77,7 @@ export default class BulkAction {
|
||||
this.loading = true;
|
||||
|
||||
if (this.value != 'export') {
|
||||
axios.post(path, {
|
||||
window.axios.post(path, {
|
||||
'handle': this.value,
|
||||
'selected': this.selected
|
||||
})
|
||||
@ -97,7 +96,7 @@ export default class BulkAction {
|
||||
//window.location.reload(false);
|
||||
});
|
||||
} else {
|
||||
axios({
|
||||
window.axios({
|
||||
url: path,
|
||||
method: 'POST',
|
||||
data:{
|
||||
@ -154,7 +153,7 @@ export default class BulkAction {
|
||||
var item = event.target;
|
||||
var status = (event.target.checked) ? 'enable' : 'disable';
|
||||
|
||||
axios.get(this.path + '/' + item_id + '/' + status)
|
||||
window.axios.get(this.path + '/' + item_id + '/' + status)
|
||||
.then(response => {
|
||||
var type = (response.data.success) ? 'success' : 'warning';
|
||||
|
||||
|
18
resources/assets/js/views/banking/accounts.js
vendored
18
resources/assets/js/views/banking/accounts.js
vendored
@ -32,22 +32,4 @@ const app = new Vue({
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.money.decimal = response.data.decimal_mark;
|
||||
this.money.thousands = response.data.thousands_separator;
|
||||
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
|
||||
this.money.precision = response.data.precision;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -36,7 +36,6 @@ const app = new Vue({
|
||||
cleared_amount: 0,
|
||||
difference: 0,
|
||||
},
|
||||
currency: null,
|
||||
}
|
||||
},
|
||||
|
||||
@ -47,7 +46,7 @@ const app = new Vue({
|
||||
methods:{
|
||||
onReconcilition() {
|
||||
let form = document.getElementById('form-create-reconciliation');
|
||||
|
||||
|
||||
let path = form.action +'?started_at=' + this.form.started_at + '&ended_at=' + this.form.ended_at + '&closing_balance=' + this.form.closing_balance + '&account_id=' + this.form.account_id;
|
||||
|
||||
window.location.href = path;
|
||||
@ -76,7 +75,7 @@ const app = new Vue({
|
||||
if (type[0] == 'income') {
|
||||
income_total += parseFloat(document.getElementById('transaction-' + type[1] + '-' + type[0]).value);
|
||||
} else {
|
||||
expense_total += parseFloat(document.getElementById('transaction-' + type[1] + '-' + type[0]).value);
|
||||
expense_total += parseFloat(document.getElementById('transaction-' + type[1] + '-' + type[0]).value);
|
||||
}
|
||||
});
|
||||
|
||||
|
16
resources/assets/js/views/purchases/bills.js
vendored
16
resources/assets/js/views/purchases/bills.js
vendored
@ -49,7 +49,6 @@ const app = new Vue({
|
||||
transaction: [],
|
||||
items: '',
|
||||
discount: false,
|
||||
currency: null,
|
||||
taxes: null,
|
||||
}
|
||||
},
|
||||
@ -102,21 +101,6 @@ const app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.currency = response.data;
|
||||
this.form.currency_code = response.data.code;
|
||||
this.form.currency_rate = response.data.rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onCalculateTotal() {
|
||||
let sub_total = 0;
|
||||
let discount_total = 0;
|
||||
|
@ -29,12 +29,6 @@ const app = new Vue({
|
||||
return {
|
||||
form: new Form('payment'),
|
||||
bulk_action: new BulkAction('payments'),
|
||||
currency: null,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onCalcualte() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
17
resources/assets/js/views/sales/invoices.js
vendored
17
resources/assets/js/views/sales/invoices.js
vendored
@ -49,7 +49,6 @@ const app = new Vue({
|
||||
transaction: [],
|
||||
items: '',
|
||||
discount: false,
|
||||
currency: null,
|
||||
taxes: null,
|
||||
}
|
||||
},
|
||||
@ -102,22 +101,6 @@ const app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
onChangeCurrency(currency_code) {
|
||||
axios.get(url + '/settings/currencies/currency', {
|
||||
params: {
|
||||
code: currency_code
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.currency = response.data;
|
||||
|
||||
this.form.currency_code = response.data.code;
|
||||
this.form.currency_rate = response.data.rate;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
|
||||
onCalculateTotal() {
|
||||
let sub_total = 0;
|
||||
let discount_total = 0;
|
||||
|
Reference in New Issue
Block a user