Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the currency field #1162

Merged
merged 5 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/components/ADempiere/Form/VPOS/Collection/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
/>
</el-col>
<el-col :span="8">
<el-form-item label="Métodos de pago">
<el-form-item :label="$t('form.pos.collect.paymentMethods')">
<el-select
v-model="currentFieldPaymentMethods"
@change="changePaymentMethods"
Expand All @@ -93,6 +93,7 @@
<el-form-item :label="$t('form.pos.collect.Currency')">
<el-select
v-model="currentFieldCurrency"
:disabled="!isEmptyValue(currentAvailablePaymentMethods.reference_currency)"
@change="changeCurrency"
>
<el-option
Expand Down Expand Up @@ -644,8 +645,13 @@ export default {
},
currentFieldPaymentMethods(value) {
const payment = this.availablePaymentMethods.find(payment => payment.uuid === value)
if (!this.isEmptyValue(payment.refund_reference_currency)) {
this.changeCurrency(payment.refund_reference_currency.iso_code)
if (!this.isEmptyValue(payment.reference_currency)) {
this.changeCurrency(payment.reference_currency.iso_code)
} else {
this.changeCurrency(this.pointOfSalesCurrency.iSOCode)
}
if (!this.isEmptyValue(this.dayRate)) {
this.showDayRate(this.dayRate)
}
},
precision() {
Expand All @@ -657,6 +663,9 @@ export default {
this.$store.dispatch('addRateConvertion', this.pointOfSalesCurrency)
this.unsubscribe = this.subscribeChanges()
this.defaultValueCurrency()
if (!this.isEmptyValue(this.dayRate)) {
this.showDayRate(this.dayRate)
}
this.currentFieldPaymentMethods = this.defaulValuePaymentMethods.uuid
},
methods: {
Expand Down
1 change: 0 additions & 1 deletion src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ export default {
break
case 'Discount':
discountRate = line.value
price = currentLine.price
quantity = currentLine.quantity
break
}
Expand Down
1 change: 1 addition & 0 deletions src/lang/ADempiere/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ export default {
dayRate: 'Day Rate',
noDayRate: 'No daily rate has been generated for the currency.',
refund: 'Refund',
paymentMethods: 'Methods of payment',
emptyRate: 'No conversion rate to date',
Currency: 'Currency',
TenderType: {
Expand Down
1 change: 1 addition & 0 deletions src/lang/ADempiere/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ export default {
dayRate: 'Tasa del Día',
noDayRate: 'No se a generado una tasa del día para la moneda',
refund: 'Reembolso',
paymentMethods: 'Métodos de pago',
emptyRate: 'Sin tasa de conversión a la fecha',
TenderType: {
directDeposit: 'Depósito Directo',
Expand Down