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

Commit

Permalink
Fix: Instance In Report Filter (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricargame authored Oct 29, 2024
1 parent 890f1f3 commit 2d0498d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/api/ADempiere/reportManagement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export function getView({
printFormatId,
reportViewId,
isSummary,
instanceId,
// window
tableName,
recordId
Expand All @@ -143,8 +142,7 @@ export function getView({
report_view_id: reportViewId,
is_summary: isSummary,
table_name: tableName,
record_id: recordId,
AD_PInstance_ID: instanceId
record_id: recordId
}
})
}
Expand Down
9 changes: 7 additions & 2 deletions src/store/modules/ADempiere/reportManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,12 +701,17 @@ const reportManager = {
type: 'info'
})
return new Promise((resolve, reject) => {
const filters = getOperatorAndValue({
let 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,
Expand Down

0 comments on commit 2d0498d

Please sign in to comment.