Cubage and Weight in Warehouse Entry

Gether
Gether Member Posts: 4
Hi,
I have a question to the Cubage and Weight in Warehouse Entry. I have booked a Shipment (Item with Lot No.). I have found out that the last entry contain negative values. I have found out that the last entry contain negative values. It happens only if I book all Quantity in Shipment.
Example:
On the Location are 6 pieces. I book the Shipment with 6 pieces. This is the result:
Cubage Weight
161.398.800 382
161.398.800 382
161.398.800 382
161.398.800 382
161.398.800 382
-806.994.000 -1.910 ???
If I had booked, however, only 3 of 6 I would have in Warehous Entry this:
Cubage Weight
161.398.800 382
161.398.800 382
161.398.800 382

Is this correct that the last values are negative?

I have checked the code and have found the following place:
CU 7301 und Funktion "DeleteFromBinContent".
WITH WhseEntry DO BEGIN
FromBinContent.GET(
"Location Code","Bin Code","Item No.",
"Variant Code","Unit of Measure Code");
FromBinContent.SETRANGE("Lot No. Filter","Lot No.");
FromBinContent.SETRANGE("Serial No. Filter","Serial No.");
FromBinContent.CALCFIELDS(Quantity,"Pos. Adjmt. Qty.","Put-away Qty.");
IF FromBinContent.Quantity + Quantity = 0 THEN BEGIN
WhseEntry2.SETCURRENTKEY(
"Item No.","Bin Code","Location Code","Variant Code","Unit of Measure Code");
WhseEntry2.SETRANGE("Item No.","Item No.");
WhseEntry2.SETRANGE("Bin Code","Bin Code");
WhseEntry2.SETRANGE("Location Code","Location Code");
WhseEntry2.SETRANGE("Variant Code","Variant Code");
WhseEntry2.SETRANGE("Unit of Measure Code","Unit of Measure Code");
WhseEntry2.SETRANGE("Lot No.","Lot No.");
WhseEntry2.SETRANGE("Serial No.","Serial No.");
WhseEntry2.CALCSUMS(Cubage,Weight,"Qty. (Base)");
Cubage := -WhseEntry2.Cubage;
Weight := -WhseEntry2.Weight;

IF WhseEntry2."Qty. (Base)" + "Qty. (Base)" <> 0 THEN
RegisterRoundResidual(WhseEntry,WhseEntry2);
FromBinContent.SETRANGE("Lot No. Filter");
FromBinContent.SETRANGE("Serial No. Filter");
FromBinContent.CALCFIELDS(FromBinContent.Quantity);
IF FromBinContent.Quantity + Quantity = 0 THEN
IF (FromBinContent."Pos. Adjmt. Qty." = 0) AND
(FromBinContent."Put-away Qty." = 0) AND
(NOT FromBinContent.Fixed)
THEN
FromBinContent.DELETE;
END ELSE
IF FromBinContent.Quantity + Quantity < 0 THEN
FromBinContent.FIELDERROR(
Quantity,STRSUBSTNO(Text000,FromBinContent.Quantity));
END;