diff --git a/src/components/ADempiere/Report/Data/DataReport.vue b/src/components/ADempiere/Report/Data/DataReport.vue index 48097f804b..cb1be5010b 100644 --- a/src/components/ADempiere/Report/Data/DataReport.vue +++ b/src/components/ADempiere/Report/Data/DataReport.vue @@ -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 } diff --git a/src/store/modules/ADempiere/dictionary/window/actions.js b/src/store/modules/ADempiere/dictionary/window/actions.js index 818b45ba67..c04a8b4f52 100644 --- a/src/store/modules/ADempiere/dictionary/window/actions.js +++ b/src/store/modules/ADempiere/dictionary/window/actions.js @@ -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 { @@ -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, diff --git a/src/utils/ADempiere/constants/report.js b/src/utils/ADempiere/constants/report.js index 5f00f2917e..72d67474a2 100644 --- a/src/utils/ADempiere/constants/report.js +++ b/src/utils/ADempiere/constants/report.js @@ -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 = [