BellaDonna/Export/SimbaExporter - mit Rechnungsbelegen

This commit is contained in:
2025-04-14 16:25:44 +02:00
parent ae32db7b1b
commit f98e42c7bc
6 changed files with 99 additions and 20 deletions

View File

@@ -64,6 +64,8 @@
<Compile Include="AnzahlUrlaubstage.Designer.cs">
<DependentUpon>AnzahlUrlaubstage.cs</DependentUpon>
</Compile>
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\SimbaExporter.cs" />
<Compile Include="Finanzauswertung.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using Utils = BS.Shared.Core.Utils;
namespace BellaDonna.Export
{
public class CustomDataExporter : DataExporter
{
public override QueryDC CreateQuery(QueryDC query)
{
QueryDC q = null;
if (query.Oid == 100)
{
q = FibuExport.CreateQuery(query);
}
CreateBuchungsExportProtokollEintrag(q);
return q;
}
public override string CreateExportString(string pFileID, string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 0 && pHeaderCaption[0].Contains("Buchhaltungsexport"))
{
//return FibuExport.CreateExportString(pHeaderCaption, pContent);
}
return base.CreateExportString(pFileID, pHeaderCaption, pContent);
}
}
}

View File

@@ -54,6 +54,7 @@ namespace BellaDonna
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.lblRechnungnr = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -103,6 +104,7 @@ namespace BellaDonna
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblRechnungnr,
this.lblGP,
this.xrLabel5,
this.xrRichText1,
@@ -131,9 +133,9 @@ namespace BellaDonna
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 259.3611F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(437.9164F, 23F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(99.37471F, 23F);
this.xrLabel5.StylePriority.UseTextAlignment = false;
this.xrLabel5.Text = "Rechnungnr.: [InvoiceNumber]";
this.xrLabel5.Text = "Rechnungnr.:";
//
// xrRichText1
//
@@ -281,6 +283,15 @@ namespace BellaDonna
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// lblRechnungnr
//
this.lblRechnungnr.LocationFloat = new DevExpress.Utils.PointFloat(100F, 259.3611F);
this.lblRechnungnr.Name = "lblRechnungnr";
this.lblRechnungnr.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblRechnungnr.SizeF = new System.Drawing.SizeF(437.9164F, 23F);
this.lblRechnungnr.StylePriority.UseTextAlignment = false;
this.lblRechnungnr.Text = "[InvoiceNumber]";
//
// Rechnung67
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -301,6 +312,7 @@ namespace BellaDonna
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.Version = "23.2";
this.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.ChangeName);
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
@@ -333,5 +345,6 @@ namespace BellaDonna
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel lblGP;
private DevExpress.XtraReports.UI.XRLabel lblRechnungnr;
}
}

View File

@@ -43,6 +43,7 @@ namespace BellaDonna
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
lblRechnungnr.Text = pRO.InvoiceNumber;
String text = "";
if (start.Month == end.Month && start.Year == end.Year)
@@ -57,5 +58,10 @@ namespace BellaDonna
this.bindingSource1.DataSource = pRO;
}
private void ChangeName(object sender, System.ComponentModel.CancelEventArgs e)
{
PrintingSystem.Document.Name = String.Format("Rechnung {0}", lblRechnungnr.Text);
}
}
}

View File

@@ -42,7 +42,6 @@ namespace BellaDonna
this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.lblBetreff = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAbrechnungszeitraum = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
@@ -55,6 +54,8 @@ namespace BellaDonna
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.lblRechnungnr = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -104,11 +105,12 @@ namespace BellaDonna
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblRechnungnr,
this.xrLabel5,
this.lblGP,
this.xrRichText1,
this.lblAdresse,
this.lblBetreff,
this.xrLabel2,
this.xrLabel8,
this.lblAbrechnungszeitraum});
this.Page1.HeightF = 504.0834F;
@@ -158,21 +160,6 @@ namespace BellaDonna
this.lblBetreff.StylePriority.UseFont = false;
this.lblBetreff.Text = "##### [CustomerSalutation] [CustomerName], geb. [CustomerBirthdate!dd.MM.yyyy]\r\nA" +
"ktenzeichen: [CustomerReferenceNumber]";
//
// xrLabel2
//
this.xrLabel2.BackColor = System.Drawing.Color.Transparent;
this.xrLabel2.CanShrink = true;
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(1.059638E-05F, 332.2222F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.Text = "Rechnung Nr.: [InvoiceNumber]";
this.xrLabel2.WordWrap = false;
//
// xrLabel8
//
@@ -284,6 +271,30 @@ namespace BellaDonna
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// lblRechnungnr
//
this.lblRechnungnr.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblRechnungnr.LocationFloat = new DevExpress.Utils.PointFloat(113.5417F, 332.2222F);
this.lblRechnungnr.Name = "lblRechnungnr";
this.lblRechnungnr.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblRechnungnr.SizeF = new System.Drawing.SizeF(424.3747F, 23F);
this.lblRechnungnr.StylePriority.UseFont = false;
this.lblRechnungnr.StylePriority.UseTextAlignment = false;
this.lblRechnungnr.Text = "[InvoiceNumber]";
//
// xrLabel5
//
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 332.2222F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(113.5417F, 23F);
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
this.xrLabel5.Text = "Rechnung Nr.:";
//
// RechnungFlex
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -306,6 +317,7 @@ namespace BellaDonna
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
this.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.ChangeName);
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
@@ -322,7 +334,6 @@ namespace BellaDonna
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupHeaderBand Page1;
private DevExpress.XtraReports.UI.XRLabel lblBetreff;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRLabel lblAbrechnungszeitraum;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
@@ -338,5 +349,7 @@ namespace BellaDonna
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
private DevExpress.XtraReports.UI.XRLabel lblGP;
private DevExpress.XtraReports.UI.XRLabel lblRechnungnr;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
}
}

View File

@@ -21,6 +21,7 @@ namespace BellaDonna
SetzeAdresse(pRO);
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
lblRechnungnr.Text = pRO.InvoiceNumber;
String text = "";
if (start.Month == end.Month && start.Year == end.Year)
@@ -140,5 +141,15 @@ namespace BellaDonna
lblAdresse.Text = sb.ToString();
}
public static implicit operator RechnungFlex(Rechnung67 v)
{
throw new NotImplementedException();
}
private void ChangeName(object sender, System.ComponentModel.CancelEventArgs e)
{
PrintingSystem.Document.Name = String.Format("Rechnung {0}", lblRechnungnr.Text);
}
}
}