Hello,
following situation:
Sales Order > Planning > Create Project Order (1 production order with two sales lines):
Post output for both lines.
Cancel output line, it is not possible to use Applies-to Entry because there are missing information concerning the Prod. Order Line, like “Prod. Order Line No.” or “Routing Reference No.”
This is caused by the ProdOrderLine.COUNT = 1
Table 83, “Item No.” (OnValidate):
"Entry Type"::Output:
BEGIN
...
IF ProdOrderLine.COUNT = 1 THEN BEGIN
VALIDATE("Prod. Order Line No.",ProdOrderLine."Line No.");
"Routing Reference No." := ProdOrderLine."Routing Reference No.";
"Unit of Measure Code" := ProdOrderLine."Unit of Measure Code";
"Location Code" := ProdOrderLine."Location Code";
VALIDATE("Variant Code",ProdOrderLine."Variant Code");
VALIDATE("Bin Code",ProdOrderLine."Bin Code");
END ELSE
"Unit of Measure Code" := Item."Base Unit of Measure";
END;
"Entry Type"::Consumption:
BEGIN
SetFilterProdOrderComp;
ProdOrderComp.SETRANGE("Item No.","Item No.");
IF ProdOrderComp.COUNT = 1 THEN BEGIN
ProdOrderComp.FIND('-');
VALIDATE("Prod. Order Line No.",ProdOrderComp."Prod. Order Line No.");
VALIDATE("Prod. Order Comp. Line No.",ProdOrderComp."Line No.");
"Unit of Measure Code" := ProdOrderComp."Unit of Measure Code";
"Location Code" := ProdOrderComp."Location Code";
VALIDATE("Variant Code",ProdOrderComp."Variant Code");
VALIDATE("Bin Code",ProdOrderComp."Bin Code");
END ELSE BEGIN
"Unit of Measure Code" := Item."Base Unit of Measure";
VALIDATE("Prod. Order Comp. Line No.",0);
END;
END;
...
What is the use of that?
Thanks in advance!
*This post is locked for comments