Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adempiere/grpc-api

Package Overview
Dependencies
Maintainers
5
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adempiere/grpc-api - npm Package Compare versions

Comparing version 4.3.9 to 4.4.0

2

package.json
{
"name": "@adempiere/grpc-api",
"version": "4.3.9",
"version": "4.4.0",
"description": "ADempiere Web write in Javascript for a node service",

@@ -5,0 +5,0 @@ "author": "Yamel Senih",

@@ -18,3 +18,3 @@ /************************************************************************************************

const { getMetadata } = require('@adempiere/grpc-api/src/utils/metadata.js');
const { getValidId, getTimestamp, convertStringToBoolean } = require('@adempiere/grpc-api/src/utils/valueUtils.js');
const { getValidId, getTimestamp, convertStringToBoolean, getTypeOfValue } = require('@adempiere/grpc-api/src/utils/valueUtils.js');

@@ -274,3 +274,4 @@ class MatchPORReceiptInvoice

dateto,
isSameQuantity
isSameQuantity,
matchFromSelectedId
}, callback) {

@@ -285,6 +286,10 @@ const { ListMatchedToRequest } = this.stubFile;

request.setMatchToType(matchToType);
request.setVendorId(vendorId);
request.setProductId(productId);
const vendorIdConverted = parseInt(vendorId);
request.setVendorId(vendorIdConverted);
const productIdConverted = parseInt(productId);
request.setProductId(productIdConverted);
request.setDateFrom(dateFrom);
request.setDateTo(dateto);
const matchFromSelectedIdConverted = parseInt(matchFromSelectedId)
request.setMatchFromSelectedId(matchFromSelectedIdConverted);
const isSameQuantityConverted = convertStringToBoolean(isSameQuantity)

@@ -306,7 +311,4 @@ request.setIsSameQuantity(isSameQuantityConverted);

*/
Process({
token,
pageSize,
pageToken,
matchMode,

@@ -316,9 +318,7 @@ matchFromType,

matchFromSelectedId,
matchedToSelections,
matchedToSelectionsList = [],
quantity
}, callback) {
const { ProcessRequest } = this.stubFile;
const { ProcessRequest, Matched } = this.stubFile;
const request = new ProcessRequest();
request.setPageSize(pageSize);
request.setPageToken(pageToken);
request.setMatchMode(matchMode);

@@ -328,4 +328,31 @@ request.setMatchFromType(matchFromType);

request.setMatchFromSelectedId(matchFromSelectedId);
request.setMatchedToSelections(matchedToSelections);
request.setQuantity(quantity);
const { getDecimalToGRPC } = require('@adempiere/grpc-api/src/utils/baseDataTypeToGRPC.js');
request.setQuantity(
getDecimalToGRPC(quantity)
);
if (getTypeOfValue(matchedToSelectionsList) === 'String') {
matchedToSelectionsList = JSON.parse(matchedToSelectionsList);
}
// payment selections list
matchedToSelectionsList.forEach(matchSelection => {
let parsedMatchSelection = matchSelection;
if (getTypeOfValue(matchSelection) === 'String') {
parsedMatchSelection = JSON.parse(matchSelection);
}
const matchedInstance = new Matched();
matchedInstance.setId(matchSelection.id);
matchedInstance.setUuid(matchSelection.uuid);
matchedInstance.setQuantity(
getDecimalToGRPC(matchSelection.quantity)
);
matchedInstance.getMatchedQuantity(
getDecimalToGRPC(matchSelection.matchedQuantity)
);
request.addMatchedToSelections(matchedInstance);
});
const metadata = getMetadata({

@@ -332,0 +359,0 @@ token

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc