Fixed document payment change account currency issue.. ( #2zftwww )

This commit is contained in:
Cüneyt Şentürk 2022-06-07 10:47:17 +03:00
parent 31eaafdbc1
commit b33009c7cd
6 changed files with 27 additions and 13 deletions

View File

@ -170,7 +170,11 @@ export default {
this.component = Vue.component('add-new-component', (resolve, reject) => {
resolve({
template : '<div id="modal-add-new-form-' + form_prefix + '">' + this.message + '</div>',
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 => {

View File

@ -1,4 +1,4 @@
@if (! $attributes->has('withoutAddNew'))
@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))
<x-form.group.select
add-new
:path="$path"

View File

@ -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
remote
remote_action="{{ $remoteAction }}"
@ -21,7 +21,7 @@
{{ $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
add-new
path="{{ $path }}"
@ -41,7 +41,7 @@
{{ $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
remote
remote_action="{{ $remoteAction }}"

View File

@ -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
remote
remote_action="{{ $remoteAction }}"
@ -21,7 +21,7 @@
{{ $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
add-new
path="{{ $path }}"
@ -41,10 +41,10 @@
{{ $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
remote
remote_action="{{ $remoteAction }}"
remote_action="{{ $remoteAction }}
add-new
name="{{ $name }}"

View File

@ -1,5 +1,5 @@
@if (! $attributes->has('withoutAddNew'))
@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))
<x-form.group.select
add-new
:path="$path"

View File

@ -46,7 +46,7 @@
<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>