Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

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
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,77 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.Sales.Receipts.Internal;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.RevenueAndExpenseAccounts;
public class GetRevenueAccountTests : EndToEndTest
{
public GetRevenueAccountTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
}
public override void Execute()
{
PrepareDB();
using var session = new BLSession();
var itemBL = session.GetBL<ReceiptItemAccountBL>();
// Case: Inland, Company, RC:false
// Expected: default revenue account 4400
var account = itemBL.GetProfitAndLossAccount(true, 10000, 1, null, false, 4361, base.GetLoggedInUser().User, false);
Assert.Equal(4400, account.GetValueOrDefault(0));
// Case: Inland, Company, RC:true
// Expected: RC account 4335
account = itemBL.GetProfitAndLossAccount(true, 10000, 1, null, false, 4361, base.GetLoggedInUser().User, true);
Assert.Equal(4335, account.GetValueOrDefault(0));
// Case: Inland, Privat Person (has no ustID), RC:false
// Expected: default revenue account 4400
account = itemBL.GetProfitAndLossAccount(true, 10022, 1, null, false, 4361, base.GetLoggedInUser().User, false);
Assert.Equal(4400, account.GetValueOrDefault(0));
// Case: Inland, Privat Person (has no ustID), RC:true
// Expected: default revenue account 4400 (because: privat person has no ustid. There is no RC)
account = itemBL.GetProfitAndLossAccount(true, 10022, 1, null, false, 4361, base.GetLoggedInUser().User, true);
Assert.Equal(4400, account.GetValueOrDefault(0));
// Case: EU, Company, RC:false
// Expected: default revenue account for eu 4401
account = itemBL.GetProfitAndLossAccount(true, 10003, 5, null, false, 4361, base.GetLoggedInUser().User, false);
Assert.Equal(4401, account.GetValueOrDefault(0));
// Case: EU, Company, RC:true
// Expected: default revenue account for eu 4401 (Erika T. : there is no RC diff. in EU trading)
account = itemBL.GetProfitAndLossAccount(true, 10003, 5, null, false, 4361, base.GetLoggedInUser().User, true);
Assert.Equal(4401, account.GetValueOrDefault(0));
// Case: Not EU, Company, RC:false
// Expected: default revenue account for not EU 4402
account = itemBL.GetProfitAndLossAccount(true, 10007, 19, null, false, 4361, base.GetLoggedInUser().User, false);
Assert.Equal(4402, account.GetValueOrDefault(0));
// Case: NOT EU, Company, RC:true
// Expected: default revenue account for not EU 4402
account = itemBL.GetProfitAndLossAccount(true, 10007, 19, null, false, 4361, base.GetLoggedInUser().User, true);
Assert.Equal(4402, account.GetValueOrDefault(0));
// Case: Inland, Company, RC:false, Branch 1
// Expected: branch revenue account 4780
account = itemBL.GetProfitAndLossAccount(true, 10000, 1, 1, false, 4361, base.GetLoggedInUser().User, false);
Assert.Equal(4780, account.GetValueOrDefault(0));
}
private void PrepareDB()
{
base.Sql(@"UPDATE ARTIK
SET RCErloesKTO = 4335,
RCAufwandKTO = 5335
WHERE I3D = 4361");
base.Sql("INSERT INTO ArtikelBranchErloeskonto (ArtikelI3D, BranchI3D, ErloesKonto, EUErloeskonto, AuslandErloeskonto) VALUES (4361, 1, 4780, 4781, 4782)");
}
}