From 2a731fe1655c745d12e99e03da19450156bbcbc9 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 29 Jan 2025 12:55:10 +0100 Subject: [PATCH] BUG: CostBearerOid statt OrganisationOid --- .../NewGkvAbrechnungPopUpView.xaml.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs b/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs index b7442bf34..c0badb0d7 100644 --- a/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs +++ b/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs @@ -18,7 +18,7 @@ namespace BeWo.View.Detail.Accounting { public partial class NewGkvAbrechnungPopUpView : BeWoView { - private long? _LoadedInvoiceBaseOid; + private long? _LoadedCostBearerOid; private List _InvoiceBaseDCs; @@ -106,7 +106,7 @@ namespace BeWo.View.Detail.Accounting } public void Clear() { - _LoadedInvoiceBaseOid = null; + _LoadedCostBearerOid = null; popupedit_GkvSearch.Text = string.Empty; popupedit_GkvSearch.Focus(); } @@ -156,19 +156,17 @@ namespace BeWo.View.Detail.Accounting popupedit_GkvSearch.Text = e.Data.ToString(); popupedit_GkvSearch.Focus(); - RefreshInvoiceBases(e.Data.OrganisationOid); + RefreshInvoiceBases(e.Data.CostBearerOid); } - private void RefreshInvoiceBases() => RefreshInvoiceBases(_LoadedInvoiceBaseOid); - private void RefreshInvoiceBases(DateTime? start, DateTime? ende) => RefreshInvoiceBases(_LoadedInvoiceBaseOid, start ?? FilterStart, ende ?? FilterEnde); - private void RefreshInvoiceBases(long? costOid) => RefreshInvoiceBases(costOid, FilterStart, FilterEnde); - private void RefreshInvoiceBases(long? costOid, DateTime? start, DateTime? ende) + private void RefreshInvoiceBases() => RefreshInvoiceBases(_LoadedCostBearerOid); + private void RefreshInvoiceBases(long? costBearerOid) { - if (costOid != null && start != null && ende != null && ende >= start) + if (costBearerOid is long coid && FilterStart is DateTime start && FilterEnde is DateTime ende && ende >= start) { - _LoadedInvoiceBaseOid = costOid; + _LoadedCostBearerOid = costBearerOid; - ServiceFacade.DoAccountingServiceAsync(s => s.GetInvoiceBasesForCostBearerAndIdAndIsUsed(start, ende, (long)costOid, "RechnungSoziotherapie"), UpdateInvoiceList); + ServiceFacade.DoAccountingServiceAsync(s => s.GetInvoiceBasesForCostBearerAndIdAndIsUsed(start, ende, coid, "RechnungSoziotherapie"), UpdateInvoiceList); } }