diff --git a/src/api/ADempiere/business-data/entities.ts b/src/api/ADempiere/business-data/entities.ts index 9db06b492d5..3dc84dd9ac9 100644 --- a/src/api/ADempiere/business-data/entities.ts +++ b/src/api/ADempiere/business-data/entities.ts @@ -1,6 +1,6 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 201-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com * Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt * 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 @@ -139,32 +139,3 @@ export function requestDeleteEntities({ return response }) } - -// /** -// * Rollback entity (Create, Update, Delete) -// * @param {string} tableName -// * @param {number} recordId -// * @param {string} eventType -// */ -// export function rollbackEntity({ -// tableName, -// recordId, -// recordUuid, -// eventType -// }) { -// return request({ -// url: '/common/api/rollback-entity', -// method: 'post', -// data: { -// table_name: tableName, -// id: recordId, -// uuid: recordUuid, -// event_type: eventType -// } -// }) -// .then(entityResponse => { -// const { convertEntity } = require('@/utils/ADempiere/apiConverts/persistence.js') - -// return convertEntity(entityResponse) -// }) -// } diff --git a/src/api/ADempiere/common/index.ts b/src/api/ADempiere/common/index.ts index 27974cf55ed..639aaa2569b 100644 --- a/src/api/ADempiere/common/index.ts +++ b/src/api/ADempiere/common/index.ts @@ -20,24 +20,10 @@ import { request } from '@/utils/ADempiere/request' // Constants import { ROWS_OF_RECORDS_BY_PAGE } from '@/utils/ADempiere/tableUtils' -import { RECORD_ROWS_BY_LIST } from '@/utils/ADempiere/dictionary/field/lookups' // Utils and Helper Methods import { camelizeObjectKeys } from '@/utils/ADempiere/transformObject.js' -/** - * Conversion Rate - */ -export function requestGetConversionRate() { - return request({ - url: '/common/conversion-rates', - method: 'get' - }) - .then(response => { - return camelizeObjectKeys(response) - }) -} - /** * Get System Info */ @@ -82,58 +68,6 @@ export function requestGetCountryDefinition({ }) } -/** - * Get Organization list from role - * @param param0 - * @returns - */ -export function requestOrganizationsList({ - roleId, - pageToken, - pageSize = RECORD_ROWS_BY_LIST -}) { - return request({ - url: '/security/organizations', - method: 'get', - params: { - role_id: roleId, - page_token: pageToken, - page_size: pageSize - } - }) - .then(organizationsListResponse => { - return { - nextPageToken: organizationsListResponse.next_page_token, - recordCount: organizationsListResponse.record_count, - organizationsList: organizationsListResponse.organizations.map(organization => { - return camelizeObjectKeys(organization) - }) - } - }) -} - -/** - * Get Warehouses of Organization - * @param organizationId - * @returns - */ -export function requestWarehousesList({ - organizationId, - pageToken, - pageSize = RECORD_ROWS_BY_LIST -}) { - return request({ - url: '/security/warehouses', - method: 'get', - params: { - organization_id: organizationId, - // Page Data - page_token: pageToken, - page_size: pageSize - } - }) -} - /** * GET Business Partners */ @@ -169,110 +103,3 @@ export function requestListBusinessPartner({ } }) } - -/** - * GET Product Conversions - */ -export function productConversions({ - id -}) { - return request({ - url: `/common/product-conversions/${id}`, - method: 'get' - }) - .then(responseProductConversions => { - return { - nextPageToken: responseProductConversions.next_page_token, - recordCount: responseProductConversions.record_count, - businessPartnersList: responseProductConversions.product_conversion.map(list => { - return camelizeObjectKeys(list) - }) - } - }) -} - -/** - * GET Business Partne - */ -export function businessPartner({ - searchValue -}) { - return request({ - url: `/core-functionality/business-partners`, - method: 'get', - params: { - search_value: searchValue - } - }) - .then(businessPartnerResponse => { - return { - nextPageToken: businessPartnerResponse.next_page_token, - recordCount: businessPartnerResponse.record_count, - businessPartnersList: businessPartnerResponse.business_partners.map(list => { - return camelizeObjectKeys(list) - }) - } - }) -} - -/** - * POST Business Partner - */ -export function requestCreateBusinessPartner({ - value, - taxId, - duns, - naics, - name, - name2, - description, - contactName, - eMail, - phone, - businessPartnerGroupUuid, - // Location - address1, - address2, - address3, - address4, - cityUuid, - cityName, - postalCode, - regionUuid, - regionName, - countryUuid, - posUuid -}) { - return request({ - url: '/core-functionality/create-business-partner', - method: 'post', - data: { - value, - tax_id: taxId, - duns, - naics, - name, - last_name: name2, - description, - contact_name: contactName, - e_mail: eMail, - phone, - business_partner_group_uid: businessPartnerGroupUuid, - // Location - address1, - address2, - address3, - address4, - city_uuid: cityUuid, - city_name: cityName, - postal_code: postalCode, - region_uuid: regionUuid, - region_name: regionName, - country_uuid: countryUuid, - pos_uuid: posUuid - } - }) - .then(businessPartnerResponse => { - return camelizeObjectKeys(businessPartnerResponse) - }) -} diff --git a/src/api/ADempiere/form/VPOS/index.js b/src/api/ADempiere/form/VPOS/index.js index bcff4ff38fb..037a5dff8bc 100644 --- a/src/api/ADempiere/form/VPOS/index.js +++ b/src/api/ADempiere/form/VPOS/index.js @@ -1,6 +1,6 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com * Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez * 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 @@ -9,7 +9,7 @@ * * 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 + * 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 @@ -864,19 +864,6 @@ export function processOrder({ * |______________________________________| */ -/** - * List Product Conversion UOM - */ - -export function listProductConversion({ - id -}) { - return request({ - url: `common/product-conversions/${id}`, - method: 'get' - }) -} - /** * List Stock: GET /api/stocks * @param {int32} posId @@ -898,32 +885,6 @@ export function listStocks({ }) } -/** - * Get Currency Rate - * @param {int32} conversion_type_id - * @param {int32} currency_from_id - * @param {int32} currency_to_id - * @param {google.protobuf.Timestamp} conversion_date - */ - -export function getConversionRate({ - conversionTypeId, - currencyFromId, - currencyToId, - conversionDate -}) { - return request({ - url: 'common/conversion-rates', - method: 'get', - params: { - conversion_type_id: conversionTypeId, - currency_from_id: currencyFromId, - currency_to_id: currencyToId, - conversion_date: conversionDate - } - }) -} - /** * List Banks */ diff --git a/src/api/ADempiere/form/point-of-sales.js b/src/api/ADempiere/form/point-of-sales.js index 845c68af1c6..78f08da5008 100644 --- a/src/api/ADempiere/form/point-of-sales.js +++ b/src/api/ADempiere/form/point-of-sales.js @@ -9,7 +9,7 @@ * * 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 + * 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 @@ -19,7 +19,9 @@ // Get Instance for connection import { request } from '@/utils/ADempiere/request' import { config } from '@/utils/ADempiere/config' -import { isEmptyValue } from '@/utils/ADempiere' + +// Utils and Helper Methods +import { isEmptyValue } from '@/utils/ADempiere/valueUtils' import { camelizeObjectKeys } from '@/utils/ADempiere/transformObject.js' // Constants @@ -31,7 +33,6 @@ import { RECORD_ROWS_BY_LIST } from '@/utils/ADempiere/dictionary/field/lookups' * @author elsiosanchez */ export { getProductPrice as findProduct } from '@/api/ADempiere/form/price-checking.js' -export { requestGetConversionRate } from '@/api/ADempiere/common/index.ts' // List Point of sales export function getPointOfSales({ @@ -1609,23 +1610,6 @@ export function listStocks({ }) } -export function listUom({ - posUuid, - productId -}) { - return request({ - url: 'common/list-product-conversion', - method: 'get', - params: { - pos_uuid: posUuid, - product_id: productId - } - }) - .then(response => { - return camelizeObjectKeys(response) - }) -} - /** * GET List Banks * req.query.token - user token diff --git a/src/api/ADempiere/process.js b/src/api/ADempiere/process.js deleted file mode 100644 index 9dbc52c7fe1..00000000000 --- a/src/api/ADempiere/process.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com - * Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt - * 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 . - */ - -// Get Instance for connection -import { request } from '@/utils/ADempiere/request' - -/** - * Request a process - * This function allows follow structure: - * @param {string} id, identifier from process to run - * @param {string} uuid, uuid from process to run - * @param {string} tableName, table name of tab, used only window - * @param {number} recordId, record identifier, used only window - * @param {string} recordUuid, record universal unique identifier, used only window - * @param {array} parametersList, parameters from process [{ columnName, value }] - * @param {array} selectionsList, selection records, used only browser - [{ - selectionId, - values: [{ columnName, value }] - }] - * @param {number} tableSelectedId, used only browser // TODO: Add support on adempiere-vue - */ -export function requestRunProcess({ - id, - uuid, - parametersList = [], - // window - tableName, - recordId, - recordUuid, - // browse - browserId, - selectionsList = [] -}) { - parametersList = parametersList.map(parameter => { - return { - key: parameter.columnName, - value: parameter.value - } - }) - - return request({ - url: '/common/api/process', - method: 'post', - data: { - id, - uuid, - parameters: parametersList, - // - table_name: tableName, - record_id: recordId, - record_uuid: recordUuid, - // - browser_id: browserId, - selections: selectionsList - } - }) - .then(processRunResponse => { - const { convertProcessLog } = require('@/utils/ADempiere/apiConverts/process.js') - - return convertProcessLog(processRunResponse) - }) -} diff --git a/src/api/ADempiere/security/index.ts b/src/api/ADempiere/security/index.ts index c787ba1b723..e0913aeaa02 100644 --- a/src/api/ADempiere/security/index.ts +++ b/src/api/ADempiere/security/index.ts @@ -19,6 +19,9 @@ // Get Instance for connection import { request } from '@/utils/ADempiere/request' +// Constants +import { RECORD_ROWS_BY_LIST } from '@/utils/ADempiere/dictionary/field/lookups' + // Utils and Helper Methods import { camelizeObjectKeys } from '@/utils/ADempiere/transformObject.js' import { getLanguage } from '@/lang/index' @@ -198,3 +201,54 @@ export function requestLogout() { }) } +/** + * Get Organizations list by Role + * @param param0 + * @returns + */ +export function organizationsListRequest({ + roleId, + pageToken, + pageSize = RECORD_ROWS_BY_LIST +}) { + return request({ + url: '/security/organizations', + method: 'get', + params: { + role_id: roleId, + page_token: pageToken, + page_size: pageSize + } + }) + .then(organizationsListResponse => { + return { + nextPageToken: organizationsListResponse.next_page_token, + recordCount: organizationsListResponse.record_count, + organizationsList: organizationsListResponse.organizations.map(organization => { + return camelizeObjectKeys(organization) + }) + } + }) +} + +/** + * Get Warehouses by Organization + * @param organizationId + * @returns + */ +export function warehousesListRequest({ + organizationId, + pageToken, + pageSize = RECORD_ROWS_BY_LIST +}) { + return request({ + url: '/security/warehouses', + method: 'get', + params: { + organization_id: organizationId, + // Page Data + page_token: pageToken, + page_size: pageSize + } + }) +} diff --git a/src/api/ADempiere/system-core.js b/src/api/ADempiere/system-core.js index 034a9fb8e97..f5f487a55ef 100644 --- a/src/api/ADempiere/system-core.js +++ b/src/api/ADempiere/system-core.js @@ -21,65 +21,6 @@ import { request } from '@/utils/ADempiere/request' // Constants import { ROWS_OF_RECORDS_BY_PAGE } from '@/utils/ADempiere/tableUtils' -import { RECORD_ROWS_BY_LIST } from '@/utils/ADempiere/dictionary/field/lookups' - -// Get Organization list from role -export function requestOrganizationsList({ - roleUuid, - roleId, - pageToken, - pageSize = RECORD_ROWS_BY_LIST -}) { - return request({ - url: '/security/organizations', - method: 'get', - params: { - role_id: roleId, - role_uuid: roleUuid, - // Page Data - page_token: pageToken, - page_size: pageSize - } - }) - .then(organizationsListResponse => { - const { convertOrganization } = require('@/utils/ADempiere/apiConverts/core.js') - - return { - nextPageToken: organizationsListResponse.next_page_token, - recordCount: organizationsListResponse.record_count, - organizationsList: organizationsListResponse.records.map(organization => { - return convertOrganization(organization) - }) - } - }) -} - -// Get Warehouses of Organization -export function requestWarehousesList({ - organizationUuid, - organizationId, - pageToken, - pageSize = RECORD_ROWS_BY_LIST -}) { - return request({ - url: '/security/warehouses', - method: 'get', - params: { - organization_id: organizationId, - organization_uuid: organizationUuid, - // Page Data - page_token: pageToken, - page_size: pageSize - } - }) - .then(warehousesListResponse => { - return { - nextPageToken: warehousesListResponse.next_page_token, - recordCount: warehousesListResponse.record_count, - warehousesList: warehousesListResponse.records - } - }) -} /** * Get Country definition from server using id or uuid for record @@ -121,67 +62,6 @@ export function requestLanguagesList({ }) } -export function requestCreateBusinessPartner({ - value, - taxId, - duns, - naics, - name, - name2, - description, - contactName, - eMail, - phone, - businessPartnerGroupUuid, - // Location - address1, - address2, - address3, - address4, - cityUuid, - cityName, - postalCode, - regionUuid, - regionName, - countryUuid, - posUuid -}) { - return request({ - url: '/core-functionality/create-business-partner', - method: 'post', - data: { - value, - tax_id: taxId, - duns, - naics, - name, - last_name: name2, - description, - contact_name: contactName, - e_mail: eMail, - phone, - business_partner_group_uid: businessPartnerGroupUuid, - // Location - address1, - address2, - address3, - address4, - city_uuid: cityUuid, - city_name: cityName, - postal_code: postalCode, - region_uuid: regionUuid, - region_name: regionName, - country_uuid: countryUuid, - pos_uuid: posUuid - } - }) - .then(businessPartnerResponse => { - const { convertBusinessPartner } = require('@/utils/ADempiere/apiConverts/core.js') - - return convertBusinessPartner(businessPartnerResponse) - }) -} - export function requestGetBusinessPartner({ posUuid, searchValue @@ -201,95 +81,55 @@ export function requestGetBusinessPartner({ }) } -export function requestListBusinessPartner({ - posUuid, - searchValue, - value, - name, - contactName, - eMail, - postalCode, - phone, - // Query - // criteria, - pageSize = ROWS_OF_RECORDS_BY_PAGE, - pageToken -}) { +/** + * Get System Info + */ +export function systemInfo() { return request({ - url: '/core-functionality/business-partners', - method: 'get', - params: { - pos_uuid: posUuid, - search_value: searchValue, - value, - name, - contact_name: contactName, - e_mail: eMail, - phone, - // Location - postal_code: postalCode, - page_size: pageSize, - page_token: pageToken - } + url: '/core/system-info', + method: 'get' }) - .then(businessPartnerResponse => { - const { convertBusinessPartner } = require('@/utils/ADempiere/apiConverts/core.js') - - return { - nextPageToken: businessPartnerResponse.next_page_token, - recordCount: businessPartnerResponse.record_count, - businessPartnersList: businessPartnerResponse.records.map(businessPartner => { - return convertBusinessPartner(businessPartner) - }) - } + .then(response => { + return response + }) + .catch(error => { + console.info(error) }) } /** - * Get currency rate - * @param {string} conversionTypeUuid - * @param {string} currencyFromUuid - * @param {string} currencyToUuid - * @param {date} conversionDate - * @returns {promise} + * Get Currency Rate + * @param {int32} conversion_type_id + * @param {int32} currency_from_id + * @param {int32} currency_to_id + * @param {google.protobuf.Timestamp} conversion_date */ -export function requestGetConversionRate({ - posUuid, - conversionTypeUuid, - currencyFromUuid, - currencyToUuid, +export function getConversionRateRequest({ + conversionTypeId, + currencyFromId, + currencyToId, conversionDate }) { return request({ - url: '/core-functionality/conversion-rate', + url: '/core-functionality/conversion-rates', method: 'get', params: { - pos_uuid: posUuid, - conversion_type_uuid: conversionTypeUuid, - currency_from_uuid: currencyFromUuid, - currency_to_uuid: currencyToUuid, + conversion_type_id: conversionTypeId, + currency_from_id: currencyFromId, + currency_to_id: currencyToId, conversion_date: conversionDate } }) - .then(conversionRateResponse => { - const { convertConversionRate } = require('@/utils/ADempiere/apiConverts/core.js') - - return convertConversionRate(conversionRateResponse) - }) } /** - * Get System Info + * List Product Conversion UOM */ -export function systemInfo() { +export function listProductConversionsRequest({ + id +}) { return request({ - url: '/core/system-info', + url: `core-functionality/product-conversions/${id}`, method: 'get' }) - .then(response => { - return response - }) - .catch(error => { - console.info(error) - }) } diff --git a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue index 07198bfeb14..d8d1ce66c1b 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue @@ -165,8 +165,8 @@ import { formatPrice } from '@/utils/ADempiere/valueFormat.js' import { - requestGetConversionRate -} from '@/api/ADempiere/common/index.ts' + getConversionRateRequest +} from '@/api/ADempiere/system-core' import posMixin from '@/components/ADempiere/Form/VPOS/posMixin.js' export default { @@ -359,7 +359,8 @@ export default { // If there are payments in another currency, search for conversion convertingPaymentMethods() { if (!this.isEmptyValue(this.paymentCurrency)) { - requestGetConversionRate({ + // TODO: Change by UUID to ID + getConversionRateRequest({ conversionTypeUuid: this.currentPointOfSales.conversionTypeUuid, currencyFromUuid: this.currency.uuid, currencyToUuid: this.paymentCurrency.currencyUuid diff --git a/src/store/modules/ADempiere/form/VPOS/collection.js b/src/store/modules/ADempiere/form/VPOS/collection.js index d2c75421adf..0c026591c86 100644 --- a/src/store/modules/ADempiere/form/VPOS/collection.js +++ b/src/store/modules/ADempiere/form/VPOS/collection.js @@ -1,30 +1,36 @@ -// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution -// Copyright (C) 2023-Present E.R.P. Consultores y Asociados, C.A. -// Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez -// 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 . +/** + * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez + * 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 . + */ import Vue from 'vue' import lang from '@/lang' + // API Request Methods import { createPayment, // updatePayment, deletePayment, listPayments, - getConversionRate, processOrder } from '@/api/ADempiere/form/VPOS' +import { + getConversionRateRequest +} from '@/api/ADempiere/system-core' + // Utils and Helper Methods import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' import { showMessage } from '@/utils/ADempiere/notification' @@ -258,7 +264,7 @@ export default { if (isEmptyValue(currencyFromId)) { currencyFromId = price_list.currency.id } - getConversionRate({ + getConversionRateRequest({ conversionTypeId: conversion_type_id, currencyFromId, currencyToId, diff --git a/src/store/modules/ADempiere/form/VPOS/lines.js b/src/store/modules/ADempiere/form/VPOS/lines.js index caac0dd3d34..a957073d1cd 100644 --- a/src/store/modules/ADempiere/form/VPOS/lines.js +++ b/src/store/modules/ADempiere/form/VPOS/lines.js @@ -1,6 +1,6 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com * Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez * 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 @@ -17,19 +17,21 @@ */ import Vue from 'vue' + // API Request Methods import { listStocks, listOrderLines, createOrderLine, updateOrderLine, - deleteOrderLine, - listProductConversion + deleteOrderLine } from '@/api/ADempiere/form/VPOS/index' -import { isEmptyValue } from '@/utils/ADempiere' +import { + listProductConversionsRequest +} from '@/api/ADempiere/system-core' // Utils and Helper Methods -// import { isEmptyValue } from '@/utils/ADempiere' +import { isEmptyValue } from '@/utils/ADempiere/valueUtils' import { showMessage } from '@/utils/ADempiere/notification.js' import { sumStocksByWarehouse } from '@/utils/ADempiere/dictionary/form/VPOS' @@ -247,7 +249,7 @@ export default { }) { return new Promise(resolve => { if (isEmptyValue(productId)) resolve([]) - listProductConversion({ + listProductConversionsRequest({ id: productId }) .then(response => { @@ -274,6 +276,7 @@ export default { }) }) }, + findListStocks({ commit, getters diff --git a/src/store/modules/ADempiere/pointOfSales/orderLine/actions.js b/src/store/modules/ADempiere/pointOfSales/orderLine/actions.js index 8e6324ebc9f..f0576fe4455 100644 --- a/src/store/modules/ADempiere/pointOfSales/orderLine/actions.js +++ b/src/store/modules/ADempiere/pointOfSales/orderLine/actions.js @@ -1,26 +1,31 @@ -// 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 esanchez@erpya.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 . +/** + * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez + * 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 . + */ +// API Request Methods import { listOrderLines, - listStocks, - listUom + listStocks } from '@/api/ADempiere/form/point-of-sales.js' +import { + listProductConversionsRequest +} from '@/api/ADempiere/system-core' -// utils and helper methods +// Utils and Helper Methods import { formatQuantity } from '@/utils/ADempiere/formatValue/numberFormat' import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' import { showMessage } from '@/utils/ADempiere/notification.js' @@ -168,7 +173,7 @@ export default { productId }) { const posUuid = rootGetters.posAttributes.currentPointOfSales.uuid - return listUom({ + return listProductConversionsRequest({ posUuid, productId }) diff --git a/src/store/modules/ADempiere/pointOfSales/payments/actions.js b/src/store/modules/ADempiere/pointOfSales/payments/actions.js index f93490939ca..e2c26d9ee45 100644 --- a/src/store/modules/ADempiere/pointOfSales/payments/actions.js +++ b/src/store/modules/ADempiere/pointOfSales/payments/actions.js @@ -1,24 +1,25 @@ -// 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 esanchez@erpya.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 . +/** + * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez + * 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 . + */ import lang from '@/lang' -// api request methods +// API Request Methods import { - // requestGetConversionRate, createPayment, deletePayment, updatePayment, @@ -33,12 +34,11 @@ import { listRefundReference, deleteRefundReference } from '@/api/ADempiere/form/point-of-sales.js' - import { - requestGetConversionRate -} from '@/api/ADempiere/common/index.ts' + getConversionRateRequest +} from '@/api/ADempiere/system-core' -// utils and helper methods +// Utils and Helper Methods import { formatDate } from '@/utils/ADempiere/formatValue/dateFormat' import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' import { showMessage } from '@/utils/ADempiere/notification.js' @@ -144,7 +144,8 @@ export default { if (isEmptyValue(params.currencyToUuid)) { return } - return requestGetConversionRate({ + // TODO: Change by UUID to ID + return getConversionRateRequest({ posUuid, conversionTypeUuid: params.conversionTypeUuid, currencyFromUuid: params.currencyFromUuid, @@ -168,7 +169,8 @@ export default { }, conversionDivideRate({ commit, dispatch, getters, rootGetters }, params) { const posUuid = isEmptyValue(params.currentPOS) ? rootGetters.posAttributes.currentPointOfSales.uuid : params.currentPOS.uuid - return requestGetConversionRate({ + // TODO: Change by UUID to ID + return getConversionRateRequest({ posUuid, conversionTypeUuid: params.conversionTypeUuid, currencyFromUuid: params.currencyFromUuid, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 87c5a70c665..09bcf21f435 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -32,14 +32,14 @@ import { requestLogout, requestRolesList, requestChangeRole, + organizationsListRequest, + warehousesListRequest, requestSessionInfo, loginAuthentication, setSessionAttribute, requestUserInfoFromSession } from '@/api/ADempiere/security/index.ts' import { - requestOrganizationsList, - requestWarehousesList, systemInfo, systemInfoDictionary, systemInfoS3 @@ -431,7 +431,7 @@ const actions = { organizationId = getters.getCurrentOrgId } - return requestOrganizationsList({ roleId }) + return organizationsListRequest({ roleId }) .then(response => { let organization = response.organizationsList.find(orgItem => { return orgItem.id === organizationId @@ -562,7 +562,7 @@ const actions = { return } - return requestWarehousesList({ + return warehousesListRequest({ organizationId }) .then(response => { diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/converted/process.json b/tests/unit/utils/ADempiere/apiConverts/objects/converted/process.json deleted file mode 100644 index ad61d85b41a..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/converted/process.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "accessLevel": "Access Level", - "description": "Process Description", - "help": "Process Help", - "id": "12345", - "isActive": false, - "isDirectPrint": true, - "isReport": false, - "name": "Process Name", - "reportExportTypes": ["Export Type 1", "Export Type 2"], - "showHelp": true, - "uuid": "95325b0a-a67b-11eb-bcbc-0242ac130002", - "parameters": [{ - "id": "5678", - "uuid": "95325d26-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Name", - "description": "Process Parameter Description", - "help": "Process Parameter Help", - "columnName": "Process Parameter Column Name", - "elementName": "Process Parameter Element Name", - "isActive": true, - "displayType": "Process Parameter Display Type", - "isFieldOnly": false, - "isRange": true, - "isSameLine": false, - "isEncrypted": true, - "isQuickEntry": false, - "sequence": "Process Parameter Sequence", - "seqNoGrid": 6, - "sortNo": 1, - "identifierSequence": "Process Parameter Identifier Sequence", - "formatPattern": "Process Parameter Format Pattern", - "vFormat": "Process Parameter V Format", - "defaultValue": "Process Parameter Default Value", - "defaultValueTo": "Process Parameter Default Value To", - "fieldLength": 2, - "valueMin": 3, - "valueMax": 3, - "isIdentifier": true, - "isParent": false, - "isKey": true, - "isSelectionColumn": false, - "isUpdateable": true, - "isAlwaysUpdateable": false, - "isAllowCopy": true, - "isHeading": false, - "isAllowLogging": true, - "isTranslated": false, - "columnSQL": "Process Parameter Column SQL", - "isDisplayed": true, - "isDisplayedGrid": false, - "isMandatory": true, - "isReadOnly": false, - "isQueryCriteria": true, - "isOrderBy": false, - "isInfoOnly": true, - "callout": "Process Parameter Callout", - "displayLogic": "Process Parameter Display Logic", - "mandatoryLogic": "Process Parameter Mandatory Logic", - "readOnlyLogic": "Process Parameter Read Only Logic", - "fieldGroup": { - "id": "3455", - "uuid": "95325e16-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Fieldgroup Name", - "fieldGroupType": "Process Parameter Fieldgroup Type", - "isActive": true, - "groupName": "Process Parameter Fieldgroup Name", - "groupType": "Process Parameter Fieldgroup Type" - }, - "reference": { - "tableName": "Process Parameter Reference Table Name", - "keyColumnName": "Process Parameter Reference Key Column Name", - "displayColumnName": "Process Parameter Reference Display Column Name", - "query": "Process Parameter Reference Query", - "directQuery": "Process Parameter Reference Direcy Query", - "validationCode": "Process Parameter Reference Validation Code", - "zoomWindows": [{ - "id": "974634", - "uuid": "95325ede-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Reference Zoom Windows Name", - "description": "Process Parameter Reference Zoom Windows Description", - "isSalesTransaction": false, - "isActive": true - }] - }, - "contextInfo": { - "id": "8546456", - "uuid": "95325f9c-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Context Info Name", - "description": "Process Parameter Context Info Description", - "sqlStatement": "Process Parameter Context Info SQL Statement", - "isActive": false, - "messageText": { - "id": "4383456", - "value": "Process Parameter Context Info Message Text Value", - "messageType": "Process Parameter Context Info Message Text Type", - "messageText": "Process Parameter Context Info Message Text Text", - "messageTip": "Process Parameter Context Info Message Text Tip", - "isActive": false - } - }, - "fieldDefinition": { - "id": "4364567", - "uuid": "95326050-a67b-11eb-bcbc-0242ac130002", - "value": "Process Parameter Field Definition Value", - "name": "Process Parameter Field Definition Name", - "isActive": false, - "fieldGroupType": "Process Parameter Field Definition Type", - "conditions": [{ - "id": "4567568", - "uuid": "953262d0-a67b-11eb-bcbc-0242ac130002", - "condition": "Process Parameter Field Definition Condition", - "styleSheet": "Process Parameter Field Definition Condition Style Sheet", - "isActive": false - }] - } - }] -} \ No newline at end of file diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLog.json b/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLog.json deleted file mode 100644 index db5d89df16c..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLog.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "uuid": "uuid", - "instanceUuid": "instance_uuid", - "isError": true, - "summary": "summary", - "resultTableName": "result_table_name", - "isProcessing": false, - "lastRun": "last_run", - "paramenters": [], - "output": {} -} diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLogWithReport.json b/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLogWithReport.json deleted file mode 100644 index db64865be07..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processLogWithReport.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "uuid": "uuid", - "instanceUuid": "instance_uuid", - "isError": true, - "summary": "summary", - "resultTableName": "result_table_name", - "isProcessing": false, - "lastRun": "last_run", - "paramenters": [], - "output": { - "uuid": "uuid", - "name": "name", - "description": "description", - "fileName": "file_name", - "output": "output", - "mimeType": "mime_type", - "dataCols": "data_cols", - "dataRows": "data_rows", - "headerName": "header_name", - "footerName": "footer_name", - "printFormatUuid": "print_format_uuid", - "reportViewUuid": "report_view_uuid", - "tableName": "table_name", - "outputStream": "output_stream", - "outputStream_asB64": "output_stream_asB64", - "outputStream_asU8": "output_stream_asU8", - "reportType": "report_type" - } -} diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processWithUndefined.json b/tests/unit/utils/ADempiere/apiConverts/objects/converted/processWithUndefined.json deleted file mode 100644 index e74d96d9906..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/converted/processWithUndefined.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "accessLevel": "Access Level", - "description": "Process Description", - "help": "Process Help", - "id": "12345", - "isActive": false, - "isDirectPrint": true, - "isReport": false, - "name": "Process Name", - "reportExportTypes": ["Export Type 1", "Export Type 2"], - "showHelp": true, - "uuid": "95325b0a-a67b-11eb-bcbc-0242ac130002", - "parameters": [{ - "id": "5678", - "uuid": "95325d26-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Name", - "description": "Process Parameter Description", - "help": "Process Parameter Help", - "columnName": "Process Parameter Column Name", - "elementName": "Process Parameter Element Name", - "isActive": true, - "displayType": "Process Parameter Display Type", - "isFieldOnly": false, - "isRange": true, - "isSameLine": false, - "isEncrypted": true, - "isQuickEntry": false, - "sequence": "Process Parameter Sequence", - "seqNoGrid": 6, - "sortNo": 1, - "identifierSequence": "Process Parameter Identifier Sequence", - "formatPattern": "Process Parameter Format Pattern", - "vFormat": "Process Parameter V Format", - "defaultValue": "Process Parameter Default Value", - "defaultValueTo": "Process Parameter Default Value To", - "fieldLength": 2, - "valueMin": 3, - "valueMax": 3, - "isIdentifier": true, - "isParent": false, - "isKey": true, - "isSelectionColumn": false, - "isUpdateable": true, - "isAlwaysUpdateable": false, - "isAllowCopy": true, - "isHeading": false, - "isAllowLogging": true, - "isTranslated": false, - "columnSQL": "Process Parameter Column SQL", - "isDisplayed": true, - "isDisplayedGrid": false, - "isMandatory": true, - "isReadOnly": false, - "isQueryCriteria": true, - "isOrderBy": false, - "isInfoOnly": true, - "callout": "Process Parameter Callout", - "displayLogic": "Process Parameter Display Logic", - "mandatoryLogic": "Process Parameter Mandatory Logic", - "readOnlyLogic": "Process Parameter Read Only Logic", - "fieldGroup": {}, - "reference": { - "zoomWindows": [] - }, - "contextInfo": { - "messageText": {} - }, - "fieldDefinition": { - "conditions": [] - } - }] -} \ No newline at end of file diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/process.json b/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/process.json deleted file mode 100644 index 5e99304ef3f..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/process.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "access_level": "Access Level", - "description": "Process Description", - "help": "Process Help", - "id": "12345", - "is_active": false, - "is_direct_print": true, - "is_report": false, - "name": "Process Name", - "report_export_types": ["Export Type 1", "Export Type 2"], - "show_help": true, - "uuid": "95325b0a-a67b-11eb-bcbc-0242ac130002", - "parameters": [ - { - "id": "5678", - "uuid": "95325d26-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Name", - "description": "Process Parameter Description", - "help": "Process Parameter Help", - "column_name": "Process Parameter Column Name", - "element_name": "Process Parameter Element Name", - "is_active": true, - "display_type": "Process Parameter Display Type", - "is_field_only": false, - "is_range": true, - "is_same_line": false, - "is_encrypted": true, - "is_quick_entry": false, - "sequence": "Process Parameter Sequence", - "seq_no_grid": 6, - "sort_no": 1, - "identifier_sequence": "Process Parameter Identifier Sequence", - "format_pattern": "Process Parameter Format Pattern", - "v_format": "Process Parameter V Format", - "default_value": "Process Parameter Default Value", - "default_value_to": "Process Parameter Default Value To", - "field_length": 2, - "value_max": 3, - "is_identifier": true, - "is_parent": false, - "is_key": true, - "is_selection_column": false, - "is_updateable": true, - "is_always_updateable": false, - "is_allow_copy": true, - "is_heading": false, - "is_allow_logging": true, - "is_translated": false, - "column_sql": "Process Parameter Column SQL", - "is_displayed": true, - "is_displayed_grid": false, - "is_mandatory": true, - "is_read_only": false, - "is_query_criteria": true, - "is_order_by": false, - "is_info_only": true, - "callout": "Process Parameter Callout", - "display_logic": "Process Parameter Display Logic", - "mandatory_logic": "Process Parameter Mandatory Logic", - "read_only_logic": "Process Parameter Read Only Logic", - "Fieldgroup": { - "id": "3455", - "uuid": "95325e16-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Fieldgroup Name", - "field_group_type": "Process Parameter Fieldgroup Type", - "is_active": true - }, - "reference": { - "table_name": "Process Parameter Reference Table Name", - "key_column_name": "Process Parameter Reference Key Column Name", - "display_column_name": "Process Parameter Reference Display Column Name", - "query": "Process Parameter Reference Query", - "direct_query": "Process Parameter Reference Direcy Query", - "validation_code": "Process Parameter Reference Validation Code", - "zoom_windows": [ - { - "id": "974634", - "uuid": "95325ede-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Reference Zoom Windows Name", - "description": "Process Parameter Reference Zoom Windows Description", - "is_sales_transaction": false, - "is_active": true - } - ] - }, - "context_info": { - "id": "8546456", - "uuid": "95325f9c-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Context Info Name", - "description": "Process Parameter Context Info Description", - "sql_statement": "Process Parameter Context Info SQL Statement", - "is_active": false, - "message_text": { - "id": "4383456", - "value": "Process Parameter Context Info Message Text Value", - "message_type": "Process Parameter Context Info Message Text Type", - "message_text": "Process Parameter Context Info Message Text Text", - "message_tip": "Process Parameter Context Info Message Text Tip", - "is_active": false - } - }, - "Fielddefinition": { - "id": "4364567", - "uuid": "95326050-a67b-11eb-bcbc-0242ac130002", - "Value": "Process Parameter Field Definition Value", - "name": "Process Parameter Field Definition Name", - "is_active": false, - "field_group_type": "Process Parameter Field Definition Type", - "conditions": [ - { - "id": "4567568", - "uuid": "953262d0-a67b-11eb-bcbc-0242ac130002", - "condition": "Process Parameter Field Definition Condition", - "style_sheet": "Process Parameter Field Definition Condition Style Sheet", - "is_active": false - } - ] - } - } - ] -} diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLog.json b/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLog.json deleted file mode 100644 index 9317d8d9846..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLog.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "uuid": "uuid", - "instance_uuid": "instance_uuid", - "is_error": true, - "summary": "summary", - "result_table_name": "result_table_name", - "is_processing": false, - "last_run": "last_run", - "paramenters": ["paramenter1", "paramenter2"], - "output": "" -} diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLogWithReport.json b/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLogWithReport.json deleted file mode 100644 index 098a9736352..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processLogWithReport.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "uuid": "uuid", - "instance_uuid": "instance_uuid", - "is_error": true, - "summary": "summary", - "result_table_name": "result_table_name", - "is_processing": false, - "last_run": "last_run", - "paramenters": ["paramenter1", "paramenter2"], - "output": { - "uuid": "uuid", - "name": "name", - "description": "description", - "file_name": "file_name", - "output": "output", - "mime_type": "mime_type", - "data_cols": "data_cols", - "data_rows": "data_rows", - "header_name": "header_name", - "footer_name": "footer_name", - "print_format_uuid": "print_format_uuid", - "report_view_uuid": "report_view_uuid", - "table_name": "table_name", - "output_stream": "output_stream", - "output_stream_asB64": "output_stream_asB64", - "output_stream_asU8": "output_stream_asU8", - "report_type": "report_type" - } -} diff --git a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processWithUndefined.json b/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processWithUndefined.json deleted file mode 100644 index bfb4416bca0..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/objects/fromApi/processWithUndefined.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "access_level": "Access Level", - "description": "Process Description", - "help": "Process Help", - "id": "12345", - "is_active": false, - "is_direct_print": true, - "is_report": false, - "name": "Process Name", - "report_export_types": ["Export Type 1", "Export Type 2"], - "show_help": true, - "uuid": "95325b0a-a67b-11eb-bcbc-0242ac130002", - "parameters": [{ - "id": "5678", - "uuid": "95325d26-a67b-11eb-bcbc-0242ac130002", - "name": "Process Parameter Name", - "description": "Process Parameter Description", - "help": "Process Parameter Help", - "column_name": "Process Parameter Column Name", - "element_name": "Process Parameter Element Name", - "is_active": true, - "display_type": "Process Parameter Display Type", - "is_field_only": false, - "is_range": true, - "is_same_line": false, - "is_encrypted": true, - "is_quick_entry": false, - "sequence": "Process Parameter Sequence", - "seq_no_grid": 6, - "sort_no": 1, - "identifier_sequence": "Process Parameter Identifier Sequence", - "format_pattern": "Process Parameter Format Pattern", - "v_format": "Process Parameter V Format", - "default_value": "Process Parameter Default Value", - "default_value_to": "Process Parameter Default Value To", - "field_length": 2, - "value_max": 3, - "is_identifier": true, - "is_parent": false, - "is_key": true, - "is_selection_column": false, - "is_updateable": true, - "is_always_updateable": false, - "is_allow_copy": true, - "is_heading": false, - "is_allow_logging": true, - "is_translated": false, - "column_sql": "Process Parameter Column SQL", - "is_displayed": true, - "is_displayed_grid": false, - "is_mandatory": true, - "is_read_only": false, - "is_query_criteria": true, - "is_order_by": false, - "is_info_only": true, - "callout": "Process Parameter Callout", - "display_logic": "Process Parameter Display Logic", - "mandatory_logic": "Process Parameter Mandatory Logic", - "read_only_logic": "Process Parameter Read Only Logic" - }] -} \ No newline at end of file diff --git a/tests/unit/utils/ADempiere/apiConverts/process.spec.js b/tests/unit/utils/ADempiere/apiConverts/process.spec.js deleted file mode 100644 index cc31501eaaf..00000000000 --- a/tests/unit/utils/ADempiere/apiConverts/process.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution -// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. -// Contributor(s): Sofia Calderon sofia.ester.calderon@gmail.com www.westfalia-it.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 . - -import { convertProcessLog } from '@/utils/ADempiere/apiConverts/process' -import processLog from './objects/fromApi/processLog.json' -import convertedProcessLog from './objects/converted/processLog.json' -import processLogWithReport from './objects/fromApi/processLogWithReport.json' -import convertedProcessLogWithReport from './objects/converted/processLogWithReport.json' - -describe('processLog', () => { - it('should return a converted processLog object', () => { - const actualProcessLog = convertProcessLog(processLog) - expect(actualProcessLog).toEqual(convertedProcessLog) - }) - - it('should return a converted processLog with output object', () => { - const actualProcessLog = convertProcessLog(processLogWithReport) - expect(actualProcessLog).toEqual(convertedProcessLogWithReport) - }) -})