diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index d138aaca9..6310a42fc 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -9,8 +9,9 @@ VerticalAlignment="Stretch" Focusable="True"> - - + + + @@ -20,9 +21,14 @@ + - + + + + + @@ -45,7 +51,7 @@ - + @@ -81,7 +87,7 @@ - + @@ -126,7 +132,7 @@ - + @@ -169,7 +175,7 @@ - + diff --git a/BeWo/ViewModel/MandatorVM.cs b/BeWo/ViewModel/MandatorVM.cs index 168ece2c6..2e8960a41 100644 --- a/BeWo/ViewModel/MandatorVM.cs +++ b/BeWo/ViewModel/MandatorVM.cs @@ -39,6 +39,8 @@ namespace BeWo.ViewModel public static string PropertyName_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert"; + public static string PropertyName_IKLeistungserbringer = ""; + private long _BeWoClientType; private string _ClientId; @@ -71,6 +73,8 @@ namespace BeWo.ViewModel private string _Apikey; + private string _IKLeistungserbringer; + public MandatorVM(IList invoiceNumberList, MandatorDC pDC) : base(pDC, true) { _InvoiceNumberList = new BindingList(invoiceNumberList); @@ -434,6 +438,21 @@ namespace BeWo.ViewModel } } + public string IKLeistungserbringer + { + get { return this._IKLeistungserbringer; } + + set + { + if (this.AreDifferent(this._IKLeistungserbringer, value)) + { + this._IKLeistungserbringer = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKLeistungserbringer, value), nameof(IKLeistungserbringer)); + this.FirePropertyChanged(nameof(IKLeistungserbringer)); + } + } + } + protected override void InitByDataContract(MandatorDC pDataContract) { this._Name = pDataContract.Name; @@ -446,6 +465,7 @@ namespace BeWo.ViewModel this._Street = pDataContract.Street; this._Settings = pDataContract.Settings; this._Apikey = pDataContract.Apikey; + this._IKLeistungserbringer = pDataContract.IKLeistungserbringer; if (_Settings == null) { @@ -499,6 +519,7 @@ namespace BeWo.ViewModel pDataContract.Street = this._Street; pDataContract.Settings = this._Settings; pDataContract.Apikey = this._Apikey; + pDataContract.IKLeistungserbringer = this._IKLeistungserbringer; return pDataContract; } diff --git a/Dakota/Logic/DakotaFileCreator.cs b/Dakota/Logic/DakotaFileCreator.cs index 036af86a3..b0029c535 100644 --- a/Dakota/Logic/DakotaFileCreator.cs +++ b/Dakota/Logic/DakotaFileCreator.cs @@ -16,7 +16,7 @@ namespace Dakota.Logic { public static class DakotaFileCreator { - public static DakotaFile GenerateDakotaFile(List paras, InfoCreatorParameter2 para2) + public static DakotaFile GenerateDakotaFile(List paras, InfoCreatorParameterFix para2) { Reset(); diff --git a/Dakota/Logic/DakotaInfoCreator.cs b/Dakota/Logic/DakotaInfoCreator.cs index d513d1e61..2d7eb0462 100644 --- a/Dakota/Logic/DakotaInfoCreator.cs +++ b/Dakota/Logic/DakotaInfoCreator.cs @@ -26,7 +26,7 @@ namespace Dakota.Logic public string Belegnummer => "444444test"; } - public struct InfoCreatorParameter2 + public struct InfoCreatorParameterFix { private string _month; private string Absenderklassifikation => "SL"; @@ -38,6 +38,7 @@ namespace Dakota.Logic public DateTime Created { get; set; } public Mandator Mandator { get; set; } + public string IKLeistungserbringer => Mandator.IKLeistungserbringer; // SL // Stellen 3 bis 8 von AbsenderIK @@ -45,10 +46,14 @@ namespace Dakota.Logic public string LogischerDateiname => $"{Absenderklassifikation}{IKAbsender.Substring(2, 6)}{Dateiidentifizierer}{_month}"; public string PhysikalischerDateiname => "idkidkid.txt"; - public InfoCreatorParameter2(int month, Mandator mandator) + public InfoCreatorParameterFix(int month, Mandator mandator) { _month = month.ToString("D2"); Created = DateTime.Now; + + if (mandator is null) + throw new NotImplementedException("47930478164968"); + Mandator = mandator; } } @@ -89,7 +94,7 @@ namespace Dakota.Logic // return info; //} - internal static InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(InfoCreatorParameter2 para) + internal static InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(InfoCreatorParameterFix para) { var info = new InfoDateiNutzdaten(); @@ -105,8 +110,7 @@ namespace Dakota.Logic return info; } - - internal static InfoDateiAuftrags GetEmptyInfoAuftragsdatei(InfoCreatorParameter2 para) + internal static InfoDateiAuftrags GetEmptyInfoAuftragsdatei(InfoCreatorParameterFix para) { var info = new InfoDateiAuftrags(); @@ -148,7 +152,7 @@ namespace Dakota.Logic return info; } - internal static void AddDakotaInfoFile(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameter2 para2) + internal static void AddDakotaInfoFile(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameterFix para2) { var blockkostentrager = file.GetDakotaInfoBlockKostentrager(para, para2); var blockkvkarte = blockkostentrager.GetDakotaInfoBlockKvKarte(para, para2); @@ -158,7 +162,7 @@ namespace Dakota.Logic abrechnungsfall.InfosAbrechnungsposition.Add(abrechnungsposition); } - internal static InfoBlockKostentrager GetDakotaInfoBlockKostentrager(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameter2 para2) + internal static InfoBlockKostentrager GetDakotaInfoBlockKostentrager(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameterFix para2) { var ikkostentrager = para.IKKostentrager; var block = file.BlockKostentragers.FirstOrDefault(x => x.IKKostentrager == ikkostentrager); @@ -175,8 +179,7 @@ namespace Dakota.Logic return block; } - - internal static InfoBlockKvKarte GetDakotaInfoBlockKvKarte(this InfoBlockKostentrager blockkostentrager, InfoCreatorParameter para, InfoCreatorParameter2 para2) + internal static InfoBlockKvKarte GetDakotaInfoBlockKvKarte(this InfoBlockKostentrager blockkostentrager, InfoCreatorParameter para, InfoCreatorParameterFix para2) { var ikkvkarte = para.IKKvkarte; var block = blockkostentrager.BlockKvKarte.FirstOrDefault(x => x.IKKrankenkasseKVKarte == ikkvkarte); @@ -195,8 +198,7 @@ namespace Dakota.Logic return block; } - - internal static InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(this InfoBlockKvKarte block, InfoCreatorParameter para, InfoCreatorParameter2 para2) + internal static InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(this InfoBlockKvKarte block, InfoCreatorParameter para, InfoCreatorParameterFix para2) { var belegnummer = para.Belegnummer; var fall = block.DakotaInfoNachrichtSLLA.Abrechnungsfalle.FirstOrDefault(x => x.Belegnummer == belegnummer); @@ -209,8 +211,7 @@ namespace Dakota.Logic return fall; } - - internal static InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(this InfoAbrechnungsfall fall, InfoCreatorParameter para, InfoCreatorParameter2 para2) + internal static InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(this InfoAbrechnungsfall fall, InfoCreatorParameter para, InfoCreatorParameterFix para2) { var pos = CreateDakotaInfoAbrechnungsposition(para); @@ -234,8 +235,7 @@ namespace Dakota.Logic return info; } - - private static InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoCreatorParameter para, InfoCreatorParameter2 para2) + private static InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoCreatorParameter para, InfoCreatorParameterFix para2) { var info = new InfoNachrichtSLGA(); @@ -243,11 +243,11 @@ namespace Dakota.Logic info.IKAbsender = para2.IKAbsender; info.IKKostentrager = para.IKKostentrager; info.IKKvKarte = para.IKKvkarte; - info.IKLeistungserbringer = para2.IKAbsender; + info.IKLeistungserbringer = para2.IKLeistungserbringer; info.Rechnungsnummer = para.InvoiceBase.InvoiceNumber; info.Rechnungsdatum = para.InvoiceBase.InvoiceDate.Value; - info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer; + info.Rechnungsart = SchlüsselRechnungsart.AbrechnungÜberAbrechnungsstelleOhnInkassovollmacht; info.Name1 = para2.Mandator.Name; info.Name2 = "Max Mustermann"; @@ -256,8 +256,7 @@ namespace Dakota.Logic return info; } - - private static InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoCreatorParameter para, InfoCreatorParameter2 para2) + private static InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoCreatorParameter para, InfoCreatorParameterFix para2) { var info = new InfoNachrichtSLLA(); @@ -275,7 +274,6 @@ namespace Dakota.Logic return info; } - private static InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoCreatorParameter para) { var info = new InfoAbrechnungsfall(); @@ -295,7 +293,6 @@ namespace Dakota.Logic return info; } - private static InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoCreatorParameter para) { var info = new InfoAbrechnungsposition(); @@ -319,7 +316,6 @@ namespace Dakota.Logic return info; } - private static InfoBlockDiagnosen CreateDakotaInfoDiagnosen() { var info = new InfoBlockDiagnosen(); diff --git a/Data/Entities/Mandator.cs b/Data/Entities/Mandator.cs index 7cde920d5..17792a392 100644 --- a/Data/Entities/Mandator.cs +++ b/Data/Entities/Mandator.cs @@ -46,6 +46,8 @@ namespace BeWo.Data.Entities public static string Setting_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert"; + public static string Setting_IKLeistungserbringer = "IKLeistungserbringer"; + private long _BeWoClientType; private string _ClientId; @@ -67,7 +69,10 @@ namespace BeWo.Data.Entities private string _RssFeedUrl; private string _Apikey; - + + private string _IKLeistungserbringer; + + public Mandator() { this._Tid = TableID.Mandator; @@ -429,6 +434,22 @@ namespace BeWo.Data.Entities } } } - + + public virtual string IKLeistungserbringer + { + get + { + return this._IKLeistungserbringer; + } + + set + { + if (this.AreDifferent(this._IKLeistungserbringer, value)) + { + this._IKLeistungserbringer = value; + } + } + } + } } \ No newline at end of file diff --git a/Data/Mappings/Mandator.hbm.xml b/Data/Mappings/Mandator.hbm.xml index 90974388c..72e924588 100644 --- a/Data/Mappings/Mandator.hbm.xml +++ b/Data/Mappings/Mandator.hbm.xml @@ -25,7 +25,7 @@ - - + + \ No newline at end of file diff --git a/Model/Changes_2023_11_29_IKLeistungserbringer.txt b/Model/Changes_2023_11_29_IKLeistungserbringer.txt new file mode 100644 index 000000000..58f06253d --- /dev/null +++ b/Model/Changes_2023_11_29_IKLeistungserbringer.txt @@ -0,0 +1,2 @@ +ALTER TABLE `bewodemo`.`mandator` +ADD COLUMN `IKLeistungserbringer` VARCHAR(16) NULL AFTER `LastModules`; \ No newline at end of file diff --git a/Service/DCEntityMapper/MandatorDC_Mandator.cs b/Service/DCEntityMapper/MandatorDC_Mandator.cs index f82c44016..9929c3a4b 100644 --- a/Service/DCEntityMapper/MandatorDC_Mandator.cs +++ b/Service/DCEntityMapper/MandatorDC_Mandator.cs @@ -29,6 +29,7 @@ namespace BeWo.Service.DCEntityMapper //pDataContract.AllowSbd = true; #endif pDataContract.Apikey = pEntity.Apikey; + pDataContract.IKLeistungserbringer = pEntity.IKLeistungserbringer; return pDataContract; } @@ -50,6 +51,7 @@ namespace BeWo.Service.DCEntityMapper pEntity.IsSchedulerAllowed = pDataContract.IsSchedulerAllowed; pEntity.IsMedicationAllowed = pDataContract.IsMedicationAllowed; pEntity.Apikey = pDataContract.Apikey; + pEntity.IKLeistungserbringer = pDataContract.IKLeistungserbringer; return pEntity; } diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs index d4534563a..8d3e32dd4 100644 --- a/Service/ServiceImplementations/OperationsServiceImp.cs +++ b/Service/ServiceImplementations/OperationsServiceImp.cs @@ -7735,7 +7735,7 @@ namespace BeWo.Service.ServiceImplementations } var month = invoicebase.InvoiceDate.Value.Month; - var para2 = new DakotaInfoCreator.InfoCreatorParameter2(month, mandator); + var para2 = new DakotaInfoCreator.InfoCreatorParameterFix(month, mandator); var code = DakotaFileCreator.GenerateDakotaFile(paras, para2); diff --git a/Shared/DataContracts/MandatorDC.cs b/Shared/DataContracts/MandatorDC.cs index 19a5821e5..02b09bd88 100644 --- a/Shared/DataContracts/MandatorDC.cs +++ b/Shared/DataContracts/MandatorDC.cs @@ -56,7 +56,7 @@ namespace BS.Shared.DataContracts [DataMember] public string Apikey { get; set; } - - + [DataMember] + public string IKLeistungserbringer { get; set; } } } \ No newline at end of file