AkkuratDienstleistungsgesellschaft/Kassenbestand - Umstellung auf Stichtag statt Monatsende

This commit is contained in:
2025-10-22 12:57:50 +02:00
parent 8656970673
commit e95a7fa84a
3 changed files with 32 additions and 50 deletions

View File

@@ -53,10 +53,8 @@ namespace Akkurat
{
kto = new Kasse();
kto.Transaktionen = new List<BargeldtransaktionDC>();
kto.Name = String.Format("{0}", row.Field2);
kto.Name = String.Format("{0}", row.Field2);
kassen.Add(kto);
oid2Kasse.Add(oid, kto);
}
else
@@ -69,7 +67,6 @@ namespace Akkurat
if (row.Field3 != null && row.Field3.ToString() == "1")
{
dc.Zahlungstyp = Zahlungstyp.Auszahlung;
}
else
{
@@ -81,9 +78,6 @@ namespace Akkurat
Decimal.TryParse(row.Field4.ToString(), out betrag);
}
dc.Betrag = betrag;
DateTime zahlungsdatum = DateTime.MinValue;
if (row.Field5 != null)
{
@@ -91,7 +85,6 @@ namespace Akkurat
{
dc.Zahlungsdatum = zahlungsdatum;
}
}
DateTime insts = DateTime.MinValue;
if (row.Field8 != null)
@@ -103,7 +96,6 @@ namespace Akkurat
letztesDatum = insts;
}
}
}
kto.Transaktionen.Add(dc);
@@ -115,33 +107,25 @@ namespace Akkurat
decimal hauptkassegesamt = 0;
int rowIdx = 1;
QueryRO newRo = new QueryRO();
var stichtag = abfrageMonat.AddMonths(1);
var stichtag = abfrageMonat.AddDays(1).AddMilliseconds(-1);
foreach (var kto in kassen.OrderBy(k => k.Name))
{
QueryRO.Row row = new QueryRO.Row();
newRo.Rows.Add(row);
row.Field1 = String.Format("{0}", rowIdx++);
row.Field2 = kto.Name;
decimal kassenBetrag = GetGesamtBetrag(kto, stichtag);
gesamt += kassenBetrag;
row.Field3 = String.Format("{0:c}", kassenBetrag);
}
if (letztesDatum == DateTime.MinValue)
{
letztesDatum = DateTime.Now;
}
lblLetzterStand.Text = String.Format("{0:MMMM yyyy}", abfrageMonat);
lblLetzterStand.Text = String.Format("{0:dd.MM.yyyy}", abfrageMonat);
lblGesamt.Text = String.Format("{0:c}", gesamt);
this.bindingSource1.DataSource = newRo;
}
@@ -172,7 +156,5 @@ namespace Akkurat
public decimal Betrag { get; set; }
public List<BargeldtransaktionDC> Transaktionen { get; set; }
}
}
}

View File

@@ -30,6 +30,7 @@ namespace Akkurat
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable5 = new DevExpress.XtraReports.UI.XRTable();
@@ -40,7 +41,6 @@ namespace Akkurat
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -66,9 +66,10 @@ namespace Akkurat
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.lblGesamt = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -91,7 +92,8 @@ namespace Akkurat
//
this.xrTable5.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable5.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTable5.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable5.Name = "xrTable5";
this.xrTable5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -145,7 +147,7 @@ namespace Akkurat
//
// xrLabel13
//
this.xrLabel13.Font = new System.Drawing.Font("Arial", 14F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))));
this.xrLabel13.Font = new DevExpress.Drawing.DXFont("Arial", 14F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.xrLabel13.Name = "xrLabel13";
this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -167,22 +169,18 @@ namespace Akkurat
//
// GroupFooter1
//
this.GroupFooter1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.GroupFooter1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.GroupFooter1.HeightF = 0F;
this.GroupFooter1.Name = "GroupFooter1";
this.GroupFooter1.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO);
//
// xrTable3
//
this.xrTable3.BackColor = System.Drawing.Color.LightGray;
this.xrTable3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable3.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrTable3.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0.0002543131F, 0F);
this.xrTable3.Name = "xrTable3";
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -239,14 +237,13 @@ namespace Akkurat
//
// lblLetzterStand
//
this.lblLetzterStand.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.lblLetzterStand.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblLetzterStand.LocationFloat = new DevExpress.Utils.PointFloat(0.0002543131F, 32.99999F);
this.lblLetzterStand.Name = "lblLetzterStand";
this.lblLetzterStand.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblLetzterStand.SizeF = new System.Drawing.SizeF(550.0002F, 23F);
this.lblLetzterStand.StylePriority.UseFont = false;
this.lblLetzterStand.StylePriority.UseTextAlignment = false;
this.lblLetzterStand.Text = "Übersicht Treuhandkonten ABW";
this.lblLetzterStand.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// pageFooterBand1
@@ -259,25 +256,25 @@ namespace Akkurat
//
// xrPageInfo2
//
this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F);
this.xrPageInfo2.Format = "Seite {0} von {1}";
this.xrPageInfo2.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(450F, 25F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(100.0001F, 23F);
this.xrPageInfo2.StyleName = "PageInfo";
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrPageInfo2.TextFormatString = "Seite {0} von {1}";
//
// xrPageInfo1
//
this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F);
this.xrPageInfo1.Format = "Abfragedatum: {0:dddd, d. MMMM yyyy}";
this.xrPageInfo1.Font = new DevExpress.Drawing.DXFont("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(450.0002F, 23F);
this.xrPageInfo1.StyleName = "PageInfo";
this.xrPageInfo1.StylePriority.UseFont = false;
this.xrPageInfo1.TextFormatString = "Abfragedatum: {0:dddd, d. MMMM yyyy}";
//
// Title
//
@@ -285,7 +282,7 @@ namespace Akkurat
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.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F);
this.Title.ForeColor = System.Drawing.Color.Black;
this.Title.Name = "Title";
//
@@ -295,7 +292,7 @@ namespace Akkurat
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.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.FieldCaption.ForeColor = System.Drawing.Color.Black;
this.FieldCaption.Name = "FieldCaption";
//
@@ -305,7 +302,7 @@ namespace Akkurat
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.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.PageInfo.ForeColor = System.Drawing.Color.Black;
this.PageInfo.Name = "PageInfo";
//
@@ -315,7 +312,7 @@ namespace Akkurat
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.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.DataField.ForeColor = System.Drawing.SystemColors.ControlText;
this.DataField.Name = "DataField";
//
@@ -382,7 +379,7 @@ namespace Akkurat
//
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -396,7 +393,7 @@ namespace Akkurat
//
// lblGesamt
//
this.lblGesamt.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.lblGesamt.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblGesamt.LocationFloat = new DevExpress.Utils.PointFloat(450F, 0F);
this.lblGesamt.Name = "lblGesamt";
this.lblGesamt.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -408,7 +405,11 @@ namespace Akkurat
this.lblGesamt.Text = "0,00";
this.lblGesamt.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// Bargeldkassensaldo
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO);
//
// Kassenbestand
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
@@ -426,7 +427,7 @@ namespace Akkurat
this.fieldFachkraftProzent});
this.DataSource = this.bindingSource1;
this.DisplayName = "Bargeldkassensaldo";
this.Margins = new System.Drawing.Printing.Margins(100, 100, 100, 50);
this.Margins = new DevExpress.Drawing.DXMargins(100F, 100F, 100F, 50F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
@@ -435,10 +436,12 @@ namespace Akkurat
this.FieldCaption,
this.PageInfo,
this.DataField});
this.Version = "13.2";
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}

View File

@@ -117,7 +117,4 @@
<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>