diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index d374a5ae3..3bae79ba7 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -962,6 +962,8 @@
BSLogoControl.xaml
+
+
@@ -995,6 +997,7 @@
+
diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user
index 5b9016668..c3f5d6713 100644
--- a/BeWo/BeWo.csproj.user
+++ b/BeWo/BeWo.csproj.user
@@ -9,7 +9,7 @@
de-DE
false
- ProjectFiles
+ ShowAllFiles
false
diff --git a/BeWo/BeWoApp.xaml b/BeWo/BeWoApp.xaml
index 92ae98733..e26b672d2 100644
--- a/BeWo/BeWoApp.xaml
+++ b/BeWo/BeWoApp.xaml
@@ -83,6 +83,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/Converter/TooltipTextConverter.cs b/BeWo/Converter/TooltipTextConverter.cs
index d3dd67712..f38cde2fe 100644
--- a/BeWo/Converter/TooltipTextConverter.cs
+++ b/BeWo/Converter/TooltipTextConverter.cs
@@ -13,7 +13,12 @@ namespace BeWo.Converter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if(value is GkvAbrechnungVM gkv)
+ if (value is bool val_bool)
+ {
+ return val_bool ? null : parameter;
+ }
+
+ if (value is GkvAbrechnungVM gkv)
{
if (parameter is string s)
{
@@ -29,6 +34,12 @@ namespace BeWo.Converter
return invoice.IsGkvValidError;
}
+ if (value is MandatorVM mandator)
+ {
+ return mandator.CanEditIKLeistungserbringerTooltip;
+ }
+
+
return "xxx";
}
diff --git a/BeWo/Converter/ValidationConverter.cs b/BeWo/Converter/ValidationConverter.cs
new file mode 100644
index 000000000..6ee6613a2
--- /dev/null
+++ b/BeWo/Converter/ValidationConverter.cs
@@ -0,0 +1,32 @@
+using BeWo.ViewModel;
+using BS.Shared;
+using BS.Shared.Core;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace BeWo.Converter
+{
+ public class ValidationConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if(value is string val_str && parameter is ValidationType val_type)
+ {
+ return Validator.IsValid(val_type, val_str);
+ }
+
+ return null;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/BeWo/Converter/ValidationToBrushConverter.cs b/BeWo/Converter/ValidationToBrushConverter.cs
new file mode 100644
index 000000000..59e980295
--- /dev/null
+++ b/BeWo/Converter/ValidationToBrushConverter.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace BeWo.Converter
+{
+ public class ValidationToBrushConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if(value is null)
+ {
+ return Brushes.Black;
+ }
+
+ if(value is bool val_bool)
+ {
+ return val_bool ? Brushes.Black : Brushes.Red;
+ }
+
+ return Brushes.Blue;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/BeWo/Converter/ValidationToTooltipConverter.cs b/BeWo/Converter/ValidationToTooltipConverter.cs
new file mode 100644
index 000000000..1aa37ac78
--- /dev/null
+++ b/BeWo/Converter/ValidationToTooltipConverter.cs
@@ -0,0 +1,36 @@
+using BS.Shared;
+using BS.Shared.Core;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace BeWo.Converter
+{
+ public class ValidationToTooltipConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is null)
+ {
+ return null;
+ }
+
+ if (value is bool val_bool && parameter is ValidationType val_type)
+ {
+ return val_bool ? null : Validator.InvalidTooltipTxt(val_type);
+ }
+
+ return "xxx";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs
index e717bb81b..e9469f8cb 100644
--- a/BeWo/DebugConfig.cs
+++ b/BeWo/DebugConfig.cs
@@ -122,8 +122,8 @@ namespace BeWo
new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureDakota,
- AutoLogin = true,
- SelectView = UIContext.Finance,
+ AutoLogin = false,
+ //SelectView = UIContext.Finance,
SelectIndex = 8,
Username = "m1",
Password = "bewobewo",
diff --git a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
index 736b25b12..b0e4a10fe 100644
--- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
+++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
@@ -63,8 +63,6 @@ namespace BeWo.View.Detail.Accounting
private void RefreshGkvAbrechnungenList()
{
- var test = datagrid_gkvAbrechnungen;
-
ServiceFacade.DoAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(null), UpdateGkvAbrechnungList);
}
@@ -80,6 +78,8 @@ namespace BeWo.View.Detail.Accounting
datagrid_gkvAbrechnungen.Visibility = Visibility.Visible;
UpdateDataGridFilter();
+
+ gridView.BestFitColumn(ColumnButtons);
});
}
diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index 3388c399c..7aaf8fb46 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -14,6 +14,7 @@
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:r="clr-namespace:BeWo.Security"
+ xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:val="clr-namespace:BeWo.Validation"
@@ -954,10 +955,28 @@
Grid.Row="5"
Grid.Column="2"
Content="{markup:Translate Versichertennummer}" />
+
+
-
-
- Groß
+
+ Groß
+
+ IsEnabled="{Binding Path=CanEditIKLeistungserbringer}"
+ Text="{Binding Path=IKLeistungserbringer, UpdateSourceTrigger=PropertyChanged}"
+ TextChanged="TextBox_TextChanged"
+ ToolTip="{Binding Path=CanEditIKLeistungserbringerTooltip}"
+ ToolTipService.ShowOnDisabled="True" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -39,6 +40,7 @@
+
diff --git a/ReportImp/DiakonischesWerkDinslakenSozio/Invoicing/SoziotherapieInvoiceCreation.cs b/ReportImp/DiakonischesWerkDinslakenSozio/Invoicing/SoziotherapieInvoiceCreation.cs
index c13786d0f..dd466a56b 100644
--- a/ReportImp/DiakonischesWerkDinslakenSozio/Invoicing/SoziotherapieInvoiceCreation.cs
+++ b/ReportImp/DiakonischesWerkDinslakenSozio/Invoicing/SoziotherapieInvoiceCreation.cs
@@ -66,18 +66,18 @@ namespace DiakonischesWerkDinslakenSozio.Invoicing
if (ii.ItemDescription.ToLower().Contains("gruppe"))
{
- if (iServiceRecord.RoundedDuration <= 45)
- {
- ii.UnitDescription = "GPos: 2002678"; // 2 bis 5 Teilnehmer
- }
- else if (iServiceRecord.RoundedDuration <= 60)
- {
- ii.UnitDescription = "GPos: 2002677"; // 2 bis 5 Teilnehmer
- }
- else
- {
+ //if (iServiceRecord.RoundedDuration <= 45)
+ //{
+ // ii.UnitDescription = "GPos: 2002678"; // 2 bis 5 Teilnehmer
+ //}
+ //else if (iServiceRecord.RoundedDuration <= 60)
+ //{
+ // ii.UnitDescription = "GPos: 2002677"; // 2 bis 5 Teilnehmer
+ //}
+ //else
+ //{
ii.UnitDescription = "GPos: 2002672"; // 2 bis 5 Teilnehmer - 90 Min
- }
+ //}
// Gibt 2 Preise, einmal für Funktion Primärkasse und einmal für Funktion Ersatzkasse
var preisGruppe = GetGruppenPreis(scap.CostBearer2SupportConcept, iServiceRecord.Start.Value);
ii.AmountPerUnit = preisGruppe;
@@ -92,17 +92,13 @@ namespace DiakonischesWerkDinslakenSozio.Invoicing
ii.AmountTotal = ii.AmountPerUnit * ii.UnitCount;
ii.GrossAmountTotal = ii.AmountTotal;
- if (ii.ItemDescription.ToLower().Contains("probatorik"))
- {
- ii.UnitDescription = "GPos: 2001607";
- }
- else if (ii.ItemDescription.ToLower().Contains("video"))
+ if (ii.ItemDescription.ToLower().Contains("video"))
{
if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001616";
}
- else if (iServiceRecord.RoundedDuration > 30)
+ else
{
ii.UnitDescription = "GPos: 2001615";
}
@@ -113,30 +109,38 @@ namespace DiakonischesWerkDinslakenSozio.Invoicing
{
ii.UnitDescription = "GPos: 2001618";
}
- else if (iServiceRecord.RoundedDuration > 30)
+ else
{
ii.UnitDescription = "GPos: 2001617";
}
}
- else
+ else if (ii.ItemDescription.ToLower().Contains("aufsuchende einheit"))
{
- if (iServiceRecord.RoundedDuration <= 10)
+ if (iServiceRecord.RoundedDuration <= 30)
{
- ii.UnitDescription = "GPos: 2001613";
+ ii.UnitDescription = "GPos: 2001612 / 2009690";
}
- else if (iServiceRecord.RoundedDuration <= 30)
+ else
{
- ii.UnitDescription = "GPos: 2001612";
+ ii.UnitDescription = "GPos: 2001610 / 2009690";
}
- else if (iServiceRecord.RoundedDuration <= 45)
+ }
+ else if (ii.ItemDescription.ToLower().Contains("probatorik"))
+ {
+ if (ii.ItemDescription.ToLower().Contains("aufsuchend"))
{
- ii.UnitDescription = "GPos: 2001611";
+ ii.UnitDescription = "GPos: 2001607 / 2009690";
}
- else if (iServiceRecord.RoundedDuration > 45)
+ else if (ii.ItemDescription.ToLower().Contains("büro"))
{
- ii.UnitDescription = "GPos: 2001610";
+ ii.UnitDescription = "GPos: 2001607";
}
}
+
+ else if (ii.ItemDescription.ToLower().Contains("büro-einheit"))
+ {
+ ii.UnitDescription = "GPos: 2001610";
+ }
}
return ii;
diff --git a/ReportImp/DiakonischesWerkDinslakenSozio/LeistungsnachweisSoziotherapie.cs b/ReportImp/DiakonischesWerkDinslakenSozio/LeistungsnachweisSoziotherapie.cs
index 7333a2617..cda07e0bc 100644
--- a/ReportImp/DiakonischesWerkDinslakenSozio/LeistungsnachweisSoziotherapie.cs
+++ b/ReportImp/DiakonischesWerkDinslakenSozio/LeistungsnachweisSoziotherapie.cs
@@ -58,7 +58,7 @@ namespace DiakonischesWerkDinslakenSozio
{
s.IsGroup = true;
gesamtGruppe += s.Minutes;
- s.ServiceDescription = "E";
+ s.ServiceDescription = "G";
s.Notice5 = "2002672";
}
else
@@ -71,11 +71,11 @@ namespace DiakonischesWerkDinslakenSozio
s.ServiceDescription = "V";
if (s.Minutes <= 30)
{
- s.Notice5 = "2001615";
+ s.Notice5 = "2001616";
}
else
{
- s.Notice5 = "2001616";
+ s.Notice5 = "2001615";
}
}
else if (s.ServiceDescription.Contains("Telefon"))
@@ -90,27 +90,37 @@ namespace DiakonischesWerkDinslakenSozio
s.Notice5 = "2001617";
}
}
- else if (s.ServiceDescription.Contains("Probe"))
- {
- s.Notice5 = "2001607";
- }
-
- else if (s.ServiceDescription.Contains("Einrichtung") || s.ServiceDescription == "E" || s.ServiceDescription.Contains("Gruppe"))
- {
- s.ServiceDescription = "E";
- }
- else
+ else if (s.ServiceDescription.Contains("Aufsuchende Einheit"))
{
s.ServiceDescription = "A";
if (s.Minutes <= 30)
{
- s.Notice5 = "2001612";
+ s.Notice5 = "2001612 / 2009690";
}
else
{
- s.Notice5 = "2001610";
+ s.Notice5 = "2001610 / 2009690";
}
}
+ else if (s.ServiceDescription.Contains("Probatorik"))
+ {
+ if (s.ServiceDescription.ToLower().Contains("aufsuchend"))
+ {
+ s.ServiceDescription = "AP";
+ s.Notice5 = "2001607 / 2009690";
+ }
+ else if (s.ServiceDescription.ToLower().Contains("büro"))
+ {
+ s.ServiceDescription = "P";
+ s.Notice5 = "2001607";
+ }
+ }
+
+ else if (s.ServiceDescription.Contains("Büro-Einheit"))
+ {
+ s.ServiceDescription = "E";
+ s.Notice5 = "2001610";
+ }
}
}
diff --git a/Service/Core/Utils.cs b/Service/Core/Utils.cs
index 185bde3aa..4b85928db 100644
--- a/Service/Core/Utils.cs
+++ b/Service/Core/Utils.cs
@@ -88,10 +88,10 @@ namespace BeWo.Service.Core
public static bool SendMail(string subject, string body, string toAddress)
{
- return SendMail(null, null, subject, body, toAddress);
+ return SendMail(subject, body, toAddress, null, null);
}
- public static bool SendMail(string senderName, string senderEMail, string subject, string body, string toAddress)
+ public static bool SendMail(string subject , string body, string toAddress, string senderName, string senderEMail)
{
var server = ConfigurationManager.AppSettings.Get("SmptServer");
var user = ConfigurationManager.AppSettings.Get("SmtpUser");
@@ -114,27 +114,28 @@ namespace BeWo.Service.Core
var body2 = "Kunde: " + MultitenancyOperationContextExt.Current.Tenant;
//body2 += "\r\nIP: " + GetClientIP();
body += "\n\n" + body2;
- //}
+ //}
+
-
//if (to.Equals())
-
- return SendMail(senderEMail.Trim(), senderName, to, subject, body, server, user, pass, sendAsync);
- }
+ senderEMail = senderEMail.Trim();
- public static bool SendMail(string fromEMail, string fromName, string to, string subject, string body, string smtpServer, string smtpUser, string smtpPassword, bool sendAsync)
+ return SendMail(subject, body, to, senderName, senderEMail, server, user, pass, sendAsync);
+ }
+
+ public static bool SendMail(string subject, string body, string toAddress, string senderName, string senderEMail, string smtpServer, string smtpUser, string smtpPassword, bool sendAsync)
{
try
{
- if (!IsValidEmail(to) || !IsValidEmail(fromEMail))
+ if (!IsValidEmail(toAddress) || !IsValidEmail(senderEMail))
{
return false;
}
- String from = fromEMail;
+ String from = senderEMail;
- if (to.Equals("support@bewoplaner.de"))
+ if (toAddress.Equals("support@bewoplaner.de"))
{
var supportSenderMail = ConfigurationManager.AppSettings.Get("SupportSenderEMail");
if (String.IsNullOrEmpty(supportSenderMail))
@@ -146,20 +147,20 @@ namespace BeWo.Service.Core
MailMessage message = null;
- if (String.IsNullOrEmpty(fromName))
- message = new MailMessage(from, to, subject, body);
+ if (String.IsNullOrEmpty(senderName))
+ message = new MailMessage(from, toAddress, subject, body);
else
{
MailAddress fromMailAddress = new MailAddress(from);
- MailAddress toMailAddress = new MailAddress(to);
+ MailAddress toMailAddress = new MailAddress(toAddress);
message = new MailMessage(fromMailAddress, toMailAddress);
message.Subject = subject;
message.Body = body;
}
- if (fromEMail != from)
+ if (senderEMail != from)
{
- message.ReplyToList.Add(new MailAddress(fromEMail, fromName));
+ message.ReplyToList.Add(new MailAddress(senderEMail, senderName));
}
diff --git a/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs b/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs
index db47101d7..1c455471f 100644
--- a/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs
+++ b/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs
@@ -88,7 +88,7 @@ namespace BeWo.Service.DCEntityMapper
if (isReady)
{
- if(!DakotaValidator.IsOrganisationInformationValid(orga.IKDatenannahmestelle, orga.IKKostentrager, orga.IKKrankenkasse, orga.BezDatenannahmestelle))
+ if(!Validator.IsOrganisationInformationValid(orga.IKDatenannahmestelle, orga.IKKostentrager, orga.IKKrankenkasse, orga.BezDatenannahmestelle))
{
isReady = false;
tooltip = "Organisation fehlen Informationen";
diff --git a/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs b/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs
index f93c4d34f..22e09cb19 100644
--- a/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs
+++ b/Service/DCEntityMapper/InvoiceBaseDC_InvoiceBase.cs
@@ -147,7 +147,7 @@ namespace BeWo.Service.DCEntityMapper
{
pDataContract.CustomerFirstName = customer.Person.FirstName;
pDataContract.CustomerLastName = customer.Person.LastName;
- var error = DakotaValidator.ValidateCustomer(customer.InsuranceNumber, customer.VersichertenStatus);
+ var error = Validator.ValidateCustomer(customer.InsuranceNumber, customer.VersichertenStatus);
pDataContract.IsGkvValidError = error;
pDataContract.IsGkvValid = error is null;
}
diff --git a/Service/DCEntityMapper/MandatorDC_Mandator.cs b/Service/DCEntityMapper/MandatorDC_Mandator.cs
index 9929c3a4b..0378ea482 100644
--- a/Service/DCEntityMapper/MandatorDC_Mandator.cs
+++ b/Service/DCEntityMapper/MandatorDC_Mandator.cs
@@ -1,6 +1,8 @@
+using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared.DataContracts;
+using System;
namespace BeWo.Service.DCEntityMapper
{
@@ -30,6 +32,13 @@ namespace BeWo.Service.DCEntityMapper
#endif
pDataContract.Apikey = pEntity.Apikey;
pDataContract.IKLeistungserbringer = pEntity.IKLeistungserbringer;
+ var can_edit = GetCanEditIKLeistungserbringer();
+
+ pDataContract.CanEditIKLeistungserbringer = can_edit;
+ pDataContract.CanEditIKLeistungserbringerTooltip = can_edit ? null :
+ "Mit dem Senden mind. einer GKV Abrechnung haben Sie sich bereits\n" +
+ "mit dieser IK bei uns registiert. Bei Änderungswunsch wenden Sie\n" +
+ "sich bitte an unseren Support.";
return pDataContract;
}
@@ -65,5 +74,21 @@ namespace BeWo.Service.DCEntityMapper
return pDC.MandatorOid == pEntity.Oid;
}
+
+ private bool GetCanEditIKLeistungserbringer()
+ {
+ try
+ {
+ var row_count = DAOFactory.GenericDAO.GetRowCount();
+
+ return row_count == 0;
+ }
+ catch (Exception)
+ {
+
+ }
+
+ return true;
+ }
}
}
\ No newline at end of file
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index fa63a1a5c..e3cb31760 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
+using BeWo.Data;
using BS.Shared.Core;
namespace BeWo.Service.Plugins
@@ -391,7 +392,7 @@ namespace BeWo.Service.Plugins
//t = "7653029063"; // SkF Leverkusen JuHi
//t = "1453324901"; // Akkurat
//t = "5000000000";
- //t = "5564670353"; // Mittelpunkt GbR
+ t = "5564670353"; // Mittelpunkt GbR
//t = "3788859817"; // Zukunft Leben (Stephan Hekermann)
//t = "2663321234"; // Aachener Laienhelfer Initiative e.V.
//t = "6290975576"; // Caritasverband Kelheim
diff --git a/Service/Plugins/VacationService.cs b/Service/Plugins/VacationService.cs
index 065eb1f15..97978092b 100644
--- a/Service/Plugins/VacationService.cs
+++ b/Service/Plugins/VacationService.cs
@@ -335,7 +335,7 @@ namespace BeWo.Service.Plugins
{
var res = new List();
var filters = new List { "URLAUB" };
- var reasons = DAOFactory.GenericDAO.GetAllActive();
+ var reasons = DAOFactory.GenericDAO.GetAll();
foreach (var reason in reasons)
{
diff --git a/Service/ServiceImplementations/AccountingServiceImp.cs b/Service/ServiceImplementations/AccountingServiceImp.cs
index 619484017..20fb8a222 100644
--- a/Service/ServiceImplementations/AccountingServiceImp.cs
+++ b/Service/ServiceImplementations/AccountingServiceImp.cs
@@ -1007,12 +1007,12 @@ namespace BeWo.Service.ServiceImplementations
var manager = new DakotaManager();
var mandatordc = new OperationsServiceImp().GetMandator();
- DakotaValidator.ValidateMandator(mandatordc);
+ Validator.ValidateMandator(mandatordc);
var gkvAbrechnungDC = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(gkvAbrechnung);
var orgadc = gkvAbrechnungDC.Organisation;
- DakotaValidator.ValidateOrganisation(orgadc);
+ Validator.ValidateOrganisation(orgadc);
var datenannahmestelle = orgadc.IKDatenannahmestelle;
var (datenaustauschreferenz, transfernummer) = GetNextDatenaustauschreferenzTransfernummer(gkvAbrechnung, datenannahmestelle);
@@ -1032,7 +1032,7 @@ namespace BeWo.Service.ServiceImplementations
var servicedc = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(service);
var customerdc = MapperFactory.CustomerDC_Customer.MapToNewDC(customer);
- DakotaValidator.ValidateCustomer(customerdc);
+ Validator.ValidateCustomer(customerdc);
manager.Add(servicedc, orgadc, customerdc, mandatordc, dat_short, tra_short);
}
diff --git a/Service/ServiceImplementations/CustomerServiceImp.cs b/Service/ServiceImplementations/CustomerServiceImp.cs
index ef1a05af3..3430fb140 100644
--- a/Service/ServiceImplementations/CustomerServiceImp.cs
+++ b/Service/ServiceImplementations/CustomerServiceImp.cs
@@ -859,7 +859,7 @@ namespace BeWo.Service.ServiceImplementations
{
IList list = DAOFactory.GenericDAO.GetAllActiveAndArchived();
- list = list.Where(x => DakotaValidator.IsOrganisationInformationValid(x.IKDatenannahmestelle, x.IKKostentrager, x.IKKrankenkasse, x.BezDatenannahmestelle)).ToList();
+ list = list.Where(x => Validator.IsOrganisationInformationValid(x.IKDatenannahmestelle, x.IKKostentrager, x.IKKrankenkasse, x.BezDatenannahmestelle)).ToList();
return CreateCompactOrganisations(list);
}
diff --git a/Service/ServiceImplementations/MailServiceImp.cs b/Service/ServiceImplementations/MailServiceImp.cs
index b2ded7807..27381b513 100644
--- a/Service/ServiceImplementations/MailServiceImp.cs
+++ b/Service/ServiceImplementations/MailServiceImp.cs
@@ -122,7 +122,7 @@ namespace BeWo.Service.ServiceImplementations
}
}
- return Utils.SendMail(senderName, senderEMail, subject, body, null);
+ return Utils.SendMail(subject, body, null, senderName, senderEMail);
}
private MailDC CreateMailDC(Mail2Receiver m2r)
diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs
index 10855aa25..1976055f1 100644
--- a/Shared/BeWoEntityEnums.cs
+++ b/Shared/BeWoEntityEnums.cs
@@ -1297,4 +1297,13 @@ namespace BS.Shared
Erprobung,
Echt
}
+
+ public enum ValidationType
+ {
+ CustomerVersichertenstatus,
+ CustomerVersichertennummer,
+ OrganisationIKNumber,
+ OrganisationLeistungserbringergruppe,
+ OrganisationBezDatenannahmestelle
+ }
}
\ No newline at end of file
diff --git a/Shared/Core/DakotaValidator.cs b/Shared/Core/Validator.cs
similarity index 65%
rename from Shared/Core/DakotaValidator.cs
rename to Shared/Core/Validator.cs
index 873283dc3..57e70ea9e 100644
--- a/Shared/Core/DakotaValidator.cs
+++ b/Shared/Core/Validator.cs
@@ -9,8 +9,49 @@ using System.Threading.Tasks;
namespace BS.Shared.Core
{
- public static class DakotaValidator
+ public static class Validator
{
+ public static bool? IsValid(ValidationType val_type, string val_str)
+ {
+ if (string.IsNullOrEmpty(val_str))
+ return null;
+
+ switch (val_type)
+ {
+ case ValidationType.CustomerVersichertenstatus:
+ return IsVersichertenstatusValid(val_str);
+ case ValidationType.CustomerVersichertennummer:
+ return IsVersichertennummerValid(val_str);
+ case ValidationType.OrganisationIKNumber:
+ return IsIKNumberValid(val_str);
+ case ValidationType.OrganisationLeistungserbringergruppe:
+ return IsLeistungserbringergruppeValid(val_str);
+ case ValidationType.OrganisationBezDatenannahmestelle:
+ return IsBezDatenannahmestelleValid(val_str);
+ }
+
+ return false;
+ }
+
+ public static string InvalidTooltipTxt(ValidationType val_type)
+ {
+ switch (val_type)
+ {
+ case ValidationType.CustomerVersichertenstatus:
+ return "CustomerVersichertenstatus invalid";
+ case ValidationType.CustomerVersichertennummer:
+ return "CustomerVersichertennummer invalid";
+ case ValidationType.OrganisationIKNumber:
+ return "OrganisationIKNumber invalid";
+ case ValidationType.OrganisationLeistungserbringergruppe:
+ return "OrganisationLeistungserbringergruppe invalid";
+ case ValidationType.OrganisationBezDatenannahmestelle:
+ return "OrganisationBezDatenannahmestelle invalid";
+ }
+
+ return "xxx";
+ }
+
public static string ValidateCustomer(string insuranceNumber, string versichertenStatus)
{
bool valid_number = IsVersichertennummerValid(insuranceNumber);
@@ -26,21 +67,14 @@ namespace BS.Shared.Core
return null;
}
- ///
- /// Validiert in erster Phase den Mandator.
- ///
public static void ValidateMandator(MandatorDC mandatordc)
{
if (mandatordc == null)
throw new GkvException("Mandator ist null");
- if (!DakotaValidator.IsIKNumberValid(mandatordc.IKLeistungserbringer))
+ if (!Validator.IsIKNumberValid(mandatordc.IKLeistungserbringer))
throw new GkvException($"Die IK Nummer des Leistungserbringers \"{mandatordc.IKLeistungserbringer}\" ist ungültig.");
}
-
- ///
- /// Validiert in zweiter Phase die Daten. Bei Fehler wird eine DakotaException geworfen.
- ///
public static void ValidateCustomer(CustomerDC customerDC)
{
string error = null;
@@ -55,7 +89,6 @@ namespace BS.Shared.Core
if (error != null)
throw new GkvException(error);
}
-
public static void ValidateOrganisation(OrganisationDC orga)
{
string error = null;
@@ -76,17 +109,22 @@ namespace BS.Shared.Core
if (error != null)
throw new GkvException(error);
}
-
public static bool IsOrganisationInformationValid(string ik_datenannahmestelle, string ik_kostentrager, string ik_krankenkasse, string bez_datenannahmestelle)
- => IsIKNumberValid(ik_datenannahmestelle, ik_kostentrager, ik_krankenkasse) && !string.IsNullOrEmpty(bez_datenannahmestelle);
+ => IsIKNumberValid(ik_datenannahmestelle, ik_kostentrager, ik_krankenkasse) && IsBezDatenannahmestelleValid(bez_datenannahmestelle);
public static bool IsIKNumberValid(params string[] iks)
=> iks?.All(IsIKNumberValid) ?? false;
+ public static bool IsBezDatenannahmestelleValid(string bez_datenannahmestelle)
+ {
+ return !string.IsNullOrWhiteSpace(bez_datenannahmestelle);
+ }
public static bool IsIKNumberValid(string iknummer)
{
if (iknummer == null)
return false;
+ iknummer = iknummer.Trim();
+
if (iknummer.Length != 9)
return false;
@@ -97,7 +135,12 @@ namespace BS.Shared.Core
if (nummer == null)
return false;
- if (nummer.Length < 10)
+ nummer = nummer.Trim();
+
+ if (nummer.Length < 6)
+ return false;
+
+ if (nummer.Length > 12)
return false;
return true;
@@ -107,7 +150,15 @@ namespace BS.Shared.Core
if (status == null)
return false;
- if (status.Length != 5 && status.Length != 7)
+ status = status.Trim();
+
+ if (status.Length == 0)
+ return false;
+
+ if (status.Length == 6)
+ return false;
+
+ if (status.Length >= 8)
return false;
return true;
@@ -117,6 +168,8 @@ namespace BS.Shared.Core
if (code == null)
return false;
+ code = code.Trim();
+
if (code.Length != 5 && code.Length != 7)
return false;
diff --git a/Shared/DataContracts/MandatorDC.cs b/Shared/DataContracts/MandatorDC.cs
index 02b09bd88..1c9e00c80 100644
--- a/Shared/DataContracts/MandatorDC.cs
+++ b/Shared/DataContracts/MandatorDC.cs
@@ -58,5 +58,11 @@ namespace BS.Shared.DataContracts
[DataMember]
public string IKLeistungserbringer { get; set; }
+
+ [DataMember]
+ public bool CanEditIKLeistungserbringer { get; set; }
+
+ [DataMember]
+ public string CanEditIKLeistungserbringerTooltip { get; set; }
}
}
\ No newline at end of file
diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj
index c242fc85b..93b00d5e8 100644
--- a/Shared/Shared.csproj
+++ b/Shared/Shared.csproj
@@ -135,7 +135,7 @@
-
+