Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

This commit is contained in:
Christian
2023-10-31 15:42:14 +01:00
22 changed files with 3053 additions and 267 deletions

View File

@@ -152,6 +152,10 @@
<Compile Include="Validation\ServiceRecordValidator.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\BeWo\BeWo.csproj">
<Project>{3FEBB560-9275-413A-9767-BB68C44EEBC3}</Project>
<Name>BeWo</Name>
</ProjectReference>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>

View File

@@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using AWOMuensterlandRecklinghausen.Service;
using BeWo.Core.Config;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Service.Configuration;
using BeWo.Service.ServiceImplementations;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
@@ -231,7 +233,16 @@ namespace AWOMuensterlandRecklinghausen
CorrectOverlappingTimes(groupFilteredRecords.OrderBy(s => s.Start).ToList());
}
public override void CreateEmployeeDetails(MitarbeiterstundenkontoRO ro)
public override MitarbeiterstundenkontoRO.EmployeeDetail BerechneUeberstundenBis(MitarbeiterstundenkontoRO.EmployeeDetail edOrig, IList<ServiceRecord> records, DateTime monat, out decimal? ueberstunden, out decimal alteExtraUeberstunden)
{
var edTotal = base.BerechneUeberstundenBis(edOrig, records, monat, out ueberstunden, out alteExtraUeberstunden);
edOrig.Custom4 = edTotal.StundenSollOhneUrlaubKrankheit; // Soll in den Vormonaten
return edTotal;
}
public override void CreateEmployeeDetails(MitarbeiterstundenkontoRO ro)
{
//zwei Anpassungen: a) Für MA mit Ferienausgleich -> Sollstd + 17 %
// b) Abwesenheiten durch Servicerecords ganz am Ende

View File

@@ -54,7 +54,7 @@ namespace AWOMuensterlandRecklinghausen.Invoicing
var emp = DAOFactory.GenericDAO.GetByID<Employee>(empOid);
if (emp == null)
{
ccEmp = "312510".Substring(3, 3);
ccEmp = "312500".Substring(3, 3);
emp2Value.Add(0, ccEmp);
}
else
@@ -62,7 +62,7 @@ namespace AWOMuensterlandRecklinghausen.Invoicing
if (emp.TaxNumber == null)
{
//throw new FaultException<BeWoFault>(new BeWoFault(String.Format("Bei Mitarbeiter*in {0} wurde keine Kostenstelle hinterlegt", emp.Person.FirstNameLastName), BeWoFaultType.CustomWithoutDetails));
emp.TaxNumber = "312510";
emp.TaxNumber = "312500";
}
ccEmp = emp.TaxNumber.Substring(3, 3);
emp2Value.Add(empOid, ccEmp);
@@ -259,13 +259,13 @@ namespace AWOMuensterlandRecklinghausen.Invoicing
}
else
{
return "312";
return "300";
}
}
}
}
//throw new FaultException<BeWoFault>(new BeWoFault(String.Format("Es wurde keine Schule für { 0 } gefunden.", c.Person.FirstNameLastName), BeWoFaultType.CustomWithoutDetails));
return "312";
return "300";
}
private bool CheckPausenabzug(SupportConcept sc)

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using BeWo.Report;
using BeWo.Report.ReportObjects;
@@ -76,11 +77,11 @@ namespace AWOMuensterlandRecklinghausen
}
day.Custom2 = day.ServiceRecords[0].ServiceDescription.Name;
}
if (day.Custom2 != null && !string.IsNullOrEmpty(day.ServiceRecords[0].Notice))
if (day.Custom2 != null && !string.IsNullOrEmpty(day.ServiceRecords[0].Notice2))
{
day.Custom2 += " - ";
}
day.Custom2 += !string.IsNullOrEmpty(day.ServiceRecords[0].Notice) ? day.ServiceRecords[0].Notice : "";
day.Custom2 += !string.IsNullOrEmpty(day.ServiceRecords[0].Notice2) ? day.ServiceRecords[0].Notice2 : "";
// Anteil des Wochenendezuschlags an der Arbeitszeit
if (day.HoursSaturday > 0)
@@ -117,5 +118,44 @@ namespace AWOMuensterlandRecklinghausen
}
this.bindingSource1.DataSource = pRO;
}
private void xrTableCell27_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRTableCell cell = ((XRTableCell)sender);
if (cell.Text.StartsWith("-"))
{
cell.ForeColor = Color.Red;
}
else
{
cell.ForeColor = Color.Black;
}
}
private void xrTableCell54_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRTableCell cell = ((XRTableCell)sender);
if (cell.Text.StartsWith("-"))
{
cell.ForeColor = Color.Red;
}
else
{
cell.ForeColor = Color.Black;
}
}
private void xrTableCell63_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRTableCell cell = ((XRTableCell)sender);
if (cell.Text.StartsWith("-"))
{
cell.ForeColor = Color.Red;
}
else
{
cell.ForeColor = Color.Black;
}
}
}
}

View File

@@ -125,6 +125,7 @@ namespace AWOMuensterlandRecklinghausen
this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField();
this.xrControlStyle1 = new DevExpress.XtraReports.UI.XRControlStyle();
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -156,7 +157,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowDetail});
this.xrTableDetail.SizeF = new System.Drawing.SizeF(700.9999F, 22F);
this.xrTableDetail.SizeF = new System.Drawing.SizeF(703.4178F, 22F);
this.xrTableDetail.StylePriority.UseBorders = false;
this.xrTableDetail.StylePriority.UseFont = false;
this.xrTableDetail.StylePriority.UsePadding = false;
@@ -268,13 +269,14 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom3", "{0:0.00}")});
this.xrTableCell27.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell27.FormattingRules.Add(this.NegZahl);
this.xrTableCell27.Name = "xrTableCell27";
this.xrTableCell27.StyleName = "xrControlStyle1";
this.xrTableCell27.StylePriority.UseFont = false;
this.xrTableCell27.StylePriority.UseTextAlignment = false;
this.xrTableCell27.Text = "xrTableCell27";
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell27.Weight = 0.042454539815835309D;
this.xrTableCell27.Weight = 0.044634799441956016D;
this.xrTableCell27.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.xrTableCell27_BeforePrint);
//
// NegZahl
//
@@ -319,7 +321,7 @@ namespace AWOMuensterlandRecklinghausen
this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableHeader});
this.GroupHeader2.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.GroupHeader2.HeightF = 60F;
this.GroupHeader2.HeightF = 40F;
this.GroupHeader2.Name = "GroupHeader2";
this.GroupHeader2.StylePriority.UseFont = false;
//
@@ -334,7 +336,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
this.xrTableRowHeader});
this.xrTableHeader.SizeF = new System.Drawing.SizeF(700.9999F, 60F);
this.xrTableHeader.SizeF = new System.Drawing.SizeF(704.0002F, 40F);
this.xrTableHeader.StylePriority.UseBackColor = false;
this.xrTableHeader.StylePriority.UseBorders = false;
this.xrTableHeader.StylePriority.UseFont = false;
@@ -352,7 +354,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell16,
this.xrTableCell19});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 0.79999999999999982D;
this.xrTableRow2.Weight = 0.53333333333333321D;
//
// xrTableCell4
//
@@ -435,7 +437,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell19.StylePriority.UseTextAlignment = false;
this.xrTableCell19.Text = "Saldo";
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell19.Weight = 0.040577088894214193D;
this.xrTableCell19.Weight = 0.043162915844123351D;
//
// xrTableRowHeader
//
@@ -449,7 +451,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell24,
this.xrTableCell10});
this.xrTableRowHeader.Name = "xrTableRowHeader";
this.xrTableRowHeader.Weight = 0.79999999999999982D;
this.xrTableRowHeader.Weight = 0.53333333333333321D;
//
// xrTableCell5
//
@@ -542,7 +544,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.Text = "Urlaub";
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell10.Weight = 0.040577092688766248D;
this.xrTableCell10.Weight = 0.043162919638675405D;
//
// GroupHeader3
//
@@ -552,7 +554,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTable2,
this.xrLabel1});
this.GroupHeader3.Font = new System.Drawing.Font("Calibri", 14F);
this.GroupHeader3.HeightF = 99.8333F;
this.GroupHeader3.HeightF = 84.16669F;
this.GroupHeader3.Level = 1;
this.GroupHeader3.Name = "GroupHeader3";
this.GroupHeader3.PageBreak = DevExpress.XtraReports.UI.PageBreak.BeforeBand;
@@ -561,9 +563,9 @@ namespace AWOMuensterlandRecklinghausen
// xrPictureBox3
//
this.xrPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox3.Image")));
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(500.639F, 0F);
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(512.6715F, 0F);
this.xrPictureBox3.Name = "xrPictureBox3";
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(199.3611F, 76.87503F);
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(190.7462F, 76.87503F);
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// lblMonat
@@ -574,7 +576,7 @@ namespace AWOMuensterlandRecklinghausen
this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(180.0001F, 0F);
this.lblMonat.Multiline = true;
this.lblMonat.Name = "lblMonat";
this.lblMonat.SizeF = new System.Drawing.SizeF(320.639F, 25F);
this.lblMonat.SizeF = new System.Drawing.SizeF(332.6714F, 25F);
this.lblMonat.StyleName = "Title";
this.lblMonat.StylePriority.UseFont = false;
this.lblMonat.Text = "lblMonat";
@@ -587,7 +589,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable2.SizeF = new System.Drawing.SizeF(500.639F, 28.95838F);
this.xrTable2.SizeF = new System.Drawing.SizeF(512.6715F, 28.95838F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
@@ -624,7 +626,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell25.StylePriority.UseFont = false;
this.xrTableCell25.StylePriority.UseTextAlignment = false;
this.xrTableCell25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell25.Weight = 0.461993132396104D;
this.xrTableCell25.Weight = 0.47761473506238256D;
//
// xrLabel1
//
@@ -664,7 +666,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(653.918F, 20.00001F);
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(46.08215F, 20F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(50.08228F, 20F);
this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseBorderWidth = false;
this.xrLabel4.StylePriority.UseFont = false;
@@ -698,7 +700,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableRow7,
this.xrTableRow8,
this.xrTableRow10});
this.xrTable3.SizeF = new System.Drawing.SizeF(700.9998F, 80F);
this.xrTable3.SizeF = new System.Drawing.SizeF(704.0002F, 80F);
this.xrTable3.StylePriority.UseBorders = false;
this.xrTable3.StylePriority.UseFont = false;
this.xrTable3.StylePriority.UsePadding = false;
@@ -783,7 +785,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell37.BorderWidth = 2F;
this.xrTableCell37.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.StundenGesamtIst", "{0:0.00}")});
this.xrTableCell37.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Bold);
this.xrTableCell37.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell37.Name = "xrTableCell37";
this.xrTableCell37.StylePriority.UseBorders = false;
this.xrTableCell37.StylePriority.UseBorderWidth = false;
@@ -792,7 +794,7 @@ namespace AWOMuensterlandRecklinghausen
xrSummary1.FormatString = "{0:0.00}";
this.xrTableCell37.Summary = xrSummary1;
this.xrTableCell37.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell37.Weight = 0.035217866881645195D;
this.xrTableCell37.Weight = 0.03746217635067571D;
//
// xrTableRow7
//
@@ -866,13 +868,13 @@ namespace AWOMuensterlandRecklinghausen
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell44.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.StundenSollMax", "{0:0.00}")});
this.xrTableCell44.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Bold);
this.xrTableCell44.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell44.Name = "xrTableCell44";
this.xrTableCell44.StylePriority.UseBorders = false;
this.xrTableCell44.StylePriority.UseFont = false;
this.xrTableCell44.StylePriority.UseTextAlignment = false;
this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell44.Weight = 0.035217999193574268D;
this.xrTableCell44.Weight = 0.037462308644885145D;
//
// xrTableRow8
//
@@ -957,7 +959,8 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell54.StylePriority.UseTextAlignment = false;
this.xrTableCell54.Text = "xrTableCell14";
this.xrTableCell54.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell54.Weight = 0.036415677554525794D;
this.xrTableCell54.Weight = 0.038736310377114072D;
this.xrTableCell54.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.xrTableCell54_BeforePrint);
//
// xrTableRow10
//
@@ -1042,7 +1045,8 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell63.StylePriority.UseFont = false;
this.xrTableCell63.StylePriority.UseTextAlignment = false;
this.xrTableCell63.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell63.Weight = 0.036415677554525794D;
this.xrTableCell63.Weight = 0.038736310377114072D;
this.xrTableCell63.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.xrTableCell63_BeforePrint);
//
// lblAA
//
@@ -1255,6 +1259,11 @@ namespace AWOMuensterlandRecklinghausen
this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt";
//
// xrControlStyle1
//
this.xrControlStyle1.Name = "xrControlStyle1";
this.xrControlStyle1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
//
// Mitarbeiterarbeitszeitkonto
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1281,7 +1290,7 @@ namespace AWOMuensterlandRecklinghausen
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.Wochenende,
this.NegZahl});
this.Margins = new System.Drawing.Printing.Margins(75, 51, 27, 63);
this.Margins = new System.Drawing.Printing.Margins(75, 46, 27, 63);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
@@ -1289,7 +1298,8 @@ namespace AWOMuensterlandRecklinghausen
this.Title,
this.FieldCaption,
this.PageInfo,
this.DataField});
this.DataField,
this.xrControlStyle1});
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit();
@@ -1395,5 +1405,6 @@ namespace AWOMuensterlandRecklinghausen
private DevExpress.XtraReports.UI.XRTableCell xrTableCell63;
private DevExpress.XtraReports.UI.FormattingRule Wochenende;
private DevExpress.XtraReports.UI.FormattingRule NegZahl;
private DevExpress.XtraReports.UI.XRControlStyle xrControlStyle1;
}
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C1FED668-ADB9-47E0-B589-1389618E1B6E}</ProjectGuid>
<ProjectGuid>{F511664C-784C-4582-BDCE-0BEFED504CB4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ArbeiterwohlfahrtWesel</RootNamespace>

View File

@@ -31,6 +31,7 @@ namespace AutismusKoelnBonn
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Quittierungsbeleg));
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
@@ -130,6 +131,8 @@ namespace AutismusKoelnBonn
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel25 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel26 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -269,7 +272,7 @@ namespace AutismusKoelnBonn
// xrTableCell12
//
this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified", "{0:0.##}")});
this.xrTableCell12.Font = new System.Drawing.Font("Calibri", 9.75F);
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.StylePriority.UseBorders = false;
@@ -282,7 +285,7 @@ namespace AutismusKoelnBonn
// xrTableCell34
//
this.xrTableCell34.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesUnqualified")});
this.xrTableCell34.Font = new System.Drawing.Font("Calibri", 9.75F);
this.xrTableCell34.Name = "xrTableCell34";
this.xrTableCell34.StylePriority.UseFont = false;
@@ -441,7 +444,7 @@ namespace AutismusKoelnBonn
this.xrTableCell32.StylePriority.UseFont = false;
this.xrTableCell32.StylePriority.UsePadding = false;
this.xrTableCell32.StylePriority.UseTextAlignment = false;
this.xrTableCell32.Text = "FLS in";
this.xrTableCell32.Text = "Fehl-";
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
this.xrTableCell32.Weight = 0.20949720670391064D;
//
@@ -549,7 +552,7 @@ namespace AutismusKoelnBonn
this.xrTableCell7.StylePriority.UseBorders = false;
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "Minuten\r\nKontigent\r\n(ohne 1,2)";
this.xrTableCell7.Text = "Minuten\r\nRechnung\r\n(ohne 1,2)";
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell7.Weight = 0.20949720670391064D;
//
@@ -565,7 +568,7 @@ namespace AutismusKoelnBonn
this.xrTableCell33.StylePriority.UseBorders = false;
this.xrTableCell33.StylePriority.UseFont = false;
this.xrTableCell33.StylePriority.UseTextAlignment = false;
this.xrTableCell33.Text = "Minuten\r\nRechnung\r\n(ohne 1,2)";
this.xrTableCell33.Text = "kontakte\r\nMinuten\r\n(ohne 1,2)";
this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell33.Weight = 0.20949720670391064D;
//
@@ -574,6 +577,7 @@ namespace AutismusKoelnBonn
this.xrTableCell43.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell43.Font = new System.Drawing.Font("Arial", 10F);
this.xrTableCell43.Multiline = true;
this.xrTableCell43.Name = "xrTableCell43";
this.xrTableCell43.StylePriority.UseBorders = false;
this.xrTableCell43.StylePriority.UseFont = false;
@@ -897,6 +901,8 @@ namespace AutismusKoelnBonn
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel25,
this.xrLabel26,
this.xrLabel23,
this.xrLabel24,
this.xrLabel22,
@@ -937,7 +943,7 @@ namespace AutismusKoelnBonn
this.xrLabel23.StylePriority.UseFont = false;
this.xrLabel23.StylePriority.UsePadding = false;
this.xrLabel23.StylePriority.UseTextAlignment = false;
this.xrLabel23.Text = "Kontingent";
this.xrLabel23.Text = "FLS";
this.xrLabel23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel24
@@ -956,16 +962,16 @@ namespace AutismusKoelnBonn
this.xrLabel24.StylePriority.UseFont = false;
this.xrLabel24.StylePriority.UsePadding = false;
this.xrLabel24.StylePriority.UseTextAlignment = false;
this.xrLabel24.Text = "Rechnung";
this.xrLabel24.Text = "Fehlkontkt.";
this.xrLabel24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel22
//
this.xrLabel22.Font = new System.Drawing.Font("Calibri", 9.75F);
this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(492.2778F, 20.00001F);
this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(567.2778F, 20.00001F);
this.xrLabel22.Name = "xrLabel22";
this.xrLabel22.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrLabel22.SizeF = new System.Drawing.SizeF(290.0001F, 20.00001F);
this.xrLabel22.SizeF = new System.Drawing.SizeF(215.0001F, 20.00001F);
this.xrLabel22.StylePriority.UseBackColor = false;
this.xrLabel22.StylePriority.UseBorders = false;
this.xrLabel22.StylePriority.UseFont = false;
@@ -980,7 +986,7 @@ namespace AutismusKoelnBonn
this.xrLabel20.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel20.BorderWidth = 2F;
this.xrLabel20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesUnqualified")});
this.xrLabel20.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(417.2777F, 0F);
this.xrLabel20.Name = "xrLabel20";
@@ -992,9 +998,9 @@ namespace AutismusKoelnBonn
this.xrLabel20.StylePriority.UseFont = false;
this.xrLabel20.StylePriority.UsePadding = false;
this.xrLabel20.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0}";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrLabel20.Summary = xrSummary1;
xrSummary2.FormatString = "{0:0}";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrLabel20.Summary = xrSummary2;
this.xrLabel20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel18
@@ -1362,10 +1368,10 @@ namespace AutismusKoelnBonn
// xrLabel11
//
this.xrLabel11.Font = new System.Drawing.Font("Calibri", 9.75F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(492.2778F, 0F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(567.2778F, 0F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(290.0001F, 20.00001F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(215.0001F, 20.00001F);
this.xrLabel11.StylePriority.UseBackColor = false;
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseFont = false;
@@ -1381,7 +1387,7 @@ namespace AutismusKoelnBonn
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel1.BorderWidth = 2F;
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMBillable", "{0:0.##}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified", "{0:0.##}")});
this.xrLabel1.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(342.2778F, 0F);
this.xrLabel1.Name = "xrLabel1";
@@ -1423,6 +1429,48 @@ namespace AutismusKoelnBonn
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt";
//
// xrLabel25
//
this.xrLabel25.BackColor = System.Drawing.Color.Transparent;
this.xrLabel25.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel25.BorderWidth = 2F;
this.xrLabel25.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
this.xrLabel25.LocationFloat = new DevExpress.Utils.PointFloat(492.2778F, 20.00001F);
this.xrLabel25.Name = "xrLabel25";
this.xrLabel25.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel25.SizeF = new System.Drawing.SizeF(75F, 20F);
this.xrLabel25.StylePriority.UseBackColor = false;
this.xrLabel25.StylePriority.UseBorders = false;
this.xrLabel25.StylePriority.UseBorderWidth = false;
this.xrLabel25.StylePriority.UseFont = false;
this.xrLabel25.StylePriority.UsePadding = false;
this.xrLabel25.StylePriority.UseTextAlignment = false;
this.xrLabel25.Text = "Gesamtzeit";
this.xrLabel25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel26
//
this.xrLabel26.BackColor = System.Drawing.Color.Transparent;
this.xrLabel26.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel26.BorderWidth = 2F;
this.xrLabel26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMBillable")});
this.xrLabel26.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
this.xrLabel26.LocationFloat = new DevExpress.Utils.PointFloat(492.2778F, 0F);
this.xrLabel26.Name = "xrLabel26";
this.xrLabel26.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel26.SizeF = new System.Drawing.SizeF(75F, 20F);
this.xrLabel26.StylePriority.UseBackColor = false;
this.xrLabel26.StylePriority.UseBorders = false;
this.xrLabel26.StylePriority.UseBorderWidth = false;
this.xrLabel26.StylePriority.UseFont = false;
this.xrLabel26.StylePriority.UsePadding = false;
this.xrLabel26.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0}";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrLabel26.Summary = xrSummary1;
this.xrLabel26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// Quittierungsbeleg
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1556,5 +1604,7 @@ namespace AutismusKoelnBonn
private DevExpress.XtraReports.UI.XRLabel xrLabel24;
private DevExpress.XtraReports.UI.XRLabel xrLabel22;
private DevExpress.XtraReports.UI.XRLabel xrLabel20;
private DevExpress.XtraReports.UI.XRLabel xrLabel25;
private DevExpress.XtraReports.UI.XRLabel xrLabel26;
}
}

View File

@@ -41,10 +41,12 @@ namespace AutismusKoelnBonn
{
sd.Notice5 = "E";
sd.MinutesQualified = sd.Minutes;
sd.MinutesUnqualified = 0;
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt"))
{
sd.Notice5 = "F";
sd.MinutesQualified = Math.Round(sd.Minutes * 0.8, 2);
sd.MinutesUnqualified = sd.Minutes ;
sd.MinutesQualified = 0;
}
else if (sd.IsGroup)
{

View File

@@ -375,7 +375,7 @@ namespace DomizielAnsbach
{
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
{
if (s.ServiceCategory.Contains("Ambulant Betreutes "))
if (s.ServiceCategory.Contains("Ambulant Betreutes ") || s.ServiceCategory.Contains("Indirekt"))
bewoRo.Services.Add(s);
else if (s.ServiceCategory.Contains("Zuverdienst - Arbeitszeit"))
zvRo.Services.Add(s);

View File

@@ -61,17 +61,18 @@ namespace DomizielAnsbach.Invoicing
DateTime ende = invoicePeriod.EndDate;
var cbOid = scap.CostBearer2SupportConcept.CostBearer.Oid ?? 0;
var pausch = ZuverdienstHelper.GetPauschalen(cbOid, customer, DateTime.Today);
var pausch = ZuverdienstHelper.GetPauschalen(cbOid, customer, ende);
var crList = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(scap.ServiceCategory.CostRatePeriods);
AddCostRatePeriods(crList, pausch, scap);
var mot = crList.GetCostRatePeriodForDate(BS.Shared.CostRatePeriodType.AmountOfMoney, start);
var mot = crList.GetCostRatePeriodForDate(BS.Shared.CostRatePeriodType.AmountOfMoney, start.Date);
decimal? stundensatz;
decimal? tagessatz;
decimal uCount = 0;
decimal kCount = 0;
if (scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("Zuverdienst - Arbeitszeit"))
foreach (var at in customer.AbsenceTimes)
{
if (at.AbsenceReason.BillableMinutes.HasValue && at.AbsenceReason.Description.Contains("ZV"))
@@ -199,12 +200,12 @@ namespace DomizielAnsbach.Invoicing
if (iServiceRecord.Start > start)
start = (DateTime)iServiceRecord.Start;
var pausch = ZuverdienstHelper.GetPauschalen(cbOid, c, start);
var pausch = ZuverdienstHelper.GetPauschalen(cbOid, c, start.Date);
var crList = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(scap.ServiceCategory.CostRatePeriods);
AddCostRatePeriods(crList, pausch, scap);
var mot = crList.GetCostRatePeriodForDate(BS.Shared.CostRatePeriodType.AmountOfMoney, start);
var mot = crList.GetCostRatePeriodForDate(BS.Shared.CostRatePeriodType.AmountOfMoney, start.Date);
if (iServiceRecord.ServiceDescription.Name.Contains("Pause"))
{
invoiceItem.AmountPerUnit = mot.CostRateValue;

View File

@@ -30,9 +30,9 @@ namespace DomizielAnsbach
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QuittierungsbelegAbw));
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QuittierungsbelegAbw));
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrTableServiceRecords1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -51,6 +51,14 @@ namespace DomizielAnsbach
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
@@ -71,6 +79,7 @@ namespace DomizielAnsbach
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
@@ -78,20 +87,12 @@ namespace DomizielAnsbach
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -297,6 +298,102 @@ namespace DomizielAnsbach
this.GroupHeader1.RepeatEveryPage = true;
this.GroupHeader1.StylePriority.UseFont = false;
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.GroupFooter1.HeightF = 25F;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrTable1
//
this.xrTable1.BorderColor = System.Drawing.Color.Black;
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(669.9999F, 25F);
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell8,
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell12,
this.xrTableCell14});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableRow1.Weight = 1.25D;
//
// xrTableCell8
//
this.xrTableCell8.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UsePadding = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "Summe";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell8.Weight = 0.11363635923509893D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesUnqualified")});
this.xrTableCell9.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell9.StylePriority.UseFont = false;
this.xrTableCell9.StylePriority.UsePadding = false;
this.xrTableCell9.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.##}";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell9.Summary = xrSummary1;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell9.Weight = 0.10732323140481673D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified")});
this.xrTableCell10.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UsePadding = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
xrSummary2.FormatString = "{0:0.##}";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell10.Summary = xrSummary2;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell10.Weight = 0.10732322845341978D;
//
// xrTableCell12
//
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 3, 0, 100F);
this.xrTableCell12.StylePriority.UseFont = false;
this.xrTableCell12.StylePriority.UsePadding = false;
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell12.Weight = 0.40404038746507664D;
//
// xrTableCell14
//
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 0.11363619904777417D;
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -488,20 +585,34 @@ namespace DomizielAnsbach
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPictureBox2,
this.xrLabel4,
this.xrLabel3,
this.xrLabel2,
this.xrLabel6,
this.xrLabel5});
this.ReportFooter.Font = new System.Drawing.Font("Arial", 11F);
this.ReportFooter.HeightF = 102.5832F;
this.ReportFooter.HeightF = 128.6248F;
this.ReportFooter.Name = "ReportFooter";
this.ReportFooter.StylePriority.UseFont = false;
//
// xrLabel4
//
this.xrLabel4.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(666.9999F, 51.72221F);
this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Erläuterung: Eventuelle Gruppenzeiten sind berechnet nach der Formel Gruppendauer" +
" : 3 x Anzahl\r\nder Mitarbeiter/innen";
//
// xrLabel3
//
this.xrLabel3.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(536.6738F, 84.58323F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(536.6738F, 100.6248F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(137F, 17.99997F);
@@ -512,7 +623,7 @@ namespace DomizielAnsbach
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(175F, 84.58323F);
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(175F, 100.6248F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(281.5348F, 17.99997F);
@@ -523,7 +634,7 @@ namespace DomizielAnsbach
// xrLabel6
//
this.xrLabel6.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 84.58323F);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 100.6248F);
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(121.7362F, 17.99997F);
@@ -534,7 +645,7 @@ namespace DomizielAnsbach
// xrLabel5
//
this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 74.22221F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 90.26381F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(670.0001F, 10.36106F);
@@ -559,119 +670,20 @@ namespace DomizielAnsbach
this.fieldAbrechenbareFLS.Expression = "([TotalFLMBillable] / 60) * 1.2";
this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS";
//
// xrLabel4
//
this.xrLabel4.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(666.9999F, 51.72221F);
this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Erläuterung: Eventuelle Gruppenzeiten sind berechnet nach der Formel Gruppendauer" +
" : 3 x Anzahl\r\nder Mitarbeiter/innen";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// GroupFooter1
// xrPictureBox2
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.GroupFooter1.HeightF = 25F;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrTable1
//
this.xrTable1.BorderColor = System.Drawing.Color.Black;
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(669.9999F, 25F);
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell8,
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell12,
this.xrTableCell14});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableRow1.Weight = 1.25D;
//
// xrTableCell8
//
this.xrTableCell8.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UsePadding = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "Summe";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell8.Weight = 0.11363635923509893D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesUnqualified")});
this.xrTableCell9.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell9.StylePriority.UseFont = false;
this.xrTableCell9.StylePriority.UsePadding = false;
this.xrTableCell9.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.##}";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell9.Summary = xrSummary1;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell9.Weight = 0.10732323140481673D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesQualified")});
this.xrTableCell10.Font = new System.Drawing.Font("Calibri", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 3, 0, 100F);
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UsePadding = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
xrSummary2.FormatString = "{0:0.##}";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell10.Summary = xrSummary2;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell10.Weight = 0.10732322845341978D;
//
// xrTableCell12
//
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 3, 0, 100F);
this.xrTableCell12.StylePriority.UseFont = false;
this.xrTableCell12.StylePriority.UsePadding = false;
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell12.Weight = 0.40404038746507664D;
//
// xrTableCell14
//
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 0.11363619904777417D;
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(175.0002F, 54.76379F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// QuittierungsbelegAbw
//
@@ -701,8 +713,8 @@ namespace DomizielAnsbach
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -764,5 +776,6 @@ namespace DomizielAnsbach
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
}
}

View File

@@ -76,6 +76,7 @@ namespace DomizielAnsbach
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -472,6 +473,7 @@ namespace DomizielAnsbach
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPictureBox2,
this.xrLabel3,
this.xrLabel2,
this.xrLabel6,
@@ -543,6 +545,16 @@ namespace DomizielAnsbach
this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS";
//
// xrPictureBox2
//
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(178.3263F, 16.22219F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// QuittierungsbelegPB
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -623,5 +635,6 @@ namespace DomizielAnsbach
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1;
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
}
}

View File

@@ -12,7 +12,6 @@ namespace HphBersenbrueck.Export
{
public override string CreateExportString(string pFileID, string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 0 && pHeaderCaption[0].Contains("Micos"))
{
return MicosExporter.CreateExportString(pHeaderCaption, pContent);
@@ -22,9 +21,17 @@ namespace HphBersenbrueck.Export
public override QueryDC CreateQuery(QueryDC query)
{
var q = MicosExporter.CreateQuery(query);
CreateBuchungsExportProtokollEintrag(q);
QueryDC q = null;
if (query.Oid == 3000)
{
q = MicosExporter.CreateQuery(query);
}
else
{
q = MicosExporter.CreateDifferenzQuery(query);
}
CreateBuchungsExportProtokollEintrag(q);
return q;
}
}

View File

@@ -4,6 +4,7 @@ using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared.Core;
using BS.Shared.DataContracts;
@@ -34,29 +35,70 @@ namespace HphBersenbrueck.Export
{
dtStart = new DateTime(1900, 1, 1);
}
query.QueryResult = GetAbrechnungenString(dt, dtStart, dtEnd);
query.QueryResult = GetAbrechnungenString(dt, dtStart, dtEnd, false);
return query;
}
public static QueryDC CreateDifferenzQuery(QueryDC query)
{
DateTime dt = DateTime.Now;
//DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("Micos DifferenzExport {0:yyyyMMdd}.txt", dt);
DateTime dtStart = new DateTime(1900, 1, 1);
DateTime dtEnd = DateTime.MaxValue;
var gesamtExport = GetAbrechnungenString(dt, dtStart, dtEnd, true);
var letzterExport = GetAlteExporte();
if (String.IsNullOrEmpty(letzterExport))
{
query.QueryResult = gesamtExport;
}
query.QueryResult = GetDifferenzAbrechnungenString(gesamtExport, letzterExport);
return query;
}
public static string CreateExportString(string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("Micos"))
{
DateTime dt = DateTime.Now;
DateTime.TryParse(pHeaderCaption[1], out dt);
var gesamtExport = GetAbrechnungenString(dt, dt, dt, false);
return GetAbrechnungenString(dt, dt, dt);
var letzterExport = GetAlteExporte();
if (String.IsNullOrEmpty(letzterExport))
{
return gesamtExport;
}
return GetDifferenzAbrechnungenString(gesamtExport, letzterExport);
}
return null;
}
public static String GetAbrechnungenString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
private static String GetAlteExporte()
{
var exports = DAOFactory.GenericDAO.GetAllActive<BuchungsExport>();
string alteBuchungen = "";
if (exports.Count > 0)
{
foreach (var exp in exports)
{
if (exp.Name.Contains("Micos "))
{
alteBuchungen += exp.Export;
alteBuchungen += "\n";
}
}
}
return alteBuchungen;
}
public static String GetAbrechnungenString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
{
StringBuilder sb = new StringBuilder();
var s = GetMonatlicheAbrechnungString(date, rechnungsDatumVon, rechnungsDatumBis);
var s = GetMonatlicheAbrechnungString(date, rechnungsDatumVon, rechnungsDatumBis, differenz);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
@@ -67,11 +109,9 @@ namespace HphBersenbrueck.Export
return sb.ToString();
}
public static String GetMonatlicheAbrechnungString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
public static String GetMonatlicheAbrechnungString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
{
var sql = GetRechnungenSql(date, rechnungsDatumVon, rechnungsDatumBis);
var sql = GetRechnungenSql(date, rechnungsDatumVon, rechnungsDatumBis, differenz);
/*
* SELECT
@@ -84,20 +124,15 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
*/
var dt = ExecuteQuery(sql, date);
var datensaetze = CreateMicosDatensaetze(dt, date);
StringBuilder sb = new StringBuilder();
foreach (var data in datensaetze)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
//03002022021500070EURO990037107S000001767690004050 15022200037810037200 RE R03-781 DAK-Gesundhei 00000000
sb.Append("0300");
sb.Append(String.Format("{0:yyyyMMdd}", data.Datum));
@@ -105,7 +140,6 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append("EURO99");
String debitornr = data.Debitor;
while (debitornr.Length < 7)
{
debitornr = "0" + debitornr;
@@ -122,9 +156,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append("0004040");
sb.Append(" ");
sb.Append(String.Format("{0:ddMMyy}", data.RechnungsDatum)); // Belegdatum
String belegnummer = data.Belegnummer; // Belegnummer
while (belegnummer.Length < 7)
{
belegnummer = "0" + belegnummer;
@@ -137,10 +169,8 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
kostenstelle = "0" + kostenstelle;
}
sb.Append(kostenstelle);
sb.Append(" "); // Skonto 9 Leerzeichen
sb.Append(" "); // Textschlüssel 2 Leerzeichen
sb.Append(" "); // Zusatz-Schlüssel 1 Leerzeichen oder 2 für Storno
String buchungstext = data.Buchungstext; // Verwendungszweck
@@ -173,7 +203,57 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
return sb.ToString();
}
private static string GetDifferenzAbrechnungenString(String neuerExport, String alteBuchungen)
{
List<String> neueZeilen = new List<string>();
List<String> alteExportZeilen = new List<string>();
using (StringReader reader = new StringReader(neuerExport))
{
string line;
//int index = 1;
while ((line = reader.ReadLine()) != null)
{
neueZeilen.Add(line);
}
}
using (StringReader reader = new StringReader(alteBuchungen))
{
string line;
//int index = 1;
while ((line = reader.ReadLine()) != null)
{
alteExportZeilen.Add(line);
}
}
//prüfe Unterschiede
StringBuilder sb = new StringBuilder();
List<String> unterschiedZeilen = new List<string>();
foreach (var lineNeu in neueZeilen)
{
bool istImAltenExportSchonEnthalten = alteExportZeilen.Contains(lineNeu);
if (!istImAltenExportSchonEnthalten) // falls doch benötigt siehe Kette
{
// //Prüfe ob neue Rechnung oder alte Rechnung mit neuem Betrag
// var satzNeu = MicosDatensatz.ErzeugeDatensatz(lineNeu);
// //Suche übereinstimmende Zeile aus dem alten Export um die Differenz zu berechnen
// decimal differenz = 0;
// foreach (var lineAlt in letzterExportZeilen)
// {
// }
sb.AppendLine(lineNeu);
}
}
return sb.ToString();
}
private static IList<MicosDatensatz> CreateMicosDatensaetze(DataTable dt, DateTime date)
{
var list = new List<MicosDatensatz>();
@@ -294,41 +374,9 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
}
//private static Dictionary<long, decimal> CreateDictionary(DataTable dt)
//{
// Dictionary<long, decimal> dict = new Dictionary<long, decimal>();
// if (dt != null)
// {
// foreach (DataRow row in dt.Rows)
// {
// long? oid = row.ItemArray[0] as long?;
// decimal? betrag = row.ItemArray[4] as decimal?;
// if (oid.HasValue && betrag.HasValue)
// {
// dict.Add(oid.Value, betrag.Value);
// }
// }
// }
// return dict;
//}
private static String GetRechnungenSql(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
private static String GetRechnungenSql(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
{
if (rechnungsDatumVon <= new DateTime(1900, 1, 1))
{
rechnungsDatumVon = new DateTime(date.Year, date.Month, 1);
}
if (rechnungsDatumBis.Year > 9000)
{
rechnungsDatumBis = new DateTime(date.Year, date.Month, 1).AddMonths(1);
}
else
{
rechnungsDatumBis = rechnungsDatumBis.AddDays(1);
}
String sql = @"
SELECT
@@ -352,17 +400,27 @@ INNER JOIN invoicebase ib on ib.costbearer2supportconceptoid = cb2sc.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 c.`IsActive` = 1 AND ib.isactive = 1 and ib.type <> 1
WHERE c.`IsActive` = 1 AND ib.isactive = 1 AND ib.type <> 1
AND ib.`AccountingPeriodEnd` >= ':MonatAbrechnung_Start' AND ib.`AccountingPeriodEnd` < ':MonatAbrechnung_End'
and ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End'
ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
";
sql = sql.Replace(":Monat_Start", String.Format("{0:yyyy-MM-dd}", rechnungsDatumVon));
sql = sql.Replace(":Monat_End", String.Format("{0:yyyy-MM-dd}", rechnungsDatumBis));
if (differenz)
{
sql = sql.Replace("AND ib.`AccountingPeriodEnd` >= ':MonatAbrechnung_Start' AND ib.`AccountingPeriodEnd` < ':MonatAbrechnung_End'", "");
}
else
{
sql = sql.Replace(":MonatAbrechnung_Start", String.Format("{0:yyyy-MM}-01", date));
date = date.AddMonths(1);
sql = sql.Replace(":MonatAbrechnung_End", String.Format("{0:yyyy-MM}-01", date));
}
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
{
var newsql = sql;
@@ -398,6 +456,5 @@ ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
public String Buchungstext { get; set; }
public String Artikelbezeichnung { get; set; }
}
}

View File

@@ -55,6 +55,12 @@
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -86,6 +92,9 @@
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport.resx">
<DependentUpon>SettlementReport.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -1,4 +1,4 @@
namespace HilfeDaheimHandInHand
namespace HilfeDaheimHandInHand.Alt
{
partial class Spitzabrechnung
{

View File

@@ -6,7 +6,7 @@ using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
namespace HilfeDaheimHandInHand
namespace HilfeDaheimHandInHand.Alt
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace HilfeDaheimHandInHand
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
decimal rateFactor = 1;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
//Zwischensumme.Visible = true;
//if (!ii.ItemDescription.IsNullOrEmpty())
//{
//ii.AbrechnungsText = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
//}
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
}
pRO.RateFactor = (double)rateFactor;
if (pRO.TerminationDate == null)
{
lblStammdaten.Text = lblStammdaten.Text.Remove(lblStammdaten.Text.Length - 34, 34);
}
if (pRO.Claim > 0)
lblRestforderungGutschrift.Text = "Restforderung";
else
lblRestforderungGutschrift.Text = "Gutschrift aus Überzahlung";
if (pRO.AbsenceReason1 == null)
pRO.AbsenceReason1 = "-";
if (pRO.AbsenceReason2 == null)
pRO.AbsenceReason2 = "-";
if (pRO.AbsenceReason3 == null)
pRO.AbsenceReason3 = "-";
if (pRO.AbsenceReason4 == null)
pRO.AbsenceReason4 = "-";
this.bindingSource1.DataSource = pRO;
}
//private String GetCustomerId(SettlementRO pRO)
// {
// var cb2sc = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pRO.CostBearer2SupportConceptOid);
// return cb2sc.CostBearer.ID;
// }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -376,21 +376,27 @@ namespace LebenshilfeBadKreuznach
}
}
}
}
else if (scap.StartDate <= pRO.EndDate)
if (std.BG1 == 0 && std.BG2 == 0 && std.Gruppe == 0)
{
foreach (var scap in pRO.SupportConceptCostBearer.ApprovalPeriodList)
{
var bewilligt = calc.GetApprovedHoursPerWeek(scap, pRO.SupportConceptCostBearer.CostBearer.CostRatePeriods) ?? 0;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
if (std.BG1 != 0 && scap.StartDate <= pRO.EndDate)
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
var bewilligt = calc.GetApprovedHoursPerWeek(scap, pRO.SupportConceptCostBearer.CostBearer.CostRatePeriods) ?? 0;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
}
}
}
}

View File

@@ -377,21 +377,27 @@ namespace LebenshilfeBadKreuznach
}
}
}
}
else if (scap.StartDate <= pRO.EndDate)
if (std.BG1 == 0 && std.BG2 == 0 && std.Gruppe == 0)
{
foreach (var scap in pRO.SupportConceptCostBearer.ApprovalPeriodList)
{
var bewilligt = calc.GetApprovedHoursPerWeek(scap, pRO.SupportConceptCostBearer.CostBearer.CostRatePeriods) ?? 0;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
if (std.BG1 != 0 && scap.StartDate <= pRO.EndDate)
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
var bewilligt = calc.GetApprovedHoursPerWeek(scap, pRO.SupportConceptCostBearer.CostBearer.CostRatePeriods) ?? 0;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
}
}
}
}