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,297 @@
[
{
Message: null,
ReceiptItem: {
AddAdditionalInformations: [],
ArticleCode: 'CF-30CTQAFBG',
ArticleI3D: 43,
ArticlePositionKind: 0,
AttachedData: {},
BasePrice: 100.0,
ChangeStock: true,
ContractI3D: null,
CostCenterI3D: 1,
CostObjectI3D: 1,
CustomerCostCenter: '',
DeliveryDate: null,
Discount: 0.0,
DisplayPositionNumber: null,
EANCode: '',
Expanded: null,
FontColor: -16777208,
FontName: 'Verdana',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 0,
Indent: 0,
InternalNote: null,
InternalPosition: 0,
IsBillingPartList: false,
IsLeasing: false,
IsReverseCharge: false,
IsService: false,
Kind: 1,
ManufacturerCode: 'CF-30CTQAFBG',
OriginalPurchasePrice: 4535.0000000000,
PlannedDurationInHours: 0.0,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 50.0,
PurchaseInformations: null,
PurchaseOrderNumber: null,
PurchasePriceSupplierI3D: null,
QuantityComplete: 1.0,
QuantityProcessed: 0.0,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
RevenueAccount: 1802,
RichText: null,
ShowImage: false,
SpecialAgreementI3D: null,
Text: 'Eigener Artikel',
VATI3D: 4,
VATRate: 19.0,
Visible: 1,
WarehouseI3D: -1,
WEEE: ''
},
Status: 0
},
{
Message: null,
ReceiptItem: {
AddAdditionalInformations: [],
ArticleCode: 'FREMD',
ArticleI3D: 1,
ArticlePositionKind: 0,
AttachedData: {},
BasePrice: 100.0,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: '',
DeliveryDate: null,
Discount: 0.0,
DisplayPositionNumber: null,
EANCode: '',
Expanded: null,
FontColor: -16777208,
FontName: 'Verdana',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 0,
Indent: 0,
InternalNote: null,
InternalPosition: 0,
IsBillingPartList: false,
IsLeasing: false,
IsReverseCharge: false,
IsService: false,
Kind: 1,
ManufacturerCode: 'Q7830A#BAP',
OriginalPurchasePrice: 0.00000000,
PlannedDurationInHours: 0.0,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 50.0,
PurchaseInformations: null,
PurchaseOrderNumber: null,
PurchasePriceSupplierI3D: null,
QuantityComplete: 1.0,
QuantityProcessed: 0.0,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
RevenueAccount: null,
RichText: null,
ShowImage: false,
SpecialAgreementI3D: null,
Text: 'Externer Artikel',
VATI3D: 4,
VATRate: 19.0,
Visible: 1,
WarehouseI3D: -1,
WEEE: null
},
Status: 0
},
{
Message: null,
ReceiptItem: {
AddAdditionalInformations: [],
ArticleCode: 'FREMD',
ArticleI3D: 1,
ArticlePositionKind: 0,
AttachedData: {},
BasePrice: 100.0,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: '',
DeliveryDate: null,
Discount: 0.0,
DisplayPositionNumber: null,
EANCode: null,
Expanded: null,
FontColor: -16777208,
FontName: 'Verdana',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 0,
Indent: 0,
InternalNote: null,
InternalPosition: 0,
IsBillingPartList: false,
IsLeasing: false,
IsReverseCharge: false,
IsService: false,
Kind: 1,
ManufacturerCode: '2444666668888888',
OriginalPurchasePrice: 50.0,
PlannedDurationInHours: 0.0,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 50.0,
PurchaseInformations: null,
PurchaseOrderNumber: null,
PurchasePriceSupplierI3D: null,
QuantityComplete: 1.0,
QuantityProcessed: 0.0,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
RevenueAccount: null,
RichText: null,
ShowImage: false,
SpecialAgreementI3D: null,
Text: 'Unbekannter Artikel',
VATI3D: 4,
VATRate: 19.0,
Visible: 1,
WarehouseI3D: -1,
WEEE: null
},
Status: 0
},
{
Message: null,
ReceiptItem: {
AddAdditionalInformations: [],
ArticleCode: '910-005154',
ArticleI3D: 4359,
ArticlePositionKind: 0,
AttachedData: {},
BasePrice: 100.0,
ChangeStock: true,
ContractI3D: null,
CostCenterI3D: 1,
CostObjectI3D: 1,
CustomerCostCenter: '',
DeliveryDate: null,
Discount: 0.0,
DisplayPositionNumber: null,
EANCode: '5099206073067',
Expanded: null,
FontColor: -16777208,
FontName: 'Verdana',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 0,
Indent: 0,
InternalNote: null,
InternalPosition: 0,
IsBillingPartList: false,
IsLeasing: false,
IsReverseCharge: false,
IsService: false,
Kind: 1,
ManufacturerCode: '910-005154',
OriginalPurchasePrice: 77.1039233500,
PlannedDurationInHours: 0.0,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 50.0,
PurchaseInformations: null,
PurchaseOrderNumber: null,
PurchasePriceSupplierI3D: null,
QuantityComplete: 1.0,
QuantityProcessed: 0.0,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
RevenueAccount: 4401,
RichText: null,
ShowImage: false,
SpecialAgreementI3D: null,
Text: 'Kunden Artikelcode',
VATI3D: 4,
VATRate: 19.0,
Visible: 1,
WarehouseI3D: -1,
WEEE: ''
},
Status: 0
},
{
Message: null,
ReceiptItem: {
AddAdditionalInformations: [],
ArticleCode: 'ARTIKNEU',
ArticleI3D: 2,
ArticlePositionKind: 0,
AttachedData: {},
BasePrice: 100.0,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: '',
DeliveryDate: null,
Discount: 0.0,
DisplayPositionNumber: null,
EANCode: '',
Expanded: null,
FontColor: -16777208,
FontName: 'Verdana',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 0,
Indent: 0,
InternalNote: null,
InternalPosition: 0,
IsBillingPartList: false,
IsLeasing: false,
IsReverseCharge: false,
IsService: false,
Kind: 1,
ManufacturerCode: '{Guid}',
OriginalPurchasePrice: 0.0000000000,
PlannedDurationInHours: 0.0,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 50.0,
PurchaseInformations: null,
PurchaseOrderNumber: null,
PurchasePriceSupplierI3D: null,
QuantityComplete: 1.0,
QuantityProcessed: 0.0,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
RevenueAccount: null,
RichText: null,
ShowImage: false,
SpecialAgreementI3D: null,
Text: 'Kein Herstellercode',
VATI3D: 4,
VATRate: 19.0,
Visible: 1,
WarehouseI3D: -1,
WEEE: null
},
Status: 0
}
]
@@ -0,0 +1,137 @@
using System.Collections.Generic;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Sales.Receipts.DataAndResults;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.Data.Entities.Sales.Receipts.Offers.OfferImport;
using Centron.Data.WebServices.Sales.Receipts.Offers;
using Centron.Interfaces;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.CustomerArea.CustomerToArticle;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.TicketTests.Ticket133940;
public class Ticket133940Tests : EndToEndTest
{
public Ticket133940Tests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
this.Verifier.Settings.CleanupProperty<ReceiptOfferItemDTO>(f => f.ManufacturerCode, RegexHelper.Guid, "Guid");
}
public const int CustomerI3D = 10006;
public const string OwnArticleManufacturerCode = "CF-30CTQAFBG";
public const string ExternalArticleManufacturerCode = "Q7830A#BAP";
public const string UnknownArticleManufacturerCode = "2444666668888888";
public const string CustomerArticleCode = "blabla-kunden-artikelcode-hehe";
public override void Execute()
{
this.PrepareDatabase();
var offer = this.CreateNewOffer();
this.ImportReceiptItems(offer);
}
private void PrepareDatabase()
{
// The HerstellerArtik are kinda broken - they all reference some invalid Hersteller (I3D column)
// So fix one article up, so it can be found and used in CreateReceiptItemsFromImport
this.Sql("UPDATE dbo.HerstellerArtik SET I3D = 49 WHERE I3D0 = 4771711");
// Create a customer article-code row
this.WithSession(session =>
{
session.GetBL<AccountWebServiceBL>().SaveCustomerArticle(new CustomerArticleDTO
{
CustomerI3D = CustomerI3D,
ArticleI3D = 4359,
CustomerArticleCode = CustomerArticleCode,
});
});
}
private ReceiptOfferDTO CreateNewOffer()
{
using var session = new BLSession();
var newReceiptData = session.GetBL<ReceiptWebServiceBL>().CreateNewReceipt(
CentronObjectKindNumeric.OfferClass,
this.GetLoggedInUser(),
CustomerI3D,
new CreateReceiptData
{
IgnoreCallbacks = true,
},
addressI3D: null,
contactPersonI3D: null,
insertSalutationAndAgreement: false,
ignoreDefaultContract: true,
insertCustomerDiscount: false).ThrowIfError();
return (ReceiptOfferDTO)newReceiptData.Receipt;
}
private void ImportReceiptItems(ReceiptOfferDTO offer)
{
using var session = new BLSession();
var parsedData = new ParsedData
{
Positions = new List<ParsedPositionData>
{
// Case 1: We have a article with that manufacturer code
new ParsedPositionData
{
VendorCode = OwnArticleManufacturerCode,
Description = "Eigener Artikel",
PurchasePrice = 50,
SellPrice = 100,
},
// Case 2: We know this manufacturer-code as a external article
new ParsedPositionData
{
VendorCode = ExternalArticleManufacturerCode,
Description = "Externer Artikel",
PurchasePrice = 50,
SellPrice = 100,
},
// Case 3: A unknown manufacturer-code
new ParsedPositionData
{
VendorCode = UnknownArticleManufacturerCode,
Description = "Unbekannter Artikel",
PurchasePrice = 50,
SellPrice = 100,
},
// Case 4: A customer article-code
new ParsedPositionData
{
VendorCode = CustomerArticleCode,
Description = "Kunden Artikelcode",
PurchasePrice = 50,
SellPrice = 100,
},
// Case 5: No manufacturer-code at all
new ParsedPositionData
{
VendorCode = null,
Description = "Kein Herstellercode",
PurchasePrice = 50,
SellPrice = 100
},
},
DescriptionKind = DescriptionKind.Source,
};
var importedItems = session.GetBL<ReceiptItemWebServiceBL>().CreateReceiptItemsFromImport(
offer,
this.GetLoggedInUser(),
parsedData).ThrowIfError();
this.Verifier.Verify("ImportedItems", importedItems);
}
}