ChristopherusHausFamilienhilfe/Export/SimbaExporter und Rechnungsdatum auf Monatsletzten

This commit is contained in:
2024-08-16 14:21:40 +02:00
parent 34a174358d
commit b1cbc99eee
4 changed files with 49 additions and 1 deletions

View File

@@ -71,6 +71,8 @@
</Compile>
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\SimbaExporter.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\DefaultInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>

View File

@@ -53,6 +53,9 @@ namespace ChristopherusHausFamilienhilfe.Export
{
sb.AppendLine();
}
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append(String.Format("\"{0}\"", row[0]));
sb.Append(";");
sb.Append(String.Format("{0:0.00}", row[1]));
@@ -61,7 +64,8 @@ namespace ChristopherusHausFamilienhilfe.Export
sb.Append(";");
sb.Append(String.Format("{0}", row[3]));
sb.Append(";;");
sb.Append(String.Format("{0:ddMMyyyy}", row[4]));
sb.Append(String.Format("{0:dd.MM.yyyy}", lastDate)); //Simba nimmt nur Buchungen an, ReDatum = Abrechnungszeitraum
//sb.Append(String.Format("{0:ddMMyyyy}", row[4]));
sb.Append(";;");
sb.Append(String.Format("{0}", row[5]));
sb.Append(";");

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 ChristopherusHausFamilienhilfe.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
return new DefaultInvoiceCreation();
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
namespace ChristopherusHausFamilienhilfe.Invoicing
{
public class DefaultInvoiceCreation : InvoiceCreation
{
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod, IList<CompactSupportConceptDC> supportConceptList)
{
base.SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
invoice.InvoiceBase.InvoiceDate = invoice.InvoiceBase.AccountingPeriodEnd;
}
}
}