Fibu Übergabeprotokoll ASB Rhein Ruhr+Die Perspektiven

+ Bugfix fehlendes Icon im Kalender nach Übertrag in Zeiterfassung
This commit is contained in:
Christian
2023-03-28 00:02:15 +02:00
parent 34d88064ae
commit 4e7d7426ec
20 changed files with 1918 additions and 187 deletions

View File

@@ -1,5 +1,7 @@
using System; using System;
using System.Collections.Specialized;
using System.Linq; using System.Linq;
using System.Net;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Security; using System.Web.Security;
@@ -15,6 +17,8 @@ namespace BeWoPlanerMobil.Controllers
{ {
public class LoginController : AbstractBaseController public class LoginController : AbstractBaseController
{ {
private String GETSERVER_URL = "https://support.bewoplaner.de/api/getserver.php?k={0}&t=0";
public static string LoginErrorIndex => "LoginErrorIndex"; public static string LoginErrorIndex => "LoginErrorIndex";
[HttpPost] [HttpPost]
@@ -147,8 +151,53 @@ namespace BeWoPlanerMobil.Controllers
return RedirectToActionPermanent("Main", "Main"); 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; MobileSessionFacade.Tenant = tenant;
return View("Index"); 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;
}
}
} }

View File

@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress>false</Use64BitIISExpress> <Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />

View File

@@ -392,7 +392,7 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
startSchuljahr = new DateTime(2023, 1, 1); startSchuljahr = new DateTime(2023, 1, 1);
endeSchuljahr = new DateTime(2023, 7, 21); endeSchuljahr = new DateTime(2023, 7, 21);
maxAnzahl = 6; maxAnzahl = 5;
} }
int gesamtAnzahl = 0; 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) public double BerechneMinutenProTag(double flsPerWeek)
{ {
var minutenProTag = flsPerWeek * 60 / 5; var minutenProTag = flsPerWeek * 60 / 5;
return minutenProTag;
//die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden //die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden
return Rundeauf15Minuten(minutenProTag); //return Rundeauf15Minuten(minutenProTag);
} }

View File

@@ -62,7 +62,14 @@
</Compile> </Compile>
<Compile Include="CustomReportCreator.cs" /> <Compile Include="CustomReportCreator.cs" />
<Compile Include="Export\CustomDataExporter.cs" /> <Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\FibuNetDatensatz.cs" />
<Compile Include="Export\FibuNetExporter.cs" /> <Compile Include="Export\FibuNetExporter.cs" />
<Compile Include="Fibuuebergabe.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Fibuuebergabe.Designer.cs">
<DependentUpon>Fibuuebergabe.cs</DependentUpon>
</Compile>
<Compile Include="Finanzauswertung.cs"> <Compile Include="Finanzauswertung.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@@ -138,6 +145,10 @@
<EmbeddedResource Include="BudgetnachweisAnhang.resx"> <EmbeddedResource Include="BudgetnachweisAnhang.resx">
<DependentUpon>BudgetnachweisAnhang.cs</DependentUpon> <DependentUpon>BudgetnachweisAnhang.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Fibuuebergabe.resx">
<DependentUpon>Fibuuebergabe.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Finanzauswertung.resx"> <EmbeddedResource Include="Finanzauswertung.resx">
<DependentUpon>Finanzauswertung.cs</DependentUpon> <DependentUpon>Finanzauswertung.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@@ -15,6 +15,15 @@ namespace AsbRuhr
{ {
public class CustomReportCreator : DefaultReportCreator 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) public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
{ {
long oid = 0; long oid = 0;

View File

@@ -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;
}
}
}

View File

@@ -2,17 +2,21 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using BeWo.Data.Access; using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects; using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BS.Shared.Core;
using BS.Shared.DataContracts; using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace AsbRuhr.Export namespace AsbRuhr.Export
{ {
public class FibuNetExporter public class FibuNetExporter
{ {
public static QueryDC CreateQuery(QueryDC query) public static QueryDC CreateQuery(QueryDC query)
{ {
DateTime dt = DateTime.Now; DateTime dt = DateTime.Now;
@@ -28,6 +32,11 @@ namespace AsbRuhr.Export
query.FileName = String.Format("BWP Rg Buchungsdaten {0:yyyyMM}.txt", dt); query.FileName = String.Format("BWP Rg Buchungsdaten {0:yyyyMM}.txt", dt);
query.QueryResult = GetAbrechnungenString(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 else
{ {
query.FileName = String.Format("BWP Buchungsdaten {0:yyyyMM}.txt", dt); query.FileName = String.Format("BWP Buchungsdaten {0:yyyyMM}.txt", dt);
@@ -37,6 +46,37 @@ namespace AsbRuhr.Export
return query; 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<BuchungsExport>();
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) public static string CreateExportString(string[] pHeaderCaption, string[][] pContent)
{ {
if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("FibuNet")) 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; int rowIndex = 1;
foreach (DataRow row in dt.Rows) foreach (DataRow row in dt.Rows)
{ {
Erstelle1100Satz(sb, row, date, rowIndex); var ds = ErstelleFibuNetDatensatz(row);
Erstelle1100Satz(sb, ds);
sb.AppendLine(); sb.AppendLine();
Erstelle1110Satz(sb, row, date, rowIndex); Erstelle1110Satz(sb, ds);
sb.AppendLine(); sb.AppendLine();
rowIndex++; rowIndex++;
@@ -155,9 +196,10 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
dt = ExecuteQuery(GetSpitzabrechnungSql(date), date); dt = ExecuteQuery(GetSpitzabrechnungSql(date), date);
foreach (DataRow row in dt.Rows) foreach (DataRow row in dt.Rows)
{ {
Erstelle1100Satz(sb, row, date, rowIndex); var ds = ErstelleFibuNetDatensatz(row);
Erstelle1100Satz(sb, ds);
sb.AppendLine(); sb.AppendLine();
Erstelle1110Satz(sb, row, date, rowIndex); Erstelle1110Satz(sb, ds);
sb.AppendLine(); sb.AppendLine();
rowIndex++; rowIndex++;
@@ -183,10 +225,11 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
{ {
if (!String.IsNullOrEmpty(row[3].ToString())) if (!String.IsNullOrEmpty(row[3].ToString()))
{ {
Erstelle1100Satz(sb, row, date, rowIndex); var ds = ErstelleFibuNetDatensatz(row);
sb.AppendLine(); Erstelle1100Satz(sb, ds);
Erstelle1110Satz(sb, row, date, rowIndex); sb.AppendLine();
sb.AppendLine(); Erstelle1110Satz(sb, ds);
sb.AppendLine();
} }
rowIndex++; rowIndex++;
@@ -197,52 +240,125 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
return sb.ToString(); 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; //( ):1100; 14280; ; ; 10907; ; ; 1960133; ; 07022019; 8408; 1; M; F / G 1960133; 0; ; ; ; 1; ; ; ; ; ; 160;
sb.Append("( ):1100;"); sb.Append("( ):1100;");
sb.Append(String.Format("{0:0.00};;;", (decimal)row[3]).Replace(",", "")); // Betrag sb.Append(String.Format("{0:0};;;", ds.Betrag)); // Betrag
sb.Append(ds.Debitor); // SollKonto (Debitor)
sb.Append(row[1].ToString()); // SollKonto (Debitor)
sb.Append(";;;"); sb.Append(";;;");
var blg1 = row[5].ToString(); sb.Append(ds.Belegnr); // Belegnummer
if (String.IsNullOrEmpty(blg1))
blg1 = "123456";
sb.Append(blg1); // Belegnummer
sb.Append(";;"); sb.Append(";;");
sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum
sb.Append(";"); sb.Append(";");
var habenkto = GetErloeskonto(row[7].ToString()); sb.Append(ds.Erloeskonto); // HabenKonto
sb.Append(habenkto); // HabenKonto
sb.Append(";0;0;"); // sb.Append(";0;0;"); //
sb.Append(row[4].ToString()); // Buchungstext sb.Append(ds.Buchungstext); // Buchungstext
sb.Append(";0;;;;5;;;;;;"); sb.Append(";0;;;;5;;;;;;");
sb.Append("4102"); // Kostenstelle sb.Append(ds.Kostenstelle); // Kostenstelle
sb.Append(";"); 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 //( ):1110;14280;;;1;10907;8408;1;M;1960133;;07022019;;F/G 1960133;;;0
sb.Append("( ):1110;"); 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("1;"); // Satzart
sb.Append(row[1].ToString()); sb.Append(ds.Erloeskonto);
sb.Append(";"); sb.Append(";");
var habenkto = GetErloeskonto(row[7].ToString()); sb.Append(ds.Erloeskonto); // HabenKonto
sb.Append(habenkto); // HabenKonto
sb.Append(";1;M;"); // sb.Append(";1;M;"); //
var blg1 = row[5].ToString(); sb.Append(ds.Belegnr); // Belegnummer
if (String.IsNullOrEmpty(blg1))
blg1 = "123456";
sb.Append(blg1); // Belegnummer
sb.Append(";;"); sb.Append(";;");
sb.Append(String.Format("{0:ddMMyyyy}", row[0])); // Belegdatum sb.Append(String.Format("{0:ddMMyyyy}", ds.Belegdatum)); // Belegdatum
sb.Append(";;"); sb.Append(";;");
sb.Append(row[4].ToString()); // Buchungstext sb.Append(ds.Buchungstext); // Buchungstext
sb.Append(";;;0"); 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) private static void Erstelle2010Satz(StringBuilder sb, DataRow row, DateTime date, int rowIndex)
{ {
//( ):2010;0;"Kontonummer";"Kontobezeichnung";;1;0;0; //( ):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<String> neueZeilen = GetExportZeilen(neuerExport);
List<String> letzterExportZeilen = GetExportZeilen(letzterExport);
//prüfe Unterschiede
List<FibuNetDatensatz> unterschiedlicheDatensaetze = new List<FibuNetDatensatz>();
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<String> GetExportZeilen(String export)
{
List<String> zeilen = new List<String>();
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) private static String GetErloeskonto(String itemDesc)
{ {
if (itemDesc.Contains("Soziotherapie")) if (itemDesc.Contains("Soziotherapie"))
@@ -279,6 +477,7 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
return "84180"; return "84180";
} }
private static String GetDebitorenSql(DateTime date) 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) private static String GetMonatlicheRechnungenSql(DateTime date)
{ {
String sql = @" String sql = @"
select select
ib.InvoiceDate, ib.InvoiceDate,
c.DebitorNumber, c.DebitorNumber,
c.CostCenter, c.CostCenter,
sip.Claim, sip.Claim,
CONCAT(date_format(ib.AccountingPeriodStart, '%d.%m.%Y'), ' - ', date_format(ib.AccountingPeriodEnd, '%d.%m.%Y'), ' ', p.`FirstName`, ' ', p.`LastName`), CONCAT(date_format(ib.AccountingPeriodStart, '%d.%m.%Y'), ' - ', date_format(ib.AccountingPeriodEnd, '%d.%m.%Y'), ' ', p.`FirstName`, ' ', p.`LastName`),
ib.invoicenumber, ib.invoicenumber,
(select t.name from team t inner join team2customer t2c on t2c.teamoid = t.oid where t2c.customeroid = c.Oid limit 1), (select t.name from team t inner join team2customer t2c on t2c.teamoid = t.oid where t2c.customeroid = c.Oid limit 1),
ii.ItemDescription ii.ItemDescription
from from
person p person p
inner join customer c on c.personoid = p.oid inner join customer c on c.personoid = p.oid
inner join supportconcept sc on sc.customeroid = c.oid inner join supportconcept sc on sc.customeroid = c.oid
inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid
inner join serviceinvoice si on si.invoicebaseoid = ib.oid inner join serviceinvoice si on si.invoicebaseoid = ib.oid
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
order by ib.invoicenumber order by ib.invoicenumber
"; ";
return sql; return sql;
} }
@@ -364,36 +563,36 @@ order by ib.invoicenumber
private static String GetMonatlicheBetraegeSql(DateTime date) private static String GetMonatlicheBetraegeSql(DateTime date)
{ {
String sql = @" String sql = @"
SELECT SELECT
':End_Datum' AS InvoiceDate, ':End_Datum' AS InvoiceDate,
c.DebitorNumber, c.DebitorNumber,
c.CostCenter, 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 )), 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` / 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', 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', CONCAT(':PeriodeSlash', ' FLStd/BeWo ', p.`LastName`) as 'Verwendung',
':Periode' AS invoicenumber, ':Periode' AS invoicenumber,
cb2sc.Oid, cb2sc.Oid,
Cat Cat
FROM `supportconcept` sc FROM `supportconcept` sc
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid` INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid` INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
LEFT JOIN LEFT JOIN
(SELECT crp.`ObjectOid`, crp.`CostRateValue` FROM `costrateperiod` crp (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())) WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 2 AND (crp.`EndDate` is null or crp.`EndDate` > NOW()))
AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid` AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid`
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid` INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid` INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
INNER JOIN `person` p on c.`PersonOid` = p.`Oid` INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
LEFT JOIN 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 (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 `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`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`) 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` AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1
and (sr.`GeleisteteFLM` is not null) and org.Name = 'LVR' OR org.Name = 'LWL' and (sr.`GeleisteteFLM` is not null) and (org.Name = 'LVR' OR org.Name = 'LWL')
ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate` ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
"; ";
return sql; return sql;
} }
@@ -401,7 +600,7 @@ order by ib.invoicenumber
public static DataTable ExecuteQuery(String sql, DateTime dt) public static DataTable ExecuteQuery(String sql, DateTime dt)
{ {
var newsql = sql; 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(":Periode", String.Format("{0:yyyyMM}", dt));
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:ddMMyyyy}", dt)); newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:ddMMyyyy}", dt));
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt)); newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
@@ -429,4 +628,6 @@ order by ib.invoicenumber
//schwarz = konstant //schwarz = konstant
//rot = variabel //rot = variabel
} }
} }

View File

@@ -0,0 +1,466 @@
using BeWo.Report.ReportObjects;
namespace AsbRuhr
{
partial class Fibuuebergabe
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@@ -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<QueryRO>
{
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<QueryRO.Row>();
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<BuchungsExport>(oid);
var lines = FibuNetExporter.GetExportZeilen(export.Export);
var datensaetze = new List<FibuNetDatensatz>();
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;
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -13,7 +13,16 @@ namespace DiePerspektive
{ {
public class CustomReportCreator : DefaultReportCreator 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 oid = 0;
long? ibOid = null; long? ibOid = null;

View File

@@ -48,6 +48,13 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Export\FibuNetDatensatz.cs" />
<Compile Include="Fibuuebergabe.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Fibuuebergabe.Designer.cs">
<DependentUpon>Fibuuebergabe.cs</DependentUpon>
</Compile>
<Compile Include="BudgetnachweisAnhang.cs"> <Compile Include="BudgetnachweisAnhang.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@@ -90,6 +97,7 @@
<Compile Include="Budgetnachweis.Designer.cs"> <Compile Include="Budgetnachweis.Designer.cs">
<DependentUpon>Budgetnachweis.cs</DependentUpon> <DependentUpon>Budgetnachweis.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Service\QueryService.cs" />
<Compile Include="SettlementReport.cs"> <Compile Include="SettlementReport.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@@ -116,6 +124,10 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Fibuuebergabe.resx">
<DependentUpon>Fibuuebergabe.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="BudgetnachweisAnhang.resx"> <EmbeddedResource Include="BudgetnachweisAnhang.resx">
<DependentUpon>BudgetnachweisAnhang.cs</DependentUpon> <DependentUpon>BudgetnachweisAnhang.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@@ -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;
}
}
}

View File

@@ -58,8 +58,6 @@ namespace DiePerspektive.Export
} }
return GetDifferenzAbrechnungenString(date, gesamtExport, letzterExport); return GetDifferenzAbrechnungenString(date, gesamtExport, letzterExport);
} }
private static String GetLetzenExport(DateTime date, String exportName) 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) private static string GetDifferenzAbrechnungenString(DateTime date, String neuerExport, String letzterExport)
{ {
List<String> neueZeilen = new List<string>(); List<String> neueZeilen = GetExportZeilen(neuerExport);
List<String> letzterExportZeilen = new List<string>(); List<String> letzterExportZeilen = GetExportZeilen(letzterExport);
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);
}
}
}
//prüfe Unterschiede //prüfe Unterschiede
List<FibuNetDatensatz> unterschiedlicheDatensaetze = new List<FibuNetDatensatz>(); List<FibuNetDatensatz> unterschiedlicheDatensaetze = new List<FibuNetDatensatz>();
@@ -480,6 +448,26 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
return sb.ToString(); return sb.ToString();
} }
public static List<String> GetExportZeilen(String export)
{
List<String> zeilen = new List<String>();
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) private static String GetErloeskonto(String itemDesc)
{ {
if (itemDesc.Contains("Soziotherapie")) if (itemDesc.Contains("Soziotherapie"))
@@ -642,60 +630,5 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61)
//rot = variabel //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;
}
}
} }

View File

@@ -0,0 +1,466 @@
using BeWo.Report.ReportObjects;
namespace DiePerspektive
{
partial class Fibuuebergabe
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@@ -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<QueryRO>
{
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<QueryRO.Row>();
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<BuchungsExport>(oid);
var lines = FibuNetExporter.GetExportZeilen(export.Export);
var datensaetze = new List<FibuNetDatensatz>();
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;
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -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<QueryDC> GetAllQueriesOfType(QueryType pType)
{
var list = base.GetAllQueriesOfType(pType);
foreach (var queryDc in list)
{
if (queryDc.Oid == 400)
{
var exporte = DAOFactory.GenericDAO.GetAllActive<BuchungsExport>();
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;
}
}
}

View File

@@ -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<ServiceInvoice> pflegekassenRechnungen = null; IList<ServiceInvoice> pflegekassenRechnungen = null;
if (pflegekasse != null) if (pflegekasse != null)
@@ -167,7 +188,7 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
var invoice = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, sc, new List<ServiceRecordDC>()); var invoice = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, sc, new List<ServiceRecordDC>());
SetSelbstzahlerAdresse(invoice, customer, sc); SetSelbstzahlerAdresse(invoice, customer, sc);
invoice.ServiceInvoicePeriodList = new List<ServiceInvoicePeriod>();
ErstelleRechnungspositionen(invoice, invoicePeriod, "Selbstzahler", serviceRecords, customer); ErstelleRechnungspositionen(invoice, invoicePeriod, "Selbstzahler", serviceRecords, customer);
ErstelleRechnungspositionen(invoice, invoicePeriod, "Sachkosten", serviceRecords, customer); ErstelleRechnungspositionen(invoice, invoicePeriod, "Sachkosten", serviceRecords, customer);
@@ -267,7 +288,7 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
SetSelbstzahlerAdresse(invoice, customer, sc); SetSelbstzahlerAdresse(invoice, customer, sc);
} }
} }
invoice.ServiceInvoicePeriodList = new List<ServiceInvoicePeriod>();
ErstelleRechnungspositionen(invoice, invoicePeriod, category, serviceRecords, customer); ErstelleRechnungspositionen(invoice, invoicePeriod, category, serviceRecords, customer);
if (invoice.GetTotalClaim() > 0) if (invoice.GetTotalClaim() > 0)
@@ -324,9 +345,6 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
} }
} }
invoice.ServiceInvoicePeriodList = new List<ServiceInvoicePeriod>();
var sip = new ServiceInvoicePeriod var sip = new ServiceInvoicePeriod
{ {
Start = invoicePeriod.StartDateTime, Start = invoicePeriod.StartDateTime,

View File

@@ -229,7 +229,7 @@ namespace BeWo.Service.Plugins
//t = "2141858509"; // INKOMM GmbH //t = "2141858509"; // INKOMM GmbH
//t = "8975059766"; // Quer-Fällt-Ein //t = "8975059766"; // Quer-Fällt-Ein
//t = "8928179244"; // ASB Ruhr e.V. Regionalverband //t = "8928179244"; // ASB Ruhr e.V. Regionalverband
//t = "4423043131"; // Die Perspektive e.V. t = "4423043131"; // Die Perspektive e.V.
//t = "5263375280"; // LH Wolfsburg //t = "5263375280"; // LH Wolfsburg
//t = "4900722829"; // Evangelische Kirchengemeinde Bottrop //t = "4900722829"; // Evangelische Kirchengemeinde Bottrop
//t = "9853685258"; // Input //t = "9853685258"; // Input
@@ -327,7 +327,7 @@ namespace BeWo.Service.Plugins
//t = "7663765314"; // Christina Frommen (Frommen BeWo) //t = "7663765314"; // Christina Frommen (Frommen BeWo)
//t = "5462295916"; // BeWo Dellbrueck //t = "5462295916"; // BeWo Dellbrueck
//t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR //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 = "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 = "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) //t = "7748694330"; // Caritasverband der Diözese Rottenburg-Stuttgart e.V. als Rechtsträger der Caritas Ludwigsburg-Waiblingen-Enz (Projekt heißt CaritasLudwigsburgWaiblingenEnz)