diff --git a/ReportImp/BellaDonna/BellaDonna.csproj b/ReportImp/BellaDonna/BellaDonna.csproj index 79f73c005..617d3f582 100644 --- a/ReportImp/BellaDonna/BellaDonna.csproj +++ b/ReportImp/BellaDonna/BellaDonna.csproj @@ -64,6 +64,8 @@ AnzahlUrlaubstage.cs + + Component diff --git a/ReportImp/BellaDonna/Export/CustomDataExporter.cs b/ReportImp/BellaDonna/Export/CustomDataExporter.cs new file mode 100644 index 000000000..b720cb44c --- /dev/null +++ b/ReportImp/BellaDonna/Export/CustomDataExporter.cs @@ -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); + } + } +} diff --git a/ReportImp/BellaDonna/Rechnung67.Designer.cs b/ReportImp/BellaDonna/Rechnung67.Designer.cs index f5f184d6f..1723fbb19 100644 --- a/ReportImp/BellaDonna/Rechnung67.Designer.cs +++ b/ReportImp/BellaDonna/Rechnung67.Designer.cs @@ -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; } } diff --git a/ReportImp/BellaDonna/Rechnung67.cs b/ReportImp/BellaDonna/Rechnung67.cs index 13eb2c6fd..2dc4a3bc3 100644 --- a/ReportImp/BellaDonna/Rechnung67.cs +++ b/ReportImp/BellaDonna/Rechnung67.cs @@ -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); + } } } \ No newline at end of file diff --git a/ReportImp/BellaDonna/ServiceInvoiceReport.Designer.cs b/ReportImp/BellaDonna/ServiceInvoiceReport.Designer.cs index c71474627..407598373 100644 --- a/ReportImp/BellaDonna/ServiceInvoiceReport.Designer.cs +++ b/ReportImp/BellaDonna/ServiceInvoiceReport.Designer.cs @@ -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; } } diff --git a/ReportImp/BellaDonna/ServiceInvoiceReport.cs b/ReportImp/BellaDonna/ServiceInvoiceReport.cs index bf7661af9..a2471af84 100644 --- a/ReportImp/BellaDonna/ServiceInvoiceReport.cs +++ b/ReportImp/BellaDonna/ServiceInvoiceReport.cs @@ -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); + } } } \ No newline at end of file