Skip to content

Commit

Permalink
Default curreency edited
Browse files Browse the repository at this point in the history
  • Loading branch information
brkcvn committed Jun 30, 2021
1 parent c168153 commit 331e790
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
18 changes: 9 additions & 9 deletions resources/assets/js/components/AkauntingCurrencyConversion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
precision: parseInt(this.currencySymbol.precision),
masked: true
}" :value="price" disabled size="5" masked class="disabled-money text-right mr-2 js-conversion-input"></money>
<span class="mr-2">{{ currecyCode }} {{ texts[2] }}</span>
<span class="mr-2">{{ texts[1] }}</span>
<input name="currency_rate" v-model="rate" @input="onChange" class="form-control text-right mwpx-100 h-auto js-conversion-input" />
</div>
</template>
Expand Down Expand Up @@ -48,16 +48,16 @@ export default {
return {
conversion: '',
rate: this.currencyRate,
texts: []
texts: [],
texts_split: []
};
},
created() {
let conver = this.currencyConversionText.split(':price');
this.texts.push(conver[0]);
this.texts.push(conver[1].replace(':currency_code', this.currecyCode).replace(':currency_rate', this.currencyRate));
this.texts.push(this.texts[1].split(" ")[2])
this.texts.push(conver[1].replace(':currency_code', this.currecyCode).replace(':currency_rate', ''));
},
methods: {
Expand All @@ -72,19 +72,19 @@ export default {
},
price: function (price) {
this.conversion = this.currencyConversionText.replace(':price', price).replace(':currency_code', this.currecyCode).replace(':currency_rate', '');
this.conversion = this.currencyConversionText.replace(':price', price).replace(':currency_code', this.currecyCode).replace();
},
currecyCode: function (currecyCode) {
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace(':currency_rate', '');
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace();
},
currencyRate: function (currencyRate) {
this.rate = currencyRate;
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace(':currency_rate', '');
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace();
},
currencySymbol: function (currencySymbol) {
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace(':currency_rate', '');
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace();
},
},
};
Expand Down
7 changes: 5 additions & 2 deletions resources/assets/js/views/common/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,13 @@

this.form.currency_code = currency.code;
this.form.currency_rate = currency.rate;
this.currency_symbol = currency;


this.currencyConversion();
}

if (document_default_currency == currency.code) {
this.currency_symbol = currency;
}
}, this);
},

Expand Down

0 comments on commit 331e790

Please sign in to comment.