diff --git a/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js b/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js
index 7a6c6bfa..43c74706 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js
+++ b/src/components/ADempiere/Form/VPOS/Collection/fieldsListCollection.js
@@ -24,6 +24,7 @@ export default [
columnName: 'PayAmt',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 0,
handleContentSelection: true,
handleActionPerformed: true,
size: 24,
@@ -32,20 +33,6 @@ export default [
isMandatory: true
}
},
- // Currency
- {
- tableName: 'C_Order',
- columnName: 'C_Currency_ID',
- isFromDictionary: true,
- overwriteDefinition: {
- size: 24,
- handleActionKeyPerformed: true,
- handleActionPerformed: true,
- validationCode: 'C_Currency.C_Currency_ID = 100 OR C_Currency.C_Currency_ID = 50001',
- isActiveLogics: true,
- isMandatory: true
- }
- },
// TenderType
{
tableName,
@@ -54,6 +41,7 @@ export default [
isFromDictionary: true,
overwriteDefinition: {
defaultValue: 'X',
+ sequence: 1,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
@@ -62,16 +50,18 @@ export default [
isMandatory: true
}
},
+ // Currency
// Bank
{
tableName,
columnName: 'C_Bank_ID',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 3,
handleActionKeyPerformed: true,
handleActionPerformed: true,
handleContentSelection: true,
- displayLogic: `@TenderType@=='D'`,
+ displayLogic: `@TenderType@<>'X'`,
size: 24,
isActiveLogics: true,
isMandatory: true
@@ -83,6 +73,7 @@ export default [
elementColumnName: 'DateTrx',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 4,
handleFocusGained: true,
handleFocusLost: true,
handleKeyPressed: true,
@@ -102,6 +93,7 @@ export default [
columnName: 'ReferenceNo',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 5,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
@@ -118,6 +110,7 @@ export default [
columnName: 'CreditCardType',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 6,
defaultValue: 'M',
handleActionKeyPerformed: true,
handleContentSelection: true,
@@ -135,6 +128,7 @@ export default [
columnName: 'CreditCardNumber',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 7,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
@@ -151,6 +145,7 @@ export default [
columnName: 'AccountNo',
isFromDictionary: true,
overwriteDefinition: {
+ sequence: 8,
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 b1658031..7efaa9a6 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/index.vue
@@ -62,25 +62,25 @@
{{ $t('form.pos.collect.dayRate') }}:
-
-
-
+
+
+
{{
- formatPrice(formatConversionCurrenty(dateRate.divideRate), dateRate.currencyTo.iSOCode)
+ formatPrice(formatConversionCurrenty(dayRate.divideRate), dayRate.currencyTo.iSOCode)
}}
{{
- dateRate.currencyTo.iSOCode
+ dayRate.currencyTo.iSOCode
}}
{{
- formatConversionCurrenty(dateRate.divideRate)
+ formatConversionCurrenty(dayRate.divideRate)
}}
{{
- formatPrice(1, dateRate.iSOCode)
+ formatPrice(1, dayRate.iSOCode)
}}
@@ -100,11 +100,10 @@
@@ -124,14 +123,12 @@
-
-
+
@@ -314,7 +311,7 @@ export default {
},
computed: {
listCurrency() {
- return this.$store.state['pointOfSales/point/index'].listCurrency
+ return this.$store.state['pointOfSales/point/index'].currenciesList
},
convertionList() {
return this.$store.state['pointOfSales/point/index'].conversionsList
@@ -530,19 +527,41 @@ export default {
updateOrderPaymentPos() {
return this.$store.getters.getUpdatePaymentPos
},
- dateRate() {
- const convertion = this.convertionList.find(currency => {
- if ((currency.currencyTo.iSOCode === this.currentFieldCurrency) && (this.pointOfSalesCurrency.iSOCode !== currency.currencyTo.iSOCode)) {
- return currency
+ convertionsList() {
+ return this.$store.state['pointOfSales/point/index'].conversionsList
+ },
+ currentConvertion() {
+ if (this.isEmptyValue(this.currentPointOfSales.displayCurrency)) {
+ return {}
+ }
+ const convert = this.convertionsList.find(convert => {
+ if (!this.isEmptyValue(convert.currencyTo) && !this.isEmptyValue(this.currentPointOfSales.displayCurrency) && convert.currencyTo.id === this.currentPointOfSales.displayCurrency.id) {
+ return convert
}
})
- if (!this.isEmptyValue(convertion)) {
- return convertion
+ if (convert) {
+ return convert
+ }
+ return {}
+ },
+ dayRate() {
+ const currency = this.listCurrency.find(currency => currency.key === this.currentFieldCurrency)
+ const convert = this.convertionsList.find(convert => {
+ if (!this.isEmptyValue(currency) && !this.isEmptyValue(convert.currencyTo) && currency.id === convert.currencyTo.id && this.currentPointOfSales.currentPriceList.currency.id !== currency.id) {
+ return convert
+ }
+ })
+ if (!this.isEmptyValue(convert)) {
+ return convert
+ }
+ return {
+ currencyTo: this.currentPointOfSales.currentPriceList.currency,
+ divideRate: 1,
+ iSOCode: this.currentPointOfSales.currentPriceList.currency.iSOCode
}
- return this.pointOfSalesCurrency
},
fieldsPaymentType() {
- return this.fieldsList[2]
+ return this.fieldsList[1]
}
},
watch: {
@@ -553,21 +572,6 @@ export default {
value: value
})
},
- // currencyUuid(value) {
- // const listCurrency = this.$store.getters.getConvertionRate.find(currency => {
- // if (currency.uuid === value) {
- // return currency
- // }
- // })
- // if (listCurrency === undefined) {
- // this.$store.dispatch('conversionDivideRate', {
- // conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid,
- // currencyFromUuid: this.pointOfSalesCurrency.uuid,
- // conversionDate: this.formatDate(new Date()),
- // currencyToUuid: value
- // })
- // }
- // },
convertAllPayment(value) {
if (!this.isEmptyValue(value)) {
this.allPayCurrency = this.pay / value
@@ -583,7 +587,7 @@ export default {
})
}
},
- dateRate(value) {
+ dayRate(value) {
if (!this.isEmptyValue(value.divideRate)) {
this.$store.commit('updateValueOfField', {
containerUuid: this.containerUuid,
@@ -618,6 +622,13 @@ export default {
this.defaultValueCurrency()
},
methods: {
+ amountConvert(currency) {
+ this.$store.dispatch('searchConversion', {
+ conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid,
+ currencyFromUuid: this.currentPointOfSales.priceList.currency.uuid,
+ currencyToUuid: currency.uuid
+ })
+ },
formatNumber({ displayType, number }) {
let fixed = 0
// Amount, Costs+Prices, Number
@@ -668,18 +679,7 @@ export default {
containerUuid,
columnName: 'ReferenceNo'
})
- const currencyUuid = this.$store.getters.getValueOfField({
- containerUuid,
- columnName: 'C_Currency_ID_UUID'
- })
- const currencyId = this.$store.getters.getValueOfField({
- containerUuid,
- columnName: 'C_Currency_ID'
- })
- const currencyToPay = this.isEmptyValue(currencyUuid) ? currencyId : currencyUuid
- if (this.isEmptyValue(this.currencyDisplay(currencyToPay)) && this.currencyDisplay(currencyToPay).currencyUuid !== this.pointOfSalesCurrency.uuid) {
- this.amontSend = this.convert.divideRate * this.amontSend
- }
+ this.amontSend = this.dayRate.divideRate * this.amontSend
if (this.sendToServer) {
this.$store.dispatch('setPaymentBox', {
posUuid,
@@ -689,7 +689,7 @@ export default {
amount: this.amontSend * this.convertion,
paymentDate,
tenderTypeCode,
- currencyUuid
+ currencyUuid: this.dayRate.currencyTo.uuid
})
} else {
this.$store.dispatch('createPayments', {
@@ -700,7 +700,7 @@ export default {
amount: this.amontSend * this.convertion,
paymentDate,
tenderTypeCode,
- currencyUuid: this.currencyDisplay(currencyToPay)
+ currencyUuid: this.dayRate.currencyTo.uuid
})
}
this.addCollect()
@@ -838,14 +838,6 @@ export default {
}
return currency
},
- convertCurrency() {
- const convertCurrency = this.currencyDisplay(100)
- this.$store.dispatch('convertionPayment', {
- conversionTypeUuid: this.currentPointOfSales,
- currencyFromUuid: this.pointOfSalesCurrency.uuid,
- currencyToUuid: convertCurrency.currencyUuid
- })
- },
undoPatment() {
const list = this.listPayments[this.listPayments.length - 1]
const orderUuid = list.orderUuid
@@ -918,14 +910,13 @@ export default {
changeCurrency(value) {
this.currentFieldCurrency = value
const currency = this.listCurrency.find(currency => currency.key === value)
- const findCoventionList = this.convertionList.find(convertion => convertion.currencyTo.iSOCode === value)
- if (!this.isEmptyValue(currency) && this.isEmptyValue(findCoventionList) && (value !== this.pointOfSalesCurrency.iSOCode)) {
- this.$store.dispatch('searchConversion', {
- conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid,
- currencyFromUuid: this.pointOfSalesCurrency.uuid,
- conversionDate: this.formatDate(new Date()),
- currencyToUuid: currency.uuid
- })
+ const convert = this.convertionsList.find(convert => {
+ if (!this.isEmptyValue(currency) && !this.isEmptyValue(convert.currencyTo) && currency.id === convert.currencyTo.id && this.currentPointOfSales.currentPriceList.currency.id !== currency.id) {
+ return convert
+ }
+ })
+ if (!this.isEmptyValue(currency) && this.isEmptyValue(convert) && currency.uuid !== this.currentPointOfSales.currentPriceList.currency.uuid) {
+ this.amountConvert(currency)
}
}
}
diff --git a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
index c7953e6a..55d2453f 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
@@ -68,10 +68,7 @@
style="padding-bottom: 20px;"
>
-
- {{ formatPrice(value.multiplyRate, currency.iSOCode) }}
-
-
+
{{ formatPrice(value.amount, currency.iSOCode) }}
@@ -152,9 +149,12 @@ export default {
conevertionAmount() {
return this.$store.getters.getConvertionPayment
},
+ currentPointOfSales() {
+ return this.$store.getters.posAttributes.currentPointOfSales
+ },
// Validate if there is a payment in a different type of currency to the point
paymentCurrency() {
- return this.$store.getters.posAttributes.currentPointOfSales.currentOrder.listPayments.payments.find(pay => pay.currencyUuid !== this.currency.uuid)
+ return this.currentPointOfSales.currentOrder.listPayments.payments.find(pay => pay.currencyUuid !== this.currency.uuid)
}
},
watch: {
@@ -165,11 +165,16 @@ export default {
query: value.reference.query
})
}
+ },
+ labelTypesPayment(value) {
+ console.log(value)
}
},
created() {
- this.convertingPaymentMethods()
- if (this.isEmptyValue(this.labelTypesPayment.reference) && !this.isEmptyValue(this.listPaymentType.reference)) {
+ if (!this.isEmptyValue(this.isAddTypePay)) {
+ this.convertingPaymentMethods()
+ }
+ if (!this.isEmptyValue(this.listPaymentType.reference)) {
this.tenderTypeDisplaye({
tableName: this.listPaymentType.reference.tableName,
query: this.listPaymentType.reference.query
@@ -189,9 +194,10 @@ export default {
})
.then(response => {
this.$store.getters.posAttributes.currentPointOfSales.currentOrder.listPayments.payments.forEach(element => {
+ console.log({ response, element })
if (element.currencyUuid !== this.pointOfSalesCurrency.uuid) {
element.multiplyRate = element.amount / response.multiplyRate
- element.amountConvertion = element.multiplyRate / response.divideRate
+ element.amountConvertion = element.amount / response.divideRate
element.divideRate = response.multiplyRate
element.currencyConvertion = response.currencyTo
}
@@ -267,6 +273,7 @@ export default {
query
})
.then(response => {
+ console.log(response)
this.labelTypesPayment = response
})
}
diff --git a/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue b/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue
index e369daa4..d26b8d6e 100644
--- a/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue
+++ b/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue
@@ -162,24 +162,19 @@ export default {
}
},
mounted() {
- if (this.isReadyFromGetData) {
- this.loadKeyLayout()
+ if (this.isReadyFromGetData ||
+ (!this.isEmptyValue(this.$store.getters.getKeyLayout.uuid) &&
+ this.currentPointOfSales.keyLayoutUuid !== this.$store.getters.getKeyLayout.uuid)
+ ) {
+ this.loadKeyLayout(this.currentPointOfSales.keyLayoutUuid)
}
},
methods: {
formatQuantity,
loadKeyLayout(uuid = null) {
- const currentPOS = this.currentPointOfSales
- if (this.isEmptyValue(currentPOS) || this.isEmptyValue(currentPOS.uuid)) {
- this.$message({
- type: 'warn',
- message: 'Without POS Terminal',
- shosClose: true
- })
- return
- }
+ const KeyLayoutUuid = this.isEmptyValue(uuid) ? this.currentPointOfSales.keyLayoutUuid : uuid
- this.$store.dispatch('getKeyLayoutFromServer', uuid)
+ this.$store.dispatch('getKeyLayoutFromServer', KeyLayoutUuid)
.then(() => {
this.isLoadedKeyLayout = true
})
diff --git a/src/components/ADempiere/Form/VPOS/Order/fieldsListOrder.js b/src/components/ADempiere/Form/VPOS/Order/fieldsListOrder.js
index 7a77cad5..e9922432 100644
--- a/src/components/ADempiere/Form/VPOS/Order/fieldsListOrder.js
+++ b/src/components/ADempiere/Form/VPOS/Order/fieldsListOrder.js
@@ -45,9 +45,11 @@ export default [
isFromDictionary: true,
overwriteDefinition: {
size: 24,
+ handleFocusGained: true,
handleActionPerformed: true,
handleContentSelection: true,
- handleActionKeyPerformed: true
+ handleActionKeyPerformed: true,
+ isReadOnly: true
}
}
// {
diff --git a/src/components/ADempiere/Form/VPOS/Order/index.vue b/src/components/ADempiere/Form/VPOS/Order/index.vue
index c8caae96..208f1b1a 100644
--- a/src/components/ADempiere/Form/VPOS/Order/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Order/index.vue
@@ -54,16 +54,43 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -105,20 +132,22 @@
@current-change="handleCurrentLineChange"
@shortkey.native="shortcutKeyMethod"
>
-
-
-
- {{ displayValue(scope.row, valueOrder) }}
-
-
-
+
+
+
+
+ {{ displayValue(scope.row, valueOrder) }}
+
+
+
+
0) {
+ this.convertedAmount()
+ }
+ },
+ currentOrder(value) {
+ this.validatePin = true
+ }
+ },
mounted() {
if (!this.isEmptyValue(this.$route.query.action)) {
this.$store.dispatch('reloadOrder', { orderUuid: this.$route.query.action })
@@ -613,6 +656,32 @@ export default {
formatDate,
formatPrice,
formatQuantity,
+ openPin(pin) {
+ validatePin({
+ posUuid: this.currentPointOfSales.uuid,
+ pin
+ })
+ .then(response => {
+ this.validatePin = false
+ this.pin = ''
+ this.visible = false
+ })
+ .catch(error => {
+ console.error(error.message)
+ this.$message({
+ type: 'error',
+ message: error.message,
+ showClose: true
+ })
+ this.pin = ''
+ })
+ .finally(() => {
+ this.closePing()
+ })
+ },
+ closePin() {
+ this.visible = false
+ },
closeConvertion() {
this.seeConversion = false
},
diff --git a/src/components/ADempiere/Form/VPOS/Order/line/index.vue b/src/components/ADempiere/Form/VPOS/Order/line/index.vue
index 0d3ad55f..7bc1d5c6 100644
--- a/src/components/ADempiere/Form/VPOS/Order/line/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Order/line/index.vue
@@ -51,6 +51,7 @@
diff --git a/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js b/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
index 849696ea..6d5c228d 100644
--- a/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
+++ b/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
@@ -20,7 +20,6 @@ import {
deleteOrderLine
} from '@/api/ADempiere/form/point-of-sales.js'
import { formatPercent } from '@/utils/ADempiere/valueFormat.js'
-import { showMessage } from '@/utils/ADempiere/notification.js'
export default {
name: 'OrderLineMixin',
@@ -80,11 +79,20 @@ export default {
}
},
computed: {
-
- },
- created() {
- if (!this.isEmptyValue(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency)) {
- this.convertedAmountAsTotal(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency)
+ totalAmountConverted() {
+ const conversionsList = this.$store.state['pointOfSales/point/index'].conversionsList
+ if (this.isEmptyValue(conversionsList) && !this.isEmptyValue(this.currentPointOfSales.conversionTypeUuid)) {
+ return 1
+ }
+ const converted = conversionsList.find(converted => {
+ if (converted.conversionTypeUuid === this.currentPointOfSales.conversionTypeUuid) {
+ return converted
+ }
+ })
+ if (!this.isEmptyValue(converted)) {
+ return converted.divideRate
+ }
+ return 1
}
},
methods: {
@@ -184,7 +192,6 @@ export default {
})
},
deleteOrderLine(lineSelection) {
- console
deleteOrderLine({
orderLineUuid: lineSelection.uuid
})
@@ -200,39 +207,14 @@ export default {
})
})
},
- convertedAmountAsTotal(value) {
- this.$store.dispatch('conversionDivideRate', {
- conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid,
- currencyFromUuid: this.pointOfSalesCurrency.uuid,
- currencyToUuid: value.uuid
- })
- .then(response => {
- if (!this.isEmptyValue(response.currencyTo)) {
- const currency = {
- ...response.currencyTo,
- amountConvertion: response.divideRate,
- multiplyRate: response.multiplyRate
- }
- this.totalAmountConvertedLine = currency
- } else {
- this.totalAmountConvertedLine.multiplyRate = '1'
- this.totalAmountConvertedLine.iSOCode = value.iSOCode
- }
+ convertedAmount() {
+ if (!this.isEmptyValue(this.currentPointOfSales.displayCurrency) && this.totalAmountConverted === 1) {
+ this.$store.dispatch('searchConversion', {
+ conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid,
+ currencyFromUuid: this.currentPointOfSales.currentPriceList.currency.uuid,
+ currencyToUuid: this.currentPointOfSales.displayCurrency.uuid
})
- .catch(error => {
- console.warn(`conversionDivideRate: ${error.message}. Code: ${error.code}.`)
- showMessage({
- type: 'error',
- message: error.message,
- showClose: true
- })
- })
- },
- getTotalAmount(basePrice, multiplyRate) {
- if (this.isEmptyValue(basePrice) || this.isEmptyValue(multiplyRate)) {
- return 0
}
- return (basePrice * multiplyRate)
},
/**
* Show the correct display format
@@ -241,6 +223,7 @@ export default {
*/
displayValue(row, orderLine) {
const { columnName } = orderLine
+ // const iSOCode = this.isEmptyValue(this.currentPointOfSales.displayCurrency) ? '' : this.currentPointOfSales.displayCurrency.iSOCode
if (columnName === 'LineDescription') {
return row.lineDescription
}
@@ -254,7 +237,7 @@ export default {
} else if (columnName === 'GrandTotal') {
return this.formatPrice(row.grandTotal, currency)
} else if (columnName === 'ConvertedAmount') {
- return this.formatPrice(this.getTotalAmount(row.grandTotal, this.totalAmountConvertedLine.multiplyRate), this.totalAmountConvertedLine.iSOCode)
+ return this.formatPrice(row.grandTotal / this.totalAmountConverted)
}
},
productPrice(price, discount) {
diff --git a/src/components/ADempiere/Form/VPOS/posMixin.js b/src/components/ADempiere/Form/VPOS/posMixin.js
index e45b3338..d1189e5d 100644
--- a/src/components/ADempiere/Form/VPOS/posMixin.js
+++ b/src/components/ADempiere/Form/VPOS/posMixin.js
@@ -435,7 +435,7 @@ export default {
case 'C_BPartner_ID_UUID': {
const bPartnerValue = mutation.payload.value
- if (!this.isEmptyValue(this.currentPointOfSales)) {
+ if (!this.isEmptyValue(this.currentPointOfSales.templateBusinessPartner)) {
const bPartnerPOS = this.currentPointOfSales.templateBusinessPartner.uuid
// Does not send values to server, when empty values are set or
// if BPartner set equal to BPartner POS template
diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue
index c0e36d20..656f8e31 100644
--- a/src/layout/components/Sidebar/Item.vue
+++ b/src/layout/components/Sidebar/Item.vue
@@ -32,6 +32,7 @@ export default {
if (this.addMargin) {
return 'margin-left: -20px;'
}
+ return ''
}
}
}
diff --git a/src/store/modules/ADempiere/pointOfSales/keyLayout/actions.js b/src/store/modules/ADempiere/pointOfSales/keyLayout/actions.js
index 5920505d..7a1c77fe 100644
--- a/src/store/modules/ADempiere/pointOfSales/keyLayout/actions.js
+++ b/src/store/modules/ADempiere/pointOfSales/keyLayout/actions.js
@@ -31,6 +31,10 @@ export default {
if (isEmptyValue(keyLayoutUuid)) {
console.info('not load key layout')
+ commit('setKeyLayout', {
+ isLoaded: false,
+ isReload: true
+ })
return
}
getKeyLayout({
diff --git a/src/store/modules/ADempiere/pointOfSales/payments/actions.js b/src/store/modules/ADempiere/pointOfSales/payments/actions.js
index 2cc5c8b1..ad1eea7d 100644
--- a/src/store/modules/ADempiere/pointOfSales/payments/actions.js
+++ b/src/store/modules/ADempiere/pointOfSales/payments/actions.js
@@ -171,36 +171,6 @@ export default {
addRateConvertion({ commit, state, getters }, currency) {
commit('conversionRate', currency)
},
- conversionMultiplyRate({ commit }, {
- containerUuid,
- conversionTypeUuid,
- currencyFromUuid,
- currencyToUuid
- // conversionDate
- }) {
- requestGetConversionRate({
- conversionTypeUuid,
- currencyFromUuid,
- currencyToUuid
- // conversionDate
- })
- .then(response => {
- const multiplyRate = isEmptyValue(response.multiplyRate) ? 1 : response.multiplyRate
- if (containerUuid === 'Collection') {
- commit('currencyMultiplyRateCollection', multiplyRate)
- } else {
- commit('currencyMultiplyRate', multiplyRate)
- }
- })
- .catch(error => {
- console.warn(`conversionMultiplyRate: ${error.message}. Code: ${error.code}.`)
- showMessage({
- type: 'error',
- message: error.message,
- showClose: true
- })
- })
- },
changeMultiplyRate({ commit }, params) {
commit('currencyMultiplyRate', params)
},
@@ -321,27 +291,5 @@ export default {
}
})
commit('setCurrencyDisplaye', displaycurrency)
- },
- convertionPayment({ commit }, {
- conversionTypeUuid,
- currencyFromUuid,
- currencyToUuid
- }) {
- requestGetConversionRate({
- conversionTypeUuid,
- currencyFromUuid,
- currencyToUuid
- })
- .then(response => {
- commit('setConvertionPayment', response)
- })
- .catch(error => {
- console.warn(`ConvertionPayment: ${error.message}. Code: ${error.code}.`)
- showMessage({
- type: 'error',
- message: error.message,
- showClose: true
- })
- })
}
}
diff --git a/src/store/modules/ADempiere/pointOfSales/point/actions.js b/src/store/modules/ADempiere/pointOfSales/point/actions.js
index 2a1afa93..2ba3a5ba 100644
--- a/src/store/modules/ADempiere/pointOfSales/point/actions.js
+++ b/src/store/modules/ADempiere/pointOfSales/point/actions.js
@@ -109,7 +109,7 @@ export default {
})
})
},
- setCurrentPOS({ commit, dispatch, rootGetters }, posToSet) {
+ setCurrentPOS({ commit, dispatch, state, rootGetters }, posToSet) {
commit('setCurrentPointOfSales', posToSet)
const oldRoute = router.app._route
router.push({
@@ -122,6 +122,7 @@ export default {
pos: posToSet.id
}
}, () => {})
+ state.currenciesList = []
dispatch('listWarehouseFromServer', posToSet.uuid)
dispatch('listCurrenciesFromServer', posToSet.uuid)
dispatch('listPricesFromServer', posToSet)