Remove default values from Waste import for amount and locode

This commit is contained in:
Daniel Schick 2025-07-23 09:47:57 +02:00
parent 8bc2ae99a8
commit 4d131f718f

View File

@ -1279,18 +1279,18 @@ namespace ENI2.Excel
if (waste.WasteType == 2309) waste.WasteType = 507; if (waste.WasteType == 2309) waste.WasteType = 507;
if (waste.WasteType == 3000) waste.WasteType = 401; if (waste.WasteType == 3000) waste.WasteType = 401;
waste.WasteDisposalAmount_MTQ = reader.ReadNumberDefaultZero(wasteAmount); waste.WasteDisposalAmount_MTQ = reader.ReadNumber(wasteAmount);
waste.WasteCapacity_MTQ = reader.ReadNumberDefaultZero(wasteCapacity); waste.WasteCapacity_MTQ = reader.ReadNumber(wasteCapacity);
waste.WasteAmountRetained_MTQ = reader.ReadNumberDefaultZero(wasteRetained); waste.WasteAmountRetained_MTQ = reader.ReadNumber(wasteRetained);
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
if (waste.WasteDisposalPort.IsNullOrEmpty()) //if (waste.WasteDisposalPort.IsNullOrEmpty())
{ //{
waste.WasteDisposalPort = "ZZUKN"; // waste.WasteDisposalPort = "ZZUKN";
} //}
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen); waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen);
if (!waste.WasteType.HasValue || (waste.WasteType > 999)) if (!waste.WasteType.HasValue || (waste.WasteType > 999))
{ {
@ -1368,7 +1368,7 @@ namespace ENI2.Excel
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511")) wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
wr.WasteDescription = "-"; wr.WasteDescription = "-";
} }
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount) ?? (double?)0; // Default ist 0, nicht nix ;-) wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount); // ?? (double?)0; // Default ist 0, nicht nix ;-) // Update: wir wollen doch einen Fehler
} }
// only add message when an identification number was given // only add message when an identification number was given