From 33f97e21c4527ef62fbe9e0beff41c860f9c2c23 Mon Sep 17 00:00:00 2001 From: Ricardo Fenomeno <78000356+Ricargame@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:52:43 -0400 Subject: [PATCH] Fix: InstanceId In Report Engine (#2893) --- src/api/ADempiere/reportManagement/index.ts | 4 +++- src/store/modules/ADempiere/reportManager.js | 8 +------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/api/ADempiere/reportManagement/index.ts b/src/api/ADempiere/reportManagement/index.ts index f133068bb4..5ec307f8a9 100644 --- a/src/api/ADempiere/reportManagement/index.ts +++ b/src/api/ADempiere/reportManagement/index.ts @@ -125,6 +125,7 @@ export function getView({ printFormatId, reportViewId, isSummary, + instanceId, // window tableName, recordId @@ -142,7 +143,8 @@ export function getView({ report_view_id: reportViewId, is_summary: isSummary, table_name: tableName, - record_id: recordId + record_id: recordId, + instance_id: instanceId } }) } diff --git a/src/store/modules/ADempiere/reportManager.js b/src/store/modules/ADempiere/reportManager.js index 03a4f6c4a0..dc3d4f7ba3 100644 --- a/src/store/modules/ADempiere/reportManager.js +++ b/src/store/modules/ADempiere/reportManager.js @@ -701,17 +701,11 @@ const reportManager = { type: 'info' }) return new Promise((resolve, reject) => { - let filters = getOperatorAndValue({ + const filters = getOperatorAndValue({ format: 'array', containerUuid, fieldsList }) - if (!isEmptyValue(instanceId)) { - const filtersArray = JSON.parse(filters) - const newFilter = { 'name': 'AD_PInstance_ID', 'operator': 'equal', 'values': instanceId } - filtersArray.push(newFilter) - filters = JSON.stringify(filtersArray) - } getView({ printFormatId, reportViewId,