From 76be3fbd3ca8539d780412a28febcea5e9574806 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Tue, 25 Nov 2025 15:21:58 +0100 Subject: [PATCH] =?UTF-8?q?Vorbereitung=20f=C3=BCr=20Storno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/CustomAccountingService.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ReportImp/HshCologne/Service/CustomAccountingService.cs diff --git a/ReportImp/HshCologne/Service/CustomAccountingService.cs b/ReportImp/HshCologne/Service/CustomAccountingService.cs new file mode 100644 index 000000000..e4850611f --- /dev/null +++ b/ReportImp/HshCologne/Service/CustomAccountingService.cs @@ -0,0 +1,39 @@ +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 HshCologne.Service +{ + public class CustomAccountingService : AccountingService + { + public override ServiceInvoice ErstelleStornoRechnung(InvoiceBaseDC ibdc) + { + var i = base.ErstelleStornoRechnung(ibdc); + int invoiceCounter = 0; + var inc = PluginLoader.FindClass(); + 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, null); + return i; + } + } +} \ No newline at end of file