Zwei Projekte zusammenführen - AuswegHeikePuetz und HeikePuetz
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<ProjectGuid>{1154ACF1-E4B3-4040-AFB3-750A871A8004}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>KundeXyz</RootNamespace>
|
||||
<RootNamespace>Ausweg</RootNamespace>
|
||||
<AssemblyName>6451336202_Reports</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
@@ -57,7 +57,20 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="QuittierungsbelegMitDatum.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="QuittierungsbelegMitDatum.Designer.cs">
|
||||
<DependentUpon>QuittierungsbelegMitDatum.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SettlementReport2.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SettlementReport2.Designer.cs">
|
||||
<DependentUpon>SettlementReport2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Translation\TranslationDictionary.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -78,5 +91,16 @@
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="QuittierungsbelegMitDatum.resx">
|
||||
<DependentUpon>QuittierungsbelegMitDatum.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SettlementReport2.resx">
|
||||
<DependentUpon>SettlementReport2.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,18 @@
|
||||
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 Ausweg
|
||||
{
|
||||
public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
|
||||
{
|
||||
public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
ReportImp/AuswegHeikePuetz/Properties/licenses.licx
Normal file
1
ReportImp/AuswegHeikePuetz/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
|
||||
1446
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.Designer.cs
generated
Normal file
1446
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
148
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.cs
Normal file
148
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
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 BS.Shared.Extensions;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Ausweg
|
||||
{
|
||||
public partial class Quittierungsbeleg2 : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
{
|
||||
public Quittierungsbeleg2()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServicesOverviewRO pRO)
|
||||
{
|
||||
bool hatGruppen = false;
|
||||
|
||||
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"))
|
||||
{
|
||||
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt") || (sd.ProzentAbrechenbar < 100))
|
||||
sd.Notice5 = "F";
|
||||
else if (sd.IsGroup)
|
||||
sd.Notice5 = "GR";
|
||||
else if (!sd.IsGroup)
|
||||
sd.Notice5 = "E";
|
||||
|
||||
ServicesOverviewRO.CreateSignatureString(sd);
|
||||
if (sd.IsGroup)
|
||||
{
|
||||
hatGruppen = true;
|
||||
}
|
||||
|
||||
if (sd.SignatureDate.HasValue && sd.SignatureDate.Value.Date == sd.StartDate.Date)
|
||||
{
|
||||
sd.SignatureDate = null;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (at.AbsenceReason.BillableMinutes.HasValue && at.AbsenceReason.BillableMinutes.Value > 0)
|
||||
{
|
||||
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;
|
||||
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)
|
||||
{
|
||||
Image returnImage = null;
|
||||
MemoryStream ms = new System.IO.MemoryStream(byteArrayIn);
|
||||
returnImage = Image.FromStream(ms);
|
||||
|
||||
return returnImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.resx
Normal file
129
ReportImp/AuswegHeikePuetz/QuittierungsbelegMitDatum.resx
Normal file
File diff suppressed because one or more lines are too long
1158
ReportImp/AuswegHeikePuetz/SettlementReport2.Designer.cs
generated
Normal file
1158
ReportImp/AuswegHeikePuetz/SettlementReport2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
51
ReportImp/AuswegHeikePuetz/SettlementReport2.cs
Normal file
51
ReportImp/AuswegHeikePuetz/SettlementReport2.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
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 Ausweg
|
||||
{
|
||||
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
{
|
||||
public Spitzabrechnung()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(Settlement2RO pRO)
|
||||
{
|
||||
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;
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
ReportImp/AuswegHeikePuetz/SettlementReport2.resx
Normal file
129
ReportImp/AuswegHeikePuetz/SettlementReport2.resx
Normal file
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace AuswegHeikePuetz.Translation
|
||||
namespace Ausweg.Translation
|
||||
{
|
||||
public class ApiTranslationDictionary : TranslationDictionary
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user