diff --git a/ReportImp/AutismusLeben/SettlementReport.Designer.cs b/ReportImp/AutismusLeben/SettlementReport.Designer.cs index d530bfbea..79e218d79 100644 --- a/ReportImp/AutismusLeben/SettlementReport.Designer.cs +++ b/ReportImp/AutismusLeben/SettlementReport.Designer.cs @@ -46,7 +46,7 @@ namespace AutismusLeben this.xrLabel_RecipientContactPerson = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); - this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblSchlusssatz = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); @@ -109,9 +109,7 @@ namespace AutismusLeben this.table_Abschlagszahlungen = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTable6 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -232,7 +230,7 @@ namespace AutismusLeben // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrLabel4, + this.lblSchlusssatz, this.xrLabel10, this.xrLabel12}); this.ReportFooter.Font = new System.Drawing.Font("Verdana", 10F); @@ -241,15 +239,12 @@ namespace AutismusLeben this.ReportFooter.Name = "ReportFooter"; this.ReportFooter.StylePriority.UseFont = false; // - // xrLabel4 + // lblSchlusssatz // - this.xrLabel4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "Notice")}); - this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.28474F); - this.xrLabel4.Name = "xrLabel4"; - this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel4.SizeF = new System.Drawing.SizeF(701.4999F, 67.27084F); - this.xrLabel4.Text = "xrLabel4"; + this.lblSchlusssatz.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.28474F); + this.lblSchlusssatz.Name = "lblSchlusssatz"; + this.lblSchlusssatz.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblSchlusssatz.SizeF = new System.Drawing.SizeF(701.4999F, 67.27084F); // // xrLabel10 // @@ -536,7 +531,8 @@ namespace AutismusLeben // xrTableCell22 // this.xrTableCell22.BorderColor = System.Drawing.Color.Black; - this.xrTableCell22.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + this.xrTableCell22.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell22.Name = "xrTableCell22"; this.xrTableCell22.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -549,7 +545,8 @@ namespace AutismusLeben // xrTableCell24 // this.xrTableCell24.BorderColor = System.Drawing.Color.Black; - this.xrTableCell24.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + this.xrTableCell24.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell24.Name = "xrTableCell24"; this.xrTableCell24.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -1050,9 +1047,7 @@ namespace AutismusLeben // this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrTableCell13, - this.xrTableCell14, this.xrTableCell15, - this.xrTableCell19, this.xrTableCell20}); this.xrTableRow4.Name = "xrTableRow4"; this.xrTableRow4.Weight = 0.085D; @@ -1074,25 +1069,11 @@ namespace AutismusLeben this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; this.xrTableCell13.Weight = 0.079615439182946335D; // - // xrTableCell14 - // - this.xrTableCell14.BorderColor = System.Drawing.Color.Black; - this.xrTableCell14.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableCell14.CanShrink = true; - this.xrTableCell14.Name = "xrTableCell14"; - this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrTableCell14.StylePriority.UseBorderColor = false; - this.xrTableCell14.StylePriority.UseBorders = false; - this.xrTableCell14.StylePriority.UseFont = false; - this.xrTableCell14.StylePriority.UsePadding = false; - this.xrTableCell14.StylePriority.UseTextAlignment = false; - this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell14.Weight = 0.10685903513343351D; - // // xrTableCell15 // this.xrTableCell15.BorderColor = System.Drawing.Color.Black; - this.xrTableCell15.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell15.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell15.CanShrink = true; this.xrTableCell15.Name = "xrTableCell15"; this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -1102,21 +1083,7 @@ namespace AutismusLeben this.xrTableCell15.StylePriority.UsePadding = false; this.xrTableCell15.StylePriority.UseTextAlignment = false; this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell15.Weight = 0.5696793525676398D; - // - // xrTableCell19 - // - this.xrTableCell19.BorderColor = System.Drawing.Color.Black; - this.xrTableCell19.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) - | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableCell19.Name = "xrTableCell19"; - this.xrTableCell19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrTableCell19.StylePriority.UseBorderColor = false; - this.xrTableCell19.StylePriority.UseBorders = false; - this.xrTableCell19.StylePriority.UsePadding = false; - this.xrTableCell19.StylePriority.UseTextAlignment = false; - this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell19.Weight = 0.16346152642544659D; + this.xrTableCell15.Weight = 0.839999863489566D; // // xrTableCell20 // @@ -1130,7 +1097,7 @@ namespace AutismusLeben this.xrTableCell20.StylePriority.UsePadding = false; this.xrTableCell20.StylePriority.UseTextAlignment = false; this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell20.Weight = 0.16346122158311638D; + this.xrTableCell20.Weight = 0.16346126839268615D; // // xrTable6 // @@ -1330,9 +1297,7 @@ namespace AutismusLeben private DevExpress.XtraReports.UI.XRTable table_Abschlagszahlungen; private DevExpress.XtraReports.UI.XRTableRow xrTableRow4; private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; private DevExpress.XtraReports.UI.XRTableCell xrTableCell15; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell19; private DevExpress.XtraReports.UI.XRTableCell xrTableCell20; private DevExpress.XtraReports.UI.XRTable xrTable7; private DevExpress.XtraReports.UI.XRTableRow xrTableRow5; @@ -1349,7 +1314,7 @@ namespace AutismusLeben private DevExpress.XtraReports.UI.XRTableRow xrTableRow6; private DevExpress.XtraReports.UI.XRTableCell tc_RueckzahlungOderRestbetrag; private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; - private DevExpress.XtraReports.UI.XRLabel xrLabel4; + private DevExpress.XtraReports.UI.XRLabel lblSchlusssatz; private DevExpress.XtraReports.UI.XRLine xrLine2; private DevExpress.XtraReports.UI.XRLabel xrLabel8; private DevExpress.XtraReports.UI.XRLabel xrLabel11; diff --git a/ReportImp/AutismusLeben/SettlementReport.cs b/ReportImp/AutismusLeben/SettlementReport.cs index bd34c795c..b67b234af 100644 --- a/ReportImp/AutismusLeben/SettlementReport.cs +++ b/ReportImp/AutismusLeben/SettlementReport.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Linq; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report; @@ -27,7 +28,7 @@ namespace AutismusLeben { //lblNotice.Visible = false; } - + if (pRO.InvoiceItems != null && pRO.InvoiceItems.Count == 1) { var ii = pRO.InvoiceItems[0]; @@ -85,58 +86,47 @@ namespace AutismusLeben var os = new OperationsServiceImp(); var span = new DateTimeSpan(pRO.AccountingStartDate, pRO.InvoiceDateTime.Value); var abschlagszahlungen = os.GetAccountingTransactions(span, null, pRO.CostBearer2SupportConceptOid); + Dictionary gruppierteAbschlagszahlungen = GruppiereAbschlagszahlungen(pRO.InvoiceItems, abschlagszahlungen, pRO.AccountingStartDate, pRO.AccountingEndDate); - var rowCounter = 0; - while (rowCounter < abschlagszahlungen.Count) + + var rowCounter = 0; + while (rowCounter < gruppierteAbschlagszahlungen.Count) { if (rowCounter == 0) { table_Abschlagszahlungen.Rows.RemoveAt(0); var row = new XRTableRow(); var baseCell0 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 51.75f }; - var baseCell1 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 69.46f }; - var baseCell2 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 370.29f }; - var baseCell3 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; - var baseCell4 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; + var baseCell1 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 546f }; + var baseCell2 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; - string s = string.Format("{0} ({1:dd.MM.yyyy})", abschlagszahlungen[0].Notice, abschlagszahlungen[0].BookingDate); baseCell0.Text = (rowCounter + 1).ToString(); - baseCell1.Text = null; - baseCell2.Text = s; - baseCell3.Text = string.Format("{0:0.00 €}", abschlagszahlungen[0].Amount); - baseCell4.Text = string.Format("{0:0.00 €}", abschlagszahlungen[0].Amount); + baseCell1.Text = gruppierteAbschlagszahlungen.ElementAt(0).Key; + baseCell2.Text = string.Format("{0:c}", gruppierteAbschlagszahlungen.ElementAt(0).Value); row.Cells.Add(baseCell0); row.Cells.Add(baseCell1); row.Cells.Add(baseCell2); - row.Cells.Add(baseCell3); - row.Cells.Add(baseCell4); table_Abschlagszahlungen.Rows.Add(row); rowCounter++; } else { - for(rowCounter = rowCounter; rowCounter < abschlagszahlungen.Count; rowCounter++) + for(rowCounter = rowCounter; rowCounter < gruppierteAbschlagszahlungen.Count; rowCounter++) { var row = new XRTableRow(); var baseCell0 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 51.75f }; - var baseCell1 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 69.46f }; - var baseCell2 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 370.29f }; - var baseCell3 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; - var baseCell4 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; + var baseCell1 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 546f }; + var baseCell2 = new XRTableCell() { Padding = 2, TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight, BorderColor = Color.Black, Borders = DevExpress.XtraPrinting.BorderSide.All, WidthF = 106.25f }; baseCell0.Text = (rowCounter + 1).ToString(); - baseCell1.Text = null; - baseCell2.Text = string.Format("{0} ({1:dd.MM.yyyy})", abschlagszahlungen[rowCounter].Notice, abschlagszahlungen[rowCounter].BookingDate); - baseCell3.Text = string.Format("{0:0.00 €}", abschlagszahlungen[rowCounter].Amount); - baseCell4.Text = string.Format("{0:0.00 €}", abschlagszahlungen[rowCounter].Amount); + baseCell1.Text = gruppierteAbschlagszahlungen.ElementAt(rowCounter).Key; + baseCell2.Text = string.Format("{0:c}", gruppierteAbschlagszahlungen.ElementAt(rowCounter).Value); row.Cells.Add(baseCell0); row.Cells.Add(baseCell1); row.Cells.Add(baseCell2); - row.Cells.Add(baseCell3); - row.Cells.Add(baseCell4); table_Abschlagszahlungen.Rows.Add(row); rowCounter++; @@ -149,10 +139,69 @@ namespace AutismusLeben else tc_RueckzahlungOderRestbetrag.Text = "Rückzahlung"; + lblSchlusssatz.Text = string.Format("Zahlbar bis {0:dd.MM.yyyy} ohne Abzug.\nUmsatzsteuerfrei gemäß §4 Nr. 18. UStG.", pRO.InvoiceDateTime.Value.AddDays(14)); + this.bindingSource1.DataSource = pRO; } - private String GetCustomerId(SettlementRO pRO) + private Dictionary GruppiereAbschlagszahlungen(IList invoiceItems, List abschlagszahlungen, DateTime accountingStartDate, DateTime accountingEndDate) + { + DateTime? letztesEnde = null; + Dictionary gruppierteAbschlagszahlungen = new Dictionary(); + + for (int i = 0; i < invoiceItems.Count; i++) + { + var item = invoiceItems[i]; + var descriptionString = item.ItemDescription.Split(' '); + + // Wenn es das erste Item ist, also auch der erste Stundensatz, dann ist in der description das Ende ausgewiesen. + if (letztesEnde == null) + { + DateTime? ende = Convert.ToDateTime(descriptionString[4].Remove(descriptionString[4].Length - 1, 1)); + var zahlungenBisErstemStundensatzWechsel = abschlagszahlungen.Where(a => a.ValidityDate <= ende.Value).ToList(); + decimal summe = 0.0m; + foreach (var zahlung in zahlungenBisErstemStundensatzWechsel) + summe += zahlung.Amount; + + string zeitraum = string.Format("Abschlagszahlung {0:MMM yyyy} - {1:MMM yyyy}", accountingStartDate, ende.Value); + gruppierteAbschlagszahlungen.Add(zeitraum, summe); + letztesEnde = ende; + } + // Bei allen nachfolgenden Items muss geprüft werden, ob es noch ein nächstes Item gibt, weil in der Description nur der Anfang drin steht. + // Das Ende ist der Start - 1 des nächsten Items + else + { + DateTime? start = Convert.ToDateTime(descriptionString[4].Remove(descriptionString[4].Length - 1, 1)); + if (i < invoiceItems.Count - 1) + { + var nextDescriptionString = invoiceItems[i + 1].ItemDescription.Split(' '); + DateTime? ende = Convert.ToDateTime(nextDescriptionString[4].Remove(nextDescriptionString[4].Length - 1, 1)); + var zahlungenInZeitraum = abschlagszahlungen.Where(a => a.ValidityDate >= start.Value && a.ValidityDate <= ende.Value).ToList(); + decimal summe = 0.0m; + foreach (var zahlung in zahlungenInZeitraum) + summe += zahlung.Amount; + + string zeitraum = string.Format("Abschlagszahlung {0:MMM yyyy} - {1:MMM yyyy}", start.Value, ende.Value); + gruppierteAbschlagszahlungen.Add(zeitraum, summe); + letztesEnde = ende; + } + else + { + var zahlungenInZeitraum = abschlagszahlungen.Where(a => a.ValidityDate >= start.Value).ToList(); + decimal summe = 0.0m; + foreach (var zahlung in zahlungenInZeitraum) + summe += zahlung.Amount; + + string zeitraum = string.Format("Abschlagszahlung {0:MMM yyyy} - {1:MMM yyyy}", start.Value, accountingEndDate); + gruppierteAbschlagszahlungen.Add(zeitraum, summe); + } + } + } + + return gruppierteAbschlagszahlungen; + } + + private String GetCustomerId(SettlementRO pRO) { var cb2sc = DAOFactory.GenericDAO.LoadByID(pRO.CostBearer2SupportConceptOid); return cb2sc.CostBearer.ID; diff --git a/ReportImp/BloemelingUndTeckhaus/Invoicing/SoziotherapieInvoiceCreation.cs b/ReportImp/BloemelingUndTeckhaus/Invoicing/SoziotherapieInvoiceCreation.cs index 86eca8738..eb14ee6e7 100644 --- a/ReportImp/BloemelingUndTeckhaus/Invoicing/SoziotherapieInvoiceCreation.cs +++ b/ReportImp/BloemelingUndTeckhaus/Invoicing/SoziotherapieInvoiceCreation.cs @@ -2,6 +2,8 @@ using BeWo.Data.Entities; using BeWo.Service.Invoicing; using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; using BS.Shared.Services; namespace BloemelingUndTeckhaus.Invoicing @@ -29,6 +31,15 @@ namespace BloemelingUndTeckhaus.Invoicing return itemList; } - - } + + public override ServiceInvoicePeriod CreateServiceInvoicePeriod(SupportConceptApprovalPeriodDC approvalPeriodDC, DateTimeSpan invoiceAccountingPeriodSpan) + { + return base.CreateServiceInvoicePeriod(approvalPeriodDC, invoiceAccountingPeriodSpan); + } + public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List serviceRecords) + { + return base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords); + } + + } } diff --git a/ReportImp/BloemelingUndTeckhaus/SoziotherapieRechnung.cs b/ReportImp/BloemelingUndTeckhaus/SoziotherapieRechnung.cs index 009339e02..adb160771 100644 --- a/ReportImp/BloemelingUndTeckhaus/SoziotherapieRechnung.cs +++ b/ReportImp/BloemelingUndTeckhaus/SoziotherapieRechnung.cs @@ -8,6 +8,7 @@ using BeWo.Report.ReportObjects; using BeWo.Service.DCEntityMapper; using BS.Shared; using BS.Shared.Core; +using BS.Shared.Extensions; using DevExpress.XtraPrinting; using DevExpress.XtraReports.UI; @@ -33,7 +34,7 @@ namespace BloemelingUndTeckhaus decimal? pauschale = 0m; foreach (var item in allServiceInvoiceItems) { - if (item.ServiceRecord == null) + if (item.ServiceRecord == null && item.GrossAmount.IsNullOrEmpty()) { pauschale = item.AmountPerUnit; break; @@ -44,10 +45,20 @@ namespace BloemelingUndTeckhaus { allServiceInvoiceItems.RemoveAt(index); } - var anzHausbesuche = allServiceInvoiceItems.Where(s => s.ServiceDescription.ToLower().Contains("hausbesuch")).Count(); - tc_AnzHausbesuche.Text = anzHausbesuche.ToString(); - tc_Fahrtkostenpauschale.Text = string.Format("{0:c}", pauschale.Value); - + int anzHausbesuche = 0; + if (allServiceInvoiceItems.Any(s => s.ServiceDescription.ToLower().Contains("hausbesuch"))) + { + anzHausbesuche = allServiceInvoiceItems.Where(s => s.ServiceDescription.ToLower().Contains("hausbesuch")).Count(); + tc_AnzHausbesuche.Text = anzHausbesuche.ToString(); + tc_Fahrtkostenpauschale.Text = string.Format("{0:c}", pauschale.Value); + } + else + { + tc_AnzHausbesuche.Text = anzHausbesuche.ToString(); + tc_Fahrtkostenpauschale.Text = "keine"; + } + + var gc = pRO.GrossClaim.Split(' '); var gcAsDecimal = Convert.ToDecimal(gc[0]); tc_GesamtOhnePauschale.Text = string.Format("{0:c}", (gcAsDecimal - pauschale.Value * anzHausbesuche)); diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index d34caa32a..311cb91a0 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -94,7 +94,7 @@ namespace BeWo.Service.Plugins //t = "3529871747"; // Vivat gemeinnützige GmbH //t = "8561513464"; // Caritasverband Wuppertal/Solingen //t = "2727001973"; // SD Julia Schönberg - t = "5653806613"; // Feid und Kollegen + //t = "5653806613"; // Feid und Kollegen //t = "3830114427"; // FiZ Familie im Zentrum Hof //t = "7138297573"; // Tagwerk betreutes wohnen //t = "1008896531"; // BeWo Auxilio @@ -270,7 +270,7 @@ namespace BeWo.Service.Plugins //t = "6323001211"; // ASB Faßbacher Hof gGmbH //t = "9389386079"; // VARO Sozialagentur //t = "7951718431"; // Ambulant Betreutes Wohnen Astrid Pulm - t = "5850903700"; // Alzey Teilhabe + //t = "5850903700"; // Alzey Teilhabe //t = "5929601293"; // Lebenshilfe Duisburg Frühförderung (Projekt heißt LebenshilfeDuisburgAtz) //t = "6860475645"; // Lebenshilfe Duisburg ATZ (Projekt heißt LebenshilfeDuisburgAtz6860475645) //t = "9678360705"; // Lebenshilfe Duisburg HPTG (Projekt heißt LebenshilfeDuisburgHPTG) @@ -320,7 +320,7 @@ namespace BeWo.Service.Plugins //t = "9518001524"; // Sozialpädagogische Praxis Astrid Schnödewind //t = "1048483934"; // Frauenhaus e.V. EWFRA - Wohnprojekt für Frauen //t = "4293131072"; // ASB Rhein-Erft/Düren e.V. Schulbegleitung - //t = "2221228727"; // Autismus Leben gGmbH + t = "2221228727"; // Autismus Leben gGmbH //t = "5065709552"; // Biotop e.V. //t = "9094672461"; // Transkulturelles Betreuungsbüro (Toprak GmbH) //t = "9008813932"; // Aids Hilfe Giessen