diff --git a/server/AyaNova/biz/ReportBiz.cs b/server/AyaNova/biz/ReportBiz.cs index d1498ab1..bf6ea44d 100644 --- a/server/AyaNova/biz/ReportBiz.cs +++ b/server/AyaNova/biz/ReportBiz.cs @@ -412,6 +412,8 @@ namespace AyaNova.Biz //Default timeout for each operation of report generation var WaitTimeout = new WaitForFunctionOptions() { Timeout = ServerBootConfig.REPORT_RENDERING_OPERATION_TIMEOUT }; + //includeWoItemDescendants? + reportRequest.IncludeWoItemDescendants = report.IncludeWoItemDescendants; //Get data var ReportData = await GetReportData(reportRequest); diff --git a/server/AyaNova/biz/WorkOrderBiz.cs b/server/AyaNova/biz/WorkOrderBiz.cs index 951d6dd9..3eb31540 100644 --- a/server/AyaNova/biz/WorkOrderBiz.cs +++ b/server/AyaNova/biz/WorkOrderBiz.cs @@ -854,6 +854,8 @@ namespace AyaNova.Biz //workorder reports for entire workorder or just sub parts all go through here //if the ayatype is a descendant of the workorder then only the portion of the workorder from that descendant directly up to the header will be populated and returned + //however if the report template has includeWoItemDescendants=true then the woitems is fully populated + var idList = dataListSelectedRequest.SelectedRowIds; JArray ReportData = new JArray(); diff --git a/server/AyaNova/models/DataListSelectedRequest.cs b/server/AyaNova/models/DataListSelectedRequest.cs index 4b94b37d..9a7dfcfe 100644 --- a/server/AyaNova/models/DataListSelectedRequest.cs +++ b/server/AyaNova/models/DataListSelectedRequest.cs @@ -7,6 +7,7 @@ namespace AyaNova.Models { public AyaType AType { get; set; } public long[] SelectedRowIds { get; set; } + public bool IncludeWoItemDescendants {get;set;} } } diff --git a/server/AyaNova/models/Report.cs b/server/AyaNova/models/Report.cs index 4e3cbc6a..3ffd5e10 100644 --- a/server/AyaNova/models/Report.cs +++ b/server/AyaNova/models/Report.cs @@ -18,6 +18,8 @@ namespace AyaNova.Models [Required] public AyaType AType { get; set; } + public bool IncludeWoItemDescendants {get;set;} + public string Template { get; set; } public string Style { get; set; } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 0321ea8e..2acb68df 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -22,7 +22,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 1; - internal const long EXPECTED_COLUMN_COUNT = 961; + internal const long EXPECTED_COLUMN_COUNT = 962; internal const long EXPECTED_INDEX_COUNT = 137; internal const long EXPECTED_CHECK_CONSTRAINTS = 415; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 118; @@ -969,7 +969,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); //REPORTS await ExecQueryAsync("CREATE TABLE areport (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, " - + "notes TEXT, roles INTEGER NOT NULL, atype INTEGER NOT NULL, template TEXT, style TEXT, jsprerender TEXT, jshelpers TEXT, rendertype INTEGER NOT NULL, " + + "notes TEXT, roles INTEGER NOT NULL, atype INTEGER NOT NULL, includewoitemdescendants BOOL, template TEXT, style TEXT, jsprerender TEXT, jshelpers TEXT, rendertype INTEGER NOT NULL, " + "headertemplate TEXT, footertemplate TEXT, displayheaderfooter BOOL, paperformat INTEGER NOT NULL, landscape BOOL, marginoptionsbottom TEXT, " + "marginoptionsleft TEXT, marginoptionsright TEXT, marginoptionstop TEXT, pageranges TEXT, prefercsspagesize BOOL, printbackground BOOL, scale DECIMAL(8,5) )");