diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index b9aa0bdbd..43eee4c13 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -29,14 +29,14 @@ http://localhost/BeWoPlanerMobil - CurrentPage + URL True False False False - http://localhost/BeWoPlanerMobil/ + http://localhost/BeWoPlanerMobil/Main/Main diff --git a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs index c7ce27cea..9beba6d32 100644 --- a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs +++ b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs @@ -22,8 +22,8 @@ namespace BeWoPlanerMobil.Controllers protected readonly IUserService UserService = new MobileSessionFacade().UserService; protected readonly IDownloadService DownloadService = new MobileSessionFacade().DownloadService; protected readonly IReportService ReportService = new MobileSessionFacade().ReportService; - protected readonly IQueryService QueryService = new MobileSessionFacade().QueryService; - + protected readonly IQueryService QueryService = new MobileSessionFacade().QueryService; + protected const string LeerzeichenFuerGetMethoden = " "; protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 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/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index faa7ad753..ee21aea61 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -1,15 +1,26 @@ using System; using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Net; using System.Web.Mvc; +using BeWo.Service.Security; using BeWoPlanerMobil.Models; using BeWoPlanerMobil.Service; using BeWoPlanerMobil.Util; using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using DevExpress.CodeParser; +using DevExpress.XtraReports.UI; namespace BeWoPlanerMobil.Controllers { public class ReportViewerController : AbstractBaseController { + + private ReportViewerModel _Model; public ReportViewerModel Model @@ -72,7 +83,7 @@ namespace BeWoPlanerMobil.Controllers } [Authorize] - public ActionResult DocumentViewerPartial() + public ActionResult DocumentWebViewerPartial() { return PartialView("DocumentWebViewerPartial", Model); } @@ -82,5 +93,77 @@ namespace BeWoPlanerMobil.Controllers { throw new NotImplementedException("Service dafür implementieren!"); } + + [Authorize] + public ActionResult LoadCustomReport(long? reportOid) + { + if(Model?.Employee?.EmployeeOid is null || reportOid is null) + { + return Logout(); + } + + var selectedQuery = Model.Queries.FirstOrDefault(query => query.Oid.Equals(reportOid.Value)); + + if(selectedQuery is null) + { + Model.Report = null; + return PartialView("DocumentWebViewerPartial", Model); + } + + var queryReportUri = GetQueryReportUrl(selectedQuery); + var baseUri = SecurityUtils.RemoveAuthenticationInfoFromUri(queryReportUri); + + var test = QueryService.ExecuteQuery(selectedQuery.Oid, null); + + if(test is null) + { + return PartialView("DocumentWebViewerPartial", Model); + } + + QueryService.PrepareQueryReport(test, $"{MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}"); + + var tempToken = DownloadService.CreateTemporaryToken(baseUri, false); + + var addChar = baseUri.Contains("?") ? "&" : "?"; + var finalUri = $"{baseUri}{addChar}token={tempToken}"; + + var webClient = new WebClient(); + + var data = webClient.DownloadData(finalUri); + + var report = new XtraReport(); + + using(var memoryStream = new MemoryStream(data)) + { + report.PrintingSystem.LoadDocument(memoryStream); + } + + Model.Report = report; + + return PartialView("DocumentWebViewerPartial", Model); + } + + [Authorize] + private string GetQueryReportUrl(QueryDC query) + { + var url = Request?.Url; + + if(Model?.Employee?.EmployeeOid is null || url is null || query is null) + { + return null; + } + + //DEBUG: http://localhost:3777/service + //RELEASE: https://app4.bewoplaner.de/service + // http://localhost:3777/Host/ReportView.aspx?dcid=demoqueryeoid372&qoid=1304&type=QueryReport + + var urlSuffix = $"/ReportView.aspx?dcid={MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}&qoid={query.Oid}&type={Utils.EnumName(ReportTypes.QueryReport)}"; + + #if DEBUG + return $"http://localhost:3777/Host{urlSuffix}"; + #endif + + return $"{url.Scheme}//{url.Host}{urlSuffix}"; + } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Models/ReportViewerModel.cs b/BeWoPlanerMobil/Models/ReportViewerModel.cs index 9db004110..aefbd288a 100644 --- a/BeWoPlanerMobil/Models/ReportViewerModel.cs +++ b/BeWoPlanerMobil/Models/ReportViewerModel.cs @@ -133,7 +133,8 @@ namespace BeWoPlanerMobil.Models } - + public List SelectedEmployees { get; set; } + public List SelectedTeams { get; set; } diff --git a/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml b/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml index 8caf22bb1..e3c2835e4 100644 --- a/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml +++ b/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml @@ -2,11 +2,11 @@ @model BeWoPlanerMobil.Models.ReportViewerModel @Html.DevExpress().DocumentViewer(settings =>{ - // The following settings are required for a Document Viewer. - settings.Name = "documentViewer1"; - settings.Report = Model.Report; - // Callback and export route values specify corresponding controllers and their actions. - // These settings are also required. - settings.CallbackRouteValues = new { Controller="ReportViewer", Action="DocumentWebViewerPartial" }; - settings.ExportRouteValues = new { Controller="ReportViewer", Action="ExportDocumentWebViewer" }; + // The following settings are required for a Document Viewer. + settings.Name = "documentViewer1"; + settings.Report = Model.Report; + // Callback and export route values specify corresponding controllers and their actions. + // These settings are also required. + settings.CallbackRouteValues = new { Controller="ReportViewer", Action= "DocumentWebViewerPartial" }; + settings.ExportRouteValues = new { Controller="ReportViewer", Action="ExportDocumentWebViewer" }; }).GetHtml() \ No newline at end of file diff --git a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml index 62bf3e619..544ac4926 100644 --- a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml +++ b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml @@ -11,12 +11,11 @@ Mitarbeiterstundenkonto $(window).ready(function () { var isEmployeeFormSelected = $("#filterForEmployeesRadio").prop("checked"); - $("#employee-form").show(); - $("#team-form").hide(); - - + $((isEmployeeFormSelected ? "#employee-form" : "#team-form")).show(); + $((isEmployeeFormSelected ? "#team-form" : "#employee-form")).hide(); }); + // ToDo: function changeReportElements() { try { var selectedCustomReportOid = $("#customReportSelect :selected").val(); @@ -25,6 +24,7 @@ Mitarbeiterstundenkonto } } + // ToDo: function reportFilterOnChange() { try { //team oder mitarbeiter @@ -34,6 +34,7 @@ Mitarbeiterstundenkonto } } + // ToDo: Alle Mitarbeiter auswählen und gegebenenfalls Report erstellen? function allEmployeesCbOnClick() { try { @@ -42,6 +43,7 @@ Mitarbeiterstundenkonto } } + // ToDo: Alle Teams auswählen und gegebenenfalls Report erstellen? function allTeamsCbOnClick() { try { @@ -49,6 +51,16 @@ Mitarbeiterstundenkonto showErrorPopup(error); } } + + function loadCustomReport() { + try { + var selectedReportOid = $("#customReportSelect").val(); + + $("#report-container").load("@Url.Action("LoadCustomReport")", { reportOid: selectedReportOid}); + } catch (error) { + showErrorPopup(error); + } + }
@@ -64,7 +76,7 @@ Mitarbeiterstundenkonto
@if(Model.SelectedReportType == ReportType.Berichte) { - @Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "customReportSelect" }); + @Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "customReportSelect", onchange="loadCustomReport()" }); } @if(Model.SelectedReportType == ReportType.Mitarbeiterstundenkonto) @@ -112,16 +124,12 @@ Mitarbeiterstundenkonto
- - - - } -
+
@if(!(Model.Report is null)) { @Html.Partial("DocumentWebViewerPartial", Model); diff --git a/BeWoPlanerMobil/Views/Shared/Error.cshtml b/BeWoPlanerMobil/Views/Shared/Error.cshtml index 122a71dae..11a4c71c2 100644 --- a/BeWoPlanerMobil/Views/Shared/Error.cshtml +++ b/BeWoPlanerMobil/Views/Shared/Error.cshtml @@ -6,14 +6,14 @@ - Error - + Error + -
-

Error.

-

An error occurred while processing your request.

-

@ViewData["BeWoError"]

-
+
+

Error.

+

An error occurred while processing your request.

+

@ViewData["BeWoError"]

+
\ No newline at end of file diff --git a/Host/ReportView.aspx.cs b/Host/ReportView.aspx.cs index 73345aa76..7b22bd151 100644 --- a/Host/ReportView.aspx.cs +++ b/Host/ReportView.aspx.cs @@ -22,8 +22,6 @@ using System.Globalization; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Service.DCEntityMapper; -using DevExpress.XtraScheduler.Native; -using DevExpress.XtraReports.Design; namespace Host { @@ -36,8 +34,10 @@ namespace Host { try { - if (!SessionFacade.IsUserLoggedIn()) + if(!SessionFacade.IsUserLoggedIn()) + { throw new SecurityException("Anmeldung erforderlich!"); + } var report = CreateReport(); using (var repxStream = new MemoryStream()) diff --git a/Report/DefaultReportCreator.cs b/Report/DefaultReportCreator.cs index abe79a0f3..76c725afa 100644 --- a/Report/DefaultReportCreator.cs +++ b/Report/DefaultReportCreator.cs @@ -223,15 +223,20 @@ namespace BeWo.Report { var query = DAOFactory.GenericDAO.LoadByID(queryOid); - if (query == null) + if(query is null) + { return new XtraReport(); + } - var path = BS.Shared.Core.Utils.CreateSavePath(TempPath, queryReportId + ".xml"); + var path = Utils.CreateSavePath(TempPath, queryReportId + ".xml"); var table = Utils.XMLDeserialize(path); var queryReport = FindReportImp(null, query.ReportTypeName); - queryReport.SetReportDataSource(QueryRO.Create(query, table)); + + var queryReportObject = QueryRO.Create(query, table); + + queryReport.SetReportDataSource(queryReportObject); return queryReport as XtraReport; } diff --git a/ReportImp/AKGG/CustomReportCreator.cs b/ReportImp/AKGG/CustomReportCreator.cs index 71b2ac33e..93206e349 100644 --- a/ReportImp/AKGG/CustomReportCreator.cs +++ b/ReportImp/AKGG/CustomReportCreator.cs @@ -6,7 +6,6 @@ using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report; using BeWo.Report.ReportObjects; -using BeWo.Service.DCEntityMapper; using BS.Shared.Core; using DevExpress.XtraReports.UI; 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/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs index ab3e877a0..0a28077a0 100644 --- a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs +++ b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs @@ -50,6 +50,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); @@ -57,7 +58,6 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); @@ -84,6 +84,9 @@ namespace BeWo.BetreutesWohnenWoellReports this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -109,7 +112,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(675F, 22F); + this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(719.9999F, 22F); this.xrTableServiceRecords1.StylePriority.UseBackColor = false; this.xrTableServiceRecords1.StylePriority.UseFont = false; this.xrTableServiceRecords1.StylePriority.UseTextAlignment = false; @@ -122,6 +125,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4, this.xrTableCell9, this.xrTableCell12, + this.xrTableCell5, this.xrTableCell1}); this.xrTableRow2.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrTableRow2.Name = "xrTableRow2"; @@ -137,7 +141,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell3.StylePriority.UseFont = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.Text = "Datum"; - this.xrTableCell3.Weight = 0.25605213908392394D; + this.xrTableCell3.Weight = 0.2123404062766876D; // // xrTableCell4 // @@ -147,7 +151,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.Text = "Uhrzeit von - bis"; - this.xrTableCell4.Weight = 0.47552540183240349D; + this.xrTableCell4.Weight = 0.36405647615727033D; // // xrTableCell9 // @@ -156,7 +160,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell9.StylePriority.UseFont = false; this.xrTableCell9.StylePriority.UseTextAlignment = false; this.xrTableCell9.Text = "Personenzahl"; - this.xrTableCell9.Weight = 0.32189411849476823D; + this.xrTableCell9.Weight = 0.31828714609536107D; // // xrTableCell12 // @@ -166,7 +170,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell12.StylePriority.UseFont = false; this.xrTableCell12.StylePriority.UseTextAlignment = false; this.xrTableCell12.Text = "Minuten"; - this.xrTableCell12.Weight = 0.24142059080493378D; + this.xrTableCell12.Weight = 0.2194732989063812D; // // xrTableCell1 // @@ -174,7 +178,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); this.xrTableCell1.StylePriority.UsePadding = false; this.xrTableCell1.Text = "Unterschrift"; - this.xrTableCell1.Weight = 0.35115722230643115D; + this.xrTableCell1.Weight = 0.46089351900561043D; // // DetailReport // @@ -208,7 +212,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow6}); - this.xrTable3.SizeF = new System.Drawing.SizeF(675F, 25F); + this.xrTable3.SizeF = new System.Drawing.SizeF(720F, 25F); this.xrTable3.StylePriority.UseFont = false; this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // @@ -219,6 +223,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14, this.xrTableCell16, this.xrTableCell17, + this.xrTableCell6, this.xrTableCell2}); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); @@ -236,7 +241,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell13.StylePriority.UseTextAlignment = false; this.xrTableCell13.Text = "xrTableCell13"; this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell13.Weight = 0.13257575363470647D; + this.xrTableCell13.Weight = 0.10227272351322884D; // // xrTableCell14 // @@ -249,7 +254,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.Text = "xrTableCell14"; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell14.Weight = 0.24621210235959995D; + this.xrTableCell14.Weight = 0.17535353379452265D; // // xrTableCell16 // @@ -261,7 +266,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell16.StylePriority.UseTextAlignment = false; this.xrTableCell16.Text = "xrTableCell16"; this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell16.Weight = 0.16666665861053989D; + this.xrTableCell16.Weight = 0.15329546050762519D; // // xrTableCell17 // @@ -274,7 +279,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell17.StylePriority.UseTextAlignment = false; this.xrTableCell17.Text = "xrTableCell17"; this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell17.Weight = 0.12499999970715883D; + this.xrTableCell17.Weight = 0.10570707236348702D; // // xrTableCell2 // @@ -286,16 +291,16 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2.StylePriority.UseTextAlignment = false; this.xrTableCell2.Text = "xrTableCell2"; this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell2.Weight = 0.18181817927995625D; + this.xrTableCell2.Weight = 0.22198232491286482D; // // picSignature // this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None; this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")}); - this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0.2221849F, 0F); this.picSignature.Name = "picSignature"; - this.picSignature.SizeF = new System.Drawing.SizeF(135F, 24F); + this.picSignature.SizeF = new System.Drawing.SizeF(174.347F, 24F); this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; this.picSignature.StylePriority.UseBorders = false; this.picSignature.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.picSignature_BeforePrint); @@ -303,6 +308,7 @@ namespace BeWo.BetreutesWohnenWoellReports // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel11, this.xrLabel10, this.xrLabel8, this.xrLabel7, @@ -316,6 +322,17 @@ namespace BeWo.BetreutesWohnenWoellReports this.GroupFooter1.Name = "GroupFooter1"; this.GroupFooter1.StylePriority.UseFont = false; // + // xrLabel11 + // + this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(414F, 71.99999F); + this.xrLabel11.Name = "xrLabel11"; + this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel11.SizeF = new System.Drawing.SizeF(189F, 35.50002F); + this.xrLabel11.StylePriority.UseTextAlignment = false; + this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // xrLabel10 // this.xrLabel10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { @@ -397,10 +414,6 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrLabel3.StylePriority.UseFont = false; this.xrLabel3.Text = "Summe unmittelbarer Betreuungsleistungen in Minuten"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); - // // formattingRuleStartDate // this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; @@ -651,6 +664,29 @@ namespace BeWo.BetreutesWohnenWoellReports this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldFLSBillable.Name = "fieldFLSBillable"; // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Datum der Unterschrift"; + this.xrTableCell5.Weight = 0.31241921688608376D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell6.Weight = 0.15047979871237002D; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); + // // QuittierungsbelegASL // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -668,7 +704,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.formattingRuleServiceDesc, this.formattingRuleCostBearer, this.formattingRuleEmployeeName}); - this.Margins = new System.Drawing.Printing.Margins(75, 75, 50, 30); + this.Margins = new System.Drawing.Printing.Margins(29, 75, 50, 30); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = System.Drawing.Printing.PaperKind.A4; @@ -737,5 +773,8 @@ namespace BeWo.BetreutesWohnenWoellReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRPictureBox picSignature; + private DevExpress.XtraReports.UI.XRLabel xrLabel11; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; } } diff --git a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs index 27656acf7..4ccd89393 100644 --- a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs +++ b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs @@ -84,6 +84,9 @@ namespace BeWo.BetreutesWohnenWoellReports this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -109,7 +112,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(672F, 22F); + this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(719.99F, 22F); this.xrTableServiceRecords1.StylePriority.UseBackColor = false; this.xrTableServiceRecords1.StylePriority.UseFont = false; this.xrTableServiceRecords1.StylePriority.UseTextAlignment = false; @@ -122,6 +125,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4, this.xrTableCell9, this.xrTableCell12, + this.xrTableCell5, this.xrTableCell2}); this.xrTableRow2.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrTableRow2.Name = "xrTableRow2"; @@ -137,7 +141,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell3.StylePriority.UseFont = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.Text = "Datum"; - this.xrTableCell3.Weight = 0.25605213908392394D; + this.xrTableCell3.Weight = 0.19752594904022897D; // // xrTableCell4 // @@ -147,7 +151,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.Text = "Uhrzeit von - bis"; - this.xrTableCell4.Weight = 0.47552540183240349D; + this.xrTableCell4.Weight = 0.33864727526306765D; // // xrTableCell9 // @@ -156,7 +160,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell9.StylePriority.UseFont = false; this.xrTableCell9.StylePriority.UseTextAlignment = false; this.xrTableCell9.Text = "Personenzahl"; - this.xrTableCell9.Weight = 0.3218941929146843D; + this.xrTableCell9.Weight = 0.29606947506888553D; // // xrTableCell12 // @@ -166,7 +170,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell12.StylePriority.UseFont = false; this.xrTableCell12.StylePriority.UseTextAlignment = false; this.xrTableCell12.Text = "Minuten"; - this.xrTableCell12.Weight = 0.24142068144853554D; + this.xrTableCell12.Weight = 0.20415892383241957D; // // xrTableCell2 // @@ -174,7 +178,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); this.xrTableCell2.StylePriority.UsePadding = false; this.xrTableCell2.Text = "Unterschrift"; - this.xrTableCell2.Weight = 0.34384135611062244D; + this.xrTableCell2.Weight = 0.42872883164278197D; // // DetailReport // @@ -208,7 +212,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow6}); - this.xrTable3.SizeF = new System.Drawing.SizeF(672F, 25F); + this.xrTable3.SizeF = new System.Drawing.SizeF(719.99F, 25F); this.xrTable3.StylePriority.UseFont = false; this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // @@ -219,6 +223,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14, this.xrTableCell16, this.xrTableCell17, + this.xrTableCell6, this.xrTableCell1}); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); @@ -236,7 +241,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell13.StylePriority.UseTextAlignment = false; this.xrTableCell13.Text = "xrTableCell13"; this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell13.Weight = 0.13257575363470647D; + this.xrTableCell13.Weight = 0.10227271744316972D; // // xrTableCell14 // @@ -249,7 +254,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.Text = "xrTableCell14"; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell14.Weight = 0.24621210235959995D; + this.xrTableCell14.Weight = 0.17534088319775293D; // // xrTableCell16 // @@ -261,7 +266,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell16.StylePriority.UseTextAlignment = false; this.xrTableCell16.Text = "xrTableCell16"; this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell16.Weight = 0.16666669714283369D; + this.xrTableCell16.Weight = 0.15329543349935004D; // // xrTableCell17 // @@ -274,7 +279,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell17.StylePriority.UseTextAlignment = false; this.xrTableCell17.Text = "xrTableCell17"; this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell17.Weight = 0.12499995243419743D; + this.xrTableCell17.Weight = 0.10570706559889112D; // // xrTableCell1 // @@ -285,7 +290,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell1.StylePriority.UsePadding = false; this.xrTableCell1.StylePriority.UseTextAlignment = false; this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell1.Weight = 0.17803027018512233D; + this.xrTableCell1.Weight = 0.22198227224030523D; // // picSignature // @@ -294,7 +299,7 @@ namespace BeWo.BetreutesWohnenWoellReports new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")}); this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.picSignature.Name = "picSignature"; - this.picSignature.SizeF = new System.Drawing.SizeF(135F, 26.99998F); + this.picSignature.SizeF = new System.Drawing.SizeF(174.5834F, 26.99998F); this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; this.picSignature.StylePriority.UseBorders = false; this.picSignature.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.picSignature_BeforePrint); @@ -302,6 +307,7 @@ namespace BeWo.BetreutesWohnenWoellReports // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel11, this.xrLabel10, this.xrLabel8, this.xrLabel7, @@ -650,6 +656,36 @@ namespace BeWo.BetreutesWohnenWoellReports this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldFLSBillable.Name = "fieldFLSBillable"; // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Datum der Unterschrift"; + this.xrTableCell5.Weight = 0.29063139487824013D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell6.Weight = 0.15047978618305308D; + // + // xrLabel11 + // + this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(413.9999F, 71.99999F); + this.xrLabel11.Name = "xrLabel11"; + this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel11.SizeF = new System.Drawing.SizeF(189F, 35.50002F); + this.xrLabel11.StylePriority.UseTextAlignment = false; + this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // QuittierungsbelegFLS // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -667,7 +703,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.formattingRuleServiceDesc, this.formattingRuleCostBearer, this.formattingRuleEmployeeName}); - this.Margins = new System.Drawing.Printing.Margins(75, 75, 50, 30); + this.Margins = new System.Drawing.Printing.Margins(31, 75, 50, 30); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = System.Drawing.Printing.PaperKind.A4; @@ -736,5 +772,8 @@ namespace BeWo.BetreutesWohnenWoellReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRPictureBox picSignature; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; + private DevExpress.XtraReports.UI.XRLabel xrLabel11; } } diff --git a/ReportImp/Club74/ServicesOverviewReport.Designer.cs b/ReportImp/Club74/ServicesOverviewReport.Designer.cs index af75dd9ff..fc1cb1192 100644 --- a/ReportImp/Club74/ServicesOverviewReport.Designer.cs +++ b/ReportImp/Club74/ServicesOverviewReport.Designer.cs @@ -29,7 +29,6 @@ namespace BeWo.Club74 /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Stundenzettel)); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); @@ -88,13 +87,16 @@ namespace BeWo.Club74 this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); + this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldRecordCount = new DevExpress.XtraReports.UI.CalculatedField(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.bindingSource1 = new System.Windows.Forms.BindingSource(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -647,6 +649,9 @@ namespace BeWo.Club74 // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrPictureBox2, + this.xrPictureBox3, this.xrLabel7, this.xrLabel6, this.xrLabel5, @@ -654,6 +659,25 @@ namespace BeWo.Club74 this.ReportFooter.HeightF = 80.99995F; this.ReportFooter.Name = "ReportFooter"; // + // xrPictureBox2 + // + this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")}); + this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(477.0001F, 26.99998F); + this.xrPictureBox2.Name = "xrPictureBox2"; + this.xrPictureBox2.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // + // xrPictureBox3 + // + this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")}); + this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(207F, 26.99998F); + this.xrPictureBox3.Name = "xrPictureBox3"; + this.xrPictureBox3.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; + this.xrPictureBox3.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // xrLabel7 // this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top; @@ -732,6 +756,17 @@ namespace BeWo.Club74 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // + // xrLabel3 + // + this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(27F, 26.99998F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(135F, 35.50002F); + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -829,6 +864,8 @@ namespace BeWo.Club74 private DevExpress.XtraReports.UI.XRTableCell xrTableCell23; private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; private DevExpress.XtraReports.UI.CalculatedField fieldRecordCount; - + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/ReportImp/Club74/ServicesOverviewReport.cs b/ReportImp/Club74/ServicesOverviewReport.cs index 3d33d0ebf..51179b3a0 100644 --- a/ReportImp/Club74/ServicesOverviewReport.cs +++ b/ReportImp/Club74/ServicesOverviewReport.cs @@ -1,7 +1,5 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using BeWo.Report.ReportObjects; using BeWo.Report; @@ -16,7 +14,7 @@ namespace BeWo.Club74 public void SetReportDataSource(ServicesOverviewRO pRO) { - if (String.IsNullOrEmpty(pRO.ApprovedStartDate)) + if(string.IsNullOrEmpty(pRO.ApprovedStartDate)) { lblZeitraum.Text = "Nicht bewilligt"; diff --git a/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs b/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs index 0a99934ab..f76c4b5f9 100644 --- a/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs +++ b/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs @@ -88,6 +88,8 @@ namespace BeWo.Club74 this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox(); + this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); @@ -95,6 +97,7 @@ namespace BeWo.Club74 this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldRecordCount = new DevExpress.XtraReports.UI.CalculatedField(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -647,6 +650,9 @@ namespace BeWo.Club74 // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrPictureBox3, + this.xrPictureBox2, this.xrLabel7, this.xrLabel6, this.xrLabel5, @@ -654,6 +660,25 @@ namespace BeWo.Club74 this.ReportFooter.HeightF = 80.99995F; this.ReportFooter.Name = "ReportFooter"; // + // xrPictureBox3 + // + this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")}); + this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(207F, 27.00005F); + this.xrPictureBox3.Name = "xrPictureBox3"; + this.xrPictureBox3.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; + this.xrPictureBox3.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // + // xrPictureBox2 + // + this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")}); + this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(477.0001F, 26.99998F); + this.xrPictureBox2.Name = "xrPictureBox2"; + this.xrPictureBox2.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // xrLabel7 // this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top; @@ -732,6 +757,17 @@ namespace BeWo.Club74 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // + // xrLabel3 + // + this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(27F, 26.99998F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(135F, 35.50002F); + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -829,6 +865,8 @@ namespace BeWo.Club74 private DevExpress.XtraReports.UI.XRTableCell xrTableCell23; private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; private DevExpress.XtraReports.UI.CalculatedField fieldRecordCount; - + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } 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..f39df32b2 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -39,7 +39,7 @@ namespace BeWo.Service.Plugins //t = "5926081834"; // Spektrum //t = "1378137009"; // BeWo Direkt+ //t = "3010479871"; // Aachener Verein - //t = "3849764093"; // Club 74 + t = "3849764093"; // Club 74 //t = "5805202339"; // Wegweiser Betreuungsdienst //t = "2301474784"; // Hauskrankenpflege Leiendecker //t = "8243565510"; // Der Karren @@ -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) diff --git a/Service/Security/SecurityUtils.cs b/Service/Security/SecurityUtils.cs index 3568d54ab..16e6c30c6 100644 --- a/Service/Security/SecurityUtils.cs +++ b/Service/Security/SecurityUtils.cs @@ -8,7 +8,6 @@ using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Web; -using System.Windows; using BeWo.Data; using BeWo.Data.Access; using BeWo.Data.Entities; @@ -23,6 +22,8 @@ namespace BeWo.Service.Security private static readonly byte[] _Rc2Key = { 174, 130, 219, 185, 185, 221, 96, 50, 37, 212, 81, 121, 71, 206, 130, 153 }; + private static readonly Regex _AuthenticationRegex = new Regex(@"[\&|\?]?token\=[A-Za-z0-9]+|[\&|\?]?tenant\=[A-Za-z0-9]+|[\&|\?]?username\=[A-Za-z0-9.]+"); + public static string EncryptString(string strToEncrypt) { var lRc2CSP = new RC2CryptoServiceProvider(); @@ -91,9 +92,7 @@ namespace BeWo.Service.Security return HttpUtility.UrlEncode(EncryptString(tokendata)); } - - - + public static bool CheckToken(string token, string link) { if (string.IsNullOrEmpty(token)) @@ -335,5 +334,14 @@ namespace BeWo.Service.Security return result.ToString(); } + + public static string RemoveAuthenticationInfoFromUri(string navigateUri) + { + var splittedUri = _AuthenticationRegex.Split(navigateUri.Split('?')[1]); + var cleanedSplittedUri = splittedUri.Where(t => !string.IsNullOrWhiteSpace(t)).ToArray(); + var uriValues = cleanedSplittedUri.Aggregate(string.Empty, (current, item) => current + item); + + return navigateUri.Split('?')[0] + "?" + uriValues; + } } } diff --git a/Service/ServiceImplementations/QueryServiceImp.cs b/Service/ServiceImplementations/QueryServiceImp.cs index e07b74b93..fff6fdf74 100644 --- a/Service/ServiceImplementations/QueryServiceImp.cs +++ b/Service/ServiceImplementations/QueryServiceImp.cs @@ -71,15 +71,35 @@ namespace BeWo.Service.ServiceImplementations try { var lResult = id + ".xml"; + + var tenant = MultitenancyOperationContextExt.Current?.Tenant ?? SessionFacade.Tenant; - var lDir = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, MultitenancyOperationContextExt.Current.Tenant + @"\temp"); + // FaC: C:\Users\Lyndon Jetten\Entwicklung\BeWo\Host\demo\temp\ + // MoK: C:\Users\Lyndon Jetten\Entwicklung\BeWo\BeWoPlanerMobil\demo\temp + + var baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if(baseDirectory.Contains("BeWoPlanerMobil")) + { + baseDirectory = baseDirectory.Replace("BeWoPlanerMobil", "Host"); + } + + var lDir = BS.Shared.Core.Utils.CreateSavePath(baseDirectory, tenant + @"\temp"); var lPath = BS.Shared.Core.Utils.CreateSavePath(lDir, lResult); + + var table = BS.Shared.Core.Utils.XMLDeserializeFromString(dataTableJsonString); BS.Shared.Core.Utils.XMLSerialize(lPath, table); + if(!Directory.Exists(lDir)) + { - + } + + if(!File.Exists(lPath)) + { + + } return lResult; } diff --git a/Shared/Core/Utils.cs b/Shared/Core/Utils.cs index 0dfdf724d..e768c9520 100644 --- a/Shared/Core/Utils.cs +++ b/Shared/Core/Utils.cs @@ -1004,13 +1004,12 @@ namespace BS.Shared.Core public static string CreateSavePath(string tempPath, string filename) { - if (!filename.Contains("temp.txt")) - { - String test = @"c:\temp.txt"; - var test2 = CreateSavePath(tempPath, test); - } + var saveFilename = filename.Replace("..", "") + .Replace("\"", "") + .Replace("/", "") + .Replace(":", "") + .Replace(";", ""); - String saveFilename = filename.Replace("..", "").Replace("\"", "").Replace("/", "").Replace(":", "").Replace(";", ""); return Path.Combine(tempPath, saveFilename); }