From d9568e84b7d2ec4343db2e9ae65305dfbcf568d4 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Thu, 27 May 2021 13:38:18 -0400 Subject: [PATCH] Error loading Tender Type fields (#877) * add Documente activity * add traslate * add traslation zh * Error loading Tender Type fields * delete changes * minimal changes * minimal changes Co-authored-by: elsiosanchez --- .../Form/VPOS/Collection/fieldsListCollection.js | 1 + .../ADempiere/Form/VPOS/Collection/index.vue | 12 ++++++++++++ src/components/ADempiere/Form/VPOS/Order/index.vue | 3 +-- src/store/modules/ADempiere/lookup.js | 4 +++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js b/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js index c0fd828b..7a6c6bfa 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js +++ b/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js @@ -53,6 +53,7 @@ export default [ columnName: 'TenderType', isFromDictionary: true, overwriteDefinition: { + defaultValue: 'X', handleActionKeyPerformed: true, handleContentSelection: true, handleActionPerformed: true, diff --git a/src/components/ADempiere/Form/VPOS/Collection/index.vue b/src/components/ADempiere/Form/VPOS/Collection/index.vue index 669f9e39..80d09b1e 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/index.vue @@ -480,6 +480,9 @@ export default { return currency } }) + }, + fieldsPaymentType() { + return this.fieldsList[2] } }, watch: { @@ -534,6 +537,15 @@ export default { value: this.pending }) } + }, + fieldsPaymentType(value) { + const displayPaymentType = this.$store.getters.getValueOfField({ + containerUuid: 'Collection', + columnName: 'DisplayColumn_PaymentType' + }) + if (!this.isEmptyValue(value.reference) && this.isEmptyValue(displayPaymentType)) { + value.reference.directQuery = value.reference.query + } } }, created() { diff --git a/src/components/ADempiere/Form/VPOS/Order/index.vue b/src/components/ADempiere/Form/VPOS/Order/index.vue index 1f92ea04..6cfc0b7e 100644 --- a/src/components/ADempiere/Form/VPOS/Order/index.vue +++ b/src/components/ADempiere/Form/VPOS/Order/index.vue @@ -451,11 +451,10 @@ export default { formatPrice, formatQuantity, openCollectionPanel() { - this.isShowedPOSKeyLayout = !this.isShowedPOSKeyLayout + this.isShowedPOSKeyLayout = true this.$store.commit('setShowPOSCollection', true) const orderUuid = this.$route.query.action this.$store.dispatch('listPayments', { orderUuid }) - this.isShowedPOSKeyLaout = !this.isShowedPOSKeyLaout this.$store.commit('setShowPOSOptions', false) }, open() { diff --git a/src/store/modules/ADempiere/lookup.js b/src/store/modules/ADempiere/lookup.js index 64ed3f24..39b4e032 100644 --- a/src/store/modules/ADempiere/lookup.js +++ b/src/store/modules/ADempiere/lookup.js @@ -54,7 +54,9 @@ const lookup = { isBooleanToString: true }).value } - + if (parsedDirectQuery.includes('?')) { + parsedDirectQuery = directQuery.replace('?', value) + } return requestLookup({ tableName, directQuery: parsedDirectQuery,