Hi,
We solved the problem by modifying Codeunit 5896:
LOCAL CalcShareOfCapCost(InvtAdjmtEntryOrder : Record "Inventory Adjmt. Entry (Order)") ShareOfCapCost : Decimal
IF InvtAdjmtEntryOrder."Order Type" = InvtAdjmtEntryOrder."Order Type"::Assembly THEN
EXIT(1);
WITH CapLedgEntry DO BEGIN
SETCURRENTKEY("Order Type","Order No.");
SETRANGE("Order Type",InvtAdjmtEntryOrder."Order Type");
SETRANGE("Order No.",InvtAdjmtEntryOrder."Order No.");
SETRANGE("Order Line No.",InvtAdjmtEntryOrder."Order Line No.");
SETRANGE("Routing No.",InvtAdjmtEntryOrder."Routing No.");
SETRANGE("Routing Reference No.",InvtAdjmtEntryOrder."Routing Reference No.");
SETRANGE("Item No.",InvtAdjmtEntryOrder."Item No.");
CALCSUMS("Output Quantity");
ShareOfCapCost := "Output Quantity";
IF InvtAdjmtEntryOrder."Order Type" = InvtAdjmtEntryOrder."Order Type"::Production THEN
-------->OLD: SETRANGE("Order Line No);
-------> NEW: SETRANGE("Order Line No.",InvtAdjmtEntryOrder."Order Line No.");
CALCSUMS("Output Quantity");
IF "Output Quantity" <> 0 THEN
ShareOfCapCost := ShareOfCapCost / "Output Quantity"
ELSE
ShareOfCapCost := 1;