diff --git a/resources/assets/js/components/AkauntingModalAddNew.vue b/resources/assets/js/components/AkauntingModalAddNew.vue index 88f28569d..6eee76cee 100644 --- a/resources/assets/js/components/AkauntingModalAddNew.vue +++ b/resources/assets/js/components/AkauntingModalAddNew.vue @@ -170,7 +170,11 @@ export default { this.component = Vue.component('add-new-component', (resolve, reject) => { resolve({ template : '', - mixins: [Global], + + mixins: [ + Global + ], + components: { AkauntingRadioGroup, AkauntingSelect, @@ -184,6 +188,16 @@ export default { created: function() { this.form = new Form('form-create'); + + // for override global currency variable.. + this.currency = { + decimal: '.', + thousands: ',', + prefix: '$ ', + suffix: '', + precision: 2, + masked: false /* doesn't work with directive */ + }; }, mounted() { @@ -230,7 +244,7 @@ export default { }, onChangeCode(code) { - axios.get(url + '/settings/currencies/config', { + window.axios.get(url + '/settings/currencies/config', { params: { code: code } @@ -263,7 +277,7 @@ export default { this.currency.decimal = response.data.decimal_mark; this.currency.thousands = response.data.thousands_separator; this.currency.prefix = (response.data.symbol_first) ? response.data.symbol : ''; - this.currency.suffix = (!response.data.symbol_first) ? response.data.symbol : ''; + this.currency.suffix = (! response.data.symbol_first) ? response.data.symbol : ''; this.currency.precision = parseInt(response.data.precision); }) .catch(error => { diff --git a/resources/views/components/form/group/account.blade.php b/resources/views/components/form/group/account.blade.php index 7ef1391f1..f0523f9ad 100644 --- a/resources/views/components/form/group/account.blade.php +++ b/resources/views/components/form/group/account.blade.php @@ -1,4 +1,4 @@ -@if (! $attributes->has('withoutAddNew')) +@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')) has('withoutRemote')) && (! $attributes->has('withoutAddNew'))) +@if ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))) -@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew'))) +@elseif (($attributes->has('withoutRemote') && $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))) -@elseif ((! $attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew'))) +@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') && $attributes->has('without-add-new'))) has('withoutRemote')) && (! $attributes->has('withoutAddNew'))) +@if ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))) -@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew'))) +@elseif (($attributes->has('withoutRemote') && $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))) -@elseif ((!$attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew'))) +@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') && $attributes->has('without-add-new'))) has('withoutAddNew')) +@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')) - +