diff --git a/src/store/modules/ADempiere/processDefinition.js b/src/store/modules/ADempiere/processDefinition.js index 9fdc312b..080e651a 100644 --- a/src/store/modules/ADempiere/processDefinition.js +++ b/src/store/modules/ADempiere/processDefinition.js @@ -37,7 +37,8 @@ const process = { let printFormatsAvailable = [] if (responseProcess.isReport) { printFormatsAvailable = await dispatch('getListPrintFormats', { - processUuid: containerUuid + processUuid: containerUuid, + processId: responseProcess.id }) } diff --git a/src/store/modules/ADempiere/report.js b/src/store/modules/ADempiere/report.js index 3afd30a0..42b2f459 100644 --- a/src/store/modules/ADempiere/report.js +++ b/src/store/modules/ADempiere/report.js @@ -40,6 +40,7 @@ const reportControl = { }) { }, + getListPrintFormats({ commit }, { processId, processUuid, @@ -70,6 +71,7 @@ const reportControl = { }) }) }, + getReportViewsFromServer({ commit }, { processId, processUuid, @@ -103,6 +105,7 @@ const reportControl = { }) }) }, + getDrillTablesFromServer({ commit }, { processId, processUuid, @@ -140,7 +143,8 @@ const reportControl = { }) }) }, - getReportOutputFromServer({ commit, getters, rootGetters }, { + + getReportOutputFromServer({ state, commit, getters, rootGetters }, { tableName, printFormatUuid, reportViewUuid, @@ -154,8 +158,12 @@ const reportControl = { }) { return new Promise(resolve => { if (isEmptyValue(printFormatUuid)) { - printFormatUuid = getters.getDefaultPrintFormat(processUuid).printFormatUuid + const printFormat = getters.getDefaultPrintFormat(processUuid) + if (!isEmptyValue(printFormat)) { + printFormatUuid = printFormat.printFormatUuid + } } + const parametersList = rootGetters.getParametersToServer({ containerUuid: processUuid }) diff --git a/src/utils/ADempiere/apiConverts/report.js b/src/utils/ADempiere/apiConverts/report.js index 0e5898d0..18109ef5 100644 --- a/src/utils/ADempiere/apiConverts/report.js +++ b/src/utils/ADempiere/apiConverts/report.js @@ -10,16 +10,15 @@ export function convertListPrintFormats(listPrintFormatsToConvert) { } export function convertPrintFormat(printFormatToConvert) { - const { id, uuid, name, description } = printFormatToConvert + const { name, description } = printFormatToConvert return { - id, - uuid, name, description, tableName: printFormatToConvert.table_name, isDefault: printFormatToConvert.is_default, - reportViewUuid: printFormatToConvert.report_view_uuid + reportViewUuid: printFormatToConvert.report_view_uuid, + printFormatUuid: printFormatToConvert.print_format_uuid } }