diff --git a/src/api/ADempiere/form/point-of-sales.js b/src/api/ADempiere/form/point-of-sales.js index ac3569f4..7117701e 100644 --- a/src/api/ADempiere/form/point-of-sales.js +++ b/src/api/ADempiere/form/point-of-sales.js @@ -356,7 +356,7 @@ export function getKeyLayout({ keyLayoutUuid }) { } // ListProductPrice -export function requestListProductPrice({ +export function getProductPriceList({ searchValue, priceListUuid, businessPartnerUuid, @@ -395,45 +395,45 @@ export function requestListProductPrice({ }) } -export function requestPrintOrder({ +export function printOrder({ orderUuid }) { console.info(`Print order ${orderUuid}`) } -export function requestGenerateImmediateInvoice({ +export function generateImmediateInvoice({ posId, posUuid }) { console.info(`Generate imediate invoice with POS id ${posId}, and uuid ${posUuid}`) } -export function requestCompletePreparedOrder({ +export function completeOrder({ orderUuid }) { console.info(`Complete prepared order ${orderUuid}`) } -export function requestReverseSalesTransaction({ +export function reverseSalesTransaction({ orderUuid }) { console.info(`Reverse sales transaction ${orderUuid}`) } -export function requestCreateWithdrawal({ +export function withdrawal({ posId, posUuid }) { console.info(`Withdrall cash with POS id ${posId}, and uuid ${posUuid}`) } -export function requestCreateNewCustomerReturnOrder({ +export function createNewReturnOrder({ orderUuid }) { console.info(`New Customer Return Order ${orderUuid}`) } -export function requestCashClosing({ +export function cashClosing({ posId, posUuid }) { @@ -442,7 +442,7 @@ export function requestCashClosing({ // Create Payment -export function requestCreatePayment({ +export function createPayment({ posUuid, orderUuid, invoiceUuid, @@ -477,7 +477,7 @@ export function requestCreatePayment({ // Update Payment -export function requestUpdatePayment({ +export function updatePayment({ paymentUuid, bankUuid, referenceNo, @@ -506,7 +506,7 @@ export function requestUpdatePayment({ // Delete Payment -export function requestDeletePayment({ +export function deletePayment({ paymentUuid }) { return requestRest({ @@ -523,7 +523,7 @@ export function requestDeletePayment({ // List Payments -export function requestListPayments({ +export function getPaymentsList({ posUuid, orderUuid }) { @@ -568,7 +568,7 @@ export function requestListPayments({ * currency_uuid - Currency UUID reference * ] */ -export function requestProcessOrder({ +export function processOrder({ posUuid, orderUuid, createPayments, diff --git a/src/components/ADempiere/Form/ProductInfo/productList.vue b/src/components/ADempiere/Form/ProductInfo/productList.vue index d9d381cc..40f0b5c9 100644 --- a/src/components/ADempiere/Form/ProductInfo/productList.vue +++ b/src/components/ADempiere/Form/ProductInfo/productList.vue @@ -253,7 +253,7 @@ export default { methods: { formatPrice, formatQuantity, - srcImage(keyValue) { + getImageFromSource(keyValue) { if (this.isEmptyValue(keyValue)) { return this.defaultImage } diff --git a/src/components/ADempiere/Form/VPOS/Collection/index.vue b/src/components/ADempiere/Form/VPOS/Collection/index.vue index 3551d19f..682f8e70 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/index.vue @@ -182,7 +182,7 @@ import fieldsListCollection from './fieldsListCollection.js' import typeCollection from '@/components/ADempiere/Form/VPOS/Collection/typeCollection' import convertAmount from '@/components/ADempiere/Form/VPOS/Collection/convertAmount/index' import { formatDate, formatPrice } from '@/utils/ADempiere/valueFormat.js' -import { requestProcessOrder } from '@/api/ADempiere/form/point-of-sales.js' +import { processOrder } from '@/api/ADempiere/form/point-of-sales.js' export default { name: 'Collection', @@ -770,7 +770,7 @@ export default { message: this.$t('notifications.processing'), showClose: true }) - requestProcessOrder({ + processOrder({ posUuid, orderUuid, createPayments: !this.isEmptyValue(payment), diff --git a/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue b/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue index a7ba2cde..06a82d0b 100644 --- a/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue +++ b/src/components/ADempiere/Form/VPOS/KeyLayout/index.vue @@ -45,8 +45,8 @@
@@ -269,14 +269,14 @@
import OrdersList from '@/components/ADempiere/Form/VPOS/OrderList/index'
import ListProductPrice from '@/components/ADempiere/Form/VPOS/ProductInfo/productList'
import {
- requestPrintOrder,
- requestGenerateImmediateInvoice,
- requestCreateWithdrawal,
- requestCreateNewCustomerReturnOrder,
- requestCashClosing,
+ printOrder,
+ generateImmediateInvoice,
+ withdrawal,
+ createNewReturnOrder,
+ cashClosing,
requestDeleteOrder,
requestCreateOrder,
- requestProcessOrder
+ processOrder
} from '@/api/ADempiere/form/point-of-sales.js'
import ModalDialog from '@/components/ADempiere/Dialog'
import posProcess from '@/utils/ADempiere/constants/posProcess'
@@ -424,14 +424,14 @@ export default {
})
},
printOrder() {
- requestPrintOrder({
+ printOrder({
orderUuid: this.$route.query.action
})
},
generateImmediateInvoice() {
// TODO: Add BPartner
const { uuid: posUuid, id: posId } = this.getCurrentPOS
- requestGenerateImmediateInvoice({
+ generateImmediateInvoice({
posId,
posUuid
})
@@ -445,7 +445,7 @@ export default {
message: this.$t('notifications.processing'),
showClose: true
})
- requestProcessOrder({
+ processOrder({
posUuid,
orderUuid: this.$route.query.action,
createPayments: !this.isEmptyValue(this.$store.getters.getListPayments),
@@ -502,16 +502,16 @@ export default {
]
this.$store.dispatch('addParametersProcessPos', parametersList)
},
- createWithdrawal() {
+ withdrawal() {
const { uuid: posUuid, id: posId } = this.getCurrentPOS
// TODO: Add BParner, C_BankAccount_ID (caja), CashTransferBankAccount_ID, PAY_C_BankAccount_ID
- requestCreateWithdrawal({
+ withdrawal({
posId,
posUuid
})
},
createNewCustomerReturnOrder() {
- requestCreateNewCustomerReturnOrder({
+ createNewReturnOrder({
orderUuid: this.$route.query.action
})
},
@@ -573,7 +573,7 @@ export default {
},
cashClosing() {
const { uuid: posUuid, id: posId } = this.getCurrentPOS
- requestCashClosing({
+ cashClosing({
posId,
posUuid
})
diff --git a/src/store/modules/ADempiere/pointOfSales/listProductPrice.js b/src/store/modules/ADempiere/pointOfSales/listProductPrice.js
index ef763dd4..2926b188 100644
--- a/src/store/modules/ADempiere/pointOfSales/listProductPrice.js
+++ b/src/store/modules/ADempiere/pointOfSales/listProductPrice.js
@@ -1,6 +1,6 @@
import Vue from 'vue'
import {
- requestListProductPrice
+ getProductPriceList
} from '@/api/ADempiere/form/point-of-sales.js'
import { isEmptyValue, extractPagingToken } from '@/utils/ADempiere/valueUtils.js'
import { showMessage } from '@/utils/ADempiere/notification.js'
@@ -92,7 +92,7 @@ const listProductPrice = {
})
}
return new Promise(resolve => {
- requestListProductPrice({
+ getProductPriceList({
searchValue,
priceListUuid,
businessPartnerUuid,
@@ -165,7 +165,7 @@ const listProductPrice = {
})
}
return new Promise(resolve => {
- requestListProductPrice({
+ getProductPriceList({
searchValue,
priceListUuid,
businessPartnerUuid,
diff --git a/src/store/modules/ADempiere/pointOfSales/payments/actions.js b/src/store/modules/ADempiere/pointOfSales/payments/actions.js
index 74213995..e062f22d 100644
--- a/src/store/modules/ADempiere/pointOfSales/payments/actions.js
+++ b/src/store/modules/ADempiere/pointOfSales/payments/actions.js
@@ -1,9 +1,9 @@
import {
requestGetConversionRate,
- requestCreatePayment,
- requestDeletePayment,
- requestUpdatePayment,
- requestListPayments
+ createPayment,
+ deletePayment,
+ updatePayment,
+ getPaymentsList
} from '@/api/ADempiere/form/point-of-sales.js'
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
import { showMessage } from '@/utils/ADempiere/notification.js'
@@ -63,7 +63,7 @@ export default {
orderUuid
}) {
listPaymentsLocal.forEach(payment => {
- requestCreatePayment({
+ createPayment({
posUuid,
orderUuid,
bankUuid: payment.bankUuid,
@@ -174,7 +174,7 @@ export default {
return undefined
})
if (isEmptyValue(listPayments)) {
- requestCreatePayment({
+ createPayment({
posUuid,
orderUuid,
invoiceUuid,
@@ -199,7 +199,7 @@ export default {
})
})
} else {
- requestUpdatePayment({
+ updatePayment({
paymentUuid: listPayments.uuid,
bankUuid,
referenceNo,
@@ -226,7 +226,7 @@ export default {
orderUuid,
paymentUuid
}) {
- requestDeletePayment({
+ deletePayment({
paymentUuid
})
.then(response => {
@@ -243,7 +243,7 @@ export default {
},
listPayments({ commit, dispatch }, { posUuid, orderUuid }) {
dispatch('updatePaymentPos', true)
- requestListPayments({
+ getPaymentsList({
posUuid,
orderUuid
})