Fixed document payment change account currency issue.. ( #2zftwww )
This commit is contained in:
parent
31eaafdbc1
commit
b33009c7cd
@ -170,7 +170,11 @@ export default {
|
|||||||
this.component = Vue.component('add-new-component', (resolve, reject) => {
|
this.component = Vue.component('add-new-component', (resolve, reject) => {
|
||||||
resolve({
|
resolve({
|
||||||
template : '<div id="modal-add-new-form-' + form_prefix + '">' + this.message + '</div>',
|
template : '<div id="modal-add-new-form-' + form_prefix + '">' + this.message + '</div>',
|
||||||
mixins: [Global],
|
|
||||||
|
mixins: [
|
||||||
|
Global
|
||||||
|
],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
AkauntingRadioGroup,
|
AkauntingRadioGroup,
|
||||||
AkauntingSelect,
|
AkauntingSelect,
|
||||||
@ -184,6 +188,16 @@ export default {
|
|||||||
|
|
||||||
created: function() {
|
created: function() {
|
||||||
this.form = new Form('form-create');
|
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() {
|
mounted() {
|
||||||
@ -230,7 +244,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onChangeCode(code) {
|
onChangeCode(code) {
|
||||||
axios.get(url + '/settings/currencies/config', {
|
window.axios.get(url + '/settings/currencies/config', {
|
||||||
params: {
|
params: {
|
||||||
code: code
|
code: code
|
||||||
}
|
}
|
||||||
@ -263,7 +277,7 @@ export default {
|
|||||||
this.currency.decimal = response.data.decimal_mark;
|
this.currency.decimal = response.data.decimal_mark;
|
||||||
this.currency.thousands = response.data.thousands_separator;
|
this.currency.thousands = response.data.thousands_separator;
|
||||||
this.currency.prefix = (response.data.symbol_first) ? response.data.symbol : '';
|
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);
|
this.currency.precision = parseInt(response.data.precision);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@if (! $attributes->has('withoutAddNew'))
|
@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
add-new
|
add-new
|
||||||
:path="$path"
|
:path="$path"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@if ((! $attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
|
@if ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
remote
|
remote
|
||||||
remote_action="{{ $remoteAction }}"
|
remote_action="{{ $remoteAction }}"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
{{ $attributes }}
|
{{ $attributes }}
|
||||||
/>
|
/>
|
||||||
@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
|
@elseif (($attributes->has('withoutRemote') && $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
add-new
|
add-new
|
||||||
path="{{ $path }}"
|
path="{{ $path }}"
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
{{ $attributes }}
|
{{ $attributes }}
|
||||||
/>
|
/>
|
||||||
@elseif ((! $attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew')))
|
@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') && $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
remote
|
remote
|
||||||
remote_action="{{ $remoteAction }}"
|
remote_action="{{ $remoteAction }}"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@if ((! $attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
|
@if ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
remote
|
remote
|
||||||
remote_action="{{ $remoteAction }}"
|
remote_action="{{ $remoteAction }}"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
{{ $attributes }}
|
{{ $attributes }}
|
||||||
/>
|
/>
|
||||||
@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
|
@elseif (($attributes->has('withoutRemote') && $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
add-new
|
add-new
|
||||||
path="{{ $path }}"
|
path="{{ $path }}"
|
||||||
@ -41,10 +41,10 @@
|
|||||||
|
|
||||||
{{ $attributes }}
|
{{ $attributes }}
|
||||||
/>
|
/>
|
||||||
@elseif ((!$attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew')))
|
@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') && $attributes->has('without-add-new')))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
remote
|
remote
|
||||||
remote_action="{{ $remoteAction }}"
|
remote_action="{{ $remoteAction }}
|
||||||
|
|
||||||
add-new
|
add-new
|
||||||
name="{{ $name }}"
|
name="{{ $name }}"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
@if (! $attributes->has('withoutAddNew'))
|
@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))
|
||||||
<x-form.group.select
|
<x-form.group.select
|
||||||
add-new
|
add-new
|
||||||
:path="$path"
|
:path="$path"
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<x-form.group.payment-method form-group-class="col-span-6"/>
|
<x-form.group.payment-method form-group-class="col-span-6"/>
|
||||||
|
|
||||||
<x-form.group.account change="onChangePaymentAccount" form-group-class="col-span-6" />
|
<x-form.group.account change="onChangePaymentAccount" form-group-class="col-span-6" without-add-new />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user