From 8e36fb006c4837dbbf0db3d46d0dff0e691e3632 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Tue, 24 Aug 2021 00:30:07 -0400 Subject: [PATCH] Support Maximum Allowable Reimbursement (#1110) * Support Maximum Allowable Reimbursement * remove console Co-authored-by: elsiosanchez --- .../Collection/overdrawnInvoice/index.vue | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue index f1076feb..5f0a014a 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue @@ -65,8 +65,10 @@ {{ selectionTypeRefund.name }} - {{ $t('form.pos.collect.overdrawnInvoice.dailyLimit') }}: {{ formatPrice(selectionTypeRefund.maximum_refund_allowed, currency.iSOCode) }} | {{ formatPrice(0, isoCode) }}
{{ $t('form.pos.collect.overdrawnInvoice.available') }}: {{ formatPrice(selectionTypeRefund.maximum_daily_refund_allowed, currency.iSOCode) }} | {{ formatPrice(0, isoCode) }}

- {{ $t('form.pos.collect.overdrawnInvoice.customerLimit') }}: {{ formatPrice(selectionTypeRefund.maximum_refund_allowed, currency.iSOCode) }} | {{ formatPrice(0, isoCode) }} + + {{ $t('form.pos.collect.overdrawnInvoice.dailyLimit') }}: {{ formatPrice(maximumDailyRefundAllowed, refundReferenceCurrency) }} + {{ $t('form.pos.collect.overdrawnInvoice.customerLimit') }}: {{ formatPrice(maximumRefundAllowed, refundReferenceCurrency) }} +
@@ -266,14 +268,29 @@ export default { caseOrder() { return this.$store.state['pointOfSales/payments/index'].dialogoInvoce.type }, - isoCode() { - return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code + maximumRefundAllowed() { + if (!this.isEmptyValue(this.selectionTypeRefund) && !this.isEmptyValue(this.selectionTypeRefund.maximum_refund_allowed) && this.selectionTypeRefund.maximum_refund_allowed > 0) { + return this.selectionTypeRefund.maximum_refund_allowed + } + return this.$store.getters.posAttributes.currentPointOfSales.maximumRefundAllowed }, maximumDailyRefundAllowed() { + if (!this.isEmptyValue(this.selectionTypeRefund) && !this.isEmptyValue(this.selectionTypeRefund.maximum_daily_refund_allowed) && this.selectionTypeRefund.maximum_daily_refund_allowed > 0) { + return this.selectionTypeRefund.maximum_daily_refund_allowed + } return this.$store.getters.posAttributes.currentPointOfSales.maximumDailyRefundAllowed }, - maximumRefundAllowed() { - return this.$store.getters.posAttributes.currentPointOfSales.maximumRefundAllowed + refundReferenceCurrency() { + 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)) { + return '' + } + return this.$store.getters.posAttributes.currentPointOfSales.refundReferenceCurrency.iso_code + }, + isoCode() { + return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code }, displayeCurrency() { const tenderType = this.$store.getters.getValueOfField({