Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>ownSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.292</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.293</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>293</ApplicationRevision>
|
||||
<ApplicationRevision>294</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Reporting\CustomReportCreator.cs" />
|
||||
<Compile Include="Service\CustomAccountingService.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SoziotherapieRechnung.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
<DependentUpon>QuittierungsbelegJaMainz.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SBBMainzReportCreator.cs" />
|
||||
<Compile Include="Service\CustomAccountingService.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="QuittierungsbelegJugendamt.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
54
ReportImp/SBBMainzReports/Service/CustomAccountingService.cs
Normal file
54
ReportImp/SBBMainzReports/Service/CustomAccountingService.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
|
||||
|
||||
namespace SBBMainzReports.Service
|
||||
{
|
||||
public class CustomAccountingService : AccountingService
|
||||
{
|
||||
// Erstellt von Claude (KI-Assistent) am 01.04.2026.
|
||||
// ErstelleStornoRechnung: Überschreibt die Basismethode zur Erstellung einer Stornorechnung.
|
||||
// Die Methode ruft zunächst die Basisimplementierung auf, generiert anschließend eine neue
|
||||
// Rechnungsnummer (via InvoiceNumberGenerator) und ergänzt diese um den Zusatz " Storno".
|
||||
// Ebenso wird der InvoiceTypeText um " Storno" erweitert (bzw. auf "Storno" gesetzt, falls leer).
|
||||
// Die fertige Stornorechnung wird in der Datenbank gespeichert und der Rechnungszähler
|
||||
// um 1 erhöht. Am Ende wird die erstellte Stornorechnung zurückgegeben.
|
||||
public override ServiceInvoice ErstelleStornoRechnung(InvoiceBaseDC ibdc)
|
||||
{
|
||||
var i = base.ErstelleStornoRechnung(ibdc);
|
||||
//if (!String.IsNullOrEmpty(i.InvoiceBase.InvoiceNumber))
|
||||
//{
|
||||
// //i.InvoiceBase.InvoiceNumber = ibdc.InvoiceNumber + " Storno";
|
||||
// i.InvoiceBase.InvoiceNumber = i.InvoiceBase.InvoiceNumber + " Storno";
|
||||
//}
|
||||
int invoiceCounter = 0;
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
i.InvoiceBase.InvoiceNumber = inc.GetNextInvoiceNumber(invoiceCounter, i.InvoiceBase) + " Storno";
|
||||
|
||||
if (String.IsNullOrEmpty(i.InvoiceBase.InvoiceTypeText))
|
||||
{
|
||||
i.InvoiceBase.InvoiceTypeText = "Storno";
|
||||
}
|
||||
else
|
||||
{
|
||||
i.InvoiceBase.InvoiceTypeText += " Storno";
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(i);
|
||||
|
||||
inc.IncreaseInvoiceNumber(1, new List<SettlementInvoice>());
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user