BeWoTrio/Service/CustomAccountingService - Storno
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
<Compile Include="ServiceInvoiceReport.Designer.cs">
|
||||
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Service\CustomAccountingService.cs" />
|
||||
<Compile Include="SettlementReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -119,6 +120,10 @@
|
||||
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
|
||||
<Name>Report</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Service\Service.csproj">
|
||||
<Project>{094331C3-ECEE-4C89-BBFD-4C9DED89F0EF}</Project>
|
||||
<Name>Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj">
|
||||
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
|
||||
<Name>Shared</Name>
|
||||
|
||||
45
ReportImp/BeWoTrio/Service/CustomAccountingService.cs
Normal file
45
ReportImp/BeWoTrio/Service/CustomAccountingService.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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 BeWoTrio.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 = i.InvoiceBase.InvoiceNumber + " 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