@@ -363,12 +363,37 @@ export default {
}
return require('@/image/ADempiere/pos/typePayment/' + image)
},
+ selectPayment(payment) {
+ this.selectionTypeRefund = payment
+ this.$store.commit('updateValueOfField', {
+ containerUuid: this.renderComponentContainer,
+ columnName: 'PayAmt',
+ value: this.change
+ })
+ },
addRefund() {
const values = this.$store.getters.getValuesView({
containerUuid: this.renderComponentContainer,
format: 'object'
})
values.tenderType = this.selectionTypeRefund.name
+ const emptyMandatoryFields = this.$store.getters.getFieldsListEmptyMandatory({ containerUuid: this.renderComponentContainer, formatReturn: 'name' })
+ if (!this.isEmptyValue(emptyMandatoryFields)) {
+ this.$message({
+ type: 'warning',
+ message: this.$t('notifications.mandatoryFieldMissing') + emptyMandatoryFields,
+ duration: 1500,
+ showClose: true
+ })
+ return
+ }
+ Object.keys(values).forEach(element => {
+ this.$store.commit('updateValueOfField', {
+ containerUuid: this.renderComponentContainer,
+ columnName: element,
+ value: undefined
+ })
+ })
this.$store.dispatch('addRefundLoaded', values)
this.selectionTypeRefund = {}
},
@@ -411,20 +436,11 @@ export default {
optionSelected({ posUuid, orderUuid, customerDetails, payments }) {
switch (this.option) {
case 2:
- if (this.isEmptyValue(this.emptyFieldGiftCard)) {
- this.completePreparedOrder(posUuid, orderUuid, payments)
- this.$store.commit('dialogoInvoce', { show: false, success: true })
- } else {
- this.$message({
- type: 'warn',
- message: this.$t('notifications.mandatoryFieldMissing') + this.emptyFieldGiftCard,
- duration: 1500,
- showClose: true
- })
- }
+ this.completePreparedOrder(posUuid, orderUuid, payments)
+ this.$store.commit('dialogoInvoce', { show: false, success: true })
break
case 3:
- if (this.isEmptyValue(this.emptyMandatoryFields)) {
+ if (!this.isEmptyValue(this.refundLoaded)) {
this.completePreparedOrder(posUuid, orderUuid, payments)
overdrawnInvoice({
posUuid,
@@ -452,11 +468,11 @@ export default {
this.$store.commit('dialogoInvoce', { show: false, success: true })
} else {
this.$message({
- type: 'warn',
- message: this.$t('notifications.mandatoryFieldMissing') + this.emptyMandatoryFields,
- duration: 1500,
+ type: 'warning',
+ message: this.$t('form.pos.collect.overdrawnInvoice.addPayment'),
showClose: true
})
+ return
}
break
default:
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/fieldsListACH.js b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/fieldsListACH.js
index 375ba94b..c783a33b 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/fieldsListACH.js
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/fieldsListACH.js
@@ -102,7 +102,8 @@ export default [
size: 24,
isNumericField: true,
isActiveLogics: true,
- isMandatory: true
+ isMandatory: true,
+ isReadOnly: true
}
}
]
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/index.vue
index ef0e0043..ceb58a29 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/ACH/index.vue
@@ -32,6 +32,21 @@
:metadata-field="field"
/>
+
+
+
+
+
+
+
@@ -100,7 +115,6 @@ export default {
return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code
},
maximumDailyRefundAllowed() {
- console.log(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code)
return this.$store.getters.posAttributes.currentPointOfSales.maximumDailyRefundAllowed
},
maximumRefundAllowed() {
@@ -145,13 +159,6 @@ export default {
return this.$store.getters.getPaymentTypeList
}
},
- created() {
- this.$store.commit('updateValueOfField', {
- containerUuid: 'ACH',
- columnName: 'PayAmt',
- value: this.change
- })
- },
methods: {
formatPrice,
close() {
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/fieldsListCash.js b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/fieldsListCash.js
index ac71e906..316e43ef 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/fieldsListCash.js
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/fieldsListCash.js
@@ -29,7 +29,8 @@ export default [
size: 24,
isNumericField: true,
isActiveLogics: true,
- isMandatory: true
+ isMandatory: true,
+ isReadOnly: true
}
}
]
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/index.vue
index 43dd907f..e47dbc15 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/Cash/index.vue
@@ -118,7 +118,6 @@ export default {
return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code
},
maximumDailyRefundAllowed() {
- console.log(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code)
return this.$store.getters.posAttributes.currentPointOfSales.maximumDailyRefundAllowed
},
maximumRefundAllowed() {
@@ -196,13 +195,6 @@ export default {
}
}
},
- created() {
- this.$store.commit('updateValueOfField', {
- containerUuid: 'Cash',
- columnName: 'PayAmt',
- value: this.change
- })
- },
methods: {
formatPrice,
close() {
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/GiftCards/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/GiftCards/index.vue
index 90eabae0..54270762 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/GiftCards/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/GiftCards/index.vue
@@ -103,7 +103,6 @@ export default {
return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code
},
maximumDailyRefundAllowed() {
- console.log(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code)
return this.$store.getters.posAttributes.currentPointOfSales.maximumDailyRefundAllowed
},
maximumRefundAllowed() {
@@ -181,13 +180,6 @@ export default {
}
}
},
- created() {
- this.$store.commit('updateValueOfField', {
- containerUuid: 'Cash',
- columnName: 'PayAmt',
- value: this.change
- })
- },
methods: {
formatPrice,
close() {
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/fieldsListMobilePayment.js b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/fieldsListMobilePayment.js
index 74f70164..9f517e8f 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/fieldsListMobilePayment.js
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/fieldsListMobilePayment.js
@@ -86,7 +86,8 @@ export default [
size: 24,
isNumericField: true,
isActiveLogics: true,
- isMandatory: true
+ isMandatory: true,
+ isReadOnly: true
}
}
]
diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/index.vue
index ebd31f3f..6ae685cb 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/paymentTypeChange/MobilePayment/index.vue
@@ -32,6 +32,21 @@
:metadata-field="field"
/>
+
+
+
+
+
+
+