diff --git a/resources/assets/js/components/AkauntingModalAddNew.vue b/resources/assets/js/components/AkauntingModalAddNew.vue index e86d1f184..54ad320c5 100644 --- a/resources/assets/js/components/AkauntingModalAddNew.vue +++ b/resources/assets/js/components/AkauntingModalAddNew.vue @@ -199,6 +199,12 @@ export default { precision: 2, masked: false /* doesn't work with directive */ }; + + if (this.$root.$options.methods) { + for (let method in this.$root.$options.methods) { + this[method] = this.$options.methods[method] !== undefined ? this.$options.methods[method] : this.$root.$options.methods[method]; + } + } }, mounted() { diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index 2570b4ece..6e29eb03e 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -814,11 +814,6 @@ const app = new Vue({ watch: { 'form.discount': function (newVal, oldVal) { - if (newVal > 99) { - newVal = oldVal; - return; - } - if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) { this.form.discount = oldVal; this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';