AWOMuensterlandRecklinghausen großes Finish

This commit is contained in:
2023-09-20 17:52:19 +02:00
parent dffa833006
commit ecaf5b17eb
12 changed files with 974 additions and 92 deletions

View File

@@ -56,11 +56,17 @@
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\DiamantExporter.cs" />
<Compile Include="Finanzauswertung.cs">
<Compile Include="StatusCheckAbrechnung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Finanzauswertung.designer.cs">
<DependentUpon>Finanzauswertung.cs</DependentUpon>
<Compile Include="StatusCheckAbrechnung.designer.cs">
<DependentUpon>StatusCheckAbrechnung.cs</DependentUpon>
</Compile>
<Compile Include="Finanzplanung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Finanzplanung.designer.cs">
<DependentUpon>Finanzplanung.cs</DependentUpon>
</Compile>
<Compile Include="FKPlanung.cs">
<SubType>Component</SubType>
@@ -164,8 +170,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Finanzauswertung.resx">
<DependentUpon>Finanzauswertung.cs</DependentUpon>
<EmbeddedResource Include="StatusCheckAbrechnung.resx">
<DependentUpon>StatusCheckAbrechnung.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Finanzplanung.resx">
<DependentUpon>Finanzplanung.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FKPlanung.resx">

View File

@@ -185,7 +185,21 @@ namespace AWOMuensterlandRecklinghausen
duration = item.RoundedDuration;
}
var d1 = item.Start.Value;
if (item.ServiceDescription != null && (item.ServiceDescription.Name.Contains("UT") || item.ServiceDescription.Name.Contains("Unterrichtsfrei")))
{
if (emp.Custom6 > 360)
{
emp.Custom6 = emp.Custom6 + 30;
}
duration = emp.Custom6;
}
if (!item.Notice.IsNullOrEmpty() && item.Notice.StartsWith("KF-Pauschale"))
{
duration = 645;
}
var d1 = item.Start.Value;
//if (item.Start.Value > new DateTime(2023, 05, 19))
//{
// string test = "jep";
@@ -303,6 +317,7 @@ namespace AWOMuensterlandRecklinghausen
{
if (c.WeeklyTotalHours.HasValue)
{
empDetail.Custom6 = c.WeeklyTotalHours.Value;
if (c.EmploymentType != null && c.EmploymentType.Name.StartsWith("MA mit"))
{
weeklyTotalHours = c.WeeklyTotalHours.Value + (c.WeeklyTotalHours.Value * 0.17m);
@@ -318,11 +333,13 @@ namespace AWOMuensterlandRecklinghausen
empDetail.ArbeitstageProWoche = c.WeeklyDays.Value;
}
empDetail.WeeklyFLS = c.WeeklyFLS;
empDetail.HourlyRate = c.HourlyRate;
empDetail.EmploymentType = c.EmploymentType;
}
empDetail.SollProTag = (weeklyTotalHours / empDetail.ArbeitstageProWoche);
empDetail.Custom6 = empDetail.Custom6 * 60 / empDetail.ArbeitstageProWoche; // echte Sollzeit auch für MA-Mit Ferienausgleich
empDetail.SollProTag = weeklyTotalHours / empDetail.ArbeitstageProWoche;
empDetail.SollProWoche = weeklyTotalHours; //BerechneSollProWoche(c, empDetail);
HandleServiceRecords(empDetail, groupFilteredRecords, c);
@@ -467,17 +484,10 @@ namespace AWOMuensterlandRecklinghausen
tageUrlaubGesamt += ath2.StundenUrlaub / empDetail.SollProTag;
}
}
}
tatSollStdGesamt += tatSollStdImVertragsUndBerichtzeitraum;
flsSollGesamt += BerechneFlsSoll(emp, c, berichtsAnfang, berichtsEnde, tatSollStdImVertragsUndBerichtzeitraum, stundenSollProMonat);
berichtsAnfang = berichtsEnde;
berichtsEnde = monatsEnde;
c = GetNextValidContractForDate(berichtsAnfang, emp);
@@ -509,13 +519,8 @@ namespace AWOMuensterlandRecklinghausen
empDetail.TageUrlaub = tageUrlaubGesamt;
empDetail.TageKrankheit = tageKrankheitGesamt;
empDetail.UrlaubUndKrankheit = abwesenheitTageGesamt;
empDetail.StundenSollOhneUrlaubKrankheit = tatSollStdGesamt;
empDetail.FlsSoll = flsSollGesamt;
empDetail.MittelbarIst = summaryTotal.IstNichtAbrechenbar;
empDetail.Bu = bu;
empDetail.FlsIst = summaryTotal.IstAbrechenbar;

View File

@@ -168,6 +168,12 @@ namespace AWOMuensterlandRecklinghausen
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
{
if (queryOid == 120)
return CreateFinanzplanung(queryOid, queryReportId);
if (queryOid == 199)
return CreateStatusCheck(queryOid, queryReportId);
if (queryOid == 1001)
return CreateValidationMessageReport(queryOid, queryReportId);
@@ -199,7 +205,59 @@ namespace AWOMuensterlandRecklinghausen
return new XtraReport();
}
private XtraReport CreateFinanzplanung(long queryOid, string queryReportId)
{
var query = DAOFactory.GenericDAO.LoadByID<Query>(queryOid);
if (query == null)
return new XtraReport();
var path = Path.Combine(TempPath, queryReportId + ".xml");
var table = Utils.XMLDeserialize<DataTable>(path);
var qro = QueryRO.Create(query, table);
if (qro.Rows.Count > 0)
{
DateTime monat = DateTime.Parse(qro.Rows[0].Field1.ToString());
DateTime start = new DateTime(monat.Year, 9, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
var ro = FinanceRO.Create(start, end);
var druck = new Finanzplanung();
druck.SetReportDataSource(ro);
return druck;
}
return new XtraReport();
}
private XtraReport CreateStatusCheck(long queryOid, string queryReportId)
{
var query = DAOFactory.GenericDAO.LoadByID<Query>(queryOid);
if (query == null)
return new XtraReport();
var path = Path.Combine(TempPath, queryReportId + ".xml");
var table = Utils.XMLDeserialize<DataTable>(path);
var qro = QueryRO.Create(query, table);
if (qro.Rows.Count > 0)
{
DateTime monat = DateTime.Parse(qro.Rows[0].Field1.ToString());
DateTime start = new DateTime(monat.Year, monat.Month, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
var ro = FinanceRO.Create(start, end);
var druck = new Statuscheck();
druck.SetReportDataSource(ro);
return druck;
}
return new XtraReport();
}
//public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
//{

View File

@@ -59,10 +59,11 @@ namespace AWOMuensterlandRecklinghausen.Export
StringBuilder sb = new StringBuilder();
List<DataRow> mergedRows = new List<DataRow>();
Dictionary<long, DataRow> oid2Row = new Dictionary<long, DataRow>();
Dictionary<string, DataRow> oid2Row = new Dictionary<string, DataRow>();
foreach (DataRow row in dt.Rows)
{
long oid = (long)row[0];
string oid = row[0].ToString();
bool storno = false;
if (!oid2Row.ContainsKey(oid))
{
@@ -81,10 +82,20 @@ namespace AWOMuensterlandRecklinghausen.Export
decimal betrag = ErzeugeBetrag(item);
if (betrag != 0)
{
if (betrag < 0)
{
storno = true;
}
sb.Append(String.Format("{0:0.##}", betrag).Replace(",", "."));
sb.Append(";");
}
}
else if (i == 16 && storno)
{
sb.Append("Storno ");
sb.Append(item);
sb.Append(";");
}
else if (i == stopIdx)
{
sb.Append(item);
@@ -173,7 +184,7 @@ namespace AWOMuensterlandRecklinghausen.Export
String sql = @"
SELECT
cb2sc.Oid,
CONCAT(cb2sc.Oid, ib.InvoiceNumber, Round(sip.Claim, 0)) AS OID,
'F',
'0',
'124',

View File

@@ -8,9 +8,9 @@ using BS.Shared;
namespace AWOMuensterlandRecklinghausen
{
public partial class Finanzauswertung : DevExpress.XtraReports.UI.XtraReport // , IBeWoReport<FinanceRO>
public partial class Finanzplanung : DevExpress.XtraReports.UI.XtraReport
{
public Finanzauswertung()
public Finanzplanung()
{
InitializeComponent();
}

View File

@@ -1,7 +1,7 @@
using BeWo.Report.ReportObjects;
namespace AWOMuensterlandRecklinghausen
{
partial class Finanzauswertung
partial class Finanzplanung
{
/// <summary>
/// Required designer variable.
@@ -31,14 +31,17 @@ namespace AWOMuensterlandRecklinghausen
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblTitel = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
@@ -50,12 +53,16 @@ namespace AWOMuensterlandRecklinghausen
this.cellGeleistetImZeitraumHeader = new DevExpress.XtraReports.UI.XRTableCell();
this.cellRateFactorHeader = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand();
@@ -69,9 +76,7 @@ namespace AWOMuensterlandRecklinghausen
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.fieldBillableAmountYear = new DevExpress.XtraReports.UI.CalculatedField();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
@@ -105,7 +110,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(817.7084F, 25F);
this.xrTable2.SizeF = new System.Drawing.SizeF(942.9167F, 25F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
@@ -119,7 +124,8 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell7,
this.xrTableCell3,
this.xrTableCell29,
this.xrTableCell26});
this.xrTableCell26,
this.xrTableCell9});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 1D;
//
@@ -140,13 +146,23 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell7.Weight = 0.79763655127335309D;
//
// xrTableCell3
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.CustomerName")});
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.Weight = 0.79763654045261245D;
//
// xrTableCell29
//
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom3", "{0:0.00}")});
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.StylePriority.UseTextAlignment = false;
this.xrTableCell29.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell29.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell29.Weight = 0.37389115840758363D;
//
// xrTableCell26
@@ -158,13 +174,22 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell26.Weight = 0.55483772008254539D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.fieldBillableAmountYear", "{0:c}")});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell9.Weight = 0.55483772008254539D;
//
// lblTitel
//
this.lblTitel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
this.lblTitel.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.lblTitel.Name = "lblTitel";
this.lblTitel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblTitel.SizeF = new System.Drawing.SizeF(1030F, 23F);
this.lblTitel.SizeF = new System.Drawing.SizeF(248.1252F, 23F);
this.lblTitel.StylePriority.UseFont = false;
this.lblTitel.Text = "Wirtschaftsplan";
//
@@ -206,7 +231,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(817.7084F, 50F);
this.xrTable1.SizeF = new System.Drawing.SizeF(942.9167F, 50F);
this.xrTable1.StylePriority.UseBorders = false;
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.StylePriority.UsePadding = false;
@@ -220,7 +245,8 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell2,
this.cellGeleistetImZeitraumHeader,
this.cellRateFactorHeader,
this.xrTableCell25});
this.xrTableCell25,
this.xrTableCell8});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1.3953493323567705D;
//
@@ -262,6 +288,14 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell25.Weight = 0.5548377192100773D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "Erlöse Prognose Jahr";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.5548377192100773D;
//
// GroupFooter2
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -281,7 +315,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow3});
this.xrTable3.SizeF = new System.Drawing.SizeF(817.7083F, 25F);
this.xrTable3.SizeF = new System.Drawing.SizeF(942.9166F, 25F);
this.xrTable3.StylePriority.UseBorders = false;
this.xrTable3.StylePriority.UseFont = false;
this.xrTable3.StylePriority.UsePadding = false;
@@ -295,7 +329,8 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell16,
this.xrTableCell4,
this.xrTableCell5,
this.xrTableCell27});
this.xrTableCell27,
this.xrTableCell10});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 1D;
//
@@ -314,6 +349,20 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell16.Weight = 0.79763656271187944D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell4.Weight = 0.79763690650198149D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell5.Weight = 0.37389109139763022D;
//
// xrTableCell27
//
this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -326,6 +375,18 @@ namespace AWOMuensterlandRecklinghausen
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell27.Weight = 0.554837159761131D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.fieldBillableAmountYear")});
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.StylePriority.UseTextAlignment = false;
xrSummary2.FormatString = "{0:c}";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell10.Summary = xrSummary2;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell10.Weight = 0.554837159761131D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FinanceRO);
@@ -349,9 +410,9 @@ namespace AWOMuensterlandRecklinghausen
//
this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F);
this.xrPageInfo2.Format = "Seite {0} von {1}";
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(677.7084F, 25F);
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(817.7084F, 25F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(140F, 23F);
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(125.2083F, 23F);
this.xrPageInfo2.StyleName = "PageInfo";
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
@@ -362,7 +423,7 @@ namespace AWOMuensterlandRecklinghausen
this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F);
this.xrPageInfo1.Name = "xrPageInfo1";
this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime;
this.xrPageInfo1.SizeF = new System.Drawing.SizeF(270.0002F, 23F);
this.xrPageInfo1.SizeF = new System.Drawing.SizeF(248.1252F, 23F);
this.xrPageInfo1.StyleName = "PageInfo";
this.xrPageInfo1.StylePriority.UseFont = false;
//
@@ -431,31 +492,13 @@ namespace AWOMuensterlandRecklinghausen
this.ReportFooter.Name = "ReportFooter";
this.ReportFooter.StylePriority.UseFont = false;
//
// xrTableCell3
// fieldBillableAmountYear
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.CustomerName")});
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell3.Weight = 0.79763654045261245D;
this.fieldBillableAmountYear.DataMember = "SupportConceptFinanceList";
this.fieldBillableAmountYear.Expression = "[BillableAmountInReportTimeSpan]*12";
this.fieldBillableAmountYear.Name = "fieldBillableAmountYear";
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell4.Weight = 0.79763690650198149D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell5.Weight = 0.37389109139763022D;
//
// Finanzauswertung
// Finanzplanung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
@@ -465,6 +508,8 @@ namespace AWOMuensterlandRecklinghausen
this.topMarginBand1,
this.bottomMarginBand1,
this.ReportFooter});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldBillableAmountYear});
this.DataSource = this.bindingSource1;
this.Landscape = true;
this.Margins = new System.Drawing.Printing.Margins(45, 40, 50, 30);
@@ -528,5 +573,9 @@ namespace AWOMuensterlandRecklinghausen
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.CalculatedField fieldBillableAmountYear;
}
}

View File

@@ -52,13 +52,21 @@ namespace AWOMuensterlandRecklinghausen.Invoicing
else
{
var emp = DAOFactory.GenericDAO.GetByID<Employee>(empOid);
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";
}
ccEmp = emp.TaxNumber.Substring(3, 3);
emp2Value.Add(empOid, ccEmp);
if (emp == null)
{
ccEmp = "312510".Substring(3, 3);
emp2Value.Add(0, ccEmp);
}
else
{
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";
}
ccEmp = emp.TaxNumber.Substring(3, 3);
emp2Value.Add(empOid, ccEmp);
}
}
}
//Sonderfälle -> wenn MA mit anderer Quali vertritt, teilweise weiter Ursprungskostenstelle:
@@ -166,6 +174,11 @@ namespace AWOMuensterlandRecklinghausen.Invoicing
item.UnitCount -= (decimal)0.5;
//hours = item.UnitCount ?? 0;
}
if (item.ServiceRecord.Notice != null && item.ServiceRecord.Notice.StartsWith("KF-Pauschale"))
{
item.UnitCount = 10;
item.ItemDescription = "Klassenfahrt-Pauschale";
}
item.UnitCount = Math.Round(item.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero);
hours = item.UnitCount ?? 0;
hourlyRate = item.AmountPerUnit ?? 0;

View File

@@ -0,0 +1,77 @@
using System;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared;
using BS.Shared.Core;
namespace AWOMuensterlandRecklinghausen
{
public partial class Statuscheck : DevExpress.XtraReports.UI.XtraReport
{
public Statuscheck()
{
InitializeComponent();
}
public void SetReportDataSource(FinanceRO pRO)
{
DateTime start = pRO.ReportStartDate.Value;
DateTime end = pRO.ReportEndDate.Value;
DateTimeSpan lastMonth = new DateTimeSpan();
lastMonth.StartDateTime = start;
lastMonth.EndDateTime = end.AddDays(1).AddTicks(-1);
if (pRO.SupportConceptFinanceList != null)
{
foreach (var scRo in pRO.SupportConceptFinanceList)
{
scRo.Custom1 = GetTeam(scRo);
// Customer c = DAOFactory.GenericDAO.LoadByID<Customer>(scro.Costbearer2Supportconcept.SupportConcept.Customer.CustomerOid);
var serviceRecordOids = scRo.ServiceRecords.Select(s => (long)s.ServiceRecordOid).ToList();
var customerSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(serviceRecordOids, SignatureType.Customer);
if (!(customerSignature?.SignatureImage is null))
{
//var CustomerSignatureDate = customerSignature.InsTs;
scRo.Custom2 = "x";
}
var invoices = DAOFactory.SearchDAO.GetServiceInvoices(scRo.Costbearer2Supportconcept.CostBearer2SupportConceptOid.Value, lastMonth);
var count = 0;
foreach (var ii in invoices)
{
if (ii.IsActive.Equals(ActivationTypeId.Active))
{
count += 1;
if (count == 1)
{
scRo.Custom3 = String.Format("{0:dd.MM.yyyy}", ii.InvoiceBase.InvoiceDate);
}
if (count > 1)
{
scRo.Custom3 += String.Format(", {0:dd.MM.yyyy}", ii.InvoiceBase.InvoiceDate);
}
}
}
}
}
this.bindingSource1.DataSource = pRO;
}
private string GetTeam(FinanceRO.SupportConceptFinanceRO scRo)
{
string team = " ";
Customer c = DAOFactory.GenericDAO.LoadByID<Customer>(scRo.Costbearer2Supportconcept.SupportConcept.Customer.Oid ?? 0);
if (c.Team2CustomerList.Count > 0)
{
team = c.Team2CustomerList[0].Team.Name;
}
return team;
}
}
}

View File

@@ -0,0 +1,475 @@
using BeWo.Report.ReportObjects;
namespace AWOMuensterlandRecklinghausen
{
partial class Statuscheck
{
/// <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.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblTitel = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellGeleistetImZeitraumHeader = new DevExpress.XtraReports.UI.XRTableCell();
this.cellRateFactorHeader = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand();
this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo();
this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo();
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.fieldBillableAmountYear = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.Expanded = false;
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.xrTable2});
this.Detail1.Font = new System.Drawing.Font("Arial", 9F);
this.Detail1.HeightF = 25F;
this.Detail1.KeepTogetherWithDetailReports = true;
this.Detail1.Name = "Detail1";
this.Detail1.StylePriority.UseFont = false;
//
// xrTable2
//
this.xrTable2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(1084F, 25F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
this.xrTable2.StylePriority.UseTextAlignment = false;
this.xrTable2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell6,
this.xrTableCell7,
this.xrTableCell3,
this.xrTableCell29,
this.xrTableCell26,
this.xrTableCell9});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 1D;
//
// xrTableCell6
//
this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.CustomerName")});
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.88626284710752745D;
//
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.CostBearerName")});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell7.Weight = 0.88626283840426057D;
//
// xrTableCell3
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom1")});
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.Weight = 0.8862628613917658D;
//
// xrTableCell29
//
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom2", "{0:0.00}")});
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.StylePriority.UseTextAlignment = false;
this.xrTableCell29.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell29.Weight = 0.44313142566772529D;
//
// xrTableCell26
//
this.xrTableCell26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.Custom3", "{0:c}")});
this.xrTableCell26.Name = "xrTableCell26";
this.xrTableCell26.StylePriority.UseTextAlignment = false;
this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell26.Weight = 0.44313115228486588D;
//
// xrTableCell9
//
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell9.Weight = 1.2584958013667649D;
//
// lblTitel
//
this.lblTitel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
this.lblTitel.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.lblTitel.Name = "lblTitel";
this.lblTitel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblTitel.SizeF = new System.Drawing.SizeF(200F, 23F);
this.lblTitel.StylePriority.UseFont = false;
this.lblTitel.Text = "Status Abrechnung";
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail1,
this.GroupHeader2});
this.DetailReport.DataMember = "SupportConceptFinanceList";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Level = 0;
this.DetailReport.Name = "DetailReport";
//
// GroupHeader2
//
this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.GroupHeader2.HeightF = 50F;
this.GroupHeader2.Name = "GroupHeader2";
this.GroupHeader2.RepeatEveryPage = true;
//
// xrTable1
//
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(1084F, 50F);
this.xrTable1.StylePriority.UseBorders = false;
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.StylePriority.UsePadding = false;
this.xrTable1.StylePriority.UseTextAlignment = false;
this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1,
this.xrTableCell2,
this.cellGeleistetImZeitraumHeader,
this.cellRateFactorHeader,
this.xrTableCell25,
this.xrTableCell8});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1.3953493323567705D;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Klient, Vorname";
this.xrTableCell1.Weight = 0.8862628989566943D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "Kostenträger";
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell2.Weight = 0.88626292606899781D;
//
// cellGeleistetImZeitraumHeader
//
this.cellGeleistetImZeitraumHeader.Name = "cellGeleistetImZeitraumHeader";
this.cellGeleistetImZeitraumHeader.StylePriority.UseTextAlignment = false;
this.cellGeleistetImZeitraumHeader.Text = "Team";
this.cellGeleistetImZeitraumHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.cellGeleistetImZeitraumHeader.Weight = 0.88626290163437182D;
//
// cellRateFactorHeader
//
this.cellRateFactorHeader.Name = "cellRateFactorHeader";
this.cellRateFactorHeader.StylePriority.UseTextAlignment = false;
this.cellRateFactorHeader.Text = "Gültige Unterschrift";
this.cellRateFactorHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.cellRateFactorHeader.Weight = 0.44313145800725584D;
//
// xrTableCell25
//
this.xrTableCell25.Name = "xrTableCell25";
this.xrTableCell25.StylePriority.UseTextAlignment = false;
this.xrTableCell25.Text = "Rechnung Ausdruck";
this.xrTableCell25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell25.Weight = 0.44313145010736071D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "Bemerkung";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 1.2584944495007986D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FinanceRO);
//
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel2,
this.xrLabel1,
this.lblTitel});
this.ReportHeader.HeightF = 52.08333F;
this.ReportHeader.Name = "ReportHeader";
//
// pageFooterBand1
//
this.pageFooterBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPageInfo2,
this.xrPageInfo1});
this.pageFooterBand1.HeightF = 48.00002F;
this.pageFooterBand1.Name = "pageFooterBand1";
//
// xrPageInfo2
//
this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F);
this.xrPageInfo2.Format = "Seite {0} von {1}";
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(799.9999F, 25F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(284.0002F, 23F);
this.xrPageInfo2.StyleName = "PageInfo";
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrPageInfo1
//
this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F);
this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F);
this.xrPageInfo1.Name = "xrPageInfo1";
this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime;
this.xrPageInfo1.SizeF = new System.Drawing.SizeF(270.0002F, 23F);
this.xrPageInfo1.StyleName = "PageInfo";
this.xrPageInfo1.StylePriority.UseFont = false;
//
// 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.DataSource = this.bindingSource1;
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 = 30F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// fieldBillableAmountYear
//
this.fieldBillableAmountYear.DataMember = "SupportConceptFinanceList";
this.fieldBillableAmountYear.Expression = "[BillableAmountInReportTimeSpan]*12";
this.fieldBillableAmountYear.Name = "fieldBillableAmountYear";
//
// xrLabel1
//
this.xrLabel1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(200F, 10.00001F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(200F, 23F);
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.StylePriority.UseTextAlignment = false;
this.xrLabel1.Text = "Abrechnungszeitraum:";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(400F, 10.00001F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(200F, 23F);
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "[ReportStartDate!dd.MM.yyyy] - [ReportEndDate!dd.MM.yyyy]";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// Statuscheck
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.DetailReport,
this.ReportHeader,
this.pageFooterBand1,
this.topMarginBand1,
this.bottomMarginBand1});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldBillableAmountYear});
this.DataSource = this.bindingSource1;
this.Landscape = true;
this.Margins = new System.Drawing.Printing.Margins(45, 40, 50, 30);
this.PageHeight = 827;
this.PageWidth = 1169;
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.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).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.PageFooterBand pageFooterBand1;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1;
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.CalculatedField fieldFLS;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.XRLabel lblTitel;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2;
private DevExpress.XtraReports.UI.XRTableCell cellGeleistetImZeitraumHeader;
private DevExpress.XtraReports.UI.XRTableCell cellRateFactorHeader;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell25;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell26;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell29;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.CalculatedField fieldBillableAmountYear;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
}
}

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

@@ -10,34 +10,95 @@ namespace AWOMuensterlandRecklinghausen.Validation
{
public class CustomServiceRecordValidator : ServiceRecordValidator
{
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics,
int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
{
var list = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
var vs = PluginLoader.FindClass<VacationService>();
var ferien = vs.GetFerien(newServiceRecord.Start.Value, "nrw");
if (ferien != null)
{
var e = DAOFactory.GenericDAO.LoadByID<Employee>(newServiceRecord.Employee.EmployeeOid);
var c = e.GetValidContractForDate(newServiceRecord.Start.Value);
if (c != null && c.EmploymentType != null)
{
if (c.EmploymentType.Name.StartsWith("MA mit"))
{
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics,
int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
{
var list = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
var e = DAOFactory.GenericDAO.LoadByID<Employee>(newServiceRecord.Employee.EmployeeOid);
var c = e.GetValidContractForDate(newServiceRecord.Start.Value);
var vs = PluginLoader.FindClass<VacationService>();
// Check für MA mit ob Eintrag in den Ferien liegt
var ferien = vs.GetFerien(newServiceRecord.Start.Value, "nrw");
if (ferien != null)
{
if (c != null && c.EmploymentType != null)
{
if (c.EmploymentType.Name.StartsWith("MA mit"))
{
String handlungsOption = "Möchten Sie trotzdem Speichern?";
bool hatDasRechtTrotzdemZuSpeichern = true;
list.Add(new ServiceRecordValidationResultDC
{
ResultType = ServiceRecordValidationResult.Custom,
Message = "Achtung dieser Zeiterfassungseintrag liegt in den Schulferien und damit außerhalb Ihrer Arbeitszeit.\n" + handlungsOption,
Allow = hatDasRechtTrotzdemZuSpeichern
{
ResultType = ServiceRecordValidationResult.Custom,
Message = "Achtung dieser Zeiterfassungseintrag liegt in den Schulferien und damit außerhalb Ihrer Arbeitszeit.\n" + handlungsOption,
Allow = hatDasRechtTrotzdemZuSpeichern
});
}
}
}
return list;
}
}
}
}
//Check ob MonatsMax erreicht ist, da Übertragbarkeit nur innerhalb des Monats ok
SupportConceptPeriodStatisticsDC periodStat = GetStatisticsForServiceRecord(statistics, newServiceRecord);
if (periodStat != null)
{
if (periodStat.SupportConceptApprovalPeriod != null && periodStat.SupportConceptApprovalPeriod.IsApprovedBEShifting)
{
DateTime start = new DateTime(newServiceRecord.Start.Value.Year, newServiceRecord.Start.Value.Month, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
TimeSpan ts = end.Subtract(start);
int arbeitstageProWoche = 5;
var maxDays = (decimal)ts.TotalDays;
while (start < end)
{
var ferientag = vs.GetFerien(start, "nrw");
if (c != null && c.WeeklyDays.HasValue && c.WeeklyDays > 0)
{
arbeitstageProWoche = c.WeeklyDays.Value;
}
if (arbeitstageProWoche <= 5 && (start.DayOfWeek == DayOfWeek.Saturday || start.DayOfWeek == DayOfWeek.Sunday))
{
maxDays -= 1;
}
else
{
if (ferientag != null)
{
maxDays -= 1;
}
else
{
maxDays -= vs.GetFeiertagsFaktor(start);
}
}
start = start.AddDays(1);
}
decimal flsTotalForPeriod = Math.Round(periodStat.MinutesProvidedThisMonth / 60, 2, MidpointRounding.AwayFromZero);
if (periodStat.SupportConceptApprovalPeriod.ApprovedBEInterval.HasValue && periodStat.SupportConceptApprovalPeriod.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly
&& periodStat.SupportConceptApprovalPeriod.ApprovedBEPerInterval.HasValue)
{
decimal newtotalfls = newServiceRecord.RoundedDuration / 60 + flsTotalForPeriod;
decimal maxAllowed = periodStat.SupportConceptApprovalPeriod.ApprovedBEPerInterval.Value / arbeitstageProWoche * maxDays;
if (maxAllowed > 0 && newtotalfls > maxAllowed)
{
String handlungsOption = "Möchten Sie trotzdem Speichern?";
bool hatDasRechtTrotzdemZuSpeichern = true;
list.Add(new ServiceRecordValidationResultDC
{
ResultType = ServiceRecordValidationResult.Custom,
Message = "Achtung dieser Zeiterfassungseintrag überschreitet das monatliche Maximum der bewilligten Stunden.\n" + handlungsOption,
Allow = hatDasRechtTrotzdemZuSpeichern
});
}
}
}
}
return list;
}
}
}