Ruhrstern - Ersteinrichtung
This commit is contained in:
95
ReportImp/Ruhrstern/Invoicing/CustomInvoiceCreation.cs
Normal file
95
ReportImp/Ruhrstern/Invoicing/CustomInvoiceCreation.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
|
||||
namespace Ruhrstern.Invoicing
|
||||
{
|
||||
|
||||
public class CustomInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
private DateTime? accountingPeriodStart = null;
|
||||
private DateTime? accountingPeriodEnd = null;
|
||||
private decimal AMOUNT_PER_KM = 0.30m;
|
||||
|
||||
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
|
||||
{
|
||||
if (supportConcept.IsApproved || !supportConcept.IsDeleted && !supportConcept.IsArchived) // Standard, außer dass auch nicht bewilligte abgerechnet werden
|
||||
{
|
||||
var invoice = new ServiceInvoice();
|
||||
var supportConceptList = new List<CompactSupportConceptDC> { supportConcept };
|
||||
|
||||
SetSenderInformation(invoice);
|
||||
SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
|
||||
SetSingleInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConcept);
|
||||
SetRecipientInformation(invoice, costBearer);
|
||||
SetServiceInvoicePeriods(invoice, invoice.InvoiceBase.CostBearer2SupportConcept, invoicePeriod,
|
||||
serviceRecords);
|
||||
|
||||
SetServiceInvoicePeriodAmounts(invoice);
|
||||
|
||||
// Spitzabrechnung
|
||||
if (invoicePeriod == null)
|
||||
{
|
||||
SetAmountAdvancePayments(invoice);
|
||||
SetAmountEquityContribution(invoice);
|
||||
}
|
||||
|
||||
return invoice;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod,
|
||||
IList<CompactSupportConceptDC> supportConceptList)
|
||||
{
|
||||
if (invoicePeriod != null)
|
||||
{
|
||||
accountingPeriodStart = invoicePeriod.StartDate;
|
||||
accountingPeriodEnd = invoicePeriod.EndDate;
|
||||
}
|
||||
base.SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
|
||||
}
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
if (iServiceRecord.ServiceDescription.CategoryName.Contains("Assistenz"))
|
||||
{
|
||||
ii.ItemDescription = "Unterstützende Leistungen";
|
||||
}
|
||||
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("Begleitet"))
|
||||
{
|
||||
ii.ItemDescription = "Begleiteter Umgang";
|
||||
}
|
||||
else
|
||||
{
|
||||
ii.ItemDescription = "Fachleistungsstunde";
|
||||
}
|
||||
|
||||
return ii;
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
return itemList;
|
||||
}
|
||||
|
||||
public virtual void CheckMaxApprovedAmount(ServiceInvoice invoice, ServiceInvoicePeriod sip, SupportConceptApprovalPeriodDC scap, CostBearer2SupportConcept costBearer2SupportConcept, DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
18
ReportImp/Ruhrstern/Invoicing/CustomInvoiceFactory.cs
Normal file
18
ReportImp/Ruhrstern/Invoicing/CustomInvoiceFactory.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace Ruhrstern.Invoicing
|
||||
{
|
||||
public class CustomInvoiceFactory : InvoiceFactory
|
||||
{
|
||||
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
}
|
||||
}
|
||||
}
|
||||
107
ReportImp/Ruhrstern/Invoicing/CustomInvoiceNumberGenerator.cs
Normal file
107
ReportImp/Ruhrstern/Invoicing/CustomInvoiceNumberGenerator.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Services;
|
||||
using DevExpress.XtraPrinting.BarCode;
|
||||
|
||||
namespace Ruhrstern.Invoicing
|
||||
{
|
||||
internal class CustomInvoiceNumberGenerator : InvoiceNumberGenerator
|
||||
{
|
||||
public long oid_ = 1;
|
||||
|
||||
public override string GetNextInvoiceNumber(int increment, InvoiceBase invoiceBase)
|
||||
{
|
||||
string next = String.Empty;
|
||||
Customer c = null;
|
||||
|
||||
if (invoiceBase.Type == InvoiceType.General && invoiceBase.RecipientCustomerOid.HasValue || invoiceBase.Type == InvoiceType.CustomerEquity && invoiceBase.RecipientCustomerOid.HasValue)
|
||||
{
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(invoiceBase.RecipientCustomerOid.Value);
|
||||
}
|
||||
else if (invoiceBase.CostBearer2SupportConcept != null)
|
||||
{
|
||||
c = invoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
}
|
||||
if (c != null)
|
||||
{
|
||||
var team = c.Team2CustomerList != null && c.Team2CustomerList.Count > 0 ? c.Team2CustomerList[0].Team : null;
|
||||
if (team != null)
|
||||
{
|
||||
if (team.Name.ToLower().Contains("jugend"))
|
||||
{
|
||||
oid_ = 2;
|
||||
}
|
||||
}
|
||||
|
||||
InvoiceNumberDC invoiceNumber = LoadInvoiceNumber(oid_);
|
||||
|
||||
if (invoiceNumber != null && invoiceNumber.Use)
|
||||
{
|
||||
next = ApplyPattern(invoiceNumber.Pattern, invoiceNumber.CurrentNumber + increment, invoiceBase);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (invoiceBase.RecipientOrganisation != null && invoiceBase.RecipientOrganisation.Contains("Essen"))
|
||||
{
|
||||
oid_ = 2;
|
||||
}
|
||||
}
|
||||
return next;
|
||||
}
|
||||
|
||||
protected override String ApplyPattern(String pattern, long number, InvoiceBase invoiceBase)
|
||||
{
|
||||
String id = String.Empty;
|
||||
if (invoiceBase != null && !String.IsNullOrEmpty(invoiceBase.InvoiceId))
|
||||
{
|
||||
id = invoiceBase.InvoiceId;
|
||||
}
|
||||
|
||||
return ApplyPatternWithId(pattern, number, id, invoiceBase);
|
||||
}
|
||||
|
||||
protected String ApplyPatternWithId(String pattern, long number, String id, InvoiceBase invoiceBase)
|
||||
{
|
||||
string next = base.ApplyPatternWithId(pattern, number, id);
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
private InvoiceNumberDC LoadInvoiceNumber(long oid)
|
||||
{
|
||||
var inr = DAOFactory.GenericDAO.LoadByID<InvoiceNumber>(oid_);
|
||||
if (inr != null)
|
||||
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDC(inr);
|
||||
return null;
|
||||
}
|
||||
|
||||
public override InvoiceNumberDC UpdateInvoiceNumber(InvoiceNumberDC dc)
|
||||
{
|
||||
var old = DAOFactory.GenericDAO.LoadByID<InvoiceNumber>(oid_);
|
||||
MapperFactory.InvoiceNumberDC_InvoiceNumber.MergeWithEntity(dc, old);
|
||||
DAOFactory.GenericDAO.Update(old);
|
||||
|
||||
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDC(old);
|
||||
}
|
||||
|
||||
public override InvoiceNumberDC LoadInvoiceNumber()
|
||||
{
|
||||
var inr = DAOFactory.GenericDAO.LoadByID<InvoiceNumber>(oid_);
|
||||
if (inr != null)
|
||||
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDC(inr);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
ReportImp/Ruhrstern/Invoicing/SettlementInvoiceCreation.cs
Normal file
32
ReportImp/Ruhrstern/Invoicing/SettlementInvoiceCreation.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ruhrstern.Invoicing
|
||||
{
|
||||
public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
|
||||
{
|
||||
public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool IsServiceRecordBillable(ServiceRecord iRecord)
|
||||
{
|
||||
if (iRecord.ServiceDescription.ServiceCategory.Name.Contains("Jugend"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override IList<ServiceRecord> GetBillableServiceRecords(CostBearer2SupportConcept c2s)
|
||||
{
|
||||
return c2s.ServiceRecords.OrderBy(s => s.Start).Where(s => !s.ServiceDescription.ServiceCategory.Name.ToLower().Contains("jugend")).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
ReportImp/Ruhrstern/Logo.Png
Normal file
BIN
ReportImp/Ruhrstern/Logo.Png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
36
ReportImp/Ruhrstern/Properties/AssemblyInfo.cs
Normal file
36
ReportImp/Ruhrstern/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("KundeXyz")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("KundeXyz")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("c1fed668-adb9-47e0-b589-1389618e1b6e")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
ReportImp/Ruhrstern/Properties/Resources.Designer.cs
generated
Normal file
63
ReportImp/Ruhrstern/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Ruhrstern.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ruhrstern.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
ReportImp/Ruhrstern/Properties/Resources.resx
Normal file
120
ReportImp/Ruhrstern/Properties/Resources.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
1
ReportImp/Ruhrstern/Properties/licenses.licx
Normal file
1
ReportImp/Ruhrstern/Properties/licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
201
ReportImp/Ruhrstern/Reporting/CustomReportCreator.cs
Normal file
201
ReportImp/Ruhrstern/Reporting/CustomReportCreator.cs
Normal file
@@ -0,0 +1,201 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.DefaultReports;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace TemplateNeuKunde.Reporting
|
||||
{
|
||||
//public class CustomReportCreator : DefaultReportCreator
|
||||
//{
|
||||
// //Einkommentiere für LWL Prüfliste, ZAD Nummer und ServiceDescription ergänzen
|
||||
|
||||
|
||||
// //SQL Queries:
|
||||
// //INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`)
|
||||
// //VALUES(500,24,0,'LWL Quittierungsbelege','select \':Von\', \':Bis\', \':Klient/in\'','direct', NULL, NULL, NULL,1,1, NULL,'1', NULL, NULL, NULL);
|
||||
|
||||
// //INSERT INTO `parameter` (`Oid`,`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`) VALUES(4,500,25,'Von_Bis',5, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
// //INSERT INTO `parameter` (`Oid`,`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`) VALUES(5,500,25,'Klient/in',2, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
// //public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
|
||||
// //{
|
||||
// // if (queryOid == 500)
|
||||
// // {
|
||||
// // return CreateLwlPruefliste(CreateQueryRO(queryOid, queryReportId));
|
||||
|
||||
// // }
|
||||
// // return base.CreateQueryReport(queryOid, queryReportId);
|
||||
// //}
|
||||
|
||||
// //private LwlPruefliste CreateLwlPruefliste(QueryRO queryRo)
|
||||
// //{
|
||||
// // var liste = new LwlPruefliste();
|
||||
|
||||
// // if (queryRo.Rows.Count > 0)
|
||||
// // {
|
||||
// // DateTime start = DateTime.MaxValue;
|
||||
// // DateTime end = DateTime.MinValue;
|
||||
|
||||
// // if (queryRo.Rows[0].Field1 != null)
|
||||
// // {
|
||||
// // DateTime.TryParse(queryRo.Rows[0].Field1.ToString(), out start);
|
||||
// // }
|
||||
// // if (queryRo.Rows[0].Field2 != null)
|
||||
// // {
|
||||
// // DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end);
|
||||
// // }
|
||||
// // long? customerOid = null;
|
||||
// // if (queryRo.Rows[0].Field3.ToString() == "0")
|
||||
// // {
|
||||
// // var masterReport = new LwlPruefliste();
|
||||
// // //masterReport.CreateDocument();
|
||||
|
||||
// // var customerList = DAOFactory.GenericDAO.GetAllActive<Customer>();
|
||||
// // var customerListOrd = customerList.OrderBy(c => c.Person.LastNameFirstName).ToList();
|
||||
// // foreach (var c in customerListOrd)
|
||||
// // {
|
||||
// // var ro = LwlPrueflisteRO.Create(start, end, "9011113", c.Oid);
|
||||
// // if (ro.ServiceRecords != null && ro.ServiceRecords.Count > 0)
|
||||
// // {
|
||||
// // try
|
||||
// // {
|
||||
// // liste = new LwlPruefliste();
|
||||
// // liste.SetReportDataSource(ro);
|
||||
// // liste.CreateDocument();
|
||||
// // masterReport.Pages.AddRange(liste.Pages);
|
||||
// // }
|
||||
// // catch
|
||||
// // {
|
||||
// // // ignore - z.B. kein Hilfeplan
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // return (LwlPruefliste)masterReport;
|
||||
// // }
|
||||
|
||||
// // if (queryRo.Rows[0].Field3 != null)
|
||||
// // {
|
||||
// // if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out var oidOut))
|
||||
// // {
|
||||
// // customerOid = oidOut;
|
||||
// // }
|
||||
// // var ro = LwlPrueflisteRO.Create(start, end, "9011113", customerOid);
|
||||
// // liste.SetReportDataSource(ro);
|
||||
// // return liste;
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // return liste;
|
||||
// //}
|
||||
|
||||
|
||||
// //Einkommentiere für LWL 2. Seite mit Anhang für Budgetnachweise
|
||||
// //public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
|
||||
// //{
|
||||
// // return base.CreateSettlementReport(dcId, invoiceBaseOid, true);
|
||||
// //}
|
||||
|
||||
|
||||
// //public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
// //{
|
||||
// // List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay);
|
||||
|
||||
// // if (lROs.Count > 0)
|
||||
// // {
|
||||
|
||||
// // var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
|
||||
// // rootReport.CreateDocument();
|
||||
|
||||
// // for (int i = 1; i < lROs.Count; i++)
|
||||
// // {
|
||||
// // var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
|
||||
// // lNext.CreateDocument();
|
||||
// // rootReport.Pages.AddRange(lNext.Pages);
|
||||
// // }
|
||||
|
||||
// // return rootReport;
|
||||
// // }
|
||||
// // return new XtraReport();
|
||||
// //}
|
||||
|
||||
// //public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
// //{
|
||||
// // var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||
// // return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
|
||||
// //}
|
||||
// //public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
|
||||
// //{
|
||||
// // var roList = new List<ServicesOverviewRO>();
|
||||
|
||||
// // foreach (var coid in customerOids)
|
||||
// // {
|
||||
// // var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid);
|
||||
// // if (ro != null)
|
||||
// // {
|
||||
// // roList.Add(ro);
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // if (roList.Count > 0)
|
||||
// // {
|
||||
|
||||
// // var rootReport = CreateServicesOverviewReportForRo(roList[0], serviceCategoryOid);
|
||||
// // rootReport.CreateDocument();
|
||||
|
||||
// // for (int i = 1; i < roList.Count; i++)
|
||||
// // {
|
||||
// // var lNext = CreateServicesOverviewReportForRo(roList[i], serviceCategoryOid);
|
||||
// // lNext.CreateDocument();
|
||||
// // rootReport.Pages.AddRange(lNext.Pages);
|
||||
// // }
|
||||
|
||||
// // return rootReport;
|
||||
// // }
|
||||
// // return new XtraReport();
|
||||
|
||||
// //}
|
||||
//public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, String reportId)
|
||||
//{
|
||||
// return CreateServicesOverviewReportForRo(ro, null);
|
||||
//}
|
||||
|
||||
// //private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
|
||||
// //{
|
||||
// // IBeWoReport<ServicesOverviewRO> report = null;
|
||||
// // String kt = "";
|
||||
// // if (!String.IsNullOrWhiteSpace(ro.Costbearer))
|
||||
// // kt = ro.Costbearer.Trim();
|
||||
|
||||
// // String function = "";
|
||||
// // if (ro.CostBearer2SupportConceptList != null)
|
||||
// // {
|
||||
// // foreach (var c2s in ro.CostBearer2SupportConceptList)
|
||||
// // {
|
||||
// // if (c2s.CostBearer.Organisation.Function != null && !String.IsNullOrWhiteSpace(ro.Costbearer) && c2s.CostBearer.Organisation.Name == ro.Costbearer)
|
||||
// // function = c2s.CostBearer.Organisation.Function.Value;
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // if (kt == "Kreisverwaltung Mainz-Bingen")
|
||||
// // report = new AlzeyTeilhabe.StundenzettelBi2();
|
||||
|
||||
// // if (report == null && function == "Kostenträger Soziotherapie")
|
||||
// // report = new StundenzettelSoziotherapie();
|
||||
|
||||
// // if (report == null)
|
||||
// // report = new AlzeyTeilhabe.StundenzettelWo();
|
||||
|
||||
// // report.SetReportDataSource(ro);
|
||||
|
||||
// // return report as XtraReport;
|
||||
// //}
|
||||
|
||||
//}
|
||||
}
|
||||
1515
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.Designer.cs
generated
Normal file
1515
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
145
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.cs
Normal file
145
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.Core;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Ruhrstern
|
||||
{
|
||||
public partial class Quittierungsbeleg : XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
{
|
||||
public Quittierungsbeleg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServicesOverviewRO pRO)
|
||||
{
|
||||
|
||||
// Get calling method name
|
||||
//StackTrace stackTrace = new StackTrace();
|
||||
//Debug.WriteLine(stackTrace.GetFrame(1).GetMethod().Name);
|
||||
|
||||
bool hatGruppen = false;
|
||||
|
||||
//if (pRO == null)
|
||||
// return;
|
||||
|
||||
if (pRO.Services != null)
|
||||
{
|
||||
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
foreach (var sd in pRO.Services)
|
||||
{
|
||||
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
||||
{
|
||||
ServicesOverviewRO.CreateSignatureString(sd);
|
||||
sd.Notice5 = "E";
|
||||
if (sd.IsGroup)
|
||||
{
|
||||
//sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
|
||||
sd.Notice5 = "GR";
|
||||
hatGruppen = true;
|
||||
}
|
||||
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt") || (sd.ProzentAbrechenbar < 100))
|
||||
{
|
||||
sd.Notice5 = "F";
|
||||
}
|
||||
servicesBillable.Add(sd);
|
||||
}
|
||||
}
|
||||
|
||||
pRO.Services = servicesBillable;
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(pRO.AbsenceTimes))
|
||||
{
|
||||
lblHatAbwesenheiten.Text = "X";
|
||||
}
|
||||
|
||||
if (!hatGruppen)
|
||||
{
|
||||
lblHatGruppen.Text = "X";
|
||||
}
|
||||
|
||||
ErstelleAbwesenheitenTabelle(pRO);
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private void ErstelleAbwesenheitenTabelle(ServicesOverviewRO pRo)
|
||||
{
|
||||
if (pRo.Abwesenheiten != null)
|
||||
{
|
||||
int newRows = 0;
|
||||
int index = 1;
|
||||
foreach (var at in pRo.Abwesenheiten)
|
||||
{
|
||||
DevExpress.XtraReports.UI.XRTableRow row = null;
|
||||
if (index < xrTableAbwesenheiten.Rows.Count)
|
||||
{
|
||||
row = xrTableAbwesenheiten.Rows[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
row = xrTableAbwesenheiten.InsertRowBelow(xrTableAbwesenheiten.Rows[xrTableAbwesenheiten.Rows.Count - 1]);
|
||||
newRows++;
|
||||
}
|
||||
|
||||
row.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", at.Start);
|
||||
int? days = null;
|
||||
|
||||
if (at.End.HasValue)
|
||||
{
|
||||
row.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", at.End);
|
||||
days = (int)at.End.Value.Subtract(at.Start.Value).TotalDays + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.Cells[1].Text = "unbekannt";
|
||||
}
|
||||
|
||||
row.Cells[2].Text = String.Format("{0:0}", days);
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
if (newRows > 0)
|
||||
{
|
||||
lblUnterschriftKlient.Top += newRows * 20;
|
||||
lblUnterschriftMitarbeiter.Top += newRows * 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
XRPictureBox xrBox = sender as XRPictureBox;
|
||||
//var test = this.GetCurrent
|
||||
string base64String = xrBox.Tag as string;
|
||||
if (!String.IsNullOrWhiteSpace(base64String))
|
||||
{
|
||||
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
|
||||
var binData = Convert.FromBase64String(base64Data);
|
||||
Image img = ByteArrayToImage(binData);
|
||||
xrBox.Image = Utils.CropImage(img);
|
||||
}
|
||||
else
|
||||
{
|
||||
xrBox.Image = null;
|
||||
}
|
||||
}
|
||||
|
||||
public Image ByteArrayToImage(byte[] byteArrayIn)
|
||||
{
|
||||
using(var memoryStream = new MemoryStream(byteArrayIn))
|
||||
{
|
||||
return Image.FromStream(memoryStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
129
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.resx
Normal file
129
ReportImp/Ruhrstern/Reporting/Quittierungsbeleg.resx
Normal file
File diff suppressed because one or more lines are too long
1498
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.Designer.cs
generated
Normal file
1498
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
86
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.cs
Normal file
86
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Ruhrstern
|
||||
{
|
||||
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
||||
{
|
||||
public ServiceInvoiceReport()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !String.IsNullOrEmpty(pRO.RecipientOrganisation.Trim()))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientDivision.Trim()))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientStreet) && !String.IsNullOrEmpty(pRO.RecipientStreet.Trim()))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
sb.AppendLine("");
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown) && !String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown.Trim()))
|
||||
{
|
||||
sb.Append(pRO.RecipientPostCodeAndTown);
|
||||
}
|
||||
lblAddress.Text = sb.ToString();
|
||||
|
||||
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
|
||||
{
|
||||
foreach (var sip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
if (sip.ServiceInvoiceItems != null && sip.ServiceInvoiceItems.Count > 0)
|
||||
{
|
||||
foreach (var ii in sip.ServiceInvoiceItems)
|
||||
{
|
||||
ii.UnitDescription = "";
|
||||
if (ii.ServiceRecord != null)
|
||||
{
|
||||
var masnahmen = ii.ServiceRecord.Goals.
|
||||
Where(g => g.Type == BS.Shared.ValueListEntryType.SupportConceptIndividualGoalType
|
||||
|| g.Type == BS.Shared.ValueListEntryType.SupportConceptGoalType).OrderBy(g => g.ParentOid).ThenBy(g => g.TypeDescription).ToList();
|
||||
if (masnahmen != null)
|
||||
{
|
||||
foreach (var m in masnahmen)
|
||||
{
|
||||
var key = m.ValueListEntryOid.Value;
|
||||
string value = null;
|
||||
if (!string.IsNullOrEmpty(m.TypeDescription))
|
||||
{
|
||||
value = m.TypeDescription;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = m.Abbreviation;
|
||||
}
|
||||
if (ii.UnitDescription.Length > 0)
|
||||
{
|
||||
ii.UnitDescription += ", " + value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ii.UnitDescription = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.resx
Normal file
129
ReportImp/Ruhrstern/Reporting/ServiceInvoiceReport.resx
Normal file
File diff suppressed because one or more lines are too long
1234
ReportImp/Ruhrstern/Reporting/SettlementReport2.Designer.cs
generated
Normal file
1234
ReportImp/Ruhrstern/Reporting/SettlementReport2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
61
ReportImp/Ruhrstern/Reporting/SettlementReport2.cs
Normal file
61
ReportImp/Ruhrstern/Reporting/SettlementReport2.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Report;
|
||||
using System.Text.RegularExpressions;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace Ruhrstern
|
||||
{
|
||||
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
{
|
||||
public Spitzabrechnung()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(Settlement2RO pRO)
|
||||
{
|
||||
if (String.IsNullOrEmpty(pRO.Notice))
|
||||
{
|
||||
lblNotice.Visible = false;
|
||||
}
|
||||
|
||||
decimal rateFactor = 1;
|
||||
|
||||
foreach (var ii in pRO.InvoiceItems)
|
||||
{
|
||||
if (ii.RateFactor.HasValue)
|
||||
{
|
||||
rateFactor = (100 + ii.RateFactor.Value) / 100;
|
||||
}
|
||||
|
||||
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
|
||||
{
|
||||
Zwischensumme.Visible = true;
|
||||
//if (!ii.ItemDescription.IsNullOrEmpty())
|
||||
//{
|
||||
//ii.AbrechnungsText = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
|
||||
//}
|
||||
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
|
||||
ii.ItemDescription = "Fehlkontakte";
|
||||
}
|
||||
else if (ii.ItemDescription.IsNullOrEmpty())
|
||||
{
|
||||
ii.ItemDescription = "Fachleistungsstunden";
|
||||
}
|
||||
}
|
||||
pRO.RateFactor = (double)rateFactor;
|
||||
|
||||
if (pRO.Salutation1.IsNullOrEmpty() && pRO.Salutation2.IsNullOrEmpty())
|
||||
{
|
||||
lblAnrede.Text = "Guten Tag,";
|
||||
}
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
}
|
||||
127
ReportImp/Ruhrstern/Reporting/SettlementReport2.resx
Normal file
127
ReportImp/Ruhrstern/Reporting/SettlementReport2.resx
Normal file
File diff suppressed because one or more lines are too long
135
ReportImp/Ruhrstern/Ruhrstern.csproj
Normal file
135
ReportImp/Ruhrstern/Ruhrstern.csproj
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A3D9B311-57F8-44B9-9182-C1B361BE7D94}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Ruhrstern</RootNamespace>
|
||||
<AssemblyName>6666827209_Reports</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\CustomerDlls\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\CustomerDlls\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.DataAccess.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceNumberGenerator.cs" />
|
||||
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\CustomMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="Reporting\CustomReportCreator.cs" />
|
||||
<Compile Include="Reporting\Quittierungsbeleg.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\Quittierungsbeleg.Designer.cs">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\ServiceInvoiceReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\ServiceInvoiceReport.Designer.cs">
|
||||
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\SettlementReport2.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\SettlementReport2.Designer.cs">
|
||||
<DependentUpon>SettlementReport2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Service\CustomAccountingService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Data\Data.csproj">
|
||||
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
|
||||
<Name>Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Report\Report.csproj">
|
||||
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
|
||||
<Name>Report</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Service\Service.csproj">
|
||||
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
|
||||
<Name>Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj">
|
||||
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Export\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Reporting\Quittierungsbeleg.resx">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Reporting\ServiceInvoiceReport.resx">
|
||||
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Reporting\SettlementReport2.resx">
|
||||
<DependentUpon>SettlementReport2.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
39
ReportImp/Ruhrstern/Service/CustomAccountingService.cs
Normal file
39
ReportImp/Ruhrstern/Service/CustomAccountingService.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
|
||||
|
||||
namespace Ruhrstern.Service
|
||||
{
|
||||
public class CustomAccountingService : AccountingService
|
||||
{
|
||||
public override ServiceInvoice ErstelleStornoRechnung(InvoiceBaseDC ibdc)
|
||||
{
|
||||
var i = base.ErstelleStornoRechnung(ibdc);
|
||||
int invoiceCounter = 0;
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
i.InvoiceBase.InvoiceNumber = inc.GetNextInvoiceNumber(invoiceCounter, i.InvoiceBase) + " Storno";
|
||||
|
||||
if (String.IsNullOrEmpty(i.InvoiceBase.InvoiceTypeText))
|
||||
{
|
||||
i.InvoiceBase.InvoiceTypeText = "Storno";
|
||||
}
|
||||
else
|
||||
{
|
||||
i.InvoiceBase.InvoiceTypeText += " Storno";
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(i);
|
||||
inc.IncreaseInvoiceNumber(1, null);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
ReportImp/Ruhrstern/app.config
Normal file
27
ReportImp/Ruhrstern/app.config
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.4000" newVersion="3.1.0.4000" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user