AutismusLeben und BetreutesWohnenWoellReports

This commit is contained in:
Alexandra
2022-10-21 09:23:01 +02:00
parent 29dd027293
commit 41d0ee0f27
7 changed files with 49 additions and 98 deletions

5
.gitignore vendored
View File

@@ -572,3 +572,8 @@ obj
/ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.resx
/ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.cs
/ReportImp/DiakonieKKKleve/CustomMitarbeiterstundenkontoBerechnungTagesansicht.cs
/ReportImp/AMBEWO/Endabrechnung Beispiel.jpg
/ReportImp/AutismusKoelnBonn/Hintergrund.jpg
/ReportImp/AutismusKoelnBonn/Briefpapier.jpg
/ReportImp/RatPlusTat/CustomBudgetnachweisAnhangRO.cs
/ReportImp/MusterArbeitszeit

View File

@@ -57,6 +57,8 @@
<Compile Include="InvoiceCustomerReport.Designer.cs">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
</Compile>
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Mitarbeiterarbeitszeitkonto.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,25 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AutismusLeben.Invoicing
{
public class CustomInvoiceCreation : InvoiceCreation
{
public override void BerechneSummaryItemsSummen(List<InvoiceItem> newlist, bool addRateFactorToUnitCount)
{
base.BerechneSummaryItemsSummen(newlist, true);
}
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace AutismusLeben.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
return new CustomInvoiceCreation();
}
}
}

View File

@@ -35,83 +35,5 @@ namespace AutismusLeben.Service
DAOFactory.GenericDAO.Insert(i);
return i;
}
public override void StorniereInvoiceBases(List<InvoiceBaseDC> invoices)
{
foreach (var item in invoices)
{
if (item.Type.ToString() == "General" || item.Type.ToString() == "CustomerEquity" )
MessageBox.Show("Rechnungen vom Typ Allgemein oder Eigenanteil können nicht automatisch storniert werden", "Rechnung stornieren", MessageBoxButton.OK, MessageBoxImage.Error);
else
ErstelleStornoRechnung(item);
}
}
//public override List<InvoiceBaseDC> GetInvoiceBases(DateTime? startDate, DateTime? endDate)
//{
// DateTime? end = endDate;
// if (end.HasValue)
// {
// end = end.Value.Date.AddDays(1).AddTicks(-1);
// }
// var list = DAOFactory.SearchDAO.GetInvoiceBases(startDate, end, false);
// var returnlist = new List<InvoiceBaseDC>();
// foreach (var ib in list)
// {
// var dc = MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(ib);
// if (String.IsNullOrEmpty(dc.CustomerFirstName) && String.IsNullOrEmpty(dc.CustomerLastName) && ib.Type == InvoiceType.Service && (ib.InvoiceTypeText == "Tagesstruktur" || ib.InvoiceTypeText == "Tagesstruktur Storno"))
// {
// var si = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(ib.Oid.Value);
// if (si != null)
// {
// var names = new List<String>();
// foreach (var sip in si.ServiceInvoicePeriodList)
// {
// if (sip.Customer != null)
// {
// names.Add(sip.Customer.Person.LastNameFirstName);
// }
// }
// dc.CustomerLastName = "";
// foreach (var name in names.OrderBy(n => n))
// {
// if (dc.CustomerLastName.Length > 0)
// {
// dc.CustomerLastName += "\n";
// }
// dc.CustomerLastName += name;
// }
// }
// }
// else if (ib.InvoiceId == "RechnungHort" || ib.InvoiceId == "RechnungHortPrivat")
// {
// dc.CustomerFirstName = "";
// dc.CustomerLastName = "";
// var si = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(ib.Oid.Value);
// if (si != null)
// {
// foreach (var sip in si.ServiceInvoicePeriodList)
// {
// if (!String.IsNullOrEmpty(sip.Notice))
// {
// dc.CustomerLastName = sip.Notice;
// }
// }
// }
// }
// returnlist.Add(dc);
// }
// return returnlist;
//}
}
}

View File

@@ -25,25 +25,6 @@ namespace AutismusLeben
//{
// lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte Tätigkeiten:", start, end);
//}
foreach (var sip in pRO.ServiceInvoicePeriods)
{
if (sip.ServiceInvoiceItems != null)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
if (!String.IsNullOrEmpty(ii.RateFactor))
{
var rfStr = ii.RateFactor.Replace("%", "").Replace(",00", "").Trim();
int rfInt = 0;
Int32.TryParse(rfStr, out rfInt);
decimal rateFactor = (100m + rfInt) / 100m;
ii.Hours = ii.Hours * rateFactor;
}
}
}
}
if (pRO.InvoiceNumber.Length > 2)
pRO.InvoiceNumber = String.Format("3{0:MM}{0:yy}0{1}", end, pRO.InvoiceNumber);

View File

@@ -15,7 +15,7 @@ namespace BeWo.BetreutesWohnenWoellReports
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, false, null, true, false);
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, false, serviceCategoryOid, true, false);
if (lROs.Count > 0)
{