From 4e7d7426ec2719d5b24198c9bfdb5aa642725d5d Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 28 Mar 2023 00:02:15 +0200 Subject: [PATCH] =?UTF-8?q?Fibu=20=C3=9Cbergabeprotokoll=20ASB=20Rhein=20R?= =?UTF-8?q?uhr+Die=20Perspektiven=20+=20Bugfix=20fehlendes=20Icon=20im=20K?= =?UTF-8?q?alender=20nach=20=C3=9Cbertrag=20in=20Zeiterfassung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LoginController.cs | 51 +- Host/Host.csproj.user | 2 +- ReportImp/AkggMid/LeistungsnachweisHelper.cs | 5 +- ReportImp/AsbRuhr/AsbRuhr.csproj | 11 + ReportImp/AsbRuhr/CustomReportCreator.cs | 9 + ReportImp/AsbRuhr/Export/FibuNetDatensatz.cs | 65 +++ ReportImp/AsbRuhr/Export/FibuNetExporter.cs | 371 ++++++++++---- ReportImp/AsbRuhr/Fibuuebergabe.Designer.cs | 466 ++++++++++++++++++ ReportImp/AsbRuhr/Fibuuebergabe.cs | 69 +++ ReportImp/AsbRuhr/Fibuuebergabe.resx | 123 +++++ .../DiePerspektive/CustomReportCreator.cs | 11 +- .../DiePerspektive/DiePerspektive.csproj | 12 + .../DiePerspektive/Export/FibuNetDatensatz.cs | 65 +++ .../DiePerspektive/Export/FibuNetExporter.cs | 113 +---- .../DiePerspektive/Fibuuebergabe.Designer.cs | 466 ++++++++++++++++++ ReportImp/DiePerspektive/Fibuuebergabe.cs | 69 +++ ReportImp/DiePerspektive/Fibuuebergabe.resx | 123 +++++ .../DiePerspektive/Service/QueryService.cs | 42 ++ .../Abrechnung/CustomInvoiceCreation.cs | 28 +- Service/Plugins/PluginLoader.cs | 4 +- 20 files changed, 1918 insertions(+), 187 deletions(-) create mode 100644 ReportImp/AsbRuhr/Export/FibuNetDatensatz.cs create mode 100644 ReportImp/AsbRuhr/Fibuuebergabe.Designer.cs create mode 100644 ReportImp/AsbRuhr/Fibuuebergabe.cs create mode 100644 ReportImp/AsbRuhr/Fibuuebergabe.resx create mode 100644 ReportImp/DiePerspektive/Export/FibuNetDatensatz.cs create mode 100644 ReportImp/DiePerspektive/Fibuuebergabe.Designer.cs create mode 100644 ReportImp/DiePerspektive/Fibuuebergabe.cs create mode 100644 ReportImp/DiePerspektive/Fibuuebergabe.resx create mode 100644 ReportImp/DiePerspektive/Service/QueryService.cs diff --git a/BeWoPlanerMobil/Controllers/LoginController.cs b/BeWoPlanerMobil/Controllers/LoginController.cs index 13f5c3c0f..eeae80b18 100644 --- a/BeWoPlanerMobil/Controllers/LoginController.cs +++ b/BeWoPlanerMobil/Controllers/LoginController.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Specialized; using System.Linq; +using System.Net; using System.Web; using System.Web.Mvc; using System.Web.Security; @@ -15,6 +17,8 @@ namespace BeWoPlanerMobil.Controllers { public class LoginController : AbstractBaseController { + private String GETSERVER_URL = "https://support.bewoplaner.de/api/getserver.php?k={0}&t=0"; + public static string LoginErrorIndex => "LoginErrorIndex"; [HttpPost] @@ -147,8 +151,53 @@ namespace BeWoPlanerMobil.Controllers return RedirectToActionPermanent("Main", "Main"); } + if (!String.IsNullOrWhiteSpace(tenant)) + { + var server = GetServerFromTenant(tenant); + if (!String.IsNullOrEmpty(server) && server.Contains("bewoplaner.de")) + { + Log.Info($"Request Url.Host = " + Request.Url.Host); + if (Request.Url.Host != server) + { + var newurl = String.Format("https://{0}/mobil/login/{1}", server, tenant); + Log.Info($"Wrong Server... Redirect to : " + newurl); + + return Redirect(newurl); + } + } + } MobileSessionFacade.Tenant = tenant; return View("Index"); } - } + + private string GetServerFromTenant(string tenant) + { + try + { + if (tenant == "demo") + { + return "app1.bewoplaner.de"; + } + + String url = String.Format(GETSERVER_URL, tenant); + using (WebClient client = new WebClient()) + { + //MessageBox.Show(hostAddress); + byte[] response = client.UploadValues(url, "POST", new NameValueCollection()); + + String server = System.Text.Encoding.ASCII.GetString(response); + + return server; + } + } + catch (Exception ex) + { + //MessageBox.Show(String.Format("Fehler beim Prüfen der Kundennummer: {0}\n\n{1}", ex.Message, ex.StackTrace)); + return null; + } + + return null; + } + } + } diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user index a441248c4..47b4326c0 100644 --- a/Host/Host.csproj.user +++ b/Host/Host.csproj.user @@ -3,7 +3,7 @@ BeWo2.0 true - Release|Any CPU + Debug|Any CPU false diff --git a/ReportImp/AkggMid/LeistungsnachweisHelper.cs b/ReportImp/AkggMid/LeistungsnachweisHelper.cs index b612ca9cd..a2328827a 100644 --- a/ReportImp/AkggMid/LeistungsnachweisHelper.cs +++ b/ReportImp/AkggMid/LeistungsnachweisHelper.cs @@ -392,7 +392,7 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa startSchuljahr = new DateTime(2023, 1, 1); endeSchuljahr = new DateTime(2023, 7, 21); - maxAnzahl = 6; + maxAnzahl = 5; } int gesamtAnzahl = 0; @@ -480,9 +480,10 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa public double BerechneMinutenProTag(double flsPerWeek) { var minutenProTag = flsPerWeek * 60 / 5; + return minutenProTag; //die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden - return Rundeauf15Minuten(minutenProTag); + //return Rundeauf15Minuten(minutenProTag); } diff --git a/ReportImp/AsbRuhr/AsbRuhr.csproj b/ReportImp/AsbRuhr/AsbRuhr.csproj index 0e985648e..4ef55d7d3 100644 --- a/ReportImp/AsbRuhr/AsbRuhr.csproj +++ b/ReportImp/AsbRuhr/AsbRuhr.csproj @@ -62,7 +62,14 @@ + + + Component + + + Fibuuebergabe.cs + Component @@ -138,6 +145,10 @@ BudgetnachweisAnhang.cs + + Fibuuebergabe.cs + Designer + Finanzauswertung.cs Designer diff --git a/ReportImp/AsbRuhr/CustomReportCreator.cs b/ReportImp/AsbRuhr/CustomReportCreator.cs index 5aea028f8..522aa8fd4 100644 --- a/ReportImp/AsbRuhr/CustomReportCreator.cs +++ b/ReportImp/AsbRuhr/CustomReportCreator.cs @@ -15,6 +15,15 @@ namespace AsbRuhr { public class CustomReportCreator : DefaultReportCreator { + public override XtraReport CreateQueryReport(long queryOid, string queryReportId) + { + if (queryOid == 400) + { + return base.CreateQueryReport(queryOid, queryReportId); + } + return base.CreateQueryReport(queryOid, queryReportId); + } + public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid) { long oid = 0; diff --git a/ReportImp/AsbRuhr/Export/FibuNetDatensatz.cs b/ReportImp/AsbRuhr/Export/FibuNetDatensatz.cs new file mode 100644 index 000000000..376f3237d --- /dev/null +++ b/ReportImp/AsbRuhr/Export/FibuNetDatensatz.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AsbRuhr.Export +{ + public class FibuNetDatensatz + { + public String Debitor { get; set; } + public String Kostenstelle { get; set; } + public String Belegnr { get; set; } + public String Belegdatum { get; set; } + public String Erloeskonto { get; set; } + public String Buchungstext { get; set; } + public decimal Betrag { get; set; } + + + + public static FibuNetDatensatz ErzeugeDatensatz(String csv) + { + var fields = csv.Split(';'); + + + //sb.Append("( ):1100;"); + //sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag + //sb.Append(ds.Debitor); // SollKonto (Debitor) + //sb.Append(";;;"); + //sb.Append(ds.Belegnr); // Belegnummer + //sb.Append(";;"); + //sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum + //sb.Append(";"); + //sb.Append(ds.Erloeskonto); // HabenKonto + //sb.Append(";0;0;"); // + //sb.Append(ds.Buchungstext); // Buchungstext + //sb.Append(";0;;;;5;;;;;;"); + //sb.Append(ds.Kostenstelle); // Kostenstelle + //sb.Append(";"); + var dd = new FibuNetDatensatz(); + + if (fields.Length > 24) + { + decimal d = 0; + if (Decimal.TryParse(fields[1], out d)) + { + dd.Betrag = d; + } + else + { + int test = 0; + } + dd.Debitor = fields[4]; + dd.Belegnr = fields[7]; + dd.Belegdatum = fields[9]; + dd.Erloeskonto = fields[10]; + dd.Buchungstext = fields[13]; + dd.Kostenstelle = fields[24]; + + } + + return dd; + } + } +} diff --git a/ReportImp/AsbRuhr/Export/FibuNetExporter.cs b/ReportImp/AsbRuhr/Export/FibuNetExporter.cs index b8eee7535..c95c98466 100644 --- a/ReportImp/AsbRuhr/Export/FibuNetExporter.cs +++ b/ReportImp/AsbRuhr/Export/FibuNetExporter.cs @@ -2,17 +2,21 @@ using System.Collections.Generic; using System.Data; using System.IO; +using System.Linq; using System.Text; using System.Text.RegularExpressions; using BeWo.Data.Access; +using BeWo.Data.Entities; using BeWo.Report.ReportObjects; +using BeWo.Service.DCEntityMapper; +using BS.Shared.Core; using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; namespace AsbRuhr.Export { public class FibuNetExporter { - public static QueryDC CreateQuery(QueryDC query) { DateTime dt = DateTime.Now; @@ -28,6 +32,11 @@ namespace AsbRuhr.Export query.FileName = String.Format("BWP Rg Buchungsdaten {0:yyyyMM}.txt", dt); query.QueryResult = GetAbrechnungenString(dt); } + else if (query.Title == "FibuNet Buchungsdaten Korrektur") + { + query.FileName = String.Format("BWP Buchungsdaten Korrektur {0:yyyyMM}.txt", dt); + query.QueryResult = GetBuchungsdatenKorrekturString(dt); + } else { query.FileName = String.Format("BWP Buchungsdaten {0:yyyyMM}.txt", dt); @@ -37,6 +46,37 @@ namespace AsbRuhr.Export return query; } + public static String GetBuchungsdatenKorrekturString(DateTime date) + { + var gesamtExport = GetAbgrenzungString(date); + var letzterExport = GetLetzenExport(date, "FibuNet Export Buchungsdaten"); + + if (String.IsNullOrEmpty(letzterExport)) + { + return gesamtExport; + } + + return GetDifferenzAbrechnungenString(date, gesamtExport, letzterExport); + } + + private static String GetLetzenExport(DateTime date, String exportName) + { + var exports = DAOFactory.GenericDAO.GetAllActive(); + + foreach (var exp in exports) + { + if (exp.Name == exportName) + { + if (exp.Parameter.Contains(String.Format("Monat={0:dd.MM.yyyy}", date))) + { + return exp.Export; + } + } + } + + return ""; + } + public static string CreateExportString(string[] pHeaderCaption, string[][] pContent) { if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("FibuNet")) @@ -144,9 +184,10 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) int rowIndex = 1; foreach (DataRow row in dt.Rows) { - Erstelle1100Satz(sb, row, date, rowIndex); + var ds = ErstelleFibuNetDatensatz(row); + Erstelle1100Satz(sb, ds); sb.AppendLine(); - Erstelle1110Satz(sb, row, date, rowIndex); + Erstelle1110Satz(sb, ds); sb.AppendLine(); rowIndex++; @@ -155,9 +196,10 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) dt = ExecuteQuery(GetSpitzabrechnungSql(date), date); foreach (DataRow row in dt.Rows) { - Erstelle1100Satz(sb, row, date, rowIndex); + var ds = ErstelleFibuNetDatensatz(row); + Erstelle1100Satz(sb, ds); sb.AppendLine(); - Erstelle1110Satz(sb, row, date, rowIndex); + Erstelle1110Satz(sb, ds); sb.AppendLine(); rowIndex++; @@ -183,10 +225,11 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) { if (!String.IsNullOrEmpty(row[3].ToString())) { - Erstelle1100Satz(sb, row, date, rowIndex); - sb.AppendLine(); - Erstelle1110Satz(sb, row, date, rowIndex); - sb.AppendLine(); + var ds = ErstelleFibuNetDatensatz(row); + Erstelle1100Satz(sb, ds); + sb.AppendLine(); + Erstelle1110Satz(sb, ds); + sb.AppendLine(); } rowIndex++; @@ -197,52 +240,125 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) return sb.ToString(); } - private static void Erstelle1100Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex) + private static FibuNetDatensatz ErstelleFibuNetDatensatz(DataRow row) + { + var ds = new FibuNetDatensatz(); + + + + var betragObj = row[3]; + decimal betrag = 0; + if (betragObj != null) + Decimal.TryParse(betragObj.ToString().Replace(",", ""), out betrag); + + ds.Betrag = betrag; + ds.Debitor = row[1].ToString(); + var blg1 = row[5].ToString(); + if (String.IsNullOrEmpty(blg1)) + blg1 = "123456"; + ds.Belegnr = blg1; + ds.Belegdatum = row[0].ToString(); + ds.Erloeskonto = GetErloeskonto(row[7].ToString()); + ds.Buchungstext = row[4].ToString(); + ds.Kostenstelle = "4102"; + + return ds; + } + + //private static void Erstelle1100Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex) + //{ + ////( ):1100; 14280; ; ; 10907; ; ; 1960133; ; 07022019; 8408; 1; M; F / G 1960133; 0; ; ; ; 1; ; ; ; ; ; 160; + // sb.Append("( ):1100;"); + + // var betragObj = row[3]; + // decimal betrag = 0; + // if (betragObj != null) + // Decimal.TryParse(betragObj.ToString().Replace(",", ""), out betrag); + // sb.Append(String.Format("{0:0};;;", betrag)); // Betrag + + // sb.Append(row[1].ToString()); // SollKonto (Debitor) + // sb.Append(";;;"); + + // sb.Append(blg1); // Belegnummer + // sb.Append(";;"); + // sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum + // sb.Append(";"); + // var habenkto = GetErloeskonto(row[7].ToString()); + // sb.Append(habenkto); // HabenKonto + // sb.Append(";0;0;"); // + // sb.Append(row[4].ToString()); // Buchungstext + // sb.Append(";0;;;;5;;;;;;"); + // sb.Append("4102"); // Kostenstelle + // sb.Append(";"); + //} + + private static void Erstelle1100Satz(StringBuilder sb, FibuNetDatensatz ds) { //( ):1100; 14280; ; ; 10907; ; ; 1960133; ; 07022019; 8408; 1; M; F / G 1960133; 0; ; ; ; 1; ; ; ; ; ; 160; sb.Append("( ):1100;"); - sb.Append(String.Format("{0:0.00};;;", (decimal)row[3]).Replace(",", "")); // Betrag - - sb.Append(row[1].ToString()); // SollKonto (Debitor) + sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag + sb.Append(ds.Debitor); // SollKonto (Debitor) sb.Append(";;;"); - var blg1 = row[5].ToString(); - if (String.IsNullOrEmpty(blg1)) - blg1 = "123456"; - sb.Append(blg1); // Belegnummer + sb.Append(ds.Belegnr); // Belegnummer sb.Append(";;"); - sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum + sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum sb.Append(";"); - var habenkto = GetErloeskonto(row[7].ToString()); - sb.Append(habenkto); // HabenKonto + sb.Append(ds.Erloeskonto); // HabenKonto sb.Append(";0;0;"); // - sb.Append(row[4].ToString()); // Buchungstext + sb.Append(ds.Buchungstext); // Buchungstext sb.Append(";0;;;;5;;;;;;"); - sb.Append("4102"); // Kostenstelle + sb.Append(ds.Kostenstelle); // Kostenstelle sb.Append(";"); } - private static void Erstelle1110Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex) + private static void Erstelle1110Satz(StringBuilder sb, FibuNetDatensatz ds) { //( ):1110;14280;;;1;10907;8408;1;M;1960133;;07022019;;F/G 1960133;;;0 + sb.Append("( ):1110;"); - sb.Append(String.Format("{0:0.00};;;", (decimal)row[3]).Replace(",", "")); // Betrag + sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag sb.Append("1;"); // Satzart - sb.Append(row[1].ToString()); + sb.Append(ds.Erloeskonto); sb.Append(";"); - var habenkto = GetErloeskonto(row[7].ToString()); - sb.Append(habenkto); // HabenKonto + sb.Append(ds.Erloeskonto); // HabenKonto sb.Append(";1;M;"); // - var blg1 = row[5].ToString(); - if (String.IsNullOrEmpty(blg1)) - blg1 = "123456"; - sb.Append(blg1); // Belegnummer + sb.Append(ds.Belegnr); // Belegnummer sb.Append(";;"); - sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum + sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum sb.Append(";;"); - sb.Append(row[4].ToString()); // Buchungstext + sb.Append(ds.Buchungstext); // Buchungstext sb.Append(";;;0"); } + //private static void Erstelle1110Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex) + //{ + // //( ):1110;14280;;;1;10907;8408;1;M;1960133;;07022019;;F/G 1960133;;;0 + + // sb.Append("( ):1110;"); + + // var betragObj = row[3]; + // decimal betrag = 0; + // if (betragObj != null) + // Decimal.TryParse(betragObj.ToString().Replace(",", ""), out betrag); + // sb.Append(String.Format("{0:0};;;", betrag)); // Betrag + + // sb.Append("1;"); // Satzart + // sb.Append(row[1].ToString()); + // sb.Append(";"); + // var habenkto = GetErloeskonto(row[7].ToString()); + // sb.Append(habenkto); // HabenKonto + // sb.Append(";1;M;"); // + // var blg1 = row[5].ToString(); + // if (String.IsNullOrEmpty(blg1)) + // blg1 = "123456"; + // sb.Append(blg1); // Belegnummer + // sb.Append(";;"); + // sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum + // sb.Append(";;"); + // sb.Append(row[4].ToString()); // Buchungstext + // sb.Append(";;;0"); + //} + private static void Erstelle2010Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex) { //( ):2010;0;"Kontonummer";"Kontobezeichnung";;1;0;0; @@ -269,6 +385,88 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) } + private static string GetDifferenzAbrechnungenString(DateTime date, String neuerExport, String letzterExport) + { + List neueZeilen = GetExportZeilen(neuerExport); + List letzterExportZeilen = GetExportZeilen(letzterExport); + + //prüfe Unterschiede + List unterschiedlicheDatensaetze = new List(); + foreach (var lineNeu in neueZeilen) + { + + + bool istImAltenExportSchonEnthalten = letzterExportZeilen.Contains(lineNeu); + if (!istImAltenExportSchonEnthalten) + { + //Prüfe ob neue Rechnung oder alte Rechnung mit neuem Betrag + var satzNeu = FibuNetDatensatz.ErzeugeDatensatz(lineNeu); + + //Suche übereinstimmende Zeile aus dem alten Export um die Differenz zu berechnen + + decimal differenz = 0; + foreach (var lineAlt in letzterExportZeilen) + { + var satzAlt = FibuNetDatensatz.ErzeugeDatensatz(lineAlt); + + //Wenn beide Zeilen gleich sind (bis auf Betrag und Stunden) dann handelt es sich um die gleiche Rechnung, von der sich der alte Betrag wegen zwischenzeitlicher Änderungen in der Zeiterfassung geändert hat. + //Berechne Differenz, weil die mit ausgegeben werden soll + if (satzAlt.Debitor == satzNeu.Debitor && + satzAlt.Kostenstelle == satzNeu.Kostenstelle && + satzAlt.Belegnr == satzNeu.Belegnr && + satzAlt.Erloeskonto == satzNeu.Erloeskonto && + satzAlt.Buchungstext == satzNeu.Buchungstext && + satzAlt.Belegdatum == satzNeu.Belegdatum) + { + satzNeu.Betrag -= satzAlt.Betrag; + } + + } + + + + unterschiedlicheDatensaetze.Add(satzNeu); + } + + } + + StringBuilder sb = new StringBuilder(); + sb.AppendLine(String.Format("( ):1000;;{0:ddMMyyyy}", date)); + + foreach (var ds in unterschiedlicheDatensaetze) + { + Erstelle1100Satz(sb, ds); + sb.AppendLine(); + Erstelle1110Satz(sb, ds); + sb.AppendLine(); + + } + + sb.AppendLine(String.Format("( ):5;")); + + return sb.ToString(); + } + + public static List GetExportZeilen(String export) + { + List zeilen = new List(); + + using (StringReader reader = new StringReader(export)) + { + string line; + + while ((line = reader.ReadLine()) != null) + { + if (line.StartsWith("( ):1100;")) + { + zeilen.Add(line); + } + } + } + + return zeilen; + } + private static String GetErloeskonto(String itemDesc) { if (itemDesc.Contains("Soziotherapie")) @@ -279,6 +477,7 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) return "84180"; } + private static String GetDebitorenSql(DateTime date) { @@ -306,27 +505,27 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) private static String GetMonatlicheRechnungenSql(DateTime date) { String sql = @" - select - ib.InvoiceDate, - c.DebitorNumber, - c.CostCenter, - sip.Claim, - CONCAT(date_format(ib.AccountingPeriodStart, '%d.%m.%Y'), ' - ', date_format(ib.AccountingPeriodEnd, '%d.%m.%Y'), ' ', p.`FirstName`, ' ', p.`LastName`), - ib.invoicenumber, - (select t.name from team t inner join team2customer t2c on t2c.teamoid = t.oid where t2c.customeroid = c.Oid limit 1), -ii.ItemDescription - from - person p - inner join customer c on c.personoid = p.oid - inner join supportconcept sc on sc.customeroid = c.oid - inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid - inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid - inner join serviceinvoice si on si.invoicebaseoid = ib.oid - inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid - inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid -WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 -order by ib.invoicenumber -"; + select + ib.InvoiceDate, + c.DebitorNumber, + c.CostCenter, + sip.Claim, + CONCAT(date_format(ib.AccountingPeriodStart, '%d.%m.%Y'), ' - ', date_format(ib.AccountingPeriodEnd, '%d.%m.%Y'), ' ', p.`FirstName`, ' ', p.`LastName`), + ib.invoicenumber, + (select t.name from team t inner join team2customer t2c on t2c.teamoid = t.oid where t2c.customeroid = c.Oid limit 1), + ii.ItemDescription + from + person p + inner join customer c on c.personoid = p.oid + inner join supportconcept sc on sc.customeroid = c.oid + inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid + inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid + inner join serviceinvoice si on si.invoicebaseoid = ib.oid + inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid + inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid + WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 + order by ib.invoicenumber + "; return sql; } @@ -364,36 +563,36 @@ order by ib.invoicenumber private static String GetMonatlicheBetraegeSql(DateTime date) { String sql = @" - SELECT - ':End_Datum' AS InvoiceDate, - c.DebitorNumber, - c.CostCenter, - IF(crpRateFactor.`CostRateValue` is null, ROUND((sr.`GeleisteteFLM` / 60) * (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 )), - 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 ) * ((100 + crpRateFactor.`CostRateValue`)/100), 2)) AS 'Betrag', - CONCAT(:PeriodeSlash, ' FLStd/BeWo ', p.`LastName`) as 'Verwendung', - ':Periode' AS invoicenumber, - cb2sc.Oid, - Cat - 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`, sc.`Name` AS Cat, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM 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 GROUP BY sr2.`CostBearer2SupportConceptOid`) - AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid` - WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 - and (sr.`GeleisteteFLM` is not null) and org.Name = 'LVR' OR org.Name = 'LWL' - ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate` - "; + SELECT + ':End_Datum' AS InvoiceDate, + c.DebitorNumber, + c.CostCenter, + 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` > '2023-02-01') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 )), + ROUND(ROUND((sr.`GeleisteteFLM` * ((100 + crpRateFactor.`CostRateValue`)/100) / 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` > '2023-02-01') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ), 2)) AS 'Betrag', + CONCAT(':PeriodeSlash', ' FLStd/BeWo ', p.`LastName`) as 'Verwendung', + ':Periode' AS invoicenumber, + cb2sc.Oid, + Cat + 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`, sc.`Name` AS Cat, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM 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 GROUP BY sr2.`CostBearer2SupportConceptOid`, sc.`Name`) + AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid` + WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 + and (sr.`GeleisteteFLM` is not null) and (org.Name = 'LVR' OR org.Name = 'LWL') + ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate` + "; return sql; } @@ -401,7 +600,7 @@ order by ib.invoicenumber public static DataTable ExecuteQuery(String sql, DateTime dt) { var newsql = sql; - newsql = newsql.Replace(":PeriodeSlash", String.Format("{0:MM/yy}", dt)); + newsql = newsql.Replace(":PeriodeSlash", String.Format("{0:MM}/{0:yy}", dt)); newsql = newsql.Replace(":Periode", String.Format("{0:yyyyMM}", dt)); newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:ddMMyyyy}", dt)); newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt)); @@ -429,4 +628,6 @@ order by ib.invoicenumber //schwarz = konstant //rot = variabel } + + } \ No newline at end of file diff --git a/ReportImp/AsbRuhr/Fibuuebergabe.Designer.cs b/ReportImp/AsbRuhr/Fibuuebergabe.Designer.cs new file mode 100644 index 000000000..da4edd0cc --- /dev/null +++ b/ReportImp/AsbRuhr/Fibuuebergabe.Designer.cs @@ -0,0 +1,466 @@ +using BeWo.Report.ReportObjects; +namespace AsbRuhr +{ + partial class Fibuuebergabe + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); + this.xrTableDetail = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRowDetail = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); + this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrTableHeader = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); + this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); + this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DataField = new DevExpress.XtraReports.UI.XRControlStyle(); + this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // Detail1 + // + this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTableDetail}); + this.Detail1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Detail1.HeightF = 25F; + this.Detail1.Name = "Detail1"; + this.Detail1.StylePriority.UseFont = false; + this.Detail1.StylePriority.UseTextAlignment = false; + this.Detail1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // xrTableDetail + // + this.xrTableDetail.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrTableDetail.Name = "xrTableDetail"; + this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); + this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRowDetail}); + this.xrTableDetail.SizeF = new System.Drawing.SizeF(720F, 25F); + this.xrTableDetail.StylePriority.UseBorders = false; + this.xrTableDetail.StylePriority.UsePadding = false; + // + // xrTableRowDetail + // + this.xrTableRowDetail.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell13, + this.xrTableCell3, + this.xrTableCell7, + this.xrTableCell6, + this.xrTableCell8, + this.xrTableCell14, + this.xrTableCell15, + this.xrTableCell16}); + this.xrTableRowDetail.Name = "xrTableRowDetail"; + this.xrTableRowDetail.Weight = 1D; + // + // xrTableCell3 + // + this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field2")}); + this.xrTableCell3.Name = "xrTableCell3"; + this.xrTableCell3.StylePriority.UseFont = false; + this.xrTableCell3.Text = "xrTableCell3"; + this.xrTableCell3.Weight = 0.118168379302178D; + // + // xrTableCell7 + // + this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field3")}); + this.xrTableCell7.Name = "xrTableCell7"; + this.xrTableCell7.Text = "xrTableCell7"; + this.xrTableCell7.Weight = 0.11816837930217805D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field4")}); + this.xrTableCell6.Multiline = true; + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.Text = "xrTableCell6"; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell6.Weight = 0.1033973318894057D; + // + // xrTableCell8 + // + this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field5")}); + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.Text = "xrTableCell8"; + this.xrTableCell8.Weight = 0.1033973318894057D; + // + // DetailReport + // + this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail1, + this.GroupHeader1, + this.GroupFooter1}); + this.DetailReport.DataMember = "Rows"; + this.DetailReport.DataSource = this.bindingSource1; + this.DetailReport.Level = 0; + this.DetailReport.Name = "DetailReport"; + this.DetailReport.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; + // + // GroupHeader1 + // + this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel1, + this.xrTableHeader, + this.xrLabel2}); + this.GroupHeader1.GroupFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] { + new DevExpress.XtraReports.UI.GroupField("Field1", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)}); + this.GroupHeader1.HeightF = 115F; + this.GroupHeader1.Name = "GroupHeader1"; + this.GroupHeader1.RepeatEveryPage = true; + // + // xrTableHeader + // + this.xrTableHeader.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableHeader.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold); + this.xrTableHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 90.00002F); + this.xrTableHeader.Name = "xrTableHeader"; + this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); + this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRowHeader}); + this.xrTableHeader.SizeF = new System.Drawing.SizeF(720F, 25F); + this.xrTableHeader.StylePriority.UseBorders = false; + this.xrTableHeader.StylePriority.UseFont = false; + this.xrTableHeader.StylePriority.UsePadding = false; + // + // xrTableRowHeader + // + this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell5, + this.xrTableCell2, + this.xrTableCell1, + this.xrTableCell4, + this.xrTableCell11, + this.xrTableCell10, + this.xrTableCell9, + this.xrTableCell12}); + this.xrTableRowHeader.Name = "xrTableRowHeader"; + this.xrTableRowHeader.StylePriority.UseFont = false; + this.xrTableRowHeader.Weight = 1D; + // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Rechn.Nr."; + this.xrTableCell5.Weight = 0.11816838995568689D; + // + // xrTableCell2 + // + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.Text = "Re-/Bu-Dat."; + this.xrTableCell2.Weight = 0.11816838995568679D; + // + // xrTableCell1 + // + this.xrTableCell1.Name = "xrTableCell1"; + this.xrTableCell1.Text = "Debitor"; + this.xrTableCell1.Weight = 0.11816838995568685D; + // + // xrTableCell4 + // + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell4.StylePriority.UsePadding = false; + this.xrTableCell4.StylePriority.UseTextAlignment = false; + this.xrTableCell4.Text = "D-Betrag"; + this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell4.Weight = 0.10339734121122593D; + // + // xrLabel2 + // + this.xrLabel2.Font = new System.Drawing.Font("Arial", 12F); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel2.Multiline = true; + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.SizeF = new System.Drawing.SizeF(677F, 25F); + this.xrLabel2.StyleName = "Title"; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.Text = "Fibuübergabe-Protokoll Buchungen"; + // + // GroupFooter1 + // + this.GroupFooter1.HeightF = 0F; + this.GroupFooter1.Name = "GroupFooter1"; + this.GroupFooter1.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO); + // + // ReportHeader + // + this.ReportHeader.HeightF = 0F; + this.ReportHeader.Name = "ReportHeader"; + // + // Title + // + this.Title.BackColor = System.Drawing.Color.White; + this.Title.BorderColor = System.Drawing.SystemColors.ControlText; + this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.Title.BorderWidth = 1F; + this.Title.Font = new System.Drawing.Font("Times New Roman", 24F); + this.Title.ForeColor = System.Drawing.Color.Black; + this.Title.Name = "Title"; + // + // FieldCaption + // + this.FieldCaption.BackColor = System.Drawing.Color.White; + this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; + this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.FieldCaption.BorderWidth = 1F; + this.FieldCaption.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold); + this.FieldCaption.ForeColor = System.Drawing.Color.Black; + this.FieldCaption.Name = "FieldCaption"; + // + // PageInfo + // + this.PageInfo.BackColor = System.Drawing.Color.White; + this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; + this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.PageInfo.BorderWidth = 1F; + this.PageInfo.Font = new System.Drawing.Font("Times New Roman", 8F); + this.PageInfo.ForeColor = System.Drawing.Color.Black; + this.PageInfo.Name = "PageInfo"; + // + // DataField + // + this.DataField.BackColor = System.Drawing.Color.White; + this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; + this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.DataField.BorderWidth = 1F; + this.DataField.Font = new System.Drawing.Font("Times New Roman", 8F); + this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; + this.DataField.Name = "DataField"; + // + // fieldFLS + // + this.fieldFLS.DataMember = "FLSReportGroups"; + this.fieldFLS.Expression = "[TotalFLM] / 60"; + this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldFLS.Name = "fieldFLS"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 50F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 50F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // xrTableCell9 + // + this.xrTableCell9.Name = "xrTableCell9"; + this.xrTableCell9.Text = "KSt."; + this.xrTableCell9.Weight = 0.10339734121122601D; + // + // xrTableCell10 + // + this.xrTableCell10.Name = "xrTableCell10"; + this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell10.StylePriority.UsePadding = false; + this.xrTableCell10.StylePriority.UseTextAlignment = false; + this.xrTableCell10.Text = "E-Betrag"; + this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell10.Weight = 0.10339734121122601D; + // + // xrTableCell11 + // + this.xrTableCell11.Name = "xrTableCell11"; + this.xrTableCell11.Text = "Ertrag"; + this.xrTableCell11.Weight = 0.10339734121122601D; + // + // xrTableCell12 + // + this.xrTableCell12.Name = "xrTableCell12"; + this.xrTableCell12.Text = "Buchungstext"; + this.xrTableCell12.Weight = 0.29542097488921715D; + // + // xrTableCell13 + // + this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field1")}); + this.xrTableCell13.Name = "xrTableCell13"; + this.xrTableCell13.Text = "xrTableCell13"; + this.xrTableCell13.Weight = 0.118168379302178D; + // + // xrTableCell14 + // + this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field6")}); + this.xrTableCell14.Name = "xrTableCell14"; + this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell14.StylePriority.UsePadding = false; + this.xrTableCell14.StylePriority.UseTextAlignment = false; + this.xrTableCell14.Text = "xrTableCell14"; + this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell14.Weight = 0.1033973318894057D; + // + // xrTableCell15 + // + this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field7")}); + this.xrTableCell15.Name = "xrTableCell15"; + this.xrTableCell15.Text = "xrTableCell15"; + this.xrTableCell15.Weight = 0.1033973318894057D; + // + // xrTableCell16 + // + this.xrTableCell16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field8")}); + this.xrTableCell16.Name = "xrTableCell16"; + this.xrTableCell16.Text = "xrTableCell16"; + this.xrTableCell16.Weight = 0.2954209482554449D; + // + // xrLabel1 + // + this.xrLabel1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 65.00002F); + this.xrLabel1.Multiline = true; + this.xrLabel1.Name = "xrLabel1"; + this.xrLabel1.SizeF = new System.Drawing.SizeF(677F, 25F); + this.xrLabel1.StyleName = "Title"; + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "Debitoren und Erträge"; + // + // Fibuuebergabe + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.DetailReport, + this.ReportHeader, + this.topMarginBand1, + this.bottomMarginBand1}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.fieldFLS}); + this.DataSource = this.bindingSource1; + this.DisplayName = "Fibuübergabe-Protokoll"; + this.Margins = new System.Drawing.Printing.Margins(60, 30, 50, 50); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = System.Drawing.Printing.PaperKind.A4; + this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { + this.Title, + this.FieldCaption, + this.PageInfo, + this.DataField}); + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.DetailBand Detail1; + private DevExpress.XtraReports.UI.DetailReportBand DetailReport; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.XRControlStyle Title; + private DevExpress.XtraReports.UI.XRControlStyle FieldCaption; + private DevExpress.XtraReports.UI.XRControlStyle PageInfo; + private DevExpress.XtraReports.UI.XRControlStyle DataField; + private DevExpress.XtraReports.UI.XRTable xrTableHeader; + private DevExpress.XtraReports.UI.XRTableRow xrTableRowHeader; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTable xrTableDetail; + private DevExpress.XtraReports.UI.XRTableRow xrTableRowDetail; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; + private DevExpress.XtraReports.UI.CalculatedField fieldFLS; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell15; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell16; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell10; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell12; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + } +} diff --git a/ReportImp/AsbRuhr/Fibuuebergabe.cs b/ReportImp/AsbRuhr/Fibuuebergabe.cs new file mode 100644 index 000000000..0ed23d841 --- /dev/null +++ b/ReportImp/AsbRuhr/Fibuuebergabe.cs @@ -0,0 +1,69 @@ +using System; +using BeWo.Report.ReportObjects; +using BeWo.Report; +using DevExpress.XtraReports.UI; +using System.Data; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using AsbRuhr.Export; +using System.Collections.Generic; + +namespace AsbRuhr +{ + public partial class Fibuuebergabe : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + public Fibuuebergabe() + { + InitializeComponent(); + + } + + public void SetReportDataSource(QueryRO pRO) + { + this.bindingSource1.DataSource = CreateRo(pRO); + } + + private QueryRO CreateRo(QueryRO ro) + { + QueryRO result = new QueryRO(); + result.Rows = new List(); + + if (ro.Rows.Count > 0) + { + var text = ro.Rows[0].Field1.ToString(); + var oidStr = text.Split(' ')[0]; + + var oid = Int64.Parse(oidStr); + + var export = DAOFactory.GenericDAO.LoadByID(oid); + + var lines = FibuNetExporter.GetExportZeilen(export.Export); + + var datensaetze = new List(); + + foreach (var item in lines) + { + datensaetze.Add(FibuNetDatensatz.ErzeugeDatensatz(item)); + } + + foreach (var item in datensaetze) + { + var newRow = new QueryRO.Row(); + result.Rows.Add(newRow); + + newRow.Field1 = item.Belegnr; + newRow.Field2 = String.Format("{0:dd.MM.yyyy}", item.Belegdatum); + newRow.Field3 = item.Debitor; + newRow.Field4 = String.Format("{0:c}", item.Betrag / 100); + newRow.Field5 = item.Erloeskonto; + newRow.Field6 = String.Format("{0:c}", item.Betrag / 100); + newRow.Field7 = item.Kostenstelle; + newRow.Field8 = item.Buchungstext; + } + } + + return result; + } + + } +} diff --git a/ReportImp/AsbRuhr/Fibuuebergabe.resx b/ReportImp/AsbRuhr/Fibuuebergabe.resx new file mode 100644 index 000000000..d25f3eba2 --- /dev/null +++ b/ReportImp/AsbRuhr/Fibuuebergabe.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/DiePerspektive/CustomReportCreator.cs b/ReportImp/DiePerspektive/CustomReportCreator.cs index b3050a074..b43a95977 100644 --- a/ReportImp/DiePerspektive/CustomReportCreator.cs +++ b/ReportImp/DiePerspektive/CustomReportCreator.cs @@ -13,7 +13,16 @@ namespace DiePerspektive { public class CustomReportCreator : DefaultReportCreator { - public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid) + public override XtraReport CreateQueryReport(long queryOid, string queryReportId) + { + if (queryOid == 400) + { + return base.CreateQueryReport(queryOid, queryReportId); + } + return base.CreateQueryReport(queryOid, queryReportId); + } + + public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid) { long oid = 0; long? ibOid = null; diff --git a/ReportImp/DiePerspektive/DiePerspektive.csproj b/ReportImp/DiePerspektive/DiePerspektive.csproj index a3888faeb..4bf1965b6 100644 --- a/ReportImp/DiePerspektive/DiePerspektive.csproj +++ b/ReportImp/DiePerspektive/DiePerspektive.csproj @@ -48,6 +48,13 @@ + + + Component + + + Fibuuebergabe.cs + Component @@ -90,6 +97,7 @@ Budgetnachweis.cs + Component @@ -116,6 +124,10 @@ + + Fibuuebergabe.cs + Designer + BudgetnachweisAnhang.cs diff --git a/ReportImp/DiePerspektive/Export/FibuNetDatensatz.cs b/ReportImp/DiePerspektive/Export/FibuNetDatensatz.cs new file mode 100644 index 000000000..d7f2a97ba --- /dev/null +++ b/ReportImp/DiePerspektive/Export/FibuNetDatensatz.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiePerspektive.Export +{ + public class FibuNetDatensatz + { + public String Debitor { get; set; } + public String Kostenstelle { get; set; } + public String Belegnr { get; set; } + public String Belegdatum { get; set; } + public String Erloeskonto { get; set; } + public String Buchungstext { get; set; } + public decimal Betrag { get; set; } + + + + public static FibuNetDatensatz ErzeugeDatensatz(String csv) + { + var fields = csv.Split(';'); + + + //sb.Append("( ):1100;"); + //sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag + //sb.Append(ds.Debitor); // SollKonto (Debitor) + //sb.Append(";;;"); + //sb.Append(ds.Belegnr); // Belegnummer + //sb.Append(";;"); + //sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum + //sb.Append(";"); + //sb.Append(ds.Erloeskonto); // HabenKonto + //sb.Append(";0;0;"); // + //sb.Append(ds.Buchungstext); // Buchungstext + //sb.Append(";0;;;;5;;;;;;"); + //sb.Append(ds.Kostenstelle); // Kostenstelle + //sb.Append(";"); + var dd = new FibuNetDatensatz(); + + if (fields.Length > 24) + { + decimal d = 0; + if (Decimal.TryParse(fields[1], out d)) + { + dd.Betrag = d; + } + else + { + int test = 0; + } + dd.Debitor = fields[4]; + dd.Belegnr = fields[7]; + dd.Belegdatum = fields[9]; + dd.Erloeskonto = fields[10]; + dd.Buchungstext = fields[13]; + dd.Kostenstelle = fields[24]; + + } + + return dd; + } + } +} diff --git a/ReportImp/DiePerspektive/Export/FibuNetExporter.cs b/ReportImp/DiePerspektive/Export/FibuNetExporter.cs index db8133cc6..24f6baded 100644 --- a/ReportImp/DiePerspektive/Export/FibuNetExporter.cs +++ b/ReportImp/DiePerspektive/Export/FibuNetExporter.cs @@ -58,8 +58,6 @@ namespace DiePerspektive.Export } return GetDifferenzAbrechnungenString(date, gesamtExport, letzterExport); - - } private static String GetLetzenExport(DateTime date, String exportName) @@ -390,38 +388,8 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) private static string GetDifferenzAbrechnungenString(DateTime date, String neuerExport, String letzterExport) { - List neueZeilen = new List(); - List letzterExportZeilen = new List(); - - - - using (StringReader reader = new StringReader(neuerExport)) - { - string line; - int index = 1; - - while ((line = reader.ReadLine()) != null) - { - if (line.StartsWith("( ):1100;")) - { - neueZeilen.Add(line); - } - } - } - - using (StringReader reader = new StringReader(letzterExport)) - { - string line; - int index = 1; - while ((line = reader.ReadLine()) != null) - { - if (line.StartsWith("( ):1100;")) - { - letzterExportZeilen.Add(line); - } - } - } - + List neueZeilen = GetExportZeilen(neuerExport); + List letzterExportZeilen = GetExportZeilen(letzterExport); //prüfe Unterschiede List unterschiedlicheDatensaetze = new List(); @@ -480,6 +448,26 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) return sb.ToString(); } + public static List GetExportZeilen(String export) + { + List zeilen = new List(); + + using (StringReader reader = new StringReader(export)) + { + string line; + + while ((line = reader.ReadLine()) != null) + { + if (line.StartsWith("( ):1100;")) + { + zeilen.Add(line); + } + } + } + + return zeilen; + } + private static String GetErloeskonto(String itemDesc) { if (itemDesc.Contains("Soziotherapie")) @@ -642,60 +630,5 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) //rot = variabel } - class FibuNetDatensatz - { - public String Debitor { get; set; } - public String Kostenstelle { get; set; } - public String Belegnr { get; set; } - public String Belegdatum { get; set; } - public String Erloeskonto { get; set; } - public String Buchungstext { get; set; } - public decimal Betrag { get; set; } - - - - public static FibuNetDatensatz ErzeugeDatensatz(String csv) - { - var fields = csv.Split(';'); - - - //sb.Append("( ):1100;"); - //sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag - //sb.Append(ds.Debitor); // SollKonto (Debitor) - //sb.Append(";;;"); - //sb.Append(ds.Belegnr); // Belegnummer - //sb.Append(";;"); - //sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum - //sb.Append(";"); - //sb.Append(ds.Erloeskonto); // HabenKonto - //sb.Append(";0;0;"); // - //sb.Append(ds.Buchungstext); // Buchungstext - //sb.Append(";0;;;;5;;;;;;"); - //sb.Append(ds.Kostenstelle); // Kostenstelle - //sb.Append(";"); - var dd = new FibuNetDatensatz(); - - if (fields.Length > 24) - { - decimal d = 0; - if (Decimal.TryParse(fields[1], out d)) - { - dd.Betrag = d; - } - else - { - int test = 0; - } - dd.Debitor = fields[4]; - dd.Belegnr = fields[7]; - dd.Belegdatum = fields[9]; - dd.Erloeskonto = fields[10]; - dd.Buchungstext = fields[13]; - dd.Kostenstelle = fields[24]; - - } - - return dd; - } - } + } \ No newline at end of file diff --git a/ReportImp/DiePerspektive/Fibuuebergabe.Designer.cs b/ReportImp/DiePerspektive/Fibuuebergabe.Designer.cs new file mode 100644 index 000000000..e39b2de4a --- /dev/null +++ b/ReportImp/DiePerspektive/Fibuuebergabe.Designer.cs @@ -0,0 +1,466 @@ +using BeWo.Report.ReportObjects; +namespace DiePerspektive +{ + partial class Fibuuebergabe + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); + this.xrTableDetail = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRowDetail = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); + this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrTableHeader = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); + this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); + this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DataField = new DevExpress.XtraReports.UI.XRControlStyle(); + this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // Detail1 + // + this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTableDetail}); + this.Detail1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Detail1.HeightF = 25F; + this.Detail1.Name = "Detail1"; + this.Detail1.StylePriority.UseFont = false; + this.Detail1.StylePriority.UseTextAlignment = false; + this.Detail1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // xrTableDetail + // + this.xrTableDetail.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrTableDetail.Name = "xrTableDetail"; + this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); + this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRowDetail}); + this.xrTableDetail.SizeF = new System.Drawing.SizeF(720F, 25F); + this.xrTableDetail.StylePriority.UseBorders = false; + this.xrTableDetail.StylePriority.UsePadding = false; + // + // xrTableRowDetail + // + this.xrTableRowDetail.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell13, + this.xrTableCell3, + this.xrTableCell7, + this.xrTableCell6, + this.xrTableCell8, + this.xrTableCell14, + this.xrTableCell15, + this.xrTableCell16}); + this.xrTableRowDetail.Name = "xrTableRowDetail"; + this.xrTableRowDetail.Weight = 1D; + // + // xrTableCell3 + // + this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field2")}); + this.xrTableCell3.Name = "xrTableCell3"; + this.xrTableCell3.StylePriority.UseFont = false; + this.xrTableCell3.Text = "xrTableCell3"; + this.xrTableCell3.Weight = 0.118168379302178D; + // + // xrTableCell7 + // + this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field3")}); + this.xrTableCell7.Name = "xrTableCell7"; + this.xrTableCell7.Text = "xrTableCell7"; + this.xrTableCell7.Weight = 0.11816837930217805D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field4")}); + this.xrTableCell6.Multiline = true; + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.Text = "xrTableCell6"; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell6.Weight = 0.1033973318894057D; + // + // xrTableCell8 + // + this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field5")}); + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.Text = "xrTableCell8"; + this.xrTableCell8.Weight = 0.1033973318894057D; + // + // DetailReport + // + this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail1, + this.GroupHeader1, + this.GroupFooter1}); + this.DetailReport.DataMember = "Rows"; + this.DetailReport.DataSource = this.bindingSource1; + this.DetailReport.Level = 0; + this.DetailReport.Name = "DetailReport"; + this.DetailReport.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; + // + // GroupHeader1 + // + this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel1, + this.xrTableHeader, + this.xrLabel2}); + this.GroupHeader1.GroupFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] { + new DevExpress.XtraReports.UI.GroupField("Field1", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)}); + this.GroupHeader1.HeightF = 115F; + this.GroupHeader1.Name = "GroupHeader1"; + this.GroupHeader1.RepeatEveryPage = true; + // + // xrTableHeader + // + this.xrTableHeader.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableHeader.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold); + this.xrTableHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 90.00002F); + this.xrTableHeader.Name = "xrTableHeader"; + this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); + this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRowHeader}); + this.xrTableHeader.SizeF = new System.Drawing.SizeF(720F, 25F); + this.xrTableHeader.StylePriority.UseBorders = false; + this.xrTableHeader.StylePriority.UseFont = false; + this.xrTableHeader.StylePriority.UsePadding = false; + // + // xrTableRowHeader + // + this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell5, + this.xrTableCell2, + this.xrTableCell1, + this.xrTableCell4, + this.xrTableCell11, + this.xrTableCell10, + this.xrTableCell9, + this.xrTableCell12}); + this.xrTableRowHeader.Name = "xrTableRowHeader"; + this.xrTableRowHeader.StylePriority.UseFont = false; + this.xrTableRowHeader.Weight = 1D; + // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Rechn.Nr."; + this.xrTableCell5.Weight = 0.11816838995568689D; + // + // xrTableCell2 + // + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.Text = "Re-/Bu-Dat."; + this.xrTableCell2.Weight = 0.11816838995568679D; + // + // xrTableCell1 + // + this.xrTableCell1.Name = "xrTableCell1"; + this.xrTableCell1.Text = "Debitor"; + this.xrTableCell1.Weight = 0.11816838995568685D; + // + // xrTableCell4 + // + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell4.StylePriority.UsePadding = false; + this.xrTableCell4.StylePriority.UseTextAlignment = false; + this.xrTableCell4.Text = "D-Betrag"; + this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell4.Weight = 0.10339734121122593D; + // + // xrLabel2 + // + this.xrLabel2.Font = new System.Drawing.Font("Arial", 12F); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel2.Multiline = true; + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.SizeF = new System.Drawing.SizeF(677F, 25F); + this.xrLabel2.StyleName = "Title"; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.Text = "Fibuübergabe-Protokoll Buchungen"; + // + // GroupFooter1 + // + this.GroupFooter1.HeightF = 0F; + this.GroupFooter1.Name = "GroupFooter1"; + this.GroupFooter1.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO); + // + // ReportHeader + // + this.ReportHeader.HeightF = 0F; + this.ReportHeader.Name = "ReportHeader"; + // + // Title + // + this.Title.BackColor = System.Drawing.Color.White; + this.Title.BorderColor = System.Drawing.SystemColors.ControlText; + this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.Title.BorderWidth = 1F; + this.Title.Font = new System.Drawing.Font("Times New Roman", 24F); + this.Title.ForeColor = System.Drawing.Color.Black; + this.Title.Name = "Title"; + // + // FieldCaption + // + this.FieldCaption.BackColor = System.Drawing.Color.White; + this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; + this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.FieldCaption.BorderWidth = 1F; + this.FieldCaption.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold); + this.FieldCaption.ForeColor = System.Drawing.Color.Black; + this.FieldCaption.Name = "FieldCaption"; + // + // PageInfo + // + this.PageInfo.BackColor = System.Drawing.Color.White; + this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; + this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.PageInfo.BorderWidth = 1F; + this.PageInfo.Font = new System.Drawing.Font("Times New Roman", 8F); + this.PageInfo.ForeColor = System.Drawing.Color.Black; + this.PageInfo.Name = "PageInfo"; + // + // DataField + // + this.DataField.BackColor = System.Drawing.Color.White; + this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; + this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.DataField.BorderWidth = 1F; + this.DataField.Font = new System.Drawing.Font("Times New Roman", 8F); + this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; + this.DataField.Name = "DataField"; + // + // fieldFLS + // + this.fieldFLS.DataMember = "FLSReportGroups"; + this.fieldFLS.Expression = "[TotalFLM] / 60"; + this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldFLS.Name = "fieldFLS"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 50F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 50F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // xrTableCell9 + // + this.xrTableCell9.Name = "xrTableCell9"; + this.xrTableCell9.Text = "KSt."; + this.xrTableCell9.Weight = 0.10339734121122601D; + // + // xrTableCell10 + // + this.xrTableCell10.Name = "xrTableCell10"; + this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell10.StylePriority.UsePadding = false; + this.xrTableCell10.StylePriority.UseTextAlignment = false; + this.xrTableCell10.Text = "E-Betrag"; + this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell10.Weight = 0.10339734121122601D; + // + // xrTableCell11 + // + this.xrTableCell11.Name = "xrTableCell11"; + this.xrTableCell11.Text = "Ertrag"; + this.xrTableCell11.Weight = 0.10339734121122601D; + // + // xrTableCell12 + // + this.xrTableCell12.Name = "xrTableCell12"; + this.xrTableCell12.Text = "Buchungstext"; + this.xrTableCell12.Weight = 0.29542097488921715D; + // + // xrTableCell13 + // + this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field1")}); + this.xrTableCell13.Name = "xrTableCell13"; + this.xrTableCell13.Text = "xrTableCell13"; + this.xrTableCell13.Weight = 0.118168379302178D; + // + // xrTableCell14 + // + this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field6")}); + this.xrTableCell14.Name = "xrTableCell14"; + this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 5, 0, 0, 100F); + this.xrTableCell14.StylePriority.UsePadding = false; + this.xrTableCell14.StylePriority.UseTextAlignment = false; + this.xrTableCell14.Text = "xrTableCell14"; + this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell14.Weight = 0.1033973318894057D; + // + // xrTableCell15 + // + this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field7")}); + this.xrTableCell15.Name = "xrTableCell15"; + this.xrTableCell15.Text = "xrTableCell15"; + this.xrTableCell15.Weight = 0.1033973318894057D; + // + // xrTableCell16 + // + this.xrTableCell16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field8")}); + this.xrTableCell16.Name = "xrTableCell16"; + this.xrTableCell16.Text = "xrTableCell16"; + this.xrTableCell16.Weight = 0.2954209482554449D; + // + // xrLabel1 + // + this.xrLabel1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 65.00002F); + this.xrLabel1.Multiline = true; + this.xrLabel1.Name = "xrLabel1"; + this.xrLabel1.SizeF = new System.Drawing.SizeF(677F, 25F); + this.xrLabel1.StyleName = "Title"; + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "Debitoren und Erträge"; + // + // Fibuuebergabe + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.DetailReport, + this.ReportHeader, + this.topMarginBand1, + this.bottomMarginBand1}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.fieldFLS}); + this.DataSource = this.bindingSource1; + this.DisplayName = "Fibuübergabe-Protokoll"; + this.Margins = new System.Drawing.Printing.Margins(60, 30, 50, 50); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = System.Drawing.Printing.PaperKind.A4; + this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { + this.Title, + this.FieldCaption, + this.PageInfo, + this.DataField}); + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.DetailBand Detail1; + private DevExpress.XtraReports.UI.DetailReportBand DetailReport; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.XRControlStyle Title; + private DevExpress.XtraReports.UI.XRControlStyle FieldCaption; + private DevExpress.XtraReports.UI.XRControlStyle PageInfo; + private DevExpress.XtraReports.UI.XRControlStyle DataField; + private DevExpress.XtraReports.UI.XRTable xrTableHeader; + private DevExpress.XtraReports.UI.XRTableRow xrTableRowHeader; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTable xrTableDetail; + private DevExpress.XtraReports.UI.XRTableRow xrTableRowDetail; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; + private DevExpress.XtraReports.UI.CalculatedField fieldFLS; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell15; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell16; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell10; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell12; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + } +} diff --git a/ReportImp/DiePerspektive/Fibuuebergabe.cs b/ReportImp/DiePerspektive/Fibuuebergabe.cs new file mode 100644 index 000000000..e81639633 --- /dev/null +++ b/ReportImp/DiePerspektive/Fibuuebergabe.cs @@ -0,0 +1,69 @@ +using System; +using BeWo.Report.ReportObjects; +using BeWo.Report; +using DevExpress.XtraReports.UI; +using System.Data; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using DiePerspektive.Export; +using System.Collections.Generic; + +namespace DiePerspektive +{ + public partial class Fibuuebergabe : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + public Fibuuebergabe() + { + InitializeComponent(); + + } + + public void SetReportDataSource(QueryRO pRO) + { + this.bindingSource1.DataSource = CreateRo(pRO); + } + + private QueryRO CreateRo(QueryRO ro) + { + QueryRO result = new QueryRO(); + result.Rows = new List(); + + if (ro.Rows.Count > 0) + { + var text = ro.Rows[0].Field1.ToString(); + var oidStr = text.Split(' ')[0]; + + var oid = Int64.Parse(oidStr); + + var export = DAOFactory.GenericDAO.LoadByID(oid); + + var lines = FibuNetExporter.GetExportZeilen(export.Export); + + var datensaetze = new List(); + + foreach (var item in lines) + { + datensaetze.Add(FibuNetDatensatz.ErzeugeDatensatz(item)); + } + + foreach (var item in datensaetze) + { + var newRow = new QueryRO.Row(); + result.Rows.Add(newRow); + + newRow.Field1 = item.Belegnr; + newRow.Field2 = String.Format("{0:dd.MM.yyyy}", item.Belegdatum); + newRow.Field3 = item.Debitor; + newRow.Field4 = String.Format("{0:c}", item.Betrag / 100); + newRow.Field5 = item.Erloeskonto; + newRow.Field6 = String.Format("{0:c}", item.Betrag / 100); + newRow.Field7 = item.Kostenstelle; + newRow.Field8 = item.Buchungstext; + } + } + + return result; + } + + } +} diff --git a/ReportImp/DiePerspektive/Fibuuebergabe.resx b/ReportImp/DiePerspektive/Fibuuebergabe.resx new file mode 100644 index 000000000..d25f3eba2 --- /dev/null +++ b/ReportImp/DiePerspektive/Fibuuebergabe.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/DiePerspektive/Service/QueryService.cs b/ReportImp/DiePerspektive/Service/QueryService.cs new file mode 100644 index 000000000..7e17984f8 --- /dev/null +++ b/ReportImp/DiePerspektive/Service/QueryService.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; +using BS.Shared.Extensions; + +namespace DiePerspektive.Service +{ + public class CustomQueryService : QueryService + { + public override List GetAllQueriesOfType(QueryType pType) + { + var list = base.GetAllQueriesOfType(pType); + + foreach (var queryDc in list) + { + if (queryDc.Oid == 400) + { + var exporte = DAOFactory.GenericDAO.GetAllActive(); + + foreach (var exp in exporte.OrderByDescending(e => e.Datum)) + { + String name = String.Format("{0:0} {1} {2:dd.MM.yyyy HH:mm}", exp.Oid, exp.Name, exp.Datum); + + queryDc.Parameter[0].CustomValues.Add(name); + } + } + + } + + return list; + } + } +} \ No newline at end of file diff --git a/ReportImp/HphBersenbrueckFreizeitUndReisen/Abrechnung/CustomInvoiceCreation.cs b/ReportImp/HphBersenbrueckFreizeitUndReisen/Abrechnung/CustomInvoiceCreation.cs index 8c60b7516..e912e1887 100644 --- a/ReportImp/HphBersenbrueckFreizeitUndReisen/Abrechnung/CustomInvoiceCreation.cs +++ b/ReportImp/HphBersenbrueckFreizeitUndReisen/Abrechnung/CustomInvoiceCreation.cs @@ -71,6 +71,27 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung } } + if (selbszahler == null) + { + bool hasSelbstzahlerCat = false; + + foreach (var item in alleServiceRecords) + { + if (item.ServiceDescription.Category.Name == "Selbstzahler") + { + hasSelbstzahlerCat = true; + } + } + + if (hasSelbstzahlerCat) + { + var orgs = DAOFactory.SearchDAO.FindOrganisation("Selbstzahler", false).ToList(); + if (orgs != null && orgs.Count > 0) + { + selbszahler = orgs[0]; + } + } + } IList pflegekassenRechnungen = null; if (pflegekasse != null) @@ -167,7 +188,7 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung var invoice = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, sc, new List()); SetSelbstzahlerAdresse(invoice, customer, sc); - + invoice.ServiceInvoicePeriodList = new List(); ErstelleRechnungspositionen(invoice, invoicePeriod, "Selbstzahler", serviceRecords, customer); ErstelleRechnungspositionen(invoice, invoicePeriod, "Sachkosten", serviceRecords, customer); @@ -267,7 +288,7 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung SetSelbstzahlerAdresse(invoice, customer, sc); } } - + invoice.ServiceInvoicePeriodList = new List(); ErstelleRechnungspositionen(invoice, invoicePeriod, category, serviceRecords, customer); if (invoice.GetTotalClaim() > 0) @@ -324,9 +345,6 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung } } - - invoice.ServiceInvoicePeriodList = new List(); - var sip = new ServiceInvoicePeriod { Start = invoicePeriod.StartDateTime, diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index c82275349..bbb0b2fc3 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -229,7 +229,7 @@ namespace BeWo.Service.Plugins //t = "2141858509"; // INKOMM GmbH //t = "8975059766"; // Quer-Fällt-Ein //t = "8928179244"; // ASB Ruhr e.V. Regionalverband - //t = "4423043131"; // Die Perspektive e.V. + t = "4423043131"; // Die Perspektive e.V. //t = "5263375280"; // LH Wolfsburg //t = "4900722829"; // Evangelische Kirchengemeinde Bottrop //t = "9853685258"; // Input @@ -327,7 +327,7 @@ namespace BeWo.Service.Plugins //t = "7663765314"; // Christina Frommen (Frommen BeWo) //t = "5462295916"; // BeWo Dellbrueck //t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR - t = "9815376800"; // Haus Dülken GmbH + Co. KG + //t = "9815376800"; // Haus Dülken GmbH + Co. KG //t = "6917917884"; // AMBEWO Müller/Gerhards //t = "5240630948"; // Caritasverband der Diözese Rottenburg-Stuttgart e.V. - Rechtsträger der Caritas Heilbronn Hohenlohe e.V. (Projekt heißt CaritasHeilbronnHohenlohe) //t = "7748694330"; // Caritasverband der Diözese Rottenburg-Stuttgart e.V. als Rechtsträger der Caritas Ludwigsburg-Waiblingen-Enz (Projekt heißt CaritasLudwigsburgWaiblingenEnz)