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,15 @@
{
Data: {
AskUserWhetherHeWantsToUpdateTheContactPersonData: false,
Receipt: null,
ReceiptIsLockedFromOtherUser: false,
ShowDownPaymentInvoiceDialog: false,
ShowReceiptIsAlreadyExportedDialog: false,
ShowUpdateReceiptDateDialog: false,
ShowUpdateReceiptReceiverDialog: false
},
Error: null,
Message: 'Es kann leider kein Beleg (Gutschrift) erstellt werden, weil für den Kunden keine Steuernummer und keine Umsatzsteuertidentnummer hinterlegt ist!',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,276 @@
{
Data: {
AskUserWhetherHeWantsToUpdateTheContactPersonData: false,
Receipt: {
AdditionalText: null,
AddressI3D: 13,
BranchI3D: 1,
BranchOrigin: 0,
CampaignI3D: null,
ChangedAt: DateTime,
ChangedByI3D: 31,
ChangedThroughApplication: 0,
City: 'Neu-Ulm',
ConcurrencyControlGuid: Guid,
ContactName: 'Herzog',
ContactPersonI3D: 16,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CountryI3D: 1,
CreatedAt: DateTime,
CreatedByI3D: 31,
CurrencyFactor: 1.0,
CurrencyFactorIsFixed: false,
CurrencyI3D: 1,
CurrencyString: '€',
CustomerI3D: 10003,
CustomUpdateArticlePricesAndTexts: false,
Date: DateTime,
DeliveryAddress: null,
DeliveryAddressAddressI3D: null,
DeliveryAddressContactPersonI3D: null,
DeliveryAddressCustomerI3D: null,
DeliveryAddressInformation: null,
DeliveryDate: null,
DirectoryI3D: null,
EditorI3D: 22,
Email: 'herzog@celos.de',
ExclusiveOfVAT: false,
Fax: '',
HasPostOfficeBox: false,
I3D: 4,
Information: '',
InvoiceAddress: null,
InvoiceAddressAddressI3D: null,
InvoiceAddressContactPersonI3D: null,
InvoiceAddressCustomerI3D: null,
InvoiceAddressInformation: null,
IsCashAsset: false,
Items: [
{
AddAdditionalInformations: [],
ArticleCode: null,
ArticleI3D: null,
ArticlePositionKind: 0,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: null,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
DeliveryDate: null,
Discount: 0.000000000000,
DisplayPositionNumber: null,
EANCode: null,
Expanded: null,
FontColor: -16777208,
FontName: '',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 21,
Indent: 0,
InternalPosition: 0,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 2,
ManufacturerCode: null,
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: null,
OriginKind: null,
OriginReceiptI3D: null,
OriginReceiptItemI3D: null,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: null,
PurchaseOrderNumber: null,
QuantityComplete: 0.0000000,
QuantityProcessed: 0.0000000,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 4,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: null,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: 'Folgende Positionen wurden aus Rechnung 40040 vom EinDatum eingefügt:',
VATI3D: null,
VATRate: 0.00,
Visible: 1,
WarehouseI3D: null,
WEEE: null
},
{
AddAdditionalInformations: [],
ArticleCode: 'DUMMYKONTINGENT',
ArticleI3D: 86,
ArticlePositionKind: 0,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: -500.0,
ChangeStock: false,
ContractI3D: 1,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
DeliveryDate: null,
Discount: 0.000000000000,
DisplayPositionNumber: null,
EANCode: '',
Expanded: null,
FontColor: -16777208,
FontName: '',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 22,
Indent: 0,
InternalPosition: 1,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 1,
ManufacturerCode: '',
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: 0.0,
OriginKind: 4,
OriginReceiptI3D: 60,
OriginReceiptItemI3D: 252,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: 0.0,
PurchaseOrderNumber: '',
QuantityComplete: 1.0000000,
QuantityProcessed: 0.0000000,
ReasonForCustomPurchasePrice: '',
ReceiptI3D: 4,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: 4400,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: 'Gutschrift',
VATI3D: 4,
VATRate: 19.00,
Visible: 1,
WarehouseI3D: -1,
WEEE: ''
},
{
AddAdditionalInformations: [],
ArticleCode: null,
ArticleI3D: null,
ArticlePositionKind: 0,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: null,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
DeliveryDate: null,
Discount: 0.000000000000,
DisplayPositionNumber: null,
EANCode: null,
Expanded: null,
FontColor: -16777208,
FontName: '',
FontSize: 9,
FontStyle: 0,
GroupID: 0,
I3D: 23,
Indent: 0,
InternalPosition: 2,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 2,
ManufacturerCode: null,
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: null,
OriginKind: null,
OriginReceiptI3D: null,
OriginReceiptItemI3D: null,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: null,
PurchaseOrderNumber: null,
QuantityComplete: 0.0000000,
QuantityProcessed: 0.0000000,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 4,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: null,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: 'Ende der Positionen aus Rechnung 40040.',
VATI3D: null,
VATRate: 0.00,
Visible: 1,
WarehouseI3D: null,
WEEE: null
}
],
LicenseeAddress: null,
LicenseeAddressAddressI3D: null,
LicenseeAddressContactPersonI3D: null,
LicenseeAddressCustomerI3D: null,
LicenseeAddressInformation: null,
MandatorBankNumber: null,
Number: 60004,
OfficeStaffI3D: 25,
OnlyPriceValue: false,
Phone: '+49 731 96884-322',
PostOfficeBox: '',
ProjectNumber: null,
Provision: [],
PurchaseOrderNumber: null,
ReceiptConditionI3D: 18,
ReceiptConditionText: 'Der oben genannte Betrag wird mit der von Ihnen noch zu leistenden Zahlung verrechnet,\r\nbzw. Ihnen auf Ihr Konto gut geschrieben.',
ReceiptKind: 6,
ReceiptReasonI3D: 10,
ReceiptReasonText: 'kk',
ReceiptReceiver: null,
ReceiptReceiverDelivery: null,
ReceiptReceiverInvoice: null,
ReceiptReceiverLicense: null,
Receiver: 'Herr Martin Herzog\r\nAdenauerstr. 13\r\n\r\nD - 89233 Neu-Ulm',
ReminderDate: null,
SalesRepresentativeI3D: 25,
SchemaName: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
ShowInformation: false,
State: 1,
Street: 'Adenauerstr. 13',
UsedAlternativeDeliveryAddress: false,
UsedAlternativeInvoiceAddress: false,
Version: 2,
Zip: '89233'
},
ReceiptIsLockedFromOtherUser: false,
ShowDownPaymentInvoiceDialog: false,
ShowReceiptIsAlreadyExportedDialog: false,
ShowUpdateReceiptDateDialog: false,
ShowUpdateReceiptReceiverDialog: false
},
Error: null,
Message: '',
MessageCode: null,
Status: 0
}
@@ -0,0 +1,17 @@
{
Data: {
AgreementInternalPosition: null,
DiscountInternalPosition: null,
FreeTextInternalPosition: null,
Receipt: null,
SalutationInternalPosition: null,
ShowAlternativeAddressDialog: false,
ShowUseDirectDeliveryDialog: false,
UsedOverridenAddressAndContactPerson: false,
UsedOverridenEmailAddress: false
},
Error: null,
Message: 'Es kann leider kein Beleg (Gutschrift) erstellt werden, weil für den Kunden keine Steuernummer und keine Umsatzsteuertidentnummer hinterlegt ist!',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,302 @@
{
Data: {
AgreementInternalPosition: 2,
DiscountInternalPosition: null,
FreeTextInternalPosition: 1,
Receipt: {
AdditionalText: null,
AddressI3D: 13,
BranchI3D: null,
BranchOrigin: 0,
CampaignI3D: null,
ChangedAt: null,
ChangedByI3D: null,
ChangedThroughApplication: 6,
City: 'Neu-Ulm',
ConcurrencyControlGuid: Guid,
ContactName: 'Herr Martin Herzog',
ContactPersonI3D: 16,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CountryI3D: 5,
CreatedAt: null,
CreatedByI3D: 22,
CurrencyFactor: 1.0,
CurrencyFactorIsFixed: false,
CurrencyI3D: 5,
CurrencyString: '€',
CustomerI3D: 10003,
CustomUpdateArticlePricesAndTexts: false,
Date: DateTime,
DeliveryAddress: null,
DeliveryAddressAddressI3D: null,
DeliveryAddressContactPersonI3D: null,
DeliveryAddressCustomerI3D: null,
DeliveryAddressInformation: null,
DeliveryDate: null,
DirectoryI3D: null,
EditorI3D: 22,
Email: 'herzog@celos.de',
ExclusiveOfVAT: false,
Fax: '',
HasPostOfficeBox: false,
I3D: 0,
Information: '',
InvoiceAddress: null,
InvoiceAddressAddressI3D: null,
InvoiceAddressContactPersonI3D: null,
InvoiceAddressCustomerI3D: null,
InvoiceAddressInformation: null,
IsCashAsset: false,
Items: [
{
AddAdditionalInformations: [],
ArticleCode: null,
ArticleI3D: null,
ArticlePositionKind: 51,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: null,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
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,
InternalPosition: 0,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 2,
ManufacturerCode: null,
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: null,
OriginKind: null,
OriginReceiptI3D: null,
OriginReceiptItemI3D: null,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: null,
PurchaseOrderNumber: null,
QuantityComplete: null,
QuantityProcessed: null,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: null,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: 'Sehr geehrter Herr Herzog Martin,\r\n\r\nanbei wie besprochen das Angebot',
VATI3D: null,
VATRate: null,
Visible: 1,
WarehouseI3D: null,
WEEE: null
},
{
AddAdditionalInformations: [],
ArticleCode: null,
ArticleI3D: null,
ArticlePositionKind: 0,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: null,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
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,
InternalPosition: 1,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 2,
ManufacturerCode: null,
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: null,
OriginKind: null,
OriginReceiptI3D: null,
OriginReceiptItemI3D: null,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: null,
PurchaseOrderNumber: null,
QuantityComplete: null,
QuantityProcessed: null,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: null,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: '',
VATI3D: null,
VATRate: null,
Visible: 1,
WarehouseI3D: null,
WEEE: null
},
{
AddAdditionalInformations: [],
ArticleCode: null,
ArticleI3D: null,
ArticlePositionKind: 52,
AttachedData: {},
BalanceID: null,
Barcodes: [],
BasePrice: null,
ChangeStock: false,
ContractI3D: null,
CostCenterI3D: null,
CostObjectI3D: null,
CustomerCostCenter: null,
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,
InternalPosition: 2,
IsBillingPartList: false,
IsReverseCharge: false,
Kind: 2,
ManufacturerCode: null,
OnlyPriceValue: false,
OrderDisplayPositionNumber: null,
OriginalPurchasePrice: null,
OriginKind: null,
OriginReceiptI3D: null,
OriginReceiptItemI3D: null,
PreparationDate: null,
ProjectOfferRichText: null,
PurchaseBasePrice: null,
PurchaseOrderNumber: null,
QuantityComplete: null,
QuantityProcessed: null,
ReasonForCustomPurchasePrice: null,
ReceiptI3D: 0,
ReceiptItemServiceArticleClassificationI3D: null,
RevenueAccount: null,
RichText: null,
RMAItemI3D: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
SpecialAgreementI3D: null,
Text: '',
VATI3D: null,
VATRate: null,
Visible: 1,
WarehouseI3D: null,
WEEE: null
}
],
LicenseeAddress: null,
LicenseeAddressAddressI3D: null,
LicenseeAddressContactPersonI3D: null,
LicenseeAddressCustomerI3D: null,
LicenseeAddressInformation: null,
MandatorBankNumber: null,
Number: 60021,
OfficeStaffI3D: 25,
OnlyPriceValue: false,
Phone: '+49 731 96884-322',
PostOfficeBox: '',
ProjectNumber: null,
Provision: [],
PurchaseOrderNumber: null,
ReceiptConditionI3D: 18,
ReceiptConditionText: 'Der oben genannte Betrag wird mit der von Ihnen noch zu leistenden Zahlung verrechnet,\r\nbzw. Ihnen auf Ihr Konto gut geschrieben.',
ReceiptKind: 6,
ReceiptReasonI3D: null,
ReceiptReasonText: null,
ReceiptReceiver: {
AccountI3D: 4,
AdditionalAddressSupplement: '',
City: 'Neu-Ulm',
CompanyName: '',
ContactDepartment: '',
ContactName: 'Herr Martin Herzog',
Country: 'Finnland',
CountryI3D: 5,
CustomerNumber: 10003,
Department: '',
Email: null,
Fax: null,
FederalState: '',
FederalStateI3D: null,
HasPostOfficeBox: false,
HouseNumber: '13',
I3D: 0,
Phone: null,
PostOfficeBox: '',
ReceiverText: null,
Street: 'Adenauerstrasse',
SupplierNumber: null,
Zip: '89233'
},
ReceiptReceiverDelivery: null,
ReceiptReceiverInvoice: null,
ReceiptReceiverLicense: null,
Receiver: 'Herr Martin Herzog\r\nAdenauerstrasse 13\r\n89233 Neu-Ulm\r\nFinnland',
ReminderDate: null,
SalesRepresentativeI3D: 25,
SchemaName: null,
ServicePeriodFrom: null,
ServicePeriodTo: null,
ShowInformation: false,
State: 1,
Street: 'Adenauerstrasse 13',
UsedAlternativeDeliveryAddress: false,
UsedAlternativeInvoiceAddress: false,
Version: 1,
Zip: '89233'
},
SalutationInternalPosition: 0,
ShowAlternativeAddressDialog: false,
ShowUseDirectDeliveryDialog: false,
UsedOverridenAddressAndContactPerson: false,
UsedOverridenEmailAddress: false
},
Error: null,
Message: '',
MessageCode: null,
Status: 0
}
@@ -0,0 +1,45 @@
{
Data: {
CloseTicketI3Ds: [],
DuplicatePurchaseOrderNumberReceipts: [],
LoginForNegativeArticleBookingFailed: false,
LoginForNegativeArticleBookingMissingRights: false,
MissingFields: [],
NegativeArticleStockBookings: [],
PossibleBarcodesToRemove: [],
Receipt: null,
ReceiptI3D: null,
RevertContractBillingTimes: [],
ShowAskForAssetReasonDialog: false,
ShowAskIfTicketsShouldBeClosedDialog: false,
ShowAssetReasonDialog: false,
ShowCancelTasksDialog: false,
ShowClassificationDialog: false,
ShowCloseReceiptDialog: false,
ShowCreditVoucherContingentStateDialog: false,
ShowCrmProjectDialog: false,
ShowCustomerLimitExceededDialog: false,
ShowDefaultInvoicePaymentConditionsDeviationDialog: false,
ShowExternalInvoiceNumberDuplicateDialog: false,
ShowInsertFreightArticleDialog: false,
ShowLoginForNegativeArticleBookingDialog: false,
ShowMinimumPriceForDeliveryConditionDialog: false,
ShowMinimumPriceForPaymentConditionDialog: false,
ShowMinimumPriceForReceiptConditionDialog: false,
ShowMinimumPriceForSupplierPaymentConditionDialog: false,
ShowPrioritySelectionDialog: false,
ShowQuantityIsReducedBelowQuantityPickedDialog: false,
ShowReceiptTemplateNameDialog: false,
ShowRemoveBarcodesDialog: false,
ShowShouldUpdateArticlePricesBecauseOfMinPriceDialog: false,
ShowUpdateContingentsDialog: false,
ShowUpdateItemRelationToOriginDialog: false,
ShowUpdateTaskTicketPriorityDialog: false,
ShowUsePreviousContingentsDialog: false,
UpdateItemRelationToOriginData: []
},
Error: null,
Message: 'Es kann leider kein Beleg (Gutschrift) erstellt werden, weil für den Kunden keine Steuernummer und keine Umsatzsteuertidentnummer hinterlegt ist!',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,47 @@
{
Data: {
CloseTicketI3Ds: [],
DuplicatePurchaseOrderNumberReceipts: [],
LoginForNegativeArticleBookingFailed: false,
LoginForNegativeArticleBookingMissingRights: false,
MissingFields: [
4
],
NegativeArticleStockBookings: [],
PossibleBarcodesToRemove: [],
Receipt: null,
ReceiptI3D: null,
RevertContractBillingTimes: [],
ShowAskForAssetReasonDialog: false,
ShowAskIfTicketsShouldBeClosedDialog: false,
ShowAssetReasonDialog: false,
ShowCancelTasksDialog: false,
ShowClassificationDialog: false,
ShowCloseReceiptDialog: false,
ShowCreditVoucherContingentStateDialog: false,
ShowCrmProjectDialog: false,
ShowCustomerLimitExceededDialog: false,
ShowDefaultInvoicePaymentConditionsDeviationDialog: false,
ShowExternalInvoiceNumberDuplicateDialog: false,
ShowInsertFreightArticleDialog: false,
ShowLoginForNegativeArticleBookingDialog: false,
ShowMinimumPriceForDeliveryConditionDialog: false,
ShowMinimumPriceForPaymentConditionDialog: false,
ShowMinimumPriceForReceiptConditionDialog: true,
ShowMinimumPriceForSupplierPaymentConditionDialog: false,
ShowPrioritySelectionDialog: false,
ShowQuantityIsReducedBelowQuantityPickedDialog: false,
ShowReceiptTemplateNameDialog: false,
ShowRemoveBarcodesDialog: false,
ShowShouldUpdateArticlePricesBecauseOfMinPriceDialog: false,
ShowUpdateContingentsDialog: false,
ShowUpdateItemRelationToOriginDialog: false,
ShowUpdateTaskTicketPriorityDialog: false,
ShowUsePreviousContingentsDialog: false,
UpdateItemRelationToOriginData: []
},
Error: null,
Message: 'Die ausgewählte Belegskondition soll erst ab einem Mindestpreis von 0,00 € verwendet werden.',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,118 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Settings;
using Centron.BusinessLogic.Sales.Receipts.DataAndResults;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.BusinessLogic.WebServices.Sales.Receipts.DataAndResults;
using Centron.Data.WebServices.Sales.Receipts.CreditVouchers;
using Centron.Interfaces;
using Centron.Interfaces.Administration.Environment;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.TicketTests.Ticket125608;
public class Ticket125608Tests : EndToEndTest
{
public Ticket125608Tests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
// This customer doesn't have a RevenueIdentificationNumber nor a TaxNumber
private const int FailureCustomerI3D = 10018;
private const int FailureCreditVoucherI3D = 12;
// This customer does have a TaxNumber
private const int SuccessCustomerI3D = 10003;
private const int SuccessCreditVoucherI3D = 4;
public override void Execute()
{
this.PrepareDatabase();
this.CreateNewCreditVoucher();
this.CreateNewCreditVoucherVersion();
this.SaveCreditVoucher();
}
private void CreateNewCreditVoucher()
{
Test("CreateNewCreditVoucher_Failure", FailureCustomerI3D);
Test("CreateNewCreditVoucher_Success", SuccessCustomerI3D);
void Test(string name, int customerI3D)
{
using var session = new BLSession();
var result = session.GetBL<ReceiptWebServiceBL>().CreateNewReceipt(
CentronObjectKindNumeric.CreditVoucherClass,
this.GetLoggedInUser(),
customerI3D,
new CreateReceiptData(),
addressI3D: null,
contactPersonI3D: null,
insertCustomerDiscount: true,
insertSalutationAndAgreement: true,
ignoreDefaultContract: false);
this.Verifier.Verify(name, result);
}
}
private void CreateNewCreditVoucherVersion()
{
Test("CreateNewCreditVoucherVersion_Failure", FailureCreditVoucherI3D);
Test("CreateNewCreditVoucherVersion_Success", SuccessCreditVoucherI3D);
void Test(string name, int creditVoucherI3D)
{
using var session = new BLSession();
var result = session.GetBL<ReceiptWebServiceBL>().CreateNewVersion(
CentronObjectKindNumeric.CreditVoucherClass,
creditVoucherI3D,
version: null,
newContactPersonI3D: null,
this.GetLoggedInUser().User,
new CreateNewVersionData
{
IgnoreCallbacks = true
});
this.Verifier.Verify(name, result);
}
}
private void SaveCreditVoucher()
{
Test("SaveCreditVoucher_Failure", FailureCreditVoucherI3D);
Test("SaveCreditVoucher_Success", SuccessCreditVoucherI3D);
void Test(string name, int creditVoucherI3D)
{
using var session = new BLSession();
var creditVoucher = (ReceiptCreditVoucherDTO)new BLSession().GetBL<ReceiptWebServiceBL>().GetReceiptByI3D(creditVoucherI3D, CentronObjectKindNumeric.CreditVoucherClass).ThrowIfError();
// creditVoucher.ReceiptReason
var result = session.GetBL<ReceiptWebServiceBL>().SaveReceipt(
creditVoucher,
this.GetLoggedInUser().User,
new SaveReceiptData(),
autoLockIfNewReceipt: false,
CreatedThroughApplication.CentronNet,
receiptTemplateFolderI3D: null);
this.Verifier.Verify(name, result);
}
}
private void PrepareDatabase()
{
// Activate the setting
this.Sql($"UPDATE dbo.Stammdat SET Wert = 1 WHERE I3D = {(int)AppSettingsConst.IsTaxNumberForCreditCreationMandatory}");
this.Sql($"UPDATE dbo.Stammdat SET Wert = 0 WHERE I3D = {(int)AppSettingsConst.QmMessageConfirmationPopupCreditVoucher}");
this.Sql($"UPDATE dbo.Kunden SET SteuerNr = 'Test' WHERE I3D = {SuccessCustomerI3D}");
}
}