case 4068
This commit is contained in:
@@ -186,9 +186,7 @@ namespace AyaNova.Biz
|
||||
//GET LIST
|
||||
//
|
||||
internal async Task<List<NameIdItem>> GetReportListAsync(AyaType aType)
|
||||
{
|
||||
//Let postgres sort the names so that they appear with the emoji symbols last in the list which we use for sample reports to
|
||||
//not pollute the regular reports
|
||||
{
|
||||
var rpts = await ct.Report.AsNoTracking().Where(z => z.AType == aType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).OrderBy(z => z.name).ToListAsync();
|
||||
var ret = new List<NameIdItem>();
|
||||
foreach (var item in rpts)
|
||||
|
||||
@@ -1657,6 +1657,12 @@ namespace AyaNova.Util
|
||||
{
|
||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||
{
|
||||
|
||||
//get the default customer work order report by name, currently chosen is "Customer Invoice"
|
||||
ReportBiz rptb = ReportBiz.GetBiz(ct);
|
||||
var reportList = await rptb.GetReportListAsync(AyaType.WorkOrder);
|
||||
var SampleCustomerWorkOrderReportId = reportList.Where(z => z.Name == "Customer Invoice").Select(z => z.Id).First();
|
||||
|
||||
GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct);
|
||||
var gbiz = await biz.GetAsync(false);
|
||||
|
||||
@@ -1688,7 +1694,7 @@ namespace AyaNova.Util
|
||||
gbiz.CustomerAllowNotifyWOCreated = true;
|
||||
gbiz.CustomerAllowUserSettings = true;
|
||||
gbiz.CustomerAllowViewWO = true;
|
||||
// gbiz.CustomerDefaultWorkOrderReportId=1;
|
||||
gbiz.CustomerDefaultWorkOrderReportId=SampleCustomerWorkOrderReportId;
|
||||
gbiz.CustomerAllowWOWiki = true;
|
||||
gbiz.CustomerAllowWOAttachments = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user