Page extension 20501 Subc. ILEntries

Subcontracting, Microsoft.Manufacturing.Subcontracting

src/Apps/W1/Subcontracting/App/src/General/SubcILEntries.PageExt.al123 lines, Copyright (c) Microsoft Corporation. MIT

// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace Microsoft.Manufacturing.Subcontracting;using Microsoft.Inventory.Ledger;pageextension 20501 "Subc. ILEntries" extends "Item Ledger Entries"{    layout    {        addlast(Control1)        {            field("Subc. Purch. Order No."; Rec."Subc. Purch. Order No.")            {                ApplicationArea = Subcontracting;                ToolTip = 'Specifies the number of the related purchase order.';                Visible = false;            }            field("Subc. Purch. Order Line No."; Rec."Subc. Purch. Order Line No.")            {                ApplicationArea = Subcontracting;                ToolTip = 'Specifies the number of the related purchase order line.';                Visible = false;            }            field("Prod. Order No."; Rec."Subc. Prod. Order No.")            {                ApplicationArea = Subcontracting;                ToolTip = 'Specifies the number of the related production order.';                Visible = false;            }            field("Prod. Order Line No."; Rec."Subc. Prod. Order Line No.")            {                ApplicationArea = Subcontracting;                ToolTip = 'Specifies the number of the related production order line.';                Visible = false;            }        }    }    actions    {        addafter("&Application")        {            group(Production)            {                Caption = 'Production';                action("Production Order")                {                    ApplicationArea = Subcontracting;                    Caption = 'Production Order';                    Enabled = ((Rec."Order Type" = Rec."Order Type"::Production) and (Rec."Order No." <> '')) or (Rec."Subc. Prod. Order No." <> '');                    Image = Production;                    ToolTip = 'View the related production order.';                    trigger OnAction()                    begin                        ShowProductionOrder(Rec);                    end;                }                action("Production Order Routing")                {                    ApplicationArea = Subcontracting;                    Caption = 'Production Order Routing';                    Enabled = ((Rec."Order Type" = Rec."Order Type"::Production) and (Rec."Order No." <> '')) or (Rec."Subc. Prod. Order No." <> '');                    Image = Route;                    ToolTip = 'View the related production order routing.';                    trigger OnAction()                    begin                        ShowProductionOrderRouting(Rec);                    end;                }                action("Production Order Components")                {                    ApplicationArea = Subcontracting;                    Caption = 'Production Order Components';                    Enabled = ((Rec."Order Type" = Rec."Order Type"::Production) and (Rec."Order No." <> '')) or (Rec."Subc. Prod. Order No." <> '');                    Image = Components;                    ToolTip = 'View the related production order components.';                    trigger OnAction()                    begin                        ShowProductionOrderComponents(Rec);                    end;                }                action("Purchase Order")                {                    ApplicationArea = Subcontracting;                    Caption = 'Subcontracting Purchase Order';                    Enabled = Rec."Subc. Purch. Order No." <> '';                    Image = Order;                    ToolTip = 'View the related subcontracting purchase order.';                    trigger OnAction()                    begin                        ShowPurchaseOrder(Rec);                    end;                }            }        }    }    var        SubcProdOrderFactboxMgmt: Codeunit "Subc. ProdO. Factbox Mgmt.";        SubcPurchFactboxMgmt: Codeunit "Subc. Purch. Factbox Mgmt.";    local procedure ShowProductionOrder(RecRelatedVariant: Variant)    begin        SubcProdOrderFactboxMgmt.ShowProductionOrder(RecRelatedVariant);    end;    local procedure ShowProductionOrderRouting(RecRelatedVariant: Variant)    begin        SubcProdOrderFactboxMgmt.ShowProductionOrderRouting(RecRelatedVariant);    end;    local procedure ShowProductionOrderComponents(RecRelatedVariant: Variant)    begin        SubcProdOrderFactboxMgmt.ShowProductionOrderComponents(RecRelatedVariant);    end;    local procedure ShowPurchaseOrder(RecRelatedVariant: Variant)    begin        SubcPurchFactboxMgmt.ShowPurchaseOrder(RecRelatedVariant);    end;}