4. Mai 2015 14:32
Lagerdurchlauf ist notwendig für Postenart = XX, Belegnr. = XX, Zeilennr. = XX.
IF (ItemJnlLine.Quantity = 0) OR
(ItemJnlLine."Item Charge No." <> '') OR
(ItemJnlLine."Value Entry Type" IN
[ItemJnlLine."Value Entry Type"::Revaluation,ItemJnlLine."Value Entry Type"::Rounding]) OR
ItemJnlLine.Adjustment
THEN
EXIT;
GetLocation(ItemJnlLine."Location Code");
IF Location."Directed Put-away and Pick" THEN
EXIT;
CASE ItemJnlLine."Entry Type" OF
// >> --------- BITTE MAL HIER DRAUF ACHTEN --------------- >>
ItemJnlLine."Entry Type"::Output:
IF ((NOT Location."Require Receive" AND Location."Require Put-away") AND
(ItemJnlLine.Quantity >= 0)) OR
((NOT Location."Require Shipment" AND Location."Require Pick") AND
(ItemJnlLine.Quantity < 0))
THEN
IF ItemJnlLine.LastOutputOperation(ItemJnlLine) THEN
ShowError := TRUE;
// << --------- BITTE MAL HIER DRAUF ACHTEN ---------------- <<
ItemJnlLine."Entry Type"::Consumption:
IF ((NOT Location."Require Receive" AND Location."Require Put-away") AND
(ItemJnlLine.Quantity < 0)) OR
((NOT Location."Require Shipment" AND Location."Require Pick") AND
(ItemJnlLine.Quantity >= 0))
THEN
IF WhseValidateSourceLine.WhseLinesExist(
DATABASE::"Prod. Order Component",
3,
ItemJnlLine."Prod. Order No.",
ItemJnlLine."Prod. Order Line No.",
ItemJnlLine."Prod. Order Comp. Line No.",
ItemJnlLine.Quantity)
THEN
ShowError := TRUE;
END;
IF ShowError THEN
ERROR(
Text012,
ItemJnlLine.FIELDCAPTION("Entry Type"),
ItemJnlLine."Entry Type",
ItemJnlLine.FIELDCAPTION("Document No."),
ItemJnlLine."Document No.",
ItemJnlLine.FIELDCAPTION("Line No."),
ItemJnlLine."Line No.");
4. Mai 2015 16:21
5. Mai 2015 08:35