diff --git a/ReportImp/LebensWert/CustomReportCreator.cs b/ReportImp/LebensWert/CustomReportCreator.cs index a6b0283d1..c8c9b7fea 100644 --- a/ReportImp/LebensWert/CustomReportCreator.cs +++ b/ReportImp/LebensWert/CustomReportCreator.cs @@ -76,6 +76,8 @@ namespace LebensWert //} + var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); + String reportId = null; if (orgaOid > 0) { @@ -83,8 +85,13 @@ namespace LebensWert if (organisation != null) reportId = organisation.Name; } - - var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); + else + { + var organisation = DAOFactory.GenericDAO.LoadByID(ro.SupportConceptCostBearer.CostBearer.OrganisationOid); + if (organisation != null) + reportId = organisation.Name; + } + IBeWoReport lServiceOverviewSingleCustomerReport = new Quittierungsbeleg(); if (reportId != null) { diff --git a/ReportImp/LebensWert/Invoicing/CustomInvoiceFactory.cs b/ReportImp/LebensWert/Invoicing/CustomInvoiceFactory.cs index c7250956f..a37d2b2c0 100644 --- a/ReportImp/LebensWert/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/LebensWert/Invoicing/CustomInvoiceFactory.cs @@ -20,7 +20,7 @@ namespace LebensWert.Invoicing { return new CustomInvoiceCreationNI(); } - else if (csc.CostBearer.ToLower() == "landeshauptstadt hannover" || csc.CostBearer.ToLower().Contains("stadt hannover")|| csc.CostBearer.ToLower().Contains("stadt hannover") || csc.CostBearer.ToLower().Contains("region hannover neu")) + else if (csc.CostBearer.ToLower() == "landeshauptstadt hannover" || csc.CostBearer.ToLower().Contains("stadt hannover")|| csc.CostBearer.ToLower().Contains("stadt hannover") || csc.CostBearer.ToLower().Contains("region hannover neu") || csc.CostBearer.ToLower().Contains("region hannover")) { return new CustomInvoiceCreationHA(); } diff --git a/ReportImp/LebensWert/QuittierungsbelegHannover.cs b/ReportImp/LebensWert/QuittierungsbelegHannover.cs index f1ba7f8bb..88d503f80 100644 --- a/ReportImp/LebensWert/QuittierungsbelegHannover.cs +++ b/ReportImp/LebensWert/QuittierungsbelegHannover.cs @@ -94,7 +94,10 @@ namespace LebensWert if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue && scap.ServiceCategory != null && scap.ServiceCategory.Name == pRO.Services[0].ServiceCategory) { lblBewilligtFls.Text = String.Format("{0:0.00}", scap.ApprovedBEPerInterval.Value); - pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value; + if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly) + pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value; + else if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Monthly) + pRO.ApprovedFLSTotal = Convert.ToDecimal(((scap.EndDate.Value - scap.StartDate.Value).TotalDays + 1) / 30.44) * scap.ApprovedBEPerInterval.Value; } } } diff --git a/ReportImp/VaroSozialagentur/QuittierungsbelegHannover.cs b/ReportImp/VaroSozialagentur/QuittierungsbelegHannover.cs index 85f8fbd16..7fdf3013e 100644 --- a/ReportImp/VaroSozialagentur/QuittierungsbelegHannover.cs +++ b/ReportImp/VaroSozialagentur/QuittierungsbelegHannover.cs @@ -98,7 +98,10 @@ namespace VaroSozialagentur if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue && scap.ServiceCategory != null && scap.ServiceCategory.Name == pRO.Services[0].ServiceCategory) { lblBewilligtFls.Text = String.Format("{0:0.00}", scap.ApprovedBEPerInterval.Value); - pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value; + if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly) + pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value; + else if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Monthly) + pRO.ApprovedFLSTotal = Convert.ToDecimal(((scap.EndDate.Value - scap.StartDate.Value).TotalDays + 1) / 30.44) * scap.ApprovedBEPerInterval.Value; } } }