Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/close pin #1115

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,30 @@ export default [
isMandatory: true
}
},
{
elementColumnName: 'EMail',
columnName: 'EMail',
tableName: 'AD_user',
isFromDictionary: true,
overwriteDefinition: {
sequence: 5,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
size: 24,
displayLogic: `@TenderType@=='Z'`,
isActiveLogics: true,
isMandatory: true
}
},
// ReferenceNo
{
tableName: 'HR_Attribute',
elementColumnName: 'ReferenceNo',
columnName: 'ReferenceNo',
isFromDictionary: true,
overwriteDefinition: {
sequence: 5,
sequence: 6,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
Expand All @@ -124,7 +140,7 @@ export default [
columnName: 'CreditCardType',
isFromDictionary: true,
overwriteDefinition: {
sequence: 6,
sequence: 7,
defaultValue: 'M',
handleActionKeyPerformed: true,
handleContentSelection: true,
Expand All @@ -142,7 +158,7 @@ export default [
columnName: 'CreditCardNumber',
isFromDictionary: true,
overwriteDefinition: {
sequence: 7,
sequence: 8,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
Expand All @@ -159,7 +175,7 @@ export default [
columnName: 'AccountNo',
isFromDictionary: true,
overwriteDefinition: {
sequence: 8,
sequence: 9,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
Expand All @@ -168,21 +184,5 @@ export default [
isActiveLogics: true,
isMandatory: true
}
},
{
elementColumnName: 'EMail',
columnName: 'EMail',
tableName: 'AD_user',
isFromDictionary: true,
overwriteDefinition: {
sequence: 4,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
size: 24,
displayLogic: `@TenderType@=='Z'`,
isActiveLogics: true,
isMandatory: true
}
}
]
2 changes: 1 addition & 1 deletion src/components/ADempiere/Form/VPOS/Collection/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
</el-main>
<!-- Collection container bottom panel -->
<el-footer id="infoInvoce" height="auto" style="padding-left: 0px; padding-right: 0px;">
<el-row :gutter="24" style="background-color: rgb(245, 247, 250);">
<el-row :gutter="24">
<el-col :span="24">
<span>
<p class="total">
Expand Down
17 changes: 10 additions & 7 deletions src/components/ADempiere/Form/VPOS/Order/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
id="headerContainer"
style="display: -webkit-box; height: 100%"
>
<el-container style="background: white; height: 100%!important;">
<el-container v-shortkey="{ closeForm: ['esc'] }" style="background: white; height: 100%!important;" @shortkey.native="keyActionClosePin">
<el-header
height="auto"
:style="isShowedPOSKeyLayout ? 'padding-right: 20px; padding-left: 0px;' : 'padding-right: 0px; padding-left: 0px;'"
Expand Down Expand Up @@ -214,7 +214,7 @@
</el-table-column>
</el-table>
</el-main>
<el-dialog ref="dialog" :title="$t('form.pos.pinMessage.pin') + infowOverdrawnInvoice.label" width="40%" :visible.sync="visible">
<el-dialog ref="dialog" v-shortkey="{ closeForm: ['esc'] }" :title="$t('form.pos.pinMessage.pin') + infowOverdrawnInvoice.label" width="40%" :visible.sync="visible" @shortkey.native="keyActionClosePin">
<el-input
id="pin"
ref="pin"
Expand All @@ -223,6 +223,7 @@
type="password"
:placeholder="$t('form.pos.tableProduct.pin')"
:focus="true"
@change="openPin(pin)"
/>
<span style="float: right;">
<el-button
Expand Down Expand Up @@ -383,13 +384,13 @@
</p>
<p class="total">{{ $t('form.pos.order.type') }}:<b class="order-info">{{ currentOrder.documentType.name }}</b></p>
<p class="total">
{{ $t('form.pos.order.itemQuantity') }}
{{ $t('form.pos.order.itemQuantity') }}:
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ getItemQuantity }}
</b>
</p>
<p class="total">
{{ $t('form.pos.order.numberLines') }}
{{ $t('form.pos.order.numberLines') }}:
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ numberOfLines }}
</b>
Expand Down Expand Up @@ -683,9 +684,7 @@ export default {
},
watch: {
showOverdrawnInvoice(value) {
if (value) {
this.visible = value
}
this.visible = value
},
numberOfLines(value) {
if (value > 0) {
Expand Down Expand Up @@ -725,6 +724,10 @@ export default {
formatDate,
formatPrice,
formatQuantity,
keyActionClosePin(event) {
this.visible = false
this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: false })
},
focusPin() {
this.$refs.pin.focus()
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ADempiere/Form/VPOS/ProductInfo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<el-popover
v-model="visible"
v-shortkey="keyShortcuts"
placement="right"
placement="bottom-start"
trigger="click"
width="800"
width="1250"
@shortkey.native="close"
>
<el-button icon="el-icon-close" type="text" style="float: right;padding: 1% 1% 0px 0px;font-size: 20px;" @click="close" />
Expand Down
20 changes: 15 additions & 5 deletions src/components/ADempiere/Form/VPOS/ProductInfo/productList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,27 @@
>
<el-table-column
prop="product.value"
label="Codigo"
:label="$t('form.productInfo.code')"
/>
<el-table-column
prop="product.name"
label="Producto"
:label="$t('form.productInfo.name')"
/>
<el-table-column
prop="priceListName"
label="Lista de Precio"
prop="quantityOnHand"
:label="$t('form.productInfo.quantityOnHand')"
align="right"
/>
<el-table-column
label="Precio"
:label="$t('form.pos.collect.convertedAmount')"
align="right"
>
<template slot-scope="scope">
{{ formatPrice(scope.row.schemaPriceStandard, scope.row.schemaCurrency.iSOCode) }}
</template>
</el-table-column>
<el-table-column
:label="$t('form.productInfo.price')"
align="right"
>
<template slot-scope="scope">
Expand Down Expand Up @@ -133,6 +142,7 @@ export default {
listWithPrice() {
const { productPricesList } = this.productPrice
if (!this.isEmptyValue(productPricesList)) {
console.log(productPricesList)
return productPricesList
}
return []
Expand Down
50 changes: 24 additions & 26 deletions src/components/ADempiere/Form/VPOS/posMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export default {
return pos.isPosRequiredPin
}
return false
},
showOverdrawnInvoice() {
return this.$store.getters.getOverdrawnInvoice.visible
}
},
watch: {
Expand Down Expand Up @@ -200,6 +203,9 @@ export default {
if (!value && !this.isEmptyValue(this.$route.query)) {
this.reloadOrder(true)
}
},
showOverdrawnInvoice(value) {
this.visible = value
}
},
beforeMount() {
Expand Down Expand Up @@ -602,38 +608,30 @@ export default {
} else if (mutation.type === 'addActionPerformed') {
switch (mutation.payload.columnName) {
case 'QtyEntered':
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
if (this.allowsModifyQuantity) {
this.updateOrderLine(mutation.payload)
} else {
const attributePin = {
...mutation.payload,
type: 'updateOrder',
label: this.$t('form.pos.pinMessage.qtyEntered')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
} else if (!this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
if (this.allowsModifyQuantity && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
this.updateOrderLine(mutation.payload)
} else {
const attributePin = {
...mutation.payload,
type: 'updateOrder',
label: this.$t('form.pos.pinMessage.qtyEntered')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
break
case 'PriceEntered':
case 'Discount':
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
if (this.modifyPrice) {
this.updateOrderLine(mutation.payload)
} else {
const attributePin = {
...mutation.payload,
type: 'updateOrder',
label: mutation.payload.columnName === 'PriceEntered' ? this.$t('form.pos.pinMessage.price') : this.$t('form.pos.pinMessage.discount')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
} else if (!this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
if (this.modifyPrice) {
this.updateOrderLine(mutation.payload)
} else {
const attributePin = {
...mutation.payload,
type: 'updateOrder',
label: mutation.payload.columnName === 'PriceEntered' ? this.$t('form.pos.pinMessage.price') : this.$t('form.pos.pinMessage.discount')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
break
case 'C_DocTypeTarget_ID': {
Expand Down
5 changes: 3 additions & 2 deletions src/lang/ADempiere/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ export default {
discount: 'Descuento',
tax: 'Impuesto',
total: 'Total',
itemQuantity: 'Cantidad de Árticulo',
numberLines: 'Numero de Lineas',
itemQuantity: 'Cantidad de Artículos',
numberLines: 'Número de Líneas',
pointSale: 'Punto de Venta',
collect: 'Cobrar',
collections: 'Cobros',
Expand Down Expand Up @@ -521,6 +521,7 @@ export default {
id: 'ID',
lastName: 'Nombre2',
description: 'Descripción',
convertedPrice: 'Precio Convertido',
quantityOnHand: 'Existencia',
price: 'Precio',
taxAmount: 'Monto de Impuesto',
Expand Down