diff --git a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.cs b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.cs index a7955868d..78c8f5a36 100644 --- a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.cs +++ b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.cs @@ -28,12 +28,9 @@ namespace AWOMuensterlandRecklinghausen { foreach (var scRo in pRO.SupportConceptFinanceList) { - scRo.Custom1 = GetTeam(scRo); - // Customer c = DAOFactory.GenericDAO.LoadByID(scro.Costbearer2Supportconcept.SupportConcept.Customer.CustomerOid); - if(scRo.Costbearer2Supportconcept.SupportConcept.Customer.LastNameFirstName.Contains("Alkhodr")) - { - scRo.Custom1 = scRo.Custom1; - } + Customer c = DAOFactory.GenericDAO.LoadByID(scRo.Costbearer2Supportconcept.SupportConcept.Customer.Oid ?? 0); + scRo.Custom1 = GetTeam(scRo, c); + scRo.SupportConceptTimeSpanString = GetHauptbetreuer(c); var serviceRecordOids = scRo.ServiceRecords.Where(s => s.Start.Value.Date >= start.Date && s.Start.Value.Date <= end.Date).Select(s => (long)s.ServiceRecordOid).ToList(); var customerSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(serviceRecordOids, SignatureType.Customer); @@ -76,15 +73,30 @@ namespace AWOMuensterlandRecklinghausen this.bindingSource1.DataSource = pRO; } - private string GetTeam(FinanceRO.SupportConceptFinanceRO scRo) + private string GetTeam(FinanceRO.SupportConceptFinanceRO scRo, Customer c) { string team = " "; - Customer c = DAOFactory.GenericDAO.LoadByID(scRo.Costbearer2Supportconcept.SupportConcept.Customer.Oid ?? 0); if (c.Team2CustomerList.Count > 0) { team = c.Team2CustomerList[0].Team.Name; } return team; } + + private string GetHauptbetreuer(Customer customer) + { + foreach (var e2c in customer.Employee2CustomerList) + { + foreach (var v2e in e2c.ValueList) + { + if (v2e.Entry.Type == ValueListEntryType.StaffRoleType && v2e.Entry.Value == "Hauptbetreuung") + { + return e2c.Employee.Person.FirstNameLastName; + } + } + } + //throw new FaultException(new BeWoFault(String.Format("Es wurde keine Hauptbetreuung für {0} gefunden.", customer.Person.FirstNameLastName), BeWoFaultType.CustomWithoutDetails)); + return ""; + } } } diff --git a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.designer.cs b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.designer.cs index e139f820b..853bd9644 100644 --- a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.designer.cs +++ b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.designer.cs @@ -30,7 +30,6 @@ namespace AWOMuensterlandRecklinghausen private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Statuscheck)); DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); @@ -42,6 +41,7 @@ namespace AWOMuensterlandRecklinghausen this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -56,10 +56,10 @@ namespace AWOMuensterlandRecklinghausen this.cellGeleistetImZeitraumHeader = new DevExpress.XtraReports.UI.XRTableCell(); this.cellRateFactorHeader = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); @@ -74,8 +74,7 @@ namespace AWOMuensterlandRecklinghausen this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldBillableAmountYear = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -141,9 +140,10 @@ namespace AWOMuensterlandRecklinghausen // // xrTableCell5 // + this.xrTableCell5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.SupportConceptTimeSpanString")}); this.xrTableCell5.Multiline = true; this.xrTableCell5.Name = "xrTableCell5"; - this.xrTableCell5.Text = resources.GetString("xrTableCell5.Text"); this.xrTableCell5.Weight = 0.88626284710752745D; // // xrTableCell7 @@ -182,6 +182,16 @@ namespace AWOMuensterlandRecklinghausen this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell11.Weight = 0.84152611713169212D; // + // xrTableCell15 + // + this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom3")}); + this.xrTableCell15.Multiline = true; + this.xrTableCell15.Name = "xrTableCell15"; + this.xrTableCell15.StylePriority.UseTextAlignment = false; + this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell15.Weight = 0.44313115228486588D; + // // xrTableCell26 // this.xrTableCell26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { @@ -318,6 +328,15 @@ namespace AWOMuensterlandRecklinghausen this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell10.Weight = 0.84152605693883253D; // + // xrTableCell14 + // + this.xrTableCell14.Multiline = true; + this.xrTableCell14.Name = "xrTableCell14"; + this.xrTableCell14.StylePriority.UseTextAlignment = false; + this.xrTableCell14.Text = "Druckbereit"; + this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell14.Weight = 0.44313145010736071D; + // // xrTableCell25 // this.xrTableCell25.Name = "xrTableCell25"; @@ -343,10 +362,6 @@ namespace AWOMuensterlandRecklinghausen this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell8.Weight = 1.2584944495007986D; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FinanceRO); - // // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { @@ -464,7 +479,7 @@ namespace AWOMuensterlandRecklinghausen // // bottomMarginBand1 // - this.bottomMarginBand1.HeightF = 30F; + this.bottomMarginBand1.HeightF = 30.9583F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // fieldBillableAmountYear @@ -473,24 +488,9 @@ namespace AWOMuensterlandRecklinghausen this.fieldBillableAmountYear.Expression = "[BillableAmountInReportTimeSpan]*12"; this.fieldBillableAmountYear.Name = "fieldBillableAmountYear"; // - // xrTableCell14 + // bindingSource1 // - this.xrTableCell14.Multiline = true; - this.xrTableCell14.Name = "xrTableCell14"; - this.xrTableCell14.StylePriority.UseTextAlignment = false; - this.xrTableCell14.Text = "Druckbereit"; - this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell14.Weight = 0.44313145010736071D; - // - // xrTableCell15 - // - this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom3")}); - this.xrTableCell15.Multiline = true; - this.xrTableCell15.Name = "xrTableCell15"; - this.xrTableCell15.StylePriority.UseTextAlignment = false; - this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell15.Weight = 0.44313115228486588D; + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FinanceRO); // // Statuscheck // @@ -505,7 +505,7 @@ namespace AWOMuensterlandRecklinghausen this.fieldBillableAmountYear}); this.DataSource = this.bindingSource1; this.Landscape = true; - this.Margins = new DevExpress.Drawing.DXMargins(45F, 40F, 50F, 30F); + this.Margins = new DevExpress.Drawing.DXMargins(45F, 40F, 50F, 30.9583F); this.PageHeight = 1169; this.PageWidth = 1654; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A3; diff --git a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.resx b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.resx index 6b0afa56a..d58980a38 100644 --- a/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.resx +++ b/ReportImp/AWOMuensterlandRecklinghausen/StatusCheckAbrechnung.resx @@ -117,7 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - [Costbearer2Supportconcept.ApprovalPeriodList.SupportConceptApprovalPeriodEmployeeRelations.Employee.LastName], [Costbearer2Supportconcept.ApprovalPeriodList.SupportConceptApprovalPeriodEmployeeRelations.Employee.FirstName] - \ No newline at end of file