@adempiere/grpc-api
Advanced tools
Comparing version 4.6.5 to 4.6.6
{ | ||
"name": "@adempiere/grpc-api", | ||
"version": "4.6.5", | ||
"version": "4.6.6", | ||
"description": "ADempiere Web write in Javascript for a node service", | ||
@@ -5,0 +5,0 @@ "author": "Yamel Senih", |
/************************************************************************************* | ||
* Product: ADempiere gRPC Business Data Client * | ||
* Copyright (C) 2012-2023 E.R.P. Consultores y Asociados, C.A. * | ||
* Copyright (C) 2018-2023 E.R.P. Consultores y Asociados, C.A. * | ||
* Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com * | ||
@@ -18,3 +18,3 @@ * This program is free software: you can redistribute it and/or modify * | ||
const { getMetadata } = require('@adempiere/grpc-api/src/utils/metadata.js'); | ||
const { isEmptyValue, getValidId } = require('@adempiere/grpc-api/src/utils/valueUtils.js'); | ||
const { isEmptyValue, getValidId, getValidInteger, getTypeOfValue } = require('@adempiere/grpc-api/src/utils/valueUtils.js'); | ||
@@ -68,8 +68,11 @@ class BusinessData { | ||
token, | ||
processUuid, | ||
tableName, | ||
id, | ||
uuid, | ||
tableName, | ||
recordId, | ||
recordUuid, | ||
reportType, | ||
printFormatId, | ||
printFormatUuid, | ||
reportViewId, | ||
reportViewUuid, | ||
@@ -84,25 +87,43 @@ isSummary, | ||
// record of window | ||
request.setTableName(tableName); | ||
request.setId( | ||
getValidId(id) | ||
getValidInteger(id) | ||
); | ||
request.setUuid(uuid); | ||
// record of window | ||
request.setTableName(tableName); | ||
request.setRecordId( | ||
getValidInteger(recordId) | ||
); | ||
request.setRecordUuid(recordUuid); | ||
// report values | ||
request.setReportType(reportType); | ||
request.setPrintFormatId( | ||
getValidInteger(printFormatId) | ||
); | ||
request.setPrintFormatUuid(printFormatUuid); | ||
request.setReportViewId( | ||
getValidInteger(reportViewId) | ||
); | ||
request.setReportViewUuid(reportViewUuid); | ||
request.setIsSummary(isSummary); | ||
request.setProcessUuid(processUuid); | ||
// set process parameters list | ||
if (!isEmptyValue(parametersList)) { | ||
if (getTypeOfValue(parametersList) === 'String') { | ||
parametersList = JSON.parse(parametersList); | ||
} | ||
const { getKeyValueToGRPC } = require('@adempiere/grpc-api/src/utils/baseDataTypeToGRPC.js'); | ||
parametersList.forEach(parameter => { | ||
let parsedParameter = parameter; | ||
if (getTypeOfValue(parameter) === 'String') { | ||
parsedParameter = JSON.parse(parameter); | ||
} | ||
// parameter format = { columName, value, valueType } | ||
const convertedParameter = getKeyValueToGRPC({ | ||
columnName: parameter.key, | ||
value: parameter.value | ||
columnName: parsedParameter.key, | ||
value: parsedParameter.value, | ||
valueType: parsedParameter.valueType | ||
}); | ||
@@ -109,0 +130,0 @@ |
/************************************************************************************* | ||
* Product: ADempiere gRPC User Interface Client * | ||
* Copyright (C) 2012-2023 E.R.P. Consultores y Asociados, C.A. * | ||
* Copyright (C) 2018-2023 E.R.P. Consultores y Asociados, C.A. * | ||
* Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com * | ||
@@ -633,5 +633,9 @@ * This program is free software: you can redistribute it and/or modify * | ||
token, | ||
processId, | ||
processUuid, | ||
tableName, | ||
// Reference | ||
printFormatId, | ||
printFormatUuid, | ||
reportViewId, | ||
reportViewUuid, | ||
@@ -652,2 +656,7 @@ isSummary, | ||
const { getCriteriaToGRPC } = require('@adempiere/grpc-api/src/utils/baseDataTypeToGRPC.js'); | ||
request.setProcessId( | ||
getValidInteger(processId) | ||
); | ||
request.setProcessUuid(processUuid); | ||
@@ -666,5 +675,11 @@ request.setCriteria( | ||
// | ||
request.setPrintFormatId( | ||
getValidInteger(printFormatId) | ||
); | ||
if (!isEmptyValue(printFormatUuid)) { | ||
request.setPrintFormatUuid(printFormatUuid); | ||
} | ||
request.setReportViewId( | ||
getValidInteger(reportViewId) | ||
); | ||
if (!isEmptyValue(reportViewUuid)) { | ||
@@ -671,0 +686,0 @@ request.setReportViewUuid(reportViewUuid); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
6770818
191986