From dbe7021361d2478177b9278dd0959c2b2bb2d869 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 19 Aug 2019 11:59:38 +0200 Subject: [PATCH] CB --- BeWo/Core/BeWoUtils.cs | 12 +- BeWo/View/Master/AdministrationView.xaml | 124 +++++++------ BeWo/View/Master/AdministrationView.xaml.cs | 12 +- BeWoPlanerMobil/BeWoPlanerMobil.csproj | 2 +- Host/Multitenancy/demo.config | 7 +- ... beim Bewilligungszeitraum hinzugefügt.txt | 16 +- ...zeintrag hat nun eine Eintragkategorie.txt | 18 +- .../MitarbeiterstundenkontoBerechnung.cs | 5 +- ReportImp/AlphaEv/Export/DiamantExporter.cs | 96 ++++++++-- .../ServiceInvoiceReport.Designer.cs | 65 ++----- .../ServiceInvoiceReport.cs | 2 +- .../ServiceInvoiceReport.resx | 2 +- .../Invoicing/DefaultInvoiceCreation.cs | 6 +- .../LeistungsnachweisKrankenkasse.cs | 10 +- .../MitarbeiterstundenkontoBerechnung.cs | 45 +++-- .../ServicesOverviewReport.Designer.cs | 35 +++- .../Invoicing/DefaultInvoiceCreation.cs | 175 +++++++++++++++++- .../ServiceInvoiceReport.cs | 16 +- .../ServicesOverviewReport.Designer.cs | 72 +++---- Service/Plugins/PluginLoader.cs | 6 +- 20 files changed, 482 insertions(+), 244 deletions(-) diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index f048298e0..73b949058 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -1509,7 +1509,7 @@ namespace BeWo.Core if (BeWoApp.MainControl.HomeButtonPanel == null) return; - BeWoApp.MainControl.HomeView.txtHeader.Text = BeWoApp.LoggedOnUser.Employee.ToString(); + //BeWoApp.MainControl.HomeView.txtHeader.Text = BeWoApp.LoggedOnUser.Employee.ToString(); } public static void WriteExcelFile(string content, string path) @@ -1947,13 +1947,13 @@ namespace BeWo.Core documentPreviewControl.SnapsToDevicePixels = true; window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = BeWoApp.CurrentBeWo.MainWindow }; - - ThemeManager.SetTheme(window, Theme.Office2010Black); - } - //ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black); + ThemeManager.SetTheme(window, Theme.Office2010Black); + } + + ThemeManager.SetTheme(documentPreviewControl, Theme.Office2010Black); - documentPreviewControl.DocumentSource = report; + documentPreviewControl.DocumentSource = report; if(window != null) { diff --git a/BeWo/View/Master/AdministrationView.xaml b/BeWo/View/Master/AdministrationView.xaml index b2909ada0..24866892b 100644 --- a/BeWo/View/Master/AdministrationView.xaml +++ b/BeWo/View/Master/AdministrationView.xaml @@ -5,6 +5,7 @@ xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:localView="clr-namespace:BeWo.View" xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup" + xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"> @@ -35,74 +36,77 @@ - - - - - - - - - - + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + + + + + + + + + + + + - - - - - - - - + + + + + + - + diff --git a/BeWo/View/Master/AdministrationView.xaml.cs b/BeWo/View/Master/AdministrationView.xaml.cs index ca83d6115..271c2e60c 100644 --- a/BeWo/View/Master/AdministrationView.xaml.cs +++ b/BeWo/View/Master/AdministrationView.xaml.cs @@ -21,7 +21,7 @@ namespace BeWo.View.Master { #region Fields - private readonly Dictionary _OpenViews = new Dictionary(); + private readonly Dictionary _OpenViews = new Dictionary(); private BeWoView _SelectedView; @@ -93,8 +93,8 @@ namespace BeWo.View.Master if (!(sender is AccordionItem selectedAccordionItem)) return; - if (_OpenViews.ContainsKey(selectedAccordionItem)) - SetView(_OpenViews[selectedAccordionItem]); + if (_OpenViews.ContainsKey(selectedAccordionItem.Header.ToString())) + SetView(_OpenViews[selectedAccordionItem.Header.ToString()]); else GenerateNewView(selectedAccordionItem); } @@ -127,13 +127,13 @@ namespace BeWo.View.Master internal override bool DoSaveCheck() { - if (!(Root.SelectedItem is AccordionItem item) || !_OpenViews.ContainsKey(item)) return true; + if (!(Root.SelectedItem is AccordionItem item) || !_OpenViews.ContainsKey(item.Header.ToString())) return true; var lDoSave = SelectedView.DoSaveCheck(); if (!lDoSave || !IsDirty) return lDoSave; - _OpenViews.Remove((AccordionItem)Root.SelectedItem); + _OpenViews.Remove(((AccordionItem)Root.SelectedItem).Header.ToString()); return true; } @@ -152,7 +152,7 @@ namespace BeWo.View.Master pView.MaxHeight = ActualHeight - 120; } - _OpenViews.Add(pTabItem, pView); + _OpenViews.Add(pTabItem.Header.ToString(), pView); SetView(pView); } diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index 557ed6fb0..0d35675fa 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -292,7 +292,7 @@ - True + False False 8808 / diff --git a/Host/Multitenancy/demo.config b/Host/Multitenancy/demo.config index d22557546..ffdd8e32c 100644 --- a/Host/Multitenancy/demo.config +++ b/Host/Multitenancy/demo.config @@ -16,14 +16,9 @@ - Server=localhost;Password=root;User ID=root; Initial Catalog=bewodemo + Server=localhost;Password=root;User ID=root; Initial Catalog=alpha - - - NHibernate.Dialect.MySQLDialect diff --git a/Model/Changes_2019_07_31 Bugdet beim Bewilligungszeitraum hinzugefügt.txt b/Model/Changes_2019_07_31 Bugdet beim Bewilligungszeitraum hinzugefügt.txt index 28ca469e4..ead56809d 100644 --- a/Model/Changes_2019_07_31 Bugdet beim Bewilligungszeitraum hinzugefügt.txt +++ b/Model/Changes_2019_07_31 Bugdet beim Bewilligungszeitraum hinzugefügt.txt @@ -1,11 +1,5 @@ -ALTER TABLE `bewodemo`.`supportconceptapprovalperiod` -ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL AFTER `ContactCountInterval`, -ADD COLUMN `Bewilligungsart` INT(10) NOT NULL DEFAULT 0 AFTER `BudgetOid`, -ADD INDEX `FK_Budget_idx` (`BudgetOid` ASC) VISIBLE; -; -ALTER TABLE `bewodemo`.`supportconceptapprovalperiod` -ADD CONSTRAINT `FK_Budget` - FOREIGN KEY (`BudgetOid`) - REFERENCES `bewodemo`.`budget` (`Oid`) - ON DELETE RESTRICT - ON UPDATE RESTRICT; \ No newline at end of file +ALTER TABLE `supportconceptapprovalperiod` +ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL; + +ALTER TABLE `supportconceptapprovalperiod` +ADD COLUMN `Bewilligungsart` INT(10) NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/Model/Changes_2019_08_08 Notizeintrag hat nun eine Eintragkategorie.txt b/Model/Changes_2019_08_08 Notizeintrag hat nun eine Eintragkategorie.txt index 1feda43c0..033e2cc5b 100644 --- a/Model/Changes_2019_08_08 Notizeintrag hat nun eine Eintragkategorie.txt +++ b/Model/Changes_2019_08_08 Notizeintrag hat nun eine Eintragkategorie.txt @@ -1,16 +1,2 @@ -ALTER TABLE `bewodemo`.`notizeneintrag` -DROP FOREIGN KEY `FK_NOTIZENEINTRAG_KATEGORIE`; -ALTER TABLE `bewodemo`.`notizeneintrag` -ADD COLUMN `EintragKategorieOid` BIGINT(19) NULL DEFAULT NULL AFTER `NotizenKategorieOid`, -ADD INDEX `EINTRAG_KATEGORIE_FK` (`EintragKategorieOid` ASC) VISIBLE; -ALTER TABLE `bewodemo`.`notizeneintrag` RENAME INDEX `NOTIZENEINTRAG_KATEGORIE_FK` TO `NOTIZEN_KATEGORIE_FK`; -ALTER TABLE `bewodemo`.`notizeneintrag` ALTER INDEX `NOTIZEN_KATEGORIE_FK` INVISIBLE; -ALTER TABLE `bewodemo`.`notizeneintrag` -ADD CONSTRAINT `FK_NOTIZEN_KATEGORIE` - FOREIGN KEY (`NotizenKategorieOid`) - REFERENCES `bewodemo`.`notizenkategorie` (`Oid`), -ADD CONSTRAINT `FK_EINTRAG_KATEGORIE` - FOREIGN KEY (`EintragKategorieOid`) - REFERENCES `bewodemo`.`valuelistentry` (`Oid`) - ON DELETE RESTRICT - ON UPDATE RESTRICT; +ALTER TABLE `notizeneintrag` +ADD COLUMN `EintragKategorieOid` BIGINT(19) NULL DEFAULT NULL diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs index 2ffd77148..6f6b5f85c 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs @@ -573,6 +573,7 @@ namespace BeWo.Report.ReportObjects private decimal GetArbeitszeitStundenFuerTag(Arbeitszeit az, DateTime tag) { var day = tag.DayOfWeek; + decimal stunden = 0; foreach (var ae in az.ArbeitszeitEintraege) { if (SindAmGleichenWochentag(day, ae.Tag)) @@ -586,12 +587,12 @@ namespace BeWo.Report.ReportObjects if (DateTime.TryParse(dateStr1, out date1) && DateTime.TryParse(dateStr2, out date2)) { - return (decimal)date2.Subtract(date1).TotalHours; + stunden += (decimal)date2.Subtract(date1).TotalHours; } } } - return 0; + return stunden; } private bool SindAmGleichenWochentag(DayOfWeek day, AppointmentDayOfWeek aeTag) diff --git a/ReportImp/AlphaEv/Export/DiamantExporter.cs b/ReportImp/AlphaEv/Export/DiamantExporter.cs index ab716796e..21f854c79 100644 --- a/ReportImp/AlphaEv/Export/DiamantExporter.cs +++ b/ReportImp/AlphaEv/Export/DiamantExporter.cs @@ -47,10 +47,10 @@ namespace AlphaEv.Export public static String GetAbrechnungenString(DateTime date) { StringBuilder sb = new StringBuilder(); - sb.AppendLine("DebKonto;Datum;Kst;Text;Betrag;leer;leer;leer;Sachkonto"); + sb.AppendLine("Klient;DebKonto;Datum;Kst;Text;Betrag;leer;leer;leer;Sachkonto"); List oidList = new List(); - oidList.Add(1); - oidList.Add(7); + oidList.Add(1); // Fachleistung + oidList.Add(7); // Nicht-Fachkräfte var s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4016", null); if (!String.IsNullOrWhiteSpace(s)) { @@ -59,6 +59,7 @@ namespace AlphaEv.Export + //Assistenzstunden oidList.Clear(); oidList.Add(2); oidList.Add(3); @@ -67,7 +68,7 @@ namespace AlphaEv.Export oidList.Clear(); oidList.Add(2); - s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4018", costDict); + s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4019", costDict); if (!String.IsNullOrWhiteSpace(s)) { @@ -79,7 +80,7 @@ namespace AlphaEv.Export oidList.Clear(); oidList.Add(3); - s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4018", costDict); + s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4019", costDict); if (!String.IsNullOrWhiteSpace(s)) { @@ -88,6 +89,7 @@ namespace AlphaEv.Export sb.Append(s); } + //Flex oidList.Clear(); oidList.Add(10); oidList.Add(13); @@ -111,9 +113,23 @@ namespace AlphaEv.Export return sb.ToString(); } - public static String GetMonatlicheAbrechnungStringForCats(DateTime date, IList catOids, String sachkonto, Dictionary costDict) + public static String GetMonatlicheAbrechnungStringForCats(DateTime date, IList catOids, String sachkonto, Dictionary costDict, bool nurGruppen, bool nurNichtGruppen) { - var dt = ExecuteQuery(GetMonatlicheAbrechnungStringForCatsSql(date, catOids), date); + var sql = ""; + + if (nurGruppen && nurNichtGruppen) + { + sql = GetMonatlicheAbrechnungStringForCatsSql(date, catOids); + } + else + { + if (nurGruppen) + { + sql = GetMonatlicheAbrechnungStringForCatsSqlMitGruppen(date, catOids); + } + } + var dt = ExecuteQuery(sql, date); + StringBuilder sb = new StringBuilder(); foreach (DataRow row in dt.Rows) @@ -125,7 +141,7 @@ namespace AlphaEv.Export for (int i = 0; i < row.ItemArray.Length; i++) { - if (i < 8) + if (i < 9) { if (i > 0) { @@ -135,17 +151,17 @@ namespace AlphaEv.Export var item = row[i]; - if (i == 4 && row[4] != null) + if (i == 5 && row[5] != null) { decimal betrag = 0; - Decimal.TryParse(row[4].ToString(), out betrag); + Decimal.TryParse(row[5].ToString(), out betrag); //var betrag = (decimal) row[4]; - if (row[8] != null && row[9] != null && costDict != null) + if (row[9] != null && row[10] != null && costDict != null) { - var minuten = (decimal) row[8]; + var minuten = (decimal) row[9]; - var catOid = (long) row[9]; + var catOid = (long) row[10]; if (costDict.ContainsKey(catOid)) { @@ -166,7 +182,7 @@ namespace AlphaEv.Export sb.Append(item); } - if (i == 3) + if (i == 4) { sb.Append(" Std"); } @@ -216,6 +232,58 @@ namespace AlphaEv.Export String sql = @" SELECT +CONCAT(p.Lastname, ', ', p.Firstname), +c.DebitorNumber as 'DebKonto', +DATE_FORMAT(DATE_ADD(':Monat_End',INTERVAL -1 DAY), '%d.%m.%Y') as 'Datum', +c.`CostCenter` AS 'Kst', +ROUND(sr.`GeleisteteFLM` / 60, 2) as 'Text', +IF(crpRateFactor.`CostRateValue` is null, + ROUND(ROUND(sr.`GeleisteteFLM` / 60, 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ), 2), + ROUND(ROUND((sr.`GeleisteteFLM` / 60) * ((100 + crpRateFactor.`CostRateValue`)/100), 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ), 2)) AS 'Betrag', + '', + '', + '', +sr.`GeleisteteFLM`, +sr.CatOid +FROM `supportconcept` sc +INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid` +INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid` +LEFT JOIN + (SELECT crp.`ObjectOid`, crp.`CostRateValue` FROM `costrateperiod` crp + WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 2 AND (crp.`EndDate` is null or crp.`EndDate` > NOW())) + AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid` +INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid` +INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid` +INNER JOIN `person` p on c.`PersonOid` = p.`Oid` +LEFT JOIN + (SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM, sc.Oid as CatOid FROM `servicerecord` sr2 + INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid` + INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid` + WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sc.oid in (CATOIDLIST) GROUP BY sr2.`CostBearer2SupportConceptOid`) + AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid` +WHERE c.`IsActive` <> 0 AND sc.`IsActive` <> 0 +and (sr.`GeleisteteFLM` is not null) +ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate` +"; + + return sql.Replace("CATOIDLIST", oidList.ToString()); + } + + private static String GetMonatlicheAbrechnungStringForCatsSqlGruppen(DateTime date, IList catOids, bool gruppenHolen) + { + StringBuilder oidList = new StringBuilder(); + + foreach (var catOid in catOids) + { + if (oidList.Length > 0) + oidList.Append(","); + oidList.Append(catOid); + } + + + String sql = @" +SELECT +CONCAT(p.Lastname, ', ', p.Firstname), c.DebitorNumber as 'DebKonto', DATE_FORMAT(DATE_ADD(':Monat_End',INTERVAL -1 DAY), '%d.%m.%Y') as 'Datum', c.`CostCenter` AS 'Kst', diff --git a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.Designer.cs b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.Designer.cs index c1abf2df2..1181c1594 100644 --- a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.Designer.cs +++ b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.Designer.cs @@ -36,8 +36,6 @@ namespace FreundeskreisSuchthilfe this.lblMonat = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); - this.lblBewilligungVom = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.lblAddress = new DevExpress.XtraReports.UI.XRLabel(); @@ -89,12 +87,10 @@ namespace FreundeskreisSuchthilfe this.lblMonat, this.xrLabel11, this.xrLabel10, - this.lblBewilligungVom, - this.xrLabel8, this.xrLabel7, this.xrLabel6, this.lblAddress}); - this.ReportHeader.HeightF = 400F; + this.ReportHeader.HeightF = 382.2917F; this.ReportHeader.Name = "ReportHeader"; this.ReportHeader.StylePriority.UseFont = false; // @@ -115,7 +111,7 @@ namespace FreundeskreisSuchthilfe // // lblMonat // - this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 364.2084F); + this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 345.4584F); this.lblMonat.Multiline = true; this.lblMonat.Name = "lblMonat"; this.lblMonat.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -125,7 +121,7 @@ namespace FreundeskreisSuchthilfe // // xrLabel11 // - this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 328.2083F); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 309.4583F); this.xrLabel11.Multiline = true; this.xrLabel11.Name = "xrLabel11"; this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -135,33 +131,13 @@ namespace FreundeskreisSuchthilfe // // xrLabel10 // - this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 274.8542F); + this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 256.1042F); this.xrLabel10.Multiline = true; this.xrLabel10.Name = "xrLabel10"; this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel10.SizeF = new System.Drawing.SizeF(408.3333F, 22.125F); this.xrLabel10.StylePriority.UseFont = false; - this.xrLabel10.Text = "Zeitraum: [AccountingPeriod]"; - // - // lblBewilligungVom - // - this.lblBewilligungVom.LocationFloat = new DevExpress.Utils.PointFloat(175F, 256.8541F); - this.lblBewilligungVom.Multiline = true; - this.lblBewilligungVom.Name = "lblBewilligungVom"; - this.lblBewilligungVom.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.lblBewilligungVom.SizeF = new System.Drawing.SizeF(335.0835F, 18F); - this.lblBewilligungVom.StylePriority.UseFont = false; - this.lblBewilligungVom.Text = "Bewilligung vom:"; - // - // xrLabel8 - // - this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 256.8541F); - this.xrLabel8.Multiline = true; - this.xrLabel8.Name = "xrLabel8"; - this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel8.SizeF = new System.Drawing.SizeF(175F, 18F); - this.xrLabel8.StylePriority.UseFont = false; - this.xrLabel8.Text = "Ihr Zeichen:"; + this.xrLabel10.Text = "Bewilligungszeitraum: [AccountingPeriod]"; // // xrLabel7 // @@ -269,7 +245,7 @@ namespace FreundeskreisSuchthilfe this.xrTableCell32.StylePriority.UsePadding = false; this.xrTableCell32.StylePriority.UseTextAlignment = false; this.xrTableCell32.Text = "Zeitraum"; - this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; this.xrTableCell32.Weight = 0.44313146416171628D; // // xrTableCell33 @@ -281,9 +257,9 @@ namespace FreundeskreisSuchthilfe this.xrTableCell33.StylePriority.UseBorders = false; this.xrTableCell33.StylePriority.UsePadding = false; this.xrTableCell33.StylePriority.UseTextAlignment = false; - this.xrTableCell33.Text = "FLS"; - this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell33.Weight = 0.48744460221219005D; + this.xrTableCell33.Text = "Fachleistungsstunden"; + this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell33.Weight = 0.7976366323519225D; // // xrTableCell38 // @@ -295,8 +271,8 @@ namespace FreundeskreisSuchthilfe this.xrTableCell38.StylePriority.UsePadding = false; this.xrTableCell38.StylePriority.UseTextAlignment = false; this.xrTableCell38.Text = "Stundensatz"; - this.xrTableCell38.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell38.Weight = 0.57607089878008444D; + this.xrTableCell38.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell38.Weight = 0.44313145729162773D; // // xrTableCell34 // @@ -309,7 +285,7 @@ namespace FreundeskreisSuchthilfe this.xrTableCell34.StylePriority.UseTextAlignment = false; this.xrTableCell34.Text = "Summe"; this.xrTableCell34.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell34.Weight = 0.62038409866131783D; + this.xrTableCell34.Weight = 0.44313151001004208D; // // DetailReport2 // @@ -357,7 +333,7 @@ namespace FreundeskreisSuchthilfe this.xrTableCell40.StylePriority.UseBorders = false; this.xrTableCell40.StylePriority.UsePadding = false; this.xrTableCell40.StylePriority.UseTextAlignment = false; - this.xrTableCell40.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell40.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; this.xrTableCell40.Weight = 0.44313146796853359D; // // xrTableCell44 @@ -371,22 +347,21 @@ namespace FreundeskreisSuchthilfe this.xrTableCell44.StylePriority.UsePadding = false; this.xrTableCell44.StylePriority.UseTextAlignment = false; this.xrTableCell44.Text = "xrTableCell44"; - this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell44.Weight = 0.48744459729779233D; + this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell44.Weight = 0.79763662093147025D; // // xrTableCell43 // this.xrTableCell43.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:0.00}")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:c}")}); this.xrTableCell43.Name = "xrTableCell43"; this.xrTableCell43.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F); this.xrTableCell43.StylePriority.UseBorderColor = false; this.xrTableCell43.StylePriority.UseBorders = false; this.xrTableCell43.StylePriority.UsePadding = false; this.xrTableCell43.StylePriority.UseTextAlignment = false; - this.xrTableCell43.Text = "xrTableCell43"; - this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell43.Weight = 0.576070929207513D; + this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell43.Weight = 0.35450516423235268D; // // xrTableCell47 // @@ -399,7 +374,7 @@ namespace FreundeskreisSuchthilfe this.xrTableCell47.StylePriority.UsePadding = false; this.xrTableCell47.StylePriority.UseTextAlignment = false; this.xrTableCell47.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell47.Weight = 0.62038402472852416D; + this.xrTableCell47.Weight = 0.53175776607000658D; // // GroupFooter1 // @@ -553,8 +528,6 @@ namespace FreundeskreisSuchthilfe private DevExpress.XtraReports.UI.XRLabel lblAddress; private DevExpress.XtraReports.UI.XRLabel xrLabel6; private DevExpress.XtraReports.UI.XRLabel xrLabel7; - private DevExpress.XtraReports.UI.XRLabel lblBewilligungVom; - private DevExpress.XtraReports.UI.XRLabel xrLabel8; private DevExpress.XtraReports.UI.XRLabel xrLabel10; private DevExpress.XtraReports.UI.XRLabel lblMonat; private DevExpress.XtraReports.UI.XRLabel xrLabel11; diff --git a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.cs b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.cs index c4a436bc7..ddeb81389 100644 --- a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.cs +++ b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.cs @@ -104,7 +104,7 @@ namespace FreundeskreisSuchthilfe lblZahlungsziel.Text = lblZahlungsziel.Text.Replace("{Datum}", datum); - lblBewilligungVom.Text = String.Format("Bewilligung vom: {0:dd.MM.yyyy}", GetBewilligungsDatum(pRO)); + //lblBewilligungVom.Text = String.Format("Bewilligung vom: {0:dd.MM.yyyy}", GetBewilligungsDatum(pRO)); this.bindingSource1.DataSource = pRO; } diff --git a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.resx b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.resx index 3d7ff45aa..a8dd096a5 100644 --- a/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.resx +++ b/ReportImp/FreundeskreisSuchthilfe/ServiceInvoiceReport.resx @@ -120,7 +120,7 @@ Als Anlage fügen wir den unterschriebenen Leistungsnachweis in Kopie bei. -Bitte zahlen Sie den Betrag bis {Datum} auf unser Konto bei +Wir bitten um Überweisung bis zum {Datum} auf unser Konto bei der Bank für Sozialwirtschaft. Mit freundlichen Grüßen diff --git a/ReportImp/KontaktUndKrisenhilfeReports/Invoicing/DefaultInvoiceCreation.cs b/ReportImp/KontaktUndKrisenhilfeReports/Invoicing/DefaultInvoiceCreation.cs index 699d6ca4d..94ad04883 100644 --- a/ReportImp/KontaktUndKrisenhilfeReports/Invoicing/DefaultInvoiceCreation.cs +++ b/ReportImp/KontaktUndKrisenhilfeReports/Invoicing/DefaultInvoiceCreation.cs @@ -22,8 +22,10 @@ namespace KontaktUndKrisenhilfe.Invoicing { var i = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords); - - SetAmountEquityContribution(i); + if (i != null) + { + SetAmountEquityContribution(i); + } return i; } diff --git a/ReportImp/PraxisPusteblume/LeistungsnachweisKrankenkasse.cs b/ReportImp/PraxisPusteblume/LeistungsnachweisKrankenkasse.cs index 8b7883172..c7eec6ae5 100644 --- a/ReportImp/PraxisPusteblume/LeistungsnachweisKrankenkasse.cs +++ b/ReportImp/PraxisPusteblume/LeistungsnachweisKrankenkasse.cs @@ -35,7 +35,7 @@ namespace PraxisPusteblume public void SetReportDataSource(ServicesOverviewRO ro) { //cellMonat1.Text = String.Format("{0:MMM yy}", ro.StartDate); - lblZeitraum.Text = String.Format("Zeitraum {0:dd.MM.yyyy} - {1:dd.MM.yyyy}", ro.StartDate, ro.EndDate); + //lblZeitraum.Text = String.Format("Zeitraum {0:dd.MM.yyyy} - {1:dd.MM.yyyy}", ro.StartDate, ro.EndDate); InitRows(ro); if (ro.Services != null) { @@ -46,8 +46,8 @@ namespace PraxisPusteblume } - lblCustomer.Text = String.Format("Klient: {0}, {1}, {2}, {3} {4}, {5}", ro.CustomerLastName, - ro.CustomerFirstName, ro.CustomerStreet, ro.CustomerPostalCode, ro.CustomerCity, ro.ReferenceNumber); + //lblCustomer.Text = String.Format("Klient: {0}, {1}, {2}, {3} {4}, {5}", ro.CustomerLastName, + // ro.CustomerFirstName, ro.CustomerStreet, ro.CustomerPostalCode, ro.CustomerCity, ro.ReferenceNumber); if (String.IsNullOrEmpty(ro.Costbearer)) @@ -127,8 +127,8 @@ namespace PraxisPusteblume { rowWochentage.Cells[cellIdx].BackColor = Color.LightGray; tableRowPflegeeinheiten1.Cells[cellIdx].BackColor = Color.LightGray; - row2.Cells[cellIdx].BackColor = Color.LightGray; - row3.Cells[cellIdx].BackColor = Color.LightGray; + //row2.Cells[cellIdx].BackColor = Color.LightGray; + //row3.Cells[cellIdx].BackColor = Color.LightGray; } start = start.AddDays(1); } diff --git a/ReportImp/PraxisPusteblume/MitarbeiterstundenkontoBerechnung.cs b/ReportImp/PraxisPusteblume/MitarbeiterstundenkontoBerechnung.cs index 5f60127eb..00806adf8 100644 --- a/ReportImp/PraxisPusteblume/MitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/PraxisPusteblume/MitarbeiterstundenkontoBerechnung.cs @@ -19,29 +19,36 @@ namespace PraxisPusteblume { if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null && item.ServiceDescription.ServiceCategory.IsBillable) { - var cb = item.CostBearer2SupportConcept.CostBearer; - - var crlist = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cb.CostRatePeriods); - - var rateFactor = crlist.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, item.Start.Value); - - if (rateFactor != null && rateFactor.CostRateValue.HasValue) + if (item.CostBearer2SupportConcept != null) { - decimal factor = rateFactor.CostRateValue.Value; + var cb = item.CostBearer2SupportConcept.CostBearer; - if (factor == 33.33m) - { - factor = 1 + (1m / 3m); - } - else - { - factor = (100 + factor) / 100; - } + var crlist = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cb.CostRatePeriods); - item.RoundedDuration *= factor; - item.GroupRoundedDuration *= factor; + var rateFactor = crlist.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, item.Start.Value); + + if (rateFactor != null && rateFactor.CostRateValue.HasValue) + { + decimal factor = rateFactor.CostRateValue.Value; + + if (factor == 33.33m) + { + factor = 1 + (1m / 3m); + } + else + { + factor = (100 + factor) / 100; + } + + item.RoundedDuration *= factor; + item.GroupRoundedDuration *= factor; + } } - } + else + { + int test = 0; + } + } return true; } diff --git a/ReportImp/TrialogReports/ServicesOverviewReport.Designer.cs b/ReportImp/TrialogReports/ServicesOverviewReport.Designer.cs index f00ea34ff..d7f7be97b 100644 --- a/ReportImp/TrialogReports/ServicesOverviewReport.Designer.cs +++ b/ReportImp/TrialogReports/ServicesOverviewReport.Designer.cs @@ -76,6 +76,8 @@ namespace BeWo.TrialogReports this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -440,6 +442,8 @@ namespace BeWo.TrialogReports // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel15, + this.xrLabel13, this.xrLabel12, this.xrLabel11, this.xrLabel10, @@ -450,14 +454,14 @@ namespace BeWo.TrialogReports this.xrLabel9, this.xrLabel4, this.xrLabel3}); - this.ReportFooter.HeightF = 180.0001F; + this.ReportFooter.HeightF = 216.0001F; this.ReportFooter.Name = "ReportFooter"; // // xrLabel12 // this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; this.xrLabel12.Font = new System.Drawing.Font("Arial", 12F); - this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 90.00002F); + this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 90.00002F); this.xrLabel12.Name = "xrLabel12"; this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel12.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F); @@ -468,7 +472,7 @@ namespace BeWo.TrialogReports // this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; this.xrLabel11.Font = new System.Drawing.Font("Arial", 12F); - this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 162F); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 162F); this.xrLabel11.Name = "xrLabel11"; this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel11.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F); @@ -479,7 +483,7 @@ namespace BeWo.TrialogReports // this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; this.xrLabel10.Font = new System.Drawing.Font("Arial", 12F); - this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 126F); + this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 126F); this.xrLabel10.Name = "xrLabel10"; this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel10.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F); @@ -579,6 +583,27 @@ namespace BeWo.TrialogReports this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldFLSBillable.Name = "fieldFLSBillable"; // + // xrLabel13 + // + this.xrLabel13.Font = new System.Drawing.Font("Arial", 12F); + this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 198F); + this.xrLabel13.Name = "xrLabel13"; + this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel13.SizeF = new System.Drawing.SizeF(144.0002F, 18.00003F); + this.xrLabel13.StylePriority.UseFont = false; + this.xrLabel13.Text = "Geschäftsleitung"; + // + // xrLabel15 + // + this.xrLabel15.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrLabel15.Font = new System.Drawing.Font("Arial", 12F); + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 198F); + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel15.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F); + this.xrLabel15.StylePriority.UseBorders = false; + this.xrLabel15.StylePriority.UseFont = false; + // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -659,5 +684,7 @@ namespace BeWo.TrialogReports private DevExpress.XtraReports.UI.XRTableCell cellDokHeader; private DevExpress.XtraReports.UI.XRTableCell cellGoal; private DevExpress.XtraReports.UI.XRLabel lblBewilligt; + private DevExpress.XtraReports.UI.XRLabel xrLabel15; + private DevExpress.XtraReports.UI.XRLabel xrLabel13; } } diff --git a/ReportImp/WegweiserBetreuungsdienstReports/Invoicing/DefaultInvoiceCreation.cs b/ReportImp/WegweiserBetreuungsdienstReports/Invoicing/DefaultInvoiceCreation.cs index ecaac952f..32cbb0486 100644 --- a/ReportImp/WegweiserBetreuungsdienstReports/Invoicing/DefaultInvoiceCreation.cs +++ b/ReportImp/WegweiserBetreuungsdienstReports/Invoicing/DefaultInvoiceCreation.cs @@ -44,5 +44,178 @@ namespace BeWo.WegweiserBetreuungsdienstReports base.CheckMaxApprovedAmount(invoice, sip, scap, costBearer2SupportConcept, invoicePeriod, serviceRecords); } - } + public override IList CreateSummaryInvoiceItems(IList itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, + Calculations calc, bool summaryPerMonth) + { + var newlist = new List(); + + var rateToItem = new Dictionary(); + foreach (InvoiceItem iitem in itemList) + { + InvoiceItem item; + String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor); + if (summaryPerMonth) + { + key = String.Format("{0}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart); + } + + if (rateToItem.ContainsKey(key)) + { + item = rateToItem[key]; + } + else + { + item = new InvoiceItem(); + newlist.Add(item); + + item.AmountPerUnit = iitem.AmountPerUnit; + if (invoicePeriod != null) + { + item.ItemPeriodStart = invoicePeriod.StartDate; + item.ItemPeriodEnd = invoicePeriod.EndDate; + } + else + { + item.ItemPeriodStart = scap.StartDate; + item.ItemPeriodEnd = scap.EndDate; + } + if (summaryPerMonth && iitem.ItemPeriodStart.HasValue) + { + DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1); + DateTime end = start.AddMonths(1).AddDays(-1); + + if (item.ItemPeriodStart < start) + { + item.ItemPeriodStart = start; + } + if (item.ItemPeriodEnd > end) + { + item.ItemPeriodEnd = end; + } + } + item.RateFactor = iitem.RateFactor; + + item.AccountingInterval = iitem.AccountingInterval; + item.ItemDescription = iitem.ItemDescription; + item.UnitDescription = iitem.UnitDescription; + item.SupportConceptApprovalPeriodOid = scap.Oid; + + + rateToItem[key] = item; + } + + + if (!item.UnitCount.HasValue) + { + item.UnitCount = 0; + } + item.UnitCount += iitem.UnitCount ?? 0; + } + + foreach (InvoiceItem invoiceItem in newlist) + { + + if (invoiceItem.RateFactor.HasValue) + { + invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100); + } + invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero); + + invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount; + invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero); + + invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; + } + + return newlist; + } + + //public override IList CreateSummaryInvoiceItems(IList itemList, + // DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth) + //{ + // //Fasse InvoiceItems mit gleichem Stundensatz zusammen: + + // var newlist = new List(); + + // var rateToItem = new Dictionary(); + // foreach (InvoiceItem iitem in itemList) + // { + // InvoiceItem item; + // String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor); + // if (summaryPerMonth) + // { + // key = String.Format("{0}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart); + // } + + // if (rateToItem.ContainsKey(key)) + // { + // item = rateToItem[key]; + // } + // else + // { + // item = new InvoiceItem(); + // newlist.Add(item); + + // item.AmountPerUnit = iitem.AmountPerUnit; + // if (invoicePeriod != null) + // { + // item.ItemPeriodStart = invoicePeriod.StartDate; + // item.ItemPeriodEnd = invoicePeriod.EndDate; + // } + // else + // { + // item.ItemPeriodStart = scap.StartDate; + // item.ItemPeriodEnd = scap.EndDate; + // } + // if (summaryPerMonth && iitem.ItemPeriodStart.HasValue) + // { + // DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1); + // DateTime end = start.AddMonths(1).AddDays(-1); + + // if (item.ItemPeriodStart < start) + // { + // item.ItemPeriodStart = start; + // } + // if (item.ItemPeriodEnd > end) + // { + // item.ItemPeriodEnd = end; + // } + // } + // item.RateFactor = iitem.RateFactor; + + // item.AccountingInterval = iitem.AccountingInterval; + // item.ItemDescription = iitem.ItemDescription; + // item.UnitDescription = iitem.UnitDescription; + // item.SupportConceptApprovalPeriodOid = scap.Oid; + + + // rateToItem[key] = item; + // } + + + // if (!item.UnitCount.HasValue) + // { + // item.UnitCount = 0; + // } + // item.UnitCount += iitem.UnitCount ?? 0; + // } + + + // foreach (InvoiceItem invoiceItem in newlist) + // { + + // if (invoiceItem.RateFactor.HasValue) + // { + // invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100); + // } + // invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero); + + // invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount; + // invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero); + + // invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; + // } + // return newlist; + //} + } } diff --git a/ReportImp/WegweiserBetreuungsdienstReports/ServiceInvoiceReport.cs b/ReportImp/WegweiserBetreuungsdienstReports/ServiceInvoiceReport.cs index e01fafe95..2e6a81e8a 100644 --- a/ReportImp/WegweiserBetreuungsdienstReports/ServiceInvoiceReport.cs +++ b/ReportImp/WegweiserBetreuungsdienstReports/ServiceInvoiceReport.cs @@ -42,10 +42,18 @@ namespace BeWo.WegweiserBetreuungsdienstReports foreach (var ii in sip.ServiceInvoiceItems) { - ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} Std. {3}x {4:c}", ii.AccountingPeriodStart, ii.AccountingPeriodEnd, - ii.UnitCount, "", ii.AmountPerUnit); - - //amountTotal += ii.NetAmount ?? 0; + if (String.IsNullOrEmpty(ii.RateFactor) || ii.RateFactor == "1" || ii.RateFactor == "0,00 %") + { + ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} Std. {3}x {4:c}", ii.AccountingPeriodStart, ii.AccountingPeriodEnd, + ii.UnitCount, "", ii.AmountPerUnit); + } + else + { + ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}", + ii.AccountingPeriodStart, ii.AccountingPeriodEnd, + ii.UnitCount, "", ii.AmountPerUnit); + } + //amountTotal += ii.NetAmount ?? 0; } diff --git a/ReportImp/WegweiserBetreuungsdienstReports/ServicesOverviewReport.Designer.cs b/ReportImp/WegweiserBetreuungsdienstReports/ServicesOverviewReport.Designer.cs index 2c204e6f2..ef0a1c961 100644 --- a/ReportImp/WegweiserBetreuungsdienstReports/ServicesOverviewReport.Designer.cs +++ b/ReportImp/WegweiserBetreuungsdienstReports/ServicesOverviewReport.Designer.cs @@ -55,6 +55,8 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail2 = new DevExpress.XtraReports.UI.DetailBand(); + this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); @@ -70,11 +72,9 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldGruppe = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); - this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -351,6 +351,30 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.Detail2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // + // xrLabel12 + // + this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel12.Font = new System.Drawing.Font("Arial", 10F); + this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 71.72922F); + this.xrLabel12.Multiline = true; + this.xrLabel12.Name = "xrLabel12"; + this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel12.SizeF = new System.Drawing.SizeF(327.2084F, 56.29164F); + this.xrLabel12.StylePriority.UseBorders = false; + this.xrLabel12.StylePriority.UseFont = false; + this.xrLabel12.StylePriority.UseTextAlignment = false; + this.xrLabel12.Text = "Datum"; + this.xrLabel12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // xrLabel2 + // + this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 46.72921F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(292.9169F, 25F); + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // // xrLabel5 // this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.None; @@ -501,7 +525,7 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.xrLabel1.SizeF = new System.Drawing.SizeF(650F, 25F); this.xrLabel1.StylePriority.UseFont = false; this.xrLabel1.StylePriority.UseTextAlignment = false; - this.xrLabel1.Text = "Stunden-Dokumentation Betreutes Wohnen"; + this.xrLabel1.Text = "Stunden-Dokumentation"; this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrLabel9 @@ -524,6 +548,14 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.topMarginBand1.HeightF = 150F; this.topMarginBand1.Name = "topMarginBand1"; // + // xrPictureBox1 + // + this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image"))); + this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 61.66665F); + this.xrPictureBox1.Name = "xrPictureBox1"; + this.xrPictureBox1.SizeF = new System.Drawing.SizeF(250F, 50F); + this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // bottomMarginBand1 // this.bottomMarginBand1.HeightF = 30F; @@ -536,38 +568,6 @@ namespace BeWo.WegweiserBetreuungsdienstReports this.fieldGruppe.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldGruppe.Name = "fieldGruppe"; // - // xrPictureBox1 - // - this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image"))); - this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 61.66665F); - this.xrPictureBox1.Name = "xrPictureBox1"; - this.xrPictureBox1.SizeF = new System.Drawing.SizeF(250F, 50F); - this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; - // - // xrLabel2 - // - this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; - this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 46.72921F); - this.xrLabel2.Name = "xrLabel2"; - this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel2.SizeF = new System.Drawing.SizeF(292.9169F, 25F); - this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; - // - // xrLabel12 - // - this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None; - this.xrLabel12.Font = new System.Drawing.Font("Arial", 10F); - this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 71.72922F); - this.xrLabel12.Multiline = true; - this.xrLabel12.Name = "xrLabel12"; - this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel12.SizeF = new System.Drawing.SizeF(327.2084F, 56.29164F); - this.xrLabel12.StylePriority.UseBorders = false; - this.xrLabel12.StylePriority.UseFont = false; - this.xrLabel12.StylePriority.UseTextAlignment = false; - this.xrLabel12.Text = "Datum"; - this.xrLabel12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; - // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 25e94896b..4416f4df1 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -39,7 +39,7 @@ namespace BeWo.Service.Plugins //t = "1378137009"; // BeWo Direkt //t = "3010479871"; // Aachener Verein //t = "3849764093"; // Club 74 - //t = "5805202339"; // Wegweiser Betreuungsdienst + t = "5805202339"; // Wegweiser Betreuungsdienst //t = "2301474784"; // Hauskrankenpflege Leiendecker //t = "8243565510"; // Der Karren //t = "7709306800"; // Der Karren SBD @@ -171,7 +171,7 @@ namespace BeWo.Service.Plugins //t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. //t = "2632162696"; // Pro BeWo Düren //t = "6340891020"; // Caritas Ahlen - //t = "3659854106"; // alpha e.V. + t = "3659854106"; // alpha e.V. //t = "5809130435"; // Lebenshilfe Kusel //t = "3367947706"; // PaS Mönchengladbach //t = "2331203795"; // BeWo für dich @@ -193,7 +193,7 @@ namespace BeWo.Service.Plugins //t = "4693476852"; // HSH Netzwerk //t = "3884496709"; // Wahl e.V. //t = "9883255779"; // VKM Menden - t = "9556218062"; // Diakonie Landshut + //t = "9556218062"; // Diakonie Landshut //t = "2279593936"; // Diakonie Mülheim //t = "3623837005"; // Betreuwo Wesel //t = "8407321888"; // AWO Wesel