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

Konflikte gelöst
This commit is contained in:
2026-08-03 13:06:45 +02:00
28 changed files with 2996 additions and 67 deletions

View File

@@ -1,11 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Translation;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.Scheduler.Resources;
using BeWo.Scheduler.View;
@@ -151,7 +154,25 @@ namespace BeWo.Scheduler.ViewModel
protected override void DeleteAppointments(IEnumerable<AbsenceTimeDC> dcList)
{
ServiceFacade.DoCustomerServiceAsync(s => s.DeactivateAbsenceTimes(dcList.ToDictionary(dc => dc.AbsenceTimeOid != null ? dc.AbsenceTimeOid.Value : 0,
var lDcList = dcList.ToList();
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry))
{
var pastAbsenceTimes = lDcList.Where(dc => dc.IsInThePast).ToList();
if (pastAbsenceTimes.Count > 0)
{
lDcList = lDcList.Except(pastAbsenceTimes).ToList();
MessageBox.Show(Translator.Translate("Sie besitzen nicht das Benutzerrecht, bereits vergangene Mitarbeiter-Abwesenheiten zu löschen."),
"BeWo Planer", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
if (lDcList.Count == 0)
{
return;
}
ServiceFacade.DoCustomerServiceAsync(s => s.DeactivateAbsenceTimes(lDcList.ToDictionary(dc => dc.AbsenceTimeOid != null ? dc.AbsenceTimeOid.Value : 0,
dc => dc.AbsenceTimeVersion != null ? dc.AbsenceTimeVersion.Value : 0)));
}

View File

@@ -7,6 +7,7 @@ using BeWo.Core.Commands;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DependencyObject = System.Windows.DependencyObject;
@@ -139,9 +140,27 @@ namespace BeWo.View.Detail
private void RemoveAbsenceTime()
{
AbsenceTimes?.VMList.Remove(DataGridAbsenceTimes.GetCurrentValue<AbsenceTimeVM>());
var absenceTime = DataGridAbsenceTimes.GetCurrentValue<AbsenceTimeVM>();
if (absenceTime == null)
{
return;
}
if (IsAbsenceTimeInThePast(absenceTime) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry))
{
MessageBox.Show(Translator.Translate("Sie haben nicht das Benutzerrecht, bereits vergangene Mitarbeiter-Abwesenheiten zu löschen."),
"BeWo Planer", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
AbsenceTimes?.VMList.Remove(absenceTime);
BeWoWpfUtils.RefreshDXGrid(DataGridAbsenceTimes);
}
private static bool IsAbsenceTimeInThePast(AbsenceTimeVM absenceTime)
{
return absenceTime.End.HasValue && absenceTime.End.Value.Date < DateTime.Today;
}
}
}

View File

@@ -268,6 +268,12 @@ namespace BeWoPlanerMobil.Controllers
ViewData["AbsenceTimeError"] = "Beim Löschen der Abwesenheit ist ein Fehler aufgetreten!<br/><br/>Bitte wenden Sie sich an Ihren Administrator.";
}
if(absenceTime2Delete != null && !Model.CanDeleteAbsenceTime(absenceTime2Delete))
{
ViewData["AbsenceTimeError"] = "Sie haben nicht das Benutzerrecht, bereits vergangene Mitarbeiter-Abwesenheiten zu löschen.";
return PartialView("AbsenceTimePartial", Model);
}
var employee = Model.SelectedEmployee;
employee.AbsenceTimes.Remove(absenceTime2Delete);

View File

@@ -16,6 +16,8 @@ namespace BeWoPlanerMobil.Models
{
public bool HasRightToEdit => HasRightToEditCustomers;
public bool HasRightToDelete => HasRightToEditCustomers;
public bool CanDeleteAbsenceTime(AbsenceTimeDC absenceTime) => HasRightToDelete;
public long? ObjectOid => SelectedCustomerOid;
public TableID ObjectTid => TableID.Customer;
public string HtmlPrefix => "customer";

View File

@@ -1,4 +1,5 @@
using BS.Shared.DataContracts;
using BS.Shared;
using BS.Shared.DataContracts;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
@@ -9,6 +10,22 @@ namespace BeWoPlanerMobil.Models
{
public bool HasRightToEdit => HasRightToEditEmployeeAbsenceTimes;
public bool HasRightToDelete => HasRightToEditEmployeeAbsenceTimes;
public bool CanDeleteAbsenceTime(AbsenceTimeDC absenceTime)
{
if (!HasRightToDelete)
{
return false;
}
if (absenceTime.IsInThePast)
{
return CheckRight(UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry);
}
return true;
}
public string HtmlPrefix => "employee";
public EmployeeSessionModel EmployeeSessionModel => SessionModel as EmployeeSessionModel;

View File

@@ -16,5 +16,6 @@ namespace BeWoPlanerMobil.Models
long? AbsenteeOid { get; }
bool HasRightToEdit { get; }
bool HasRightToDelete { get; }
bool CanDeleteAbsenceTime(AbsenceTimeDC absenceTime);
}
}

View File

@@ -85,7 +85,7 @@
</p>
</div>
</div>
@if(Model.HasRightToEdit || Model.HasRightToDelete)
@if(Model.HasRightToEdit || Model.CanDeleteAbsenceTime(absenceTime))
{
<div class="col-sm-auto">
<div class="btn-toolbar justify-content-between">
@@ -97,8 +97,8 @@
</button>
</div>
}
@if(Model.HasRightToDelete)
@if(Model.CanDeleteAbsenceTime(absenceTime))
{
<div class="btn-group" role="group">
<button class="btn btn-danger" type="button" onclick="deleteAbsenceTime(@absenceTime.AbsenceTimeOid, '@absenceTime.Start.Value.GetIntervalDescription(absenceTime.End)')">

View File

@@ -193,6 +193,8 @@ namespace BeWo.Data.Security
return "3.30";
if (isRightVersion331(r))
return "3.31";
if (isRightVersion332(r))
return "3.32";
return BASE_VERSION;
}
@@ -252,5 +254,10 @@ namespace BeWo.Data.Security
|| r == UserRightType.Customer_DeleteMedication;
}
private static bool isRightVersion332(UserRightType r)
{
return r == UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry;
}
}
}

View File

@@ -0,0 +1,21 @@
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
namespace VereinZurIntegrationChemnitz.Calculations
{
public class CustomGroupDurationCalculator : GroupDurationCalculator
{
public override void CalculateGroupDuration(ServiceRecordGroup group)
{
base.CalculateGroupDuration(group);
foreach (var sr in group.ServiceRecordList)
{
if (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("soziotherapie"))
{
sr.RoundedDuration = sr.GroupRoundedDuration.Value;
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
namespace VereinZurIntegrationChemnitz.Calculations
{
public class CustomGroupDurationCalculator : GroupDurationCalculator
{
public override void CalculateGroupDuration(ServiceRecordGroup group)
{
base.CalculateGroupDuration(group);
foreach (var sr in group.ServiceRecordList)
{
if (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("soziotherapie"))
{
sr.RoundedDuration = sr.GroupRoundedDuration.Value;
}
}
}
}
}

View File

@@ -1,44 +1,31 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VereinZurIntegrationChemnitz
namespace VereinZurIntegrationChemnitz.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var sd = sr.ServiceDescription.Category;
var ic = GetInvoiceCreatorForCategory(sd);
if (ic != null)
return ic;
}
}
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var cat = sr.ServiceDescription.Category;
return new InvoiceCreation();
}
private InvoiceCreation GetInvoiceCreatorForCategory(ServiceCategoryDC sd)
{
if (sd != null && !String.IsNullOrEmpty(sd.Name))
{
String cat = sd.Name.ToLower().Trim();
if (cat.IndexOf("einfache pauschale") >= 0 || cat.IndexOf("doppelte pauschale") >= 0)
{
return new WBWInvoiceCreation();
}
}
return null;
}
}
if (sr.CostBearer != null && !sr.CostBearer.Name.Contains("LWL") && !sr.CostBearer.Name.Contains("LVR") &&
!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie"))
{
return new SoziotherapieInvoiceCreation();
}
}
}
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
}
}
}

View File

@@ -0,0 +1,145 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace VereinZurIntegrationChemnitz
{
public class CustomReportCreator : DefaultReportCreator
{
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, serviceCategoryOid);
if (lROs.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
if (rootReport.Pages.Count == 0)
{
rootReport.CreateDocument();
}
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
if (lNext.Pages.Count == 0)
{
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();
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
ServicesOverviewRO defaultRo = ServicesOverviewRO.CopyFromRO(ro);
ServicesOverviewRO sozioRo = ServicesOverviewRO.CopyFromRO(ro);
if (ro.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
{
ServicesOverviewRO.CreateSignatureString(s);
if (s.ServiceCategory.ToLower().Contains("sozio"))
{
sozioRo.Services.Add(s);
}
else
{
defaultRo.Services.Add(s);
}
}
}
XtraReport report = null;
report = AddReportToReport<Quittierungsbeleg>(report, defaultRo);
report = AddReportToReport<LeistungsnachweisSoziotherapie>(report, sozioRo);
if (report == null)
report = new XtraReport();
return report;
}
public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId)
{
return CreateServicesOverviewReportForRo(ro, null);
}
private XtraReport AddReportToReport<T>(XtraReport report, ServicesOverviewRO ro) where T : XtraReport, IBeWoReport<ServicesOverviewRO>, new()
{
if (ro.Services.Count > 0)
{
if (report == null)
{
report = new T();
((T)report).SetReportDataSource(ro);
}
else
{
if (report.Pages.Count == 0)
{
report.CreateDocument();
}
XtraReport newReport = new T();
((T)newReport).SetReportDataSource(ro);
newReport.CreateDocument();
report.Pages.AddRange(newReport.Pages);
}
}
return report;
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace VereinZurIntegrationChemnitz.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var cat = sr.ServiceDescription.Category;
if (sr.CostBearer != null && !sr.CostBearer.Name.Contains("LWL") && !sr.CostBearer.Name.Contains("LVR") &&
!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie"))
{
return new SoziotherapieInvoiceCreation();
}
}
}
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
}
}
}

View File

@@ -0,0 +1,170 @@
using System;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using System.Text.RegularExpressions;
using System.IO;
using DevExpress.XtraPrinting.Drawing;
namespace VereinZurIntegrationChemnitz
{
public partial class LeistungsnachweisSoziotherapie : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public LeistungsnachweisSoziotherapie()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
if (pRO.Mandator.Logo?.Original is object)
xrPictureBox3.ImageSource = new ImageSource(false, pRO.Mandator.Logo.Original);
double gesamt = 0;
double gesamtGruppe = 0;
if (pRO.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
ServicesOverviewRO.CreateSignatureString(s);
var serviceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(s.ServiceRecordOid);
pRO.ReferenceNumber = serviceRecord.CostBearer2SupportConcept.CustomerReferenceNumber;
if (serviceRecord.CostBearer2SupportConcept.ApprovedStartDate != null)
pRO.ApprovedStartDate = String.Format("{0:dd.MM.yyyy}", serviceRecord.CostBearer2SupportConcept.ApprovedStartDate);
if (serviceRecord.CostBearer2SupportConcept.ApprovedEndDate != null)
pRO.ApprovedEndDate = String.Format("{0:dd.MM.yyyy}", serviceRecord.CostBearer2SupportConcept.ApprovedEndDate);
var srDc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(serviceRecord);
s.GoalList = String.Empty;
if (srDc.Goals != null && srDc.Goals.Count > 0)
{
foreach (var goal in srDc.Goals)
{
if (!String.IsNullOrEmpty(goal.Abbreviation))
{
if (s.GoalList.Length > 0)
s.GoalList += ", ";
s.GoalList += goal.Abbreviation;
}
}
}
if (s.ServiceDescription.Contains("Gruppe"))
{
s.IsGroup = true;
gesamtGruppe += s.Minutes;
s.ServiceDescription = "E";
if (s.Minutes <= 45)
s.Notice5 = "2002678";
else if (s.Minutes <= 60)
s.Notice5 = "2002677";
else
s.Notice5 = "2002672";
}
else
{
gesamt += s.Minutes;
}
if (s.ServiceDescription.Contains("Video"))
{
s.ServiceDescription = "V";
if (s.Minutes <= 30)
{
s.Notice5 = "2001615";
}
else
{
s.Notice5 = "2001616";
}
}
else if (s.ServiceDescription.Contains("Telefon"))
{
s.ServiceDescription = "T";
if (s.Minutes <= 30)
{
s.Notice5 = "2001618";
}
else
{
s.Notice5 = "2001617";
}
}
else if (s.ServiceDescription.Contains("Aufsuchende Prob"))
{
s.ServiceDescription = "A";
s.Notice5 = "2001607";
}
else
{
if (s.ServiceDescription.Contains("Büro"))
{
s.ServiceDescription = "E";
}
else if (s.ServiceDescription.Contains("Aufsuchend"))
{
s.ServiceDescription = "A";
}
if (s.Minutes <= 10)
{
s.Notice5 = "2001613";
}
else if (s.Minutes <= 30)
{
s.Notice5 = "2001612";
}
else if (s.Minutes <= 45)
{
s.Notice5 = "2001611";
}
else
{
s.Notice5 = "2001610";
}
}
}
}
cellGesamt.Text = String.Format("{0:0.00}", gesamt / 60);
if (gesamtGruppe > 0)
{
cellGesamtGruppe.Text = String.Format("{0:0.00}", gesamtGruppe / 90);
}
this.bindingSource1.DataSource = pRO;
}
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);
System.Drawing.Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public System.Drawing.Image ByteArrayToImage(byte[] byteArrayIn)
{
using (var memoryStream = new MemoryStream(byteArrayIn))
{
return System.Drawing.Image.FromStream(memoryStream);
}
}
}
}

File diff suppressed because it is too large Load Diff

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -19,7 +19,7 @@ namespace VereinZurIntegrationChemnitz.Properties {
// -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", "17.0.0.0")]
[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 {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
using System;
using System.Text;
namespace VereinZurIntegrationChemnitz
{
[IDSpecificClass(Identifier = "RechnungSoziotherapie")]
public partial class SoziotherapieRechnung : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public SoziotherapieRechnung()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
string poBox = null;
if (pRO.InvoiceBase.RecipientContactInformations.Count > 0)
{
foreach (var i in pRO.InvoiceBase.RecipientContactInformations)
{
if (i.ContactType == BS.Shared.ContactType.private_POBox)
poBox = i.ContactValue;
}
}
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
{
sb.AppendLine(pRO.RecipientAddressLine1);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(poBox))
{
sb.AppendLine(poBox);
}
else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
{
sb.AppendLine(pRO.RecipientPoBox);
}
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine("");
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
decimal hours = 0;
if (pRO.ServiceInvoicePeriods != null)
{
foreach (var sip in pRO.ServiceInvoicePeriods)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
hours += ii.Hours ?? 0;
if (ii.UnitDescription == null || !ii.UnitDescription.StartsWith("GPos"))
{
ii.UnitDescription = "";
}
// Einheit setzen
ii.HourlyRateString = "Stunden";
if (ii.ServiceDescription != null && ii.ServiceDescription.ToLower().Contains("hausbesuchspauschale"))
{
ii.HourlyRateString = "";
}
}
}
}
if (String.IsNullOrEmpty(pRO.Notice))
{
xrLabel5.Visible = false;
}
this.bindingSource1.DataSource = pRO;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C1FED668-ADB9-47E0-B589-1389618E1B6E}</ProjectGuid>
<ProjectGuid>{EA969934-60A6-459F-A07C-1CF537ED775E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VereinZurIntegrationChemnitz</RootNamespace>
@@ -55,21 +55,23 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomInvoiceFactory.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="RechnungABW67.cs">
<Compile Include="Calculations\CustomGroupDurationCalculator.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="CustomReportCreator.cs" />
<Compile Include="LeistungsnachweisSoziotherapie.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="RechnungABW67.Designer.cs">
<DependentUpon>RechnungABW67.cs</DependentUpon>
<Compile Include="LeistungsnachweisSoziotherapie.designer.cs">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="WBWInvoiceCreation.cs" />
<Compile Include="SoziotherapieRechnung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SoziotherapieRechnung.Designer.cs">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
@@ -90,14 +92,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<EmbeddedResource Include="LeistungsnachweisSoziotherapie.resx">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="RechnungABW67.resx">
<DependentUpon>RechnungABW67.cs</DependentUpon>
<SubType>Designer</SubType>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="SoziotherapieRechnung.resx">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@@ -180,7 +180,7 @@ namespace BeWo.Service.Plugins
//t = "5809130435"; // Lebenshilfe Kusel
//t = "3367947706"; // PaS Mönchengladbach
//t = "2331203795"; // BeWo für dich
//t = "5426234256"; // SKM Leverkusen
t = "5426234256"; // SKM Leverkusen
//t = "4137042939"; // MLG Lebengestalten / Haus Müllestumpe
//t = "5260936181"; // LORI
//t = "1931553444"; // HIBA
@@ -445,6 +445,7 @@ namespace BeWo.Service.Plugins
//t = "1996525562"; // HW Hilfswerk Inklusion und Teilhabe
//t = "2348634192"; // Ravensburger Jugendhilfeverein e.V.
//t = "5692795989"; // ABW Ilse Fretz
t = "1982851778"; // Verein zur Integration Chemnitz
return t;
#else

View File

@@ -1569,7 +1569,24 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
ServiceLogic.SetActivationType<AbsenceTime>(pOid2Version, ActivationTypeId.Deleted);
var user = GetLoggedInUser();
if (!UserRightHelper.UserHasRight(user, UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry))
{
var forbiddenOids = DAOFactory.GenericDAO.LoadByIDs<AbsenceTime>(pOid2Version.Keys)
.Where(a => a.EmployeeOid != null && a.End.HasValue && a.End.Value.Date < DateTime.Today)
.Select(a => a.Oid.Value)
.ToList();
foreach (var oid in forbiddenOids)
{
pOid2Version.Remove(oid);
}
}
if (pOid2Version.Count > 0)
{
ServiceLogic.SetActivationType<AbsenceTime>(pOid2Version, ActivationTypeId.Deleted);
}
}
catch (Exception e)
{

View File

@@ -3,6 +3,7 @@ using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Data.ICD10;
using BeWo.Data.ICF;
using BeWo.Data.Security;
using BeWo.Data.Utils;
using BeWo.Service.AI;
using BeWo.Service.Configuration;
@@ -4391,8 +4392,15 @@ namespace BeWo.Service.ServiceImplementations
{
//ServiceLogic.SetActivationType<AbsenceTime>(pOid2Version, ActivationTypeId.Deleted);
var lOriginals = DAOFactory.GenericDAO.LoadByIDs<AbsenceTime>(pOid2Version.Select(e => e.Key)).Where(e => e.SystemEntryID == null).ToList();
DAOFactory.GenericDAO.Delete(lOriginals);
var abwesenheiten = DAOFactory.GenericDAO.LoadByIDs<AbsenceTime>(pOid2Version.Select(e => e.Key)).Where(e => e.SystemEntryID == null).ToList();
var user = SecurityUtils.GetLoggedInUser();
if (!UserRightHelper.UserHasRight(user, UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry))
{
abwesenheiten = abwesenheiten.Where(a => a.EmployeeOid == null || !a.End.HasValue || a.End.Value.Date >= DateTime.Today).ToList();
}
DAOFactory.GenericDAO.Delete(abwesenheiten);
}
catch (Exception e)
{
@@ -6876,6 +6884,12 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
var user = SecurityUtils.GetLoggedInUser();
if (absenceTimeDC.IsInThePast && !UserRightHelper.UserHasRight(user, UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry))
{
throw new InvalidOperationException("Sie haben nicht das Recht, bereits vergangene Abwesenheiten zu löschen.");
}
var emp = DAOFactory.GenericDAO.GetByID<Employee>(absenceTimeDC.EmployeeOid.Value);
emp.AbsenceTimes.Remove(emp.AbsenceTimes.First(a => a.Oid == absenceTimeDC.AbsenceTimeOid));
DAOFactory.GenericDAO.Update(emp);

View File

@@ -463,6 +463,7 @@ namespace BS.Shared
Employee_AllowViewOwnTeam = 20006,
Employee_AllowEditAbsenceTimes = 20007,
Employee_AllowEditOvertimes = 20008,
Employee_AllowDeleteAbsenceTimesAfterExpiry = 20009,
Employee_ViewNotizen = 20010,
Employee_EditNotizen = 20011,

View File

@@ -747,6 +747,7 @@ namespace BS.Shared.Core
dict.Add(UserRightType.Employee_ViewNotizen, Translator.Translate("MitarbeiterSingular") + " Notizen ansehen");
dict.Add(UserRightType.Employee_EditNotizen, Translator.Translate("MitarbeiterSingular") + " Notizen bearbeiten");
dict.Add(UserRightType.Employee_DeleteNotizen, Translator.Translate("MitarbeiterSingular") + " Notizen löschen");
dict.Add(UserRightType.Employee_AllowDeleteAbsenceTimesAfterExpiry, Translator.Translate("MitarbeiterSingular") + " Abwesenheiten löschen nach Ablauf");
dict.Add(UserRightType.OrganisationView_Create, Translator.Translate("Organisationen anlegen"));
dict.Add(UserRightType.OrganisationView_Delete, Translator.Translate("Organisationen löschen"));
@@ -909,6 +910,7 @@ namespace BS.Shared.Core
dict.Add(UserRightType.KalenderRessourcentermineAndererAendern, "Termine mit Ressourcen anderer " + Translator.Translate("MitarbeiterPlural") + " ändern");
dict.Add(UserRightType.KalenderInZeiterfassungUebernehmen, Translator.Translate("Termine in Zeiterfassung übernehmen"));
dict.Add(UserRightType.KalenderInAbwesenheitenUebernehmen, Translator.Translate("Termine in Abwesenheiten übernehmen"));
dict.Add(UserRightType.KalenderRessourcenDoppeltBuchen, Translator.Translate("Ressourcen doppelt buchen"));
dict.Add(UserRightType.TextbausteineAlleAnsehen, Translator.Translate("Textbausteine ansehen (allgemeine)"));
dict.Add(UserRightType.TextbausteineNurEigeneAnsehen, Translator.Translate("Textbausteine ansehen (eigene)"));
dict.Add(UserRightType.TextbausteineAlleBearbeiten, Translator.Translate("Textbausteine bearbeiten (allgemeine)"));

View File

@@ -38,6 +38,8 @@ namespace BS.Shared.DataContracts
[DataMember]
public string BackgroundColor { get; set; }
public bool IsInThePast => End.HasValue && End.Value.Date < DateTime.Today;
public bool IsAllDay
{
get