diff --git a/resources/assets/js/components/AkauntingSelect.vue b/resources/assets/js/components/AkauntingSelect.vue index 5168d03fc..c90f24277 100644 --- a/resources/assets/js/components/AkauntingSelect.vue +++ b/resources/assets/js/components/AkauntingSelect.vue @@ -420,14 +420,14 @@ export default { }, value: { type: [String, Number, Array], - default: null, + default: '', description: "Selectbox selected value" }, options: null, model: { type: [String, Number], - default: null, + default: '', description: "Selectbox selected model" }, diff --git a/resources/assets/js/components/AkauntingSelectRemote.vue b/resources/assets/js/components/AkauntingSelectRemote.vue index 35330ebee..551288418 100644 --- a/resources/assets/js/components/AkauntingSelectRemote.vue +++ b/resources/assets/js/components/AkauntingSelectRemote.vue @@ -710,14 +710,15 @@ export default { if (this.multiple) { this.real_model = value; } else { - this.real_model = value.toString(); + //this.real_model = value.toString(); + this.real_model = value; } }, model: function (value) { if (this.multiple) { this.real_model = value; } else { - this.real_model = value.toString(); + this.real_model = value; } } }, diff --git a/resources/assets/js/plugins/form.js b/resources/assets/js/plugins/form.js index 3fcac67e3..da6ca9648 100644 --- a/resources/assets/js/plugins/form.js +++ b/resources/assets/js/plugins/form.js @@ -229,11 +229,27 @@ export default class Form { submit() { this.loading = true; + axios({ + method: this.method, + url: this.action, + data: this.data() + }) + .then(this.onSuccess.bind(this)) + .catch(this.onFail.bind(this)); + } + + submitTest() { + this.loading = true; + let data = this.data(); let form_data = new FormData(); for (let key in data) { - form_data.append(key, data[key]); + if ((typeof data[key] != 'object') && (typeof data[key] != 'array') ) { + form_data.append(key, data[key]); + } else { + form_data.append(key, JSON.stringify(data[key])); + } } axios({ diff --git a/resources/assets/js/views/purchases/bills.js b/resources/assets/js/views/purchases/bills.js index 35fcac36c..35ab75333 100644 --- a/resources/assets/js/views/purchases/bills.js +++ b/resources/assets/js/views/purchases/bills.js @@ -297,6 +297,8 @@ const app = new Vue({ this.form.discount = discount; this.discount = false; + + this.onCalculateTotal(); }, onPayment() { diff --git a/resources/assets/js/views/sales/invoices.js b/resources/assets/js/views/sales/invoices.js index 7e42de7c3..a1ea6f2aa 100644 --- a/resources/assets/js/views/sales/invoices.js +++ b/resources/assets/js/views/sales/invoices.js @@ -298,6 +298,8 @@ const app = new Vue({ this.form.discount = discount; this.discount = false; + + this.onCalculateTotal(); }, onPayment() { diff --git a/resources/assets/sass/argon.scss b/resources/assets/sass/argon.scss index ebf33f0b5..b70e2261d 100644 --- a/resources/assets/sass/argon.scss +++ b/resources/assets/sass/argon.scss @@ -68,5 +68,3 @@ @import 'custom/components'; @import 'custom/utilities'; @import 'custom/vendors'; - -