Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2025-06-13 11:55:17 +02:00
16 changed files with 3196 additions and 14 deletions

View File

@@ -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>

View File

@@ -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;
}
}
}

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

File diff suppressed because it is too large Load Diff

View 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;
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View 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;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -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
{

View File

@@ -8,10 +8,9 @@ namespace BloemelingUndTeckhaus.Invoicing
{
public class StandardInvoiceCreation : InvoiceCreation
{
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
Calculations calc)
{
return base.CreateSummaryInvoiceItems(itemList, invoicePeriod, scap, calc);
}
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
{
return itemList;
}
}
}

View File

@@ -1,8 +1,10 @@
using System;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
@@ -21,8 +23,7 @@ namespace ChristopherusHausFamilienhilfe
DateTime end = pRO.AccountingPeriodEnd;
lblRechnungsnummer.Text = pRO.InvoiceNumber;
// Klientin Maren Völpert wird noch bis Juli 23 betreut und bekommt unabhängig vom KT einen anderen Paragrafen. Daher frage ich jetzt speziell nach ihrem Namen ab und setze dafür dann den Paragrafen
// Klientin Maren Völpert wird noch bis Juli 23 betreut und bekommt unabhängig vom KT einen anderen Paragrafen.
if (pRO.CustomerLastName.ToLower() == "völpert" && pRO.CustomerFirstName.ToLower() == "maren")
{
lblLeistung.Text = "Nach § 41 i.V.m. § 35 SGB VIII";
@@ -65,7 +66,20 @@ namespace ChristopherusHausFamilienhilfe
}
}
}
}
}
if (lblLeistung.Text.Contains("§ 31"))
{
var betreuungsarten = customer.ValueList.Where(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType).ToList();
if (betreuungsarten != null && betreuungsarten.Count > 0)
{
if (betreuungsarten.Any(b => b.Entry.Value.Contains("§35")))
{
var ba = betreuungsarten.Where(b => b.Entry.Value.Contains("§35")).FirstOrDefault();
lblLeistung.Text = ba.Entry.Value;
}
}
}
lblSorgeBerechtigter.Text = alleSorgeDingens;
lblGebDatum.Text = String.Format("{0:dd/MM/yyyy}", sip.Customer.DateOfBirth);

View File

@@ -90,6 +90,7 @@
<Compile Include="ServicesOverviewReport.Designer.cs">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\UserService.cs" />
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -8,7 +8,7 @@ using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared.DataContracts.Compact;
namespace SozialeDiensteNiederrhein
namespace BeWo.DerKarren
{
class KarrenHomeContentGenerator : HomeContentGenerator
{
@@ -94,8 +94,6 @@ namespace SozialeDiensteNiederrhein
liste.Add(sc);
}
}
return MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(liste);
}
}

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.MessageContracts;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Utils = BS.Shared.Core.Utils;
namespace BeWo.DerKarren.Service
{
public class CustomUserService : UserService
{
public override UserDC LoadUserByLoginName(string pUserName, string password)
{
var user = base.LoadUserByLoginName(pUserName, password);
bool isTeamleiter = false;
foreach (var group in user.UserGroups)
{
if (group.Name.Contains("Teamleitung"))
{
isTeamleiter = true;
}
}
if (isTeamleiter)
{
var emp = user.Employee;
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(emp.EmployeeOid);
emp.TeamOids = new List<long>();
foreach (var t in teams)
{
emp.TeamOids.Add(t.Oid.Value);
foreach (var member in t.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
foreach (var toid in user.Employee.TeamOids)
{
if (user.Employee.LeadingTeamOids == null)
{
user.Employee.LeadingTeamOids = new List<long>();
}
if (!user.Employee.LeadingTeamOids.Contains(toid))
{
user.Employee.LeadingTeamOids.Add(toid);
}
}
}
return user;
}
}
}