From 632e7623dd9dfad90f446f7043125d07e55f6376 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:38:54 -0400 Subject: [PATCH] Fix Overdrawn Invoice (#1018) Co-authored-by: elsiosanchez --- .../fieldsListOverdrawnInvoice.js | 17 ++++++++++------- .../VPOS/Collection/overdrawnInvoice/index.vue | 6 ++---- src/lang/ADempiere/en.js | 2 +- src/lang/ADempiere/es.js | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/fieldsListOverdrawnInvoice.js b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/fieldsListOverdrawnInvoice.js index 61261b9b..528fd7ba 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/fieldsListOverdrawnInvoice.js +++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/fieldsListOverdrawnInvoice.js @@ -79,13 +79,16 @@ export default [ elementColumnName: 'EMail', columnName: 'EMail', tableName: 'AD_user', - tabindex: '3', isFromDictionary: true, overwriteDefinition: { - sequence: 4, - isCustomField: true, - displayLogic: `@TenderType@=='D'`, - size: 24 + sequence: 9, + handleActionKeyPerformed: true, + handleContentSelection: true, + handleActionPerformed: true, + size: 24, + displayLogic: `@TenderType@=='D' || @TenderType@=='Z'`, + isActiveLogics: true, + isMandatory: true } }, { @@ -116,7 +119,7 @@ export default [ handleActionKeyPerformed: true, handleActionPerformed: true, handleContentSelection: true, - displayLogic: `@TenderType@<>'X'`, + displayLogic: `@TenderType@<>'X' & @TenderType@<>'Z'`, size: 24, isActiveLogics: true, isMandatory: true @@ -169,7 +172,7 @@ export default [ handleContentSelection: true, handleActionPerformed: true, size: 24, - displayLogic: `@TenderType@=='M'`, + displayLogic: `@TenderType@=='M' || @TenderType@=='D'`, isActiveLogics: true, isMandatory: true } diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue index 162dd5c0..d1079677 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue @@ -112,9 +112,6 @@
{{ $t('form.pos.collect.overdrawnInvoice.below') }} - - {{ $t('form.pos.collect.overdrawnInvoice.adjustDocument') }} -
@@ -211,7 +208,7 @@ export default { containerUuid: 'OverdrawnInvoice', columnName: 'TenderType' }) - if (tenderType === 'D' && tenderType === 'P') { + if (tenderType === 'D') { return true } return false @@ -286,6 +283,7 @@ export default { break case 3: if (this.isEmptyValue(this.emptyMandatoryFields)) { + this.completePreparedOrder(posUuid, orderUuid, payments) overdrawnInvoice({ posUuid, orderUuid, diff --git a/src/lang/ADempiere/en.js b/src/lang/ADempiere/en.js index ddea0cde..b66e642c 100644 --- a/src/lang/ADempiere/en.js +++ b/src/lang/ADempiere/en.js @@ -493,7 +493,7 @@ export default { }, overdrawnInvoice: { title: 'OverdrawnInvoice', - below: 'Would you like to leave the Invoice with an Open balance', + below: 'Invoice will remain with an open balance', above: 'Customer Details', returned: 'Your change is', coupon: 'Generate a Gift Card or Vale', diff --git a/src/lang/ADempiere/es.js b/src/lang/ADempiere/es.js index bc7c1384..dc513325 100644 --- a/src/lang/ADempiere/es.js +++ b/src/lang/ADempiere/es.js @@ -469,7 +469,7 @@ export default { }, overdrawnInvoice: { title: 'Factura Sobregirada', - below: 'Desea dejar la Factura con un saldo Abierto', + below: 'Factura quedarĂ¡ con un saldo abierto', above: 'Datos del Cliente', returned: 'Su vuelto es', coupon: 'Generar una Tarjeta de Regalo o Vale',