ProBalance/Service/CustomAccountingService.cs - StornoRg eingerichtet
This commit is contained in:
@@ -77,6 +77,7 @@
|
|||||||
<Compile Include="Sammelrechnung.Designer.cs">
|
<Compile Include="Sammelrechnung.Designer.cs">
|
||||||
<DependentUpon>Sammelrechnung.cs</DependentUpon>
|
<DependentUpon>Sammelrechnung.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Service\CustomAccountingService.cs" />
|
||||||
<Compile Include="SettlementReport.cs">
|
<Compile Include="SettlementReport.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
42
ReportImp/ProBalance/Service/CustomAccountingService.cs
Normal file
42
ReportImp/ProBalance/Service/CustomAccountingService.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
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 ProBalance.Service
|
||||||
|
{
|
||||||
|
public class CustomAccountingService : AccountingService
|
||||||
|
{
|
||||||
|
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, null);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user