QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142) getrackt, ohne .gitmodules und ohne erreichbares Remote. Der Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen. Umstellung: - Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6) - Gitlink aus dem Index entfernt - Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
using System.Collections.Generic;
|
|
using Centron.BusinessLogic;
|
|
using Centron.BusinessLogic.EmployeeArea;
|
|
using Centron.BusinessLogic.Sales.CustomerAssets.TimerBilling;
|
|
using Centron.BusinessLogic.WebServices.Sales.Receipts;
|
|
using Centron.Data.WebServices.Sales.Receipts;
|
|
using Centron.Data.WebServices.Sales.Receipts.DeliveryLists;
|
|
using Centron.Data.WebServices.Sales.Receipts.Invoices;
|
|
using Centron.Interfaces;
|
|
using Centron.Interfaces.BL;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using CentronSoftware.Centron.WebServices.Entities.Sales.CustomerAssets.TimerBilling;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.TicketTests.Ticket145580;
|
|
|
|
public class Ticket145580Tests : EndToEndTest
|
|
{
|
|
public Ticket145580Tests(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public const int TimerI3D = 2397;
|
|
public const int HelpdeskI3D = 1301;
|
|
public const string CrmProjectNumber = "80005";
|
|
|
|
public override void Execute()
|
|
{
|
|
// In this ticket the problem was, that the project number was taken from the ticket
|
|
// if you billed a timer of that ticket.
|
|
|
|
this.PrepareDatabase();
|
|
|
|
var receipt = (ReceiptDeliveryListDTO)this.CreateReceipt(TimerI3D, new TimerBillingSettingsDTO
|
|
{
|
|
ReceiptKind = CentronObjectKindNumeric.DeliveryListClass
|
|
});
|
|
|
|
Assert.Equal(CrmProjectNumber, receipt.ProjectNumber);
|
|
}
|
|
|
|
private void PrepareDatabase()
|
|
{
|
|
this.Sql($"UPDATE dbo.hlpdsk_requests SET ProjectNumber = '{CrmProjectNumber}' WHERE I3D = {HelpdeskI3D}");
|
|
}
|
|
|
|
private ReceiptBaseDTO CreateReceipt(int timerI3D, TimerBillingSettingsDTO settings)
|
|
{
|
|
using (var session = new BLSession())
|
|
{
|
|
var user = session.GetBL<AppUserBL>().GetAppUser(f => f.I3D == 11);
|
|
var invoiceResult = session.GetBL<ReceiptWebServiceBL>().CreateNewReceiptForHelpdekTimers([timerI3D], settings, user);
|
|
|
|
return invoiceResult.ThrowIfError();
|
|
}
|
|
}
|
|
} |