ChristopherusHausMID/Export/SimbaExporter.cs + Name PDF in Rechnung dafür
This commit is contained in:
@@ -59,6 +59,8 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="CHMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="CustomReportCreator.cs" />
|
||||
<Compile Include="Export\CustomDataExporter.cs" />
|
||||
<Compile Include="Export\SimbaExporter.cs" />
|
||||
<Compile Include="Invoicing\PoolHelper.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ChristopherusHausFamilienhilfe.Export;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
@@ -82,8 +82,6 @@ namespace ChristopherusHausMID.Export
|
||||
|
||||
private static List<FileAttachmentDC> CreateInvoiceFiles(DataTable dt)
|
||||
{
|
||||
// Rückfrage steht noch aus, ob die Sammelrechnung an jede Einzelbuchung gehangen wird oder nicht
|
||||
// dementsprechend hier noch splitten
|
||||
try
|
||||
{
|
||||
List<FileAttachmentDC> liste = new List<FileAttachmentDC>();
|
||||
@@ -99,7 +97,7 @@ namespace ChristopherusHausMID.Export
|
||||
//var invoice = DAOFactory.GenericDAO.LoadByID<ServiceInvoice>(oid);
|
||||
var idc = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(invoice);
|
||||
|
||||
var anhang = new ServiceInvoiceReport();
|
||||
var anhang = new Rechnung();
|
||||
var ro = ServiceInvoiceRO.Create(idc);
|
||||
anhang.SetReportDataSource(ro);
|
||||
anhang.CreateDocument();
|
||||
@@ -151,28 +149,6 @@ namespace ChristopherusHausMID.Export
|
||||
inner join serviceinvoice si on si.invoicebaseoid = ib.oid
|
||||
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
|
||||
UNION SELECT
|
||||
'BCH',
|
||||
sip.Claim,
|
||||
'8106' as 'Gegenkonto',
|
||||
ib.invoicenumber,
|
||||
ib.InvoiceDate,
|
||||
org.DebitorNumber,
|
||||
'3170',
|
||||
org.Name,
|
||||
p.FirstName,
|
||||
p.LastName,
|
||||
ib.Oid
|
||||
FROM
|
||||
invoicebase ib
|
||||
JOIN serviceinvoice si ON si.invoicebaseoid = ib.oid
|
||||
JOIN serviceinvoiceperiod sip ON sip.serviceinvoiceoid = si.oid
|
||||
JOIN invoiceitem ii ON ii.serviceinvoiceperiodoid = sip.oid
|
||||
inner join costbearer cb on ib.recipientcostbeareroid = cb.oid
|
||||
inner join organisation org on org.costbeareroid = cb.oid
|
||||
inner join customer c on sip.customeroid = c.oid
|
||||
inner join person p on c.PersonOid = p.oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
|
||||
";
|
||||
|
||||
return sql;
|
||||
|
||||
39
ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
generated
39
ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
generated
@@ -82,7 +82,7 @@ namespace ChristopherusHausMID
|
||||
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.lblRechnungsnr = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -217,7 +217,7 @@ namespace ChristopherusHausMID
|
||||
this.xrLabel11,
|
||||
this.xrLabel6,
|
||||
this.xrLabel8,
|
||||
this.xrLabel4,
|
||||
this.lblRechnungsnr,
|
||||
this.xrLabel5,
|
||||
this.xrLabel3,
|
||||
this.xrLabel2});
|
||||
@@ -893,22 +893,22 @@ namespace ChristopherusHausMID
|
||||
this.xrLabel8.TextFormatString = "{0:MMM yyyy}";
|
||||
this.xrLabel8.WordWrap = false;
|
||||
//
|
||||
// xrLabel4
|
||||
// lblRechnungsnr
|
||||
//
|
||||
this.xrLabel4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.xrLabel4.CanShrink = true;
|
||||
this.xrLabel4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
this.lblRechnungsnr.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblRechnungsnr.CanShrink = true;
|
||||
this.lblRechnungsnr.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoice.InvoiceNumber")});
|
||||
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(619.3312F, 0F);
|
||||
this.xrLabel4.Name = "xrLabel4";
|
||||
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(135.6688F, 20F);
|
||||
this.xrLabel4.StylePriority.UseBackColor = false;
|
||||
this.xrLabel4.StylePriority.UseFont = false;
|
||||
this.xrLabel4.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
this.xrLabel4.WordWrap = false;
|
||||
this.lblRechnungsnr.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
|
||||
this.lblRechnungsnr.LocationFloat = new DevExpress.Utils.PointFloat(619.3312F, 0F);
|
||||
this.lblRechnungsnr.Name = "lblRechnungsnr";
|
||||
this.lblRechnungsnr.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblRechnungsnr.SizeF = new System.Drawing.SizeF(135.6688F, 20F);
|
||||
this.lblRechnungsnr.StylePriority.UseBackColor = false;
|
||||
this.lblRechnungsnr.StylePriority.UseFont = false;
|
||||
this.lblRechnungsnr.StylePriority.UseTextAlignment = false;
|
||||
this.lblRechnungsnr.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
this.lblRechnungsnr.WordWrap = false;
|
||||
//
|
||||
// xrLabel5
|
||||
//
|
||||
@@ -1287,10 +1287,6 @@ namespace ChristopherusHausMID
|
||||
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell27.Weight = 2.1388968897819165D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(ChristopherusHausMID.RechnungRO);
|
||||
//
|
||||
// fieldAnteilAnRechnung
|
||||
//
|
||||
this.fieldAnteilAnRechnung.DataMember = "ServiceInvoicePeriods";
|
||||
@@ -1928,6 +1924,7 @@ namespace ChristopherusHausMID
|
||||
xrWatermark1.ImageViewMode = DevExpress.XtraPrinting.Drawing.ImageViewMode.Zoom;
|
||||
xrWatermark1.PageRange = "1";
|
||||
this.Watermarks.Add(xrWatermark1);
|
||||
this.AfterPrint += new System.EventHandler(this.Change_Name);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
|
||||
@@ -1952,7 +1949,7 @@ namespace ChristopherusHausMID
|
||||
private DevExpress.XtraReports.UI.DetailBand Detail1;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
|
||||
private DevExpress.XtraReports.UI.FormattingRule ruleNoticeNull;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblRechnungsnr;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
|
||||
|
||||
@@ -224,6 +224,12 @@ namespace ChristopherusHausMID
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
// Die Rechnungsnummer muss für den FiBu-Export gleich dem PDF-Namen sein!
|
||||
private void Change_Name(object sender, EventArgs e)
|
||||
{
|
||||
PrintingSystem.Document.Name = String.Format("Rechnung ISB{0}", lblRechnungsnr.Text);
|
||||
}
|
||||
}
|
||||
|
||||
public class RechnungRO
|
||||
|
||||
Reference in New Issue
Block a user