Payment method not supported (#1098)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>pull/3793/head
							parent
							
								
									bec6d41b44
								
							
						
					
					
						commit
						1e5e4358f9
					
				| 
						 | 
				
			
			@ -206,6 +206,9 @@ export default {
 | 
			
		|||
        case 'Z':
 | 
			
		||||
          typePay = () => import('./paymentTypeChange/zelle/index.vue')
 | 
			
		||||
          break
 | 
			
		||||
        default:
 | 
			
		||||
          typePay = () => import('./paymentTypeChange/empty.vue')
 | 
			
		||||
          break
 | 
			
		||||
      }
 | 
			
		||||
      return typePay
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,215 @@
 | 
			
		|||
<!--
 | 
			
		||||
 ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
 | 
			
		||||
 Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
 | 
			
		||||
 Contributor(s): Elsio Sanchez elsiosanches@gmail.com www.erpya.com
 | 
			
		||||
 This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 it under the terms of the GNU General Public License as published by
 | 
			
		||||
 the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
 (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
 This program is distributed in the hope that it will be useful,
 | 
			
		||||
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
 You should have received a copy of the GNU General Public License
 | 
			
		||||
 along with this program.  If not, see <https:www.gnu.org/licenses/>.
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <h1 style="text-align: center;"> {{ $t('form.pos.collect.overdrawnInvoice.emptyPayment') }} </h1>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { formatPrice } from '@/utils/ADempiere/valueFormat.js'
 | 
			
		||||
import formMixin from '@/components/ADempiere/Form/formMixin'
 | 
			
		||||
import posMixin from '@/components/ADempiere/Form/VPOS/posMixin.js'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'ACH',
 | 
			
		||||
  mixins: [
 | 
			
		||||
    formMixin,
 | 
			
		||||
    posMixin
 | 
			
		||||
  ],
 | 
			
		||||
  props: {
 | 
			
		||||
    change: {
 | 
			
		||||
      type: Number,
 | 
			
		||||
      default: 0
 | 
			
		||||
    },
 | 
			
		||||
    pay: {
 | 
			
		||||
      type: Number,
 | 
			
		||||
      default: 0
 | 
			
		||||
    },
 | 
			
		||||
    pending: {
 | 
			
		||||
      type: Number,
 | 
			
		||||
      default: 0
 | 
			
		||||
    },
 | 
			
		||||
    totalOrder: {
 | 
			
		||||
      type: Number,
 | 
			
		||||
      default: 0
 | 
			
		||||
    },
 | 
			
		||||
    currency: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: undefined
 | 
			
		||||
    },
 | 
			
		||||
    metadata: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => {
 | 
			
		||||
        return {
 | 
			
		||||
          uuid: 'ACH',
 | 
			
		||||
          containerUuid: 'ACH'
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      option: 1,
 | 
			
		||||
      typePay: 0,
 | 
			
		||||
      fieldsList: [],
 | 
			
		||||
      currentFieldCurrency: '',
 | 
			
		||||
      currentPaymentType: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    showDialogo() {
 | 
			
		||||
      return this.$store.state['pointOfSales/payments/index'].dialogoInvoce.show
 | 
			
		||||
    },
 | 
			
		||||
    caseOrder() {
 | 
			
		||||
      return this.$store.state['pointOfSales/payments/index'].dialogoInvoce.type
 | 
			
		||||
    },
 | 
			
		||||
    isoCode() {
 | 
			
		||||
      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() {
 | 
			
		||||
      return this.$store.getters.posAttributes.currentPointOfSales.maximumRefundAllowed
 | 
			
		||||
    },
 | 
			
		||||
    displayeCurrency() {
 | 
			
		||||
      const tenderType = this.$store.getters.getValueOfField({
 | 
			
		||||
        containerUuid: 'OverdrawnInvoice',
 | 
			
		||||
        columnName: 'TenderType'
 | 
			
		||||
      })
 | 
			
		||||
      if (tenderType === 'D') {
 | 
			
		||||
        return true
 | 
			
		||||
      }
 | 
			
		||||
      return false
 | 
			
		||||
    },
 | 
			
		||||
    primaryFieldsList() {
 | 
			
		||||
      return this.fieldsList.filter(field => field.sequence <= 2)
 | 
			
		||||
    },
 | 
			
		||||
    hiddenFieldsList() {
 | 
			
		||||
      return this.fieldsList.filter(field => field.sequence >= 3)
 | 
			
		||||
    },
 | 
			
		||||
    listCurrency() {
 | 
			
		||||
      return this.$store.getters.getCurrenciesList
 | 
			
		||||
    },
 | 
			
		||||
    emptyFieldGiftCard() {
 | 
			
		||||
      const empty = this.fieldsList.filter(field => {
 | 
			
		||||
        if (field.sequence < 3 && this.isEmptyValue(
 | 
			
		||||
          this.$store.getters.getValueOfField({
 | 
			
		||||
            containerUuid: 'OverdrawnInvoice',
 | 
			
		||||
            columnName: field.columnName
 | 
			
		||||
          })
 | 
			
		||||
        )) {
 | 
			
		||||
          return field
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      return empty.map(empty => empty.name)
 | 
			
		||||
    },
 | 
			
		||||
    emptyMandatoryFields() {
 | 
			
		||||
      return this.$store.getters.getFieldsListEmptyMandatory({ containerUuid: 'OverdrawnInvoice', formatReturn: 'name' })
 | 
			
		||||
    },
 | 
			
		||||
    paymentTypeList() {
 | 
			
		||||
      return this.$store.getters.getPaymentTypeList
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$store.commit('updateValueOfField', {
 | 
			
		||||
      containerUuid: 'ACH',
 | 
			
		||||
      columnName: 'PayAmt',
 | 
			
		||||
      value: this.change
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    formatPrice,
 | 
			
		||||
    close() {
 | 
			
		||||
      this.$store.commit('dialogoInvoce', { show: false })
 | 
			
		||||
    },
 | 
			
		||||
    changeCurrency(value) {
 | 
			
		||||
      this.currentFieldCurrency = value
 | 
			
		||||
    },
 | 
			
		||||
    changePaymentType(value) {
 | 
			
		||||
      this.$store.commit('currentTenderChange', value)
 | 
			
		||||
      this.currentPaymentType = value
 | 
			
		||||
      this.$store.commit('updateValueOfField', {
 | 
			
		||||
        containerUuid: 'OverdrawnInvoice',
 | 
			
		||||
        columnName: 'TenderType',
 | 
			
		||||
        value: value
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
  .el-image {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    overflow: hidden;
 | 
			
		||||
  }
 | 
			
		||||
  .el-card__header {
 | 
			
		||||
    padding: 18px 20px;
 | 
			
		||||
    border-bottom: 1px solid #e6ebf5;
 | 
			
		||||
    -webkit-box-sizing: border-box;
 | 
			
		||||
    box-sizing: border-box;
 | 
			
		||||
    background-color: rgb(245, 247, 250);
 | 
			
		||||
  }
 | 
			
		||||
  .el-card__body {
 | 
			
		||||
    padding-top: 0px !important;
 | 
			
		||||
    padding-right: 0px!important;
 | 
			
		||||
    padding-bottom: 20px;
 | 
			
		||||
    padding-left: 10px!important;
 | 
			
		||||
    height: 100%!important;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .bottom {
 | 
			
		||||
    margin-top: 0px!important;
 | 
			
		||||
    line-height: 1px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .button {
 | 
			
		||||
    padding: 0;
 | 
			
		||||
    float: right;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .image {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    display: block;
 | 
			
		||||
    height: 9vh;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .clearfix:before,
 | 
			
		||||
  .clearfix:after {
 | 
			
		||||
    display: table;
 | 
			
		||||
    content: "";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .clearfix:after {
 | 
			
		||||
    clear: both
 | 
			
		||||
  }
 | 
			
		||||
  .el-header {
 | 
			
		||||
    background: 'white';
 | 
			
		||||
    color: #333;
 | 
			
		||||
    line-height: 10px;
 | 
			
		||||
  }
 | 
			
		||||
  .el-aside {
 | 
			
		||||
    color: #333;
 | 
			
		||||
  }
 | 
			
		||||
  .el-row {
 | 
			
		||||
    margin: 0px!important;
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -503,7 +503,8 @@ export default {
 | 
			
		|||
          adjustDocument: 'You want to Adjust Document',
 | 
			
		||||
          dailyLimit: 'Daily Limit',
 | 
			
		||||
          customerLimit: 'Customer Limit',
 | 
			
		||||
          available: 'Available'
 | 
			
		||||
          available: 'Available',
 | 
			
		||||
          emptyPayment: 'Payment method not supported'
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      keyLayout: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -479,7 +479,8 @@ export default {
 | 
			
		|||
          adjustDocument: 'Desea Ajustar Documento',
 | 
			
		||||
          dailyLimit: 'Limite Diario',
 | 
			
		||||
          customerLimit: 'Limite Cliente',
 | 
			
		||||
          available: 'Disponible'
 | 
			
		||||
          available: 'Disponible',
 | 
			
		||||
          emptyPayment: 'Método de pago no soportado'
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      keyLayout: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue