Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix: InstanceId Report (#2872)
Browse files Browse the repository at this point in the history
* Fix: InstanceId Report

* Update reportManager.js
  • Loading branch information
Ricargame authored Oct 25, 2024
1 parent 97826ab commit 492dbaa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/api/ADempiere/reportManagement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export function getView({
printFormatId,
reportViewId,
isSummary,
instanceId,
// window
tableName,
recordId
Expand All @@ -142,7 +143,8 @@ export function getView({
report_view_id: reportViewId,
is_summary: isSummary,
table_name: tableName,
record_id: recordId
record_id: recordId,
AD_PInstance_ID: instanceId
}
})
}
Expand Down
14 changes: 12 additions & 2 deletions src/store/modules/ADempiere/reportManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ const initState = {
contactSend: '',
typeNotify: '',
defaultBody: '',
activateCollapse: 0
activateCollapse: 0,
instanceId: 0
}
const reportManager = {
state: initState,

mutations: {
setInstanceId(state, instanceId) {
state.instanceId = instanceId
},
setActivateCollapse(state, activateCollapse) {
state.activateCollapse = activateCollapse
},
Expand Down Expand Up @@ -632,6 +636,7 @@ const reportManager = {
containerUuid = currentRoute.params.reportUuid
}
}
const instanceId = getters.getInstanceId
const reportDefinition = getters.getStoredReport(containerUuid)
const {
internal_id,
Expand Down Expand Up @@ -698,7 +703,8 @@ const reportManager = {
tableName,
pageSize,
filters,
sortBy
sortBy,
instanceId
})
.then(reportResponse => {
commit('setReportOutput', {
Expand Down Expand Up @@ -796,6 +802,7 @@ const reportManager = {
pageSize,
pageToken
})
commit('setInstanceId', instance_id)
showNotification({
title: language.t('notifications.succesful'),
message: name,
Expand Down Expand Up @@ -1089,6 +1096,9 @@ const reportManager = {
},
getIsActiateCollapse: (state) => {
return state.activateCollapse
},
getInstanceId: (state) => {
return state.instanceId
}
}
}
Expand Down

0 comments on commit 492dbaa

Please sign in to comment.