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

Commit

Permalink
Fix: Financial Report Report With Report Engine (#2694)
Browse files Browse the repository at this point in the history
* Fix: Financial Report Report With Report Engine

* Fix: Financial Report Report With Report Engine

* Fix: Financial Report Report With Report Engine
  • Loading branch information
Ricargame authored Oct 1, 2024
1 parent 32a35cd commit cdc9007
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ADempiere/Report/Data/DataReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,13 @@ export default defineComponent({
}
const index = rowIndex + 1
const parentColumnKey = Object.keys(row.cells).find(key => row.cells[key].display_value !== '')
let value = ''
if (!isEmptyValue(parentColumnKey)) {
value = row.cells[parentColumnKey].display_value
}
const newRow = {
...row,
children: hasChildren(row.children, index.toString(), parentColumnKey, row.cells[parentColumnKey].display_value),
children: hasChildren(row.children, index.toString(), parentColumnKey, value),
level: index,
isTopLevel
}
Expand Down
10 changes: 10 additions & 0 deletions src/store/modules/ADempiere/dictionary/window/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { ROW_ATTRIBUTES } from '@/utils/ADempiere/tableUtils'
import { ACTION_None } from '@/utils/ADempiere/dictionary/workflow'

// Utils and Helper Methods
import { FINANCIAL_REPORT_CODE } from '@/utils/ADempiere/constants/report.js'
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
import { convertArrayKeyValueToObject } from '@/utils/ADempiere/formatValue/iterableFormat'
import {
Expand Down Expand Up @@ -180,6 +181,15 @@ export default {

const storedTab = rootGetters.getStoredTab(windowUuid, tabAssociatedUuid)
const { table_name } = storedTab
const { code } = rootGetters.getStoredReport(process.uuid)
if (code === FINANCIAL_REPORT_CODE) {
dispatch('startReport', {
parentUuid: tabUuid,
containerUuid: process.uuid,
recordUuid,
tableName: table_name
})
}
dispatch('runReport', {
parentUuid: tabUuid,
containerUuid: process.uuid,
Expand Down
2 changes: 2 additions & 0 deletions src/utils/ADempiere/constants/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import language from '@/lang'

const today = new Date()

export const FINANCIAL_REPORT_CODE = 'FinReport'

export const REPORT_VIEWER_NAME = 'Report Viewer'

export const staticReportRoutes = [
Expand Down

0 comments on commit cdc9007

Please sign in to comment.