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

Error in Change Dialog Display #1232

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@
</template>
</div>
<div class="text item">
<el-row :gutter="24">
<span v-if="isEmptyValue(paymentTypeListRefund)">
<el-empty :image-size="200">
<template slot="description">
<p style="text-align: center;font-size: 20px;"> {{ $t('form.pos.collect.overdrawnInvoice.emptyListPayment') }} </p>
</template>
</el-empty>
</span>
<el-row v-else :gutter="24">
<el-col v-for="(payment, index) in paymentTypeListRefund" :key="index" :span="6">
<div @click="selectPayment(payment)">
<el-card
Expand Down Expand Up @@ -139,7 +146,14 @@
</template>
</div>
<div class="text item">
<el-row :gutter="24">
<span v-if="isEmptyValue(paymentTypeList)">
<el-empty :image-size="200">
<template slot="description">
<p style="text-align: center;font-size: 20px;"> {{ $t('form.pos.collect.overdrawnInvoice.emptyListPayment') }} </p>
</template>
</el-empty>
</span>
<el-row v-else :gutter="24">
<el-col v-for="(payment, index) in paymentTypeList" :key="index" :span="6">
<div @click="selectPayment(payment)">
<el-card
Expand Down Expand Up @@ -354,7 +368,7 @@ export default {
if (!this.isEmptyValue(this.selectionTypeRefund) && !this.isEmptyValue(this.selectionTypeRefund.refund_reference_currency)) {
return this.selectionTypeRefund.refund_reference_currency.iso_code
}
if (this.isEmptyValue(this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency.iso_code)) {
if (this.isEmptyValue(this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency)) {
return ''
}
return this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency.iso_code
Expand All @@ -363,8 +377,8 @@ export default {
if (!this.isEmptyValue(this.selectionTypeRefund) && !this.isEmptyValue(this.selectionTypeRefund.refund_reference_currency)) {
return this.selectionTypeRefund.refund_reference_currency
}
if (this.isEmptyValue(this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency.iso_code)) {
return ''
if (this.isEmptyValue(this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency)) {
return {}
}
return this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export default {
},
currencyReference() {
const reference = this.isEmptyValue(this.typeRefund.refund_reference_currency) ? this.defaultCurrency.id : this.typeRefund.refund_reference_currency.id
if (this.isEmptyValue(reference)) {
return ''
}
const currency = this.listCurrency.find(currency => {
if (currency.id === reference) {
return currency
Expand Down Expand Up @@ -177,7 +180,7 @@ export default {
return this.$store.state['pointOfSales/point/index'].conversionsList
},
dayRate() {
const currency = this.listCurrency.find(currency => currency.iso_code === this.currencyReference.iso_code)
const currency = this.listCurrency.find(currency => !this.isEmptyValue(this.currencyReference) && currency.iso_code === this.currencyReference.iso_code)
const convert = this.convertionsList.find(convert => {
if (!this.isEmptyValue(currency) && !this.isEmptyValue(convert.currencyTo) && currency.id === convert.currencyTo.id && this.currentPointOfSales.currentPriceList.currency.id !== currency.id) {
return convert
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 @@ -517,6 +517,7 @@ export default {
customerLimit: 'Order Limit',
available: 'Available',
emptyPayment: 'Unsupported payment method',
emptyListPayment: 'You do not have any payment method associated with this option',
addPayment: 'You must add a change type to complete the operation',
fieldList: {
code: 'Cedula',
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 @@ -493,6 +493,7 @@ export default {
customerLimit: 'Limite Orden',
available: 'Disponible',
emptyPayment: 'Método de pago no soportado',
emptyListPayment: 'No posee ningún método de pago asociado en esta opción',
addPayment: 'Debe agregar un tipo de vuelto para completar la operación',
fieldList: {
code: 'Cedula',
Expand Down