diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index a972b4b4c..adbf111a9 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -1029,6 +1029,21 @@ namespace BeWo showStackTrace = true; showSupportForm = false; } + else if (!String.IsNullOrEmpty(e.Message) && e.Message.IndexOf("could not update") >= 0 && e.Message.IndexOf("BeWo.Data.Entities.InvoiceBase") >= 0 && e.Message.IndexOf("Duplicate entry") >= 0 && e.Message.IndexOf("for key") >= 0) + { + String rnr = ""; + var start = e.Message.IndexOf("Duplicate entry"); + var ende = e.Message.IndexOf("for key"); + if (ende > start + 16) + { + rnr = e.Message.Substring(start + 15, ende - start - 15).Trim(); + + } + + displayMessage = String.Format("Fehler beim Speichern. Die eingegebene Rechnungsnummer {0} wurde bereits vergeben.", rnr); + showStackTrace = false; + showSupportForm = false; + } //else if (stacktrace.IndexOf("GenericADOException") >= 0 && stacktrace.IndexOf("could not insert") >= 0 && stacktrace.IndexOf("Data too long for column") >= 0) //{ // displayMessage = "Eine Eingabe enthält zu viele Zeichen."; @@ -1383,6 +1398,7 @@ namespace BeWo } public static void Cleanup() { + CurrentBeWo.DocumentWatcher.LoescheAlleTempDateien(); _lockedContent = null; LoginControl = null; MainControl = null; diff --git a/BeWo/Core/DocumentWatcher.cs b/BeWo/Core/DocumentWatcher.cs index a34ec8229..3118bc7dc 100644 --- a/BeWo/Core/DocumentWatcher.cs +++ b/BeWo/Core/DocumentWatcher.cs @@ -54,7 +54,7 @@ namespace BeWo.Core try { if (!WirdDateiUeberwacht(dwi.FileName)) - { + { ueberwachteDateien.Add(dwi); } if (watcher == null) @@ -62,11 +62,20 @@ namespace BeWo.Core FileInfo fi = new FileInfo(dwi.FileName); watcher = new FileSystemWatcher(fi.DirectoryName); - watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite - | NotifyFilters.FileName | NotifyFilters.DirectoryName | NotifyFilters.Attributes; - + watcher.NotifyFilter = NotifyFilters.Size | NotifyFilters.LastWrite | NotifyFilters.CreationTime; + //watcher.NotifyFilter = NotifyFilters.Attributes + // | NotifyFilters.CreationTime + // | NotifyFilters.DirectoryName + // | NotifyFilters.FileName + // | NotifyFilters.LastAccess + // | NotifyFilters.LastWrite + // | NotifyFilters.Security + // | NotifyFilters.Size; + + watcher.Changed += new FileSystemEventHandler(OnChanged); watcher.EnableRaisingEvents = true; + watcher.IncludeSubdirectories = false; } @@ -193,7 +202,7 @@ namespace BeWo.Core { try { - string file = "Möchten Sie das alte Dokument löschen?"; + string file = "Möchten Sie das vorhandene Dokument überschreiben? Wenn Sie auf 'Behalten' klicken, wird eine neuer Datensatz für das aktuelle Dokument angelegt."; int i = 3; var dialog = new UploadDialog(file, i); @@ -220,10 +229,10 @@ namespace BeWo.Core { if (dwi.FileAttachmentOid.HasValue) { - if (System.Windows.MessageBox.Show("ACHTUNG: Das Löschen von Dateien kann nicht rückgängig gemacht werden!\nWollen Sie das Dokument '" + dwi.FileName + "' wirklich löschen?", "Löschen bestätigen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) - { - return; - } + //if (System.Windows.MessageBox.Show("ACHTUNG: Das Löschen von Dateien kann nicht rückgängig gemacht werden!\nWollen Sie das Dokument '" + dwi.FileName + "' wirklich löschen?", "Löschen bestätigen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) + //{ + // return; + //} ServiceFacade.DoOperationsServiceAsync(s => s.DeleteFileAttachment(dwi.FileAttachmentOid.Value, dwi.FileAttachmentVersion.Value)); } } @@ -238,8 +247,15 @@ namespace BeWo.Core { foreach (var file in ueberwachteDateien) { + LoescheTempDatei(file.FileName); } + ueberwachteDateien.Clear(); + if (watcher != null) + { + watcher.EnableRaisingEvents = false; + watcher.Dispose(); + } } diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs index 39ac3c6ce..3f506a8a3 100644 --- a/BeWo/MainWindow.xaml.cs +++ b/BeWo/MainWindow.xaml.cs @@ -101,7 +101,7 @@ namespace BeWo BeWoApp.MainControl.HomeView.ServiceChatView = null; } - BeWoApp.CurrentBeWo.DocumentWatcher.LoescheTempDateien(); + BeWoApp.CurrentBeWo.DocumentWatcher.LoescheAlleTempDateien(); Application.Current.Shutdown(); } diff --git a/BeWo/UploadDialog.xaml.cs b/BeWo/UploadDialog.xaml.cs index d37016537..0a198c0b9 100644 --- a/BeWo/UploadDialog.xaml.cs +++ b/BeWo/UploadDialog.xaml.cs @@ -57,7 +57,7 @@ namespace BeWo { Hochladebtn.Visibility = Visibility.Visible; _Question = string.Format(fileName); - Hochladebtn.Content = "Löschen"; + Hochladebtn.Content = "Überschreiben"; Abbrechbtn.Content = "Behalten"; } diff --git a/BeWo/View/Detail/Report/DienstplanerView.xaml.cs b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs index 72cb856c8..7ff361dd9 100644 --- a/BeWo/View/Detail/Report/DienstplanerView.xaml.cs +++ b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs @@ -122,9 +122,13 @@ namespace BeWo.View.Detail.Report ShowGrid(); // Buttons zum Bearbeiten des Dienstplans freischalten - button_mehrereDienste.Visibility = Visibility.Visible; - button_neuerMitarbeiter.Visibility = Visibility.Visible; - _BtnRemoveAllDiensteForMonth.Visibility = Visibility.Visible; + if (BeWoApp.LoggedOnUser.HasRight(BS.Shared.UserRightType.DienstplanungBearbeiten)) + { + button_mehrereDienste.Visibility = Visibility.Visible; + button_neuerMitarbeiter.Visibility = Visibility.Visible; + _BtnRemoveAllDiensteForMonth.Visibility = Visibility.Visible; + } + textblock_link_pdfexport.Visibility = Visibility.Visible; _Textblock_link_sortierung.Visibility = _DienstplanerRootObj.EnableSorting ? Visibility.Visible : Visibility.Collapsed; } @@ -670,6 +674,10 @@ namespace BeWo.View.Detail.Report private void GroupBox_MouseDown(object sender, MouseButtonEventArgs e) { + if (!BeWoApp.LoggedOnUser.HasRight(BS.Shared.UserRightType.DienstplanungBearbeiten)) + { + return; + } if (!_IsControlClick) { //_PopupPicker.IsOpen = false; @@ -796,7 +804,7 @@ namespace BeWo.View.Detail.Report if (emps.Count == 0) { - MessageBox.Show("Fügen Sie dem Wohnheim zuerst " + Translator.Translate("MitarbeiterPlural") + " hinzu. Es gibt keine " + Translator.Translate("MitarbeiterPlural") + " in diesem Wohnheim, denen man " + + MessageBox.Show("Fügen Sie dem Wohnprojekt zuerst " + Translator.Translate("MitarbeiterPlural") + " hinzu. Es gibt keine " + Translator.Translate("MitarbeiterPlural") + " in diesem Wohnprojekt, denen man " + "Dienste zuweisen könnte!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Warning); return; } @@ -1201,6 +1209,10 @@ namespace BeWo.View.Detail.Report // Methode, die bei Klick auf eine der Zellen aufgerufen wird (DPCtrlDay oder DPCtrlEmployee) public void DienstplanerControl_MouseDown(object sender, MouseEventArgs e) { + if (!BeWoApp.LoggedOnUser.HasRight(BS.Shared.UserRightType.DienstplanungBearbeiten)) + { + return; + } _IsControlClick = true; popUp_RightClick.IsOpen = false; popUp_RightClickEmployee.IsOpen = false; @@ -1328,7 +1340,7 @@ namespace BeWo.View.Detail.Report popUp_RightClick.IsOpen = false; - MessageBox.Show(Translator.Translate("Der Mitarbeiter") + " wurde aus dem Wohnheim entfernt und es können keine Änderungen mehr für diesen" + + MessageBox.Show(Translator.Translate("Der Mitarbeiter") + " wurde aus dem Wohnprojekt entfernt und es können keine Änderungen mehr für diesen" + " vorgenommen werden.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Warning); return; diff --git a/Data/Mappings/InvoiceBase.hbm.xml b/Data/Mappings/InvoiceBase.hbm.xml index 04bb45a23..fdb59889b 100644 --- a/Data/Mappings/InvoiceBase.hbm.xml +++ b/Data/Mappings/InvoiceBase.hbm.xml @@ -20,7 +20,7 @@ - + diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user index f8b116048..5ee002517 100644 --- a/Host/Host.csproj.user +++ b/Host/Host.csproj.user @@ -3,7 +3,7 @@ BeWo2.0 true - Debug|Any CPU + Release|Any CPU false diff --git a/ReportImp/InputFamilienhilfe/CustomReportCreator.cs b/ReportImp/InputFamilienhilfe/CustomReportCreator.cs index 677d0c7fa..64ee030c8 100644 --- a/ReportImp/InputFamilienhilfe/CustomReportCreator.cs +++ b/ReportImp/InputFamilienhilfe/CustomReportCreator.cs @@ -49,7 +49,7 @@ namespace InputFamilienhilfe { XtraReport invoiceReport = null; - if (iDC.ServiceInvoicePeriods.Count > 0 + if (iDC.ServiceInvoicePeriods.Count > 0 && iDC.ServiceInvoicePeriods[0].Customer != null && iDC.ServiceInvoicePeriods[0].Customer.CustomerAlias != null && iDC.ServiceInvoicePeriods[0].Customer.CustomerAlias.ToLower() != "aws" && iDC.ServiceInvoicePeriods[0].Customer.CustomerAlias.ToLower() != "bjw" && diff --git a/ReportImp/InputFamilienhilfe/RechnungNeu.cs b/ReportImp/InputFamilienhilfe/RechnungNeu.cs index 77d28eaac..2649f9f44 100644 --- a/ReportImp/InputFamilienhilfe/RechnungNeu.cs +++ b/ReportImp/InputFamilienhilfe/RechnungNeu.cs @@ -46,7 +46,7 @@ namespace InputFamilienhilfe.Neu DateTime end = pRO.AccountingPeriodEnd; string alias = ""; - if (pRO.ServiceInvoicePeriods != null) + if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0 && pRO.ServiceInvoicePeriods[0].Customer != null) { alias = pRO.ServiceInvoicePeriods[0].Customer.CustomerAlias; } @@ -65,7 +65,10 @@ namespace InputFamilienhilfe.Neu isVerfahrensbeistandschaft = true; amount = ii.NetAmount ?? 0; } - + if (!String.IsNullOrEmpty(ii.ServiceDescription) && ii.ServiceDescription.ToLower().Contains("rechnungsdifferenz") && ii.ServiceDescription.EndsWith("?")) // CB HACK: Ich habe gesehen, dass bei denen in der DB das Euro Zeichen in ein Fragezeichen umgewandelt wurde + { + ii.ServiceDescription = ii.ServiceDescription.Replace("?", "€"); + } //if (pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod != null && pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ApprovedFixedAmount.HasValue) //{ // lblRechnungstext.Text = String.Format("für die Soziale Gruppenarbeit im Leistungszeitraum {0:dd.MM.yyyy} - {0:dd.MM.yyyy} erlaube ich mir Ihnen folgende Pauschale zu berechnen:", pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd); diff --git a/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.Designer.cs b/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.Designer.cs index db4328b81..ab6cd89a1 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.Designer.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.Designer.cs @@ -51,7 +51,7 @@ namespace LebenshilfeFrankfurtOder this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblTelefon = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); @@ -128,7 +128,7 @@ namespace LebenshilfeFrankfurtOder this.xrLabel18, this.xrLabel17, this.xrLabel16, - this.xrLabel14, + this.lblTelefon, this.xrLabel12, this.xrLabel13, this.xrLabel10, @@ -396,14 +396,14 @@ namespace LebenshilfeFrankfurtOder this.xrLabel16.StylePriority.UseFont = false; this.xrLabel16.Text = "info@lebenshilfe-ffo.de"; // - // xrLabel14 + // lblTelefon // - this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(499.9998F, 190F); - this.xrLabel14.Name = "xrLabel14"; - this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel14.SizeF = new System.Drawing.SizeF(207.2103F, 20F); - this.xrLabel14.StylePriority.UseFont = false; - this.xrLabel14.Text = "(0335) 280 510 20"; + this.lblTelefon.LocationFloat = new DevExpress.Utils.PointFloat(499.9998F, 190F); + this.lblTelefon.Name = "lblTelefon"; + this.lblTelefon.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblTelefon.SizeF = new System.Drawing.SizeF(207.2103F, 20F); + this.lblTelefon.StylePriority.UseFont = false; + this.lblTelefon.Text = "(0335) 280 510 20"; // // xrLabel12 // @@ -908,7 +908,7 @@ namespace LebenshilfeFrankfurtOder private DevExpress.XtraReports.UI.XRLabel xrLabel6; private DevExpress.XtraReports.UI.XRLabel xrLabel17; private DevExpress.XtraReports.UI.XRLabel xrLabel16; - private DevExpress.XtraReports.UI.XRLabel xrLabel14; + private DevExpress.XtraReports.UI.XRLabel lblTelefon; private DevExpress.XtraReports.UI.XRLabel xrLabel12; private DevExpress.XtraReports.UI.XRLabel xrLabel13; private DevExpress.XtraReports.UI.XRLabel xrLabel10; diff --git a/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.cs b/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.cs index 3f8582c46..410b5f3ab 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AllgemeineRechnung.cs @@ -51,7 +51,12 @@ namespace LebenshilfeFrankfurtOder lblAdresse.Text = sb.ToString(); - pRO.Notice = ""; + if (!String.IsNullOrEmpty(pRO.SenderPhone)) + { + lblTelefon.Text = pRO.SenderPhone.Replace("Tel.:", "").Trim(); + } + + pRO.Notice = ""; cellFaelligkeit.Text = String.Format("{0:dd.MM.yyyy}", pRO.InvoiceDateTime.AddDays(14)); diff --git a/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs b/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs index 2f8e3c881..896d30a01 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs @@ -1319,7 +1319,7 @@ namespace LebenshilfeFrankfurtOder List quittierungsbelegRos = CreateServiceOverviewsForAbrechnung(start, end, customerOid, serviceCategoryOid); ServicesOverviewRO hortRo = CreateHortSammelRo(quittierungsbelegRos); - + quittierungsbelegRos = new List(); if (hortRo != null) @@ -1329,6 +1329,16 @@ namespace LebenshilfeFrankfurtOder var supportConcepts2ServiceRecords = CreateSc2ServiceRecordsForAbrechnung(quittierungsbelegRos); + if (supportConcepts2ServiceRecords.Count == 0) + { + + var sc = new CompactSupportConceptDC(); + sc.IsApproved = true; + var sList = new List(); + sc.CostBearerList = new List(); + sc.CostBearerList.Add(new CompactCostBearerDC { CostBearerOid = 119 }); //HACK: 119 ist die OID des Kostenträgers für Hort und Ferienbetreuung der Stadt Frankfurt Oder + supportConcepts2ServiceRecords.Add(sc, sList); + } var creator = new HortInvoiceCreation(); return creator.GenerateServiceInvoices(0, invoicePeriod, supportConcepts2ServiceRecords); diff --git a/ReportImp/LebenshilfeFrankfurtOder/Invoicing/HortInvoiceCreation.cs b/ReportImp/LebenshilfeFrankfurtOder/Invoicing/HortInvoiceCreation.cs index 782146b5d..c6f670646 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/Invoicing/HortInvoiceCreation.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/Invoicing/HortInvoiceCreation.cs @@ -43,7 +43,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing var invoiceCounter = 0; - var sortedScs = supportConcepts2ServiceRecords.Keys.OrderBy(s => !String.IsNullOrEmpty(s.Customer.DebitorNumber) ? s.Customer.DebitorNumber : "zzzzz").ToList(); + var sortedScs = supportConcepts2ServiceRecords.Keys.OrderBy(s => (s.Customer != null && !String.IsNullOrEmpty(s.Customer.DebitorNumber)) ? s.Customer.DebitorNumber : "zzzzz").ToList(); privatRechnungen = null; @@ -199,52 +199,52 @@ namespace LebenshilfeFrankfurtOder.Invoicing return invoice; } - public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer) + public override void SetSingleInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept) + { + if (supportConcept.SupportConceptOid > 0 && supportConcept.CostBearerRelOids.Count > 0) + { + base.SetSingleInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConcept); + } + } + + public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer) { base.SetRecipientInformation(serviceInvoice, costBearer); serviceInvoice.InvoiceBase.RecipientOrganisation = costBearer.Organisation.Name.Replace("Hort", "").Trim(); } - - //public override void SetServiceInvoicePeriods(ServiceInvoice invoice, CostBearer2SupportConcept costBearer2SupportConcept, DateTimeSpan invoicePeriod, List serviceRecords) - //{ - // var invoiceAccountingPeriodSpan = new DateTimeSpan - // { - // StartDateTime = invoice.InvoiceBase.AccountingPeriodStart.Value, - // EndDateTime = invoice.InvoiceBase.AccountingPeriodEnd.Value - // }; - // var apList = costBearer2SupportConcept.ApprovalPeriodList.Where(ap => - // ap.EndDate >= invoiceAccountingPeriodSpan.StartDate && - // ap.StartDate <= invoiceAccountingPeriodSpan.EndDate).ToList(); - // if (apList.Count > 0) - // { - // SupportConceptApprovalPeriod iPeriod = apList[0]; + public override void SetServiceInvoicePeriods(ServiceInvoice invoice, CostBearer2SupportConcept costBearer2SupportConcept, DateTimeSpan invoicePeriod, List serviceRecords) + { + if (costBearer2SupportConcept != null) + { + base.SetServiceInvoicePeriods(invoice, costBearer2SupportConcept, invoicePeriod, serviceRecords); + } + var invoiceAccountingPeriodSpan = new DateTimeSpan + { + StartDateTime = invoice.InvoiceBase.AccountingPeriodStart.Value, + EndDateTime = invoice.InvoiceBase.AccountingPeriodEnd.Value + }; - // SupportConceptApprovalPeriodDC approvalPeriodDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(iPeriod); - + ServiceInvoicePeriod serviceInvoicePeriod = new ServiceInvoicePeriod + { + Start = invoiceAccountingPeriodSpan.StartDateTime, + End = invoiceAccountingPeriodSpan.EndDateTime + }; - // ServiceInvoicePeriod serviceInvoicePeriod = CreateServiceInvoicePeriod(approvalPeriodDC, invoiceAccountingPeriodSpan); - // serviceInvoicePeriod.SupportConceptApprovalPeriod = iPeriod; - // serviceInvoicePeriod.Customer = costBearer2SupportConcept.SupportConcept.Customer; + + Calculations calc = PluginLoader.FindClass(_SpecificID) ?? Calculations.GetInstance(_SpecificID); - // CostBearer costBearer = costBearer2SupportConcept.CostBearer; - // List costRates = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(costBearer.CostRatePeriods); + + SetInvoiceItems(invoice, serviceInvoicePeriod, null, costBearer2SupportConcept, invoicePeriod, serviceRecords); - // CostRatePeriodDC serviceUnit = costRates.GetCostRatePeriodForDate(CostRatePeriodType.MinutesPerServiceUnit, DateTime.Now); - // serviceInvoicePeriod.ServiceUnitName = serviceUnit.UnitName; - - // SetInvoiceItems(invoice, serviceInvoicePeriod, approvalPeriodDC, costBearer2SupportConcept, invoicePeriod, serviceRecords); + if (serviceInvoicePeriod.InvoiceItemList.Count > 0) + invoice.ServiceInvoicePeriodList.Add(serviceInvoicePeriod); + + } - // CheckMaxApprovedAmount(invoice, serviceInvoicePeriod, approvalPeriodDC, costBearer2SupportConcept, invoicePeriod, serviceRecords); - - // if (serviceInvoicePeriod.InvoiceItemList.Count > 0) - // invoice.ServiceInvoicePeriodList.Add(serviceInvoicePeriod); - // } - //} - - public override void SetInvoiceItems(ServiceInvoice invoice, ServiceInvoicePeriod serviceInvoicePeriod, + public override void SetInvoiceItems(ServiceInvoice invoice, ServiceInvoicePeriod serviceInvoicePeriod, SupportConceptApprovalPeriodDC supportConceptApprovalPeriod, CostBearer2SupportConcept cb2sc, DateTimeSpan invoicePeriod, List serviceRecords) { diff --git a/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs b/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs index 54630e80e..6aa9c38de 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs @@ -150,6 +150,10 @@ namespace LebenshilfeFrankfurtOder { lblAbrechnungsart.Text = "Kurzzeitpflege nach §42 SGB XI lt. beiliegendem Leistungsnachweis"; } + else if (gg.Contains("§45a")) + { + lblAbrechnungsart.Text = "FED - Betreuung nach § 45a SGB XI lt. beiliegendem Leistungsnachweis"; + } else if (pRO.InvoiceBase != null && pRO.InvoiceBase.InvoiceId == "RechnungFudPrivat") { ankuendigungAnzeigen = true; diff --git a/Service/Plugins/CustomerService.cs b/Service/Plugins/CustomerService.cs index cb03cb3e6..1e8c6bff4 100644 --- a/Service/Plugins/CustomerService.cs +++ b/Service/Plugins/CustomerService.cs @@ -1494,7 +1494,7 @@ namespace BeWo.Service.Plugins MatchZiele(hidc, scDC); result.ImportedSupportConcept = scDC; - result.ImportMessage = "Import erfolgreich"; + //result.ImportMessage = "Import erfolgreich"; return result; } @@ -1534,18 +1534,7 @@ namespace BeWo.Service.Plugins foreach (var importMass in importziel.Massnahmen) { - var massnahme = SucheZiel(supportConcept, importMass.ZielName); - - if (massnahme == null) - { - massnahme = new ValueListEntryDC(); - massnahme.Parent = ziel; - massnahme.ParentOid = ziel.ValueListEntryOid; - massnahme.TypeDescription = importMass.ZielName; - massnahme.IsActive = true; - massnahme.Type = ValueListEntryType.SupportConceptIndividualGoalType; - supportConcept.Goals.Add(massnahme); - } + MatchMassnahme(importMass, supportConcept, ziel); } } } @@ -1553,7 +1542,29 @@ namespace BeWo.Service.Plugins } } - public virtual ValueListEntryDC SucheZiel(SupportConceptDC supportConcept, string zielName) + private void MatchMassnahme(HilfeplanImportZielDC importMass, SupportConceptDC supportConcept, ValueListEntryDC parentZiel) + { + var splitByNewLine = importMass.ZielName.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + + foreach (var massnahmeName in splitByNewLine) + { + var massnahme = SucheZiel(supportConcept, massnahmeName); + + if (massnahme == null) + { + massnahme = new ValueListEntryDC(); + massnahme.Parent = parentZiel; + massnahme.ParentOid = parentZiel.ValueListEntryOid; + massnahme.TypeDescription = massnahmeName; + massnahme.IsActive = true; + massnahme.Type = ValueListEntryType.SupportConceptIndividualGoalType; + supportConcept.Goals.Add(massnahme); + } + } + + } + + public virtual ValueListEntryDC SucheZiel(SupportConceptDC supportConcept, string zielName) { return supportConcept.Goals.Where(z => z.DisplayName != null && z.DisplayName.Contains(zielName)).FirstOrDefault(); diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index f6518ee09..175f31229 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -235,7 +235,7 @@ namespace BeWo.Service.Plugins //t = "4423043131"; // Die Perspektive e.V. //t = "5263375280"; // LH Wolfsburg //t = "4900722829"; // Evangelische Kirchengemeinde Bottrop - //t = "9853685258"; // Input + t = "9853685258"; // Input //t = "7622428090"; // Freie gemeinnützige Beratungsstelle für Psychotherapie e.V. (BfpDus) (Panama) //t = "0206140343"; // Lebenswelt Gabriel //t = "6916712798"; // LH Rodenkirchen Bewo @@ -401,7 +401,7 @@ namespace BeWo.Service.Plugins //t = "9520730180"; // Arbeitskreis Jugend- und Drogenberatung Waf //t = "8365918329"; // Lebenshilfe Stade e.V. Schulbegleitender Dienst //t = "6203102637"; // BeWo Neuss-Lauth u. Lauth GbR - t = "7060431533"; // Arche Tecklenburg e.V. + //t = "7060431533"; // Arche Tecklenburg e.V. return t; #else diff --git a/Service/ServiceImplementations/AccountingServiceImp.cs b/Service/ServiceImplementations/AccountingServiceImp.cs index 92034611f..ef3a4452f 100644 --- a/Service/ServiceImplementations/AccountingServiceImp.cs +++ b/Service/ServiceImplementations/AccountingServiceImp.cs @@ -634,8 +634,15 @@ namespace BeWo.Service.ServiceImplementations public List UpdateServiceInvoices(List invoices) { - var acc = PluginLoader.FindClass(); - return acc.UpdateServiceInvoices(invoices); + try + { + var acc = PluginLoader.FindClass(); + return acc.UpdateServiceInvoices(invoices); + } + catch (Exception e) + { + throw Utils.CreateBeWoFaultException(e); + } } public void UpdateSettlementInvoice(List invoices) diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs index 37f47d21c..593d68b99 100644 --- a/Shared/BeWoEntityEnums.cs +++ b/Shared/BeWoEntityEnums.cs @@ -580,6 +580,7 @@ namespace BS.Shared PivotTabelleAnsehen = 29003, DienstplanungAnsehen = 29004, AbwesenheitsPlanungAnsehen = 29005, + DienstplanungBearbeiten = 29006, KilometerauswertungEigene_View = 29010, VertretungenView_View = 30000, diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs index da4e38098..e81fba861 100644 --- a/Shared/Core/EnumTranslations.cs +++ b/Shared/Core/EnumTranslations.cs @@ -749,7 +749,8 @@ namespace BS.Shared.Core dict.Add(UserRightType.KilometerauswertungEigene_View, Translator.Translate("Auswertungen->Kilometerauswertung (nur eigene)")); dict.Add(UserRightType.BewertungAuswertung_View, Translator.Translate("Auswertungen->Bewertung")); dict.Add(UserRightType.PivotTabelleAnsehen, Translator.Translate("Auswertungen->Pivot Tabelle")); - dict.Add(UserRightType.DienstplanungAnsehen, Translator.Translate("Auswertungen->Dienstplanung")); + dict.Add(UserRightType.DienstplanungAnsehen, Translator.Translate("Auswertungen->Dienstplanung ansehen")); + dict.Add(UserRightType.DienstplanungBearbeiten, Translator.Translate("Auswertungen->Dienstplanung bearbeiten")); dict.Add(UserRightType.AbwesenheitsPlanungAnsehen, Translator.Translate("Auswertungen->Urlaubsplanung")); dict.Add(UserRightType.ResourceBookingView_Create, Translator.Translate("Ressourcen anlegen"));