From b49ddb5343934b0f81692bc0be1b12da0b00dee5 Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Sat, 9 May 2026 18:10:19 +0200 Subject: [PATCH 1/8] Bug 633674: Rename Subcontracting Type to Component Supply Method --- .../SubcProdOrderCompExt.Codeunit.al | 4 +- .../SubcPurchaseOrderCreator.Codeunit.al | 8 ++-- .../SubcontractingManagement.Codeunit.al | 22 +++++----- ....Enum.al => ComponentSupplyMethod.Enum.al} | 8 ++-- .../SubcProdBOMVersionLines.PageExt.al | 2 +- .../SubcProdOrderCompLine.PageExt.al | 2 +- .../Pages/SubcProdOrderComponents.Page.al | 2 +- .../SubcProdOrderCreateBind.Codeunit.al | 2 +- .../SubcTempDataInitializer.Codeunit.al | 6 +-- .../Pages/SubcTempBOMLines.Page.al | 2 +- .../Pages/SubcTempProdOrderComp.Page.al | 2 +- .../SubcPlanningCompExt.TableExt.al | 6 +-- .../SubcProdBOMLineExt.TableExt.al | 6 +-- .../SubcProdOrderCompExt.TableExt.al | 6 +-- .../Tests/SubcLocationHandlerTest.Codeunit.al | 6 +-- .../SubcSubcontractingSyncTest.Codeunit.al | 4 +- .../Tests/SubcSubcontractingTest.Codeunit.al | 40 +++++++++---------- .../SubcSubcontractingUITest.Codeunit.al | 23 +++++++++++ 18 files changed, 87 insertions(+), 64 deletions(-) rename src/Apps/W1/Subcontracting/App/src/Process/Enumerations/{SubcontractingType.Enum.al => ComponentSupplyMethod.Enum.al} (79%) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al index 66dbbec5a9..504e6897be 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al @@ -72,7 +72,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." TransferShipmentLine: Record "Transfer Shipment Line"; ConfirmManagement: Codeunit "Confirm Management"; begin - if ProdOrderComponent."Subcontracting Type" <> "Subcontracting Type"::Transfer then + if ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer then exit; TransferShipmentLine.SetRange("Prod. Order No.", ProdOrderComponent."Prod. Order No."); @@ -143,7 +143,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." if ProdOrderComponent."Location Code" = xProdOrderComponent."Location Code" then exit; - if ProdOrderComponent."Subcontracting Type" <> "Subcontracting Type"::Transfer then + if ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer then exit; TransferLine.SetCurrentKey("Prod. Order No.", "Routing No.", "Routing Reference No.", "Operation No.", "Subcontr. Purch. Order No."); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al index e803792afa..d6fde755b9 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al @@ -35,8 +35,8 @@ codeunit 99001557 "Subc. Purchase Order Creator" PurchOrderAlreadyCreatedQst: Label 'Purchase order(s) have already been created.\\Do you want to view them?'; CreationOfSubcontractingOrderIsNotAllowedErr: Label 'You cannot create Subcontracting Order, because the Production Order %1 is not released.', Comment = '%1=Production Order No.'; NoProdOrderLineWithRemQtyErr: Label 'No Prod. Order Line with Remaining Quantity.'; - BlankLocationConfirmQst: Label 'One or more Prod. Order Components with Subcontracting Type Transfer have a blank Location Code. Without a Location Code, you will not be able to create a transfer order to send the components to the subcontractor.\\Do you want to create the Subcontracting Order anyway?'; - SameAsSubcLocConfirmQst: Label 'One or more Prod. Order Components with Subcontracting Type Transfer have Location Code %1, which is the same as the Subcontracting Location Code of vendor %2. A transfer order cannot be created from and to the same location.\\Do you want to create the Subcontracting Order anyway?', Comment = '%1=Component Location Code, %2=Vendor No.'; + BlankLocationConfirmQst: Label 'One or more Prod. Order Components with Component Supply Method Transfer to Vendor have a blank Location Code. Without a Location Code, you will not be able to create a transfer order to send the components to the subcontractor.\\Do you want to create the Subcontracting Order anyway?'; + SameAsSubcLocConfirmQst: Label 'One or more Prod. Order Components with Component Supply Method Transfer to Vendor have Location Code %1, which is the same as the Subcontracting Location Code of vendor %2. A transfer order cannot be created from and to the same location.\\Do you want to create the Subcontracting Order anyway?', Comment = '%1=Component Location Code, %2=Vendor No.'; NotEnoughSpaceErr: Label 'There is not enough space to insert the subcontracting info line.'; procedure CreateSubcontractingPurchaseOrderFromRoutingLine(ProdOrderRoutingLine: Record "Prod. Order Routing Line") NoOfCreatedPurchOrder: Integer @@ -125,7 +125,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Prod. Order Line No.", RequisitionLine."Prod. Order Line No."); - ProdOrderComponent.SetRange("Subcontracting Type", "Subcontracting Type"::Purchase); + ProdOrderComponent.SetRange("Subcontracting Type", "Component Supply Method"::Purchase); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); if ProdOrderComponent.FindSet() then repeat @@ -285,7 +285,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); - ProdOrderComponent.SetRange("Subcontracting Type", "Subcontracting Type"::Transfer); + ProdOrderComponent.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); ProdOrderComponent.SetRange("Location Code", ''); if not ProdOrderComponent.IsEmpty() then diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al index 63c901be77..57253b2c67 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al @@ -51,13 +51,13 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin case ProdOrderComponent."Subcontracting Type" of - "Subcontracting Type"::InventoryByVendor, - "Subcontracting Type"::Purchase: + "Component Supply Method"::InventoryByVendor, + "Component Supply Method"::Purchase: if (VendorSubcontrLocation <> '') and (ProdOrderComponent."Location Code" <> VendorSubcontrLocation) then ProdOrderComponent.Validate("Location Code", VendorSubcontrLocation); - "Subcontracting Type"::Transfer, - "Subcontracting Type"::Empty: + "Component Supply Method"::Transfer, + "Component Supply Method"::Empty: begin if (ProdOrderComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin ProdOrderComponent.Validate("Location Code", OriginalLocationCode); @@ -74,13 +74,13 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnPlanningComponent(var PlanningComponent: Record "Planning Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin case PlanningComponent."Subcontracting Type" of - "Subcontracting Type"::InventoryByVendor, - "Subcontracting Type"::Purchase: + "Component Supply Method"::InventoryByVendor, + "Component Supply Method"::Purchase: if (VendorSubcontrLocation <> '') and (PlanningComponent."Location Code" <> VendorSubcontrLocation) then PlanningComponent.Validate("Location Code", VendorSubcontrLocation); - "Subcontracting Type"::Transfer, - "Subcontracting Type"::Empty: + "Component Supply Method"::Transfer, + "Component Supply Method"::Empty: begin if (PlanningComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin PlanningComponent.Validate("Location Code", OriginalLocationCode); @@ -409,7 +409,7 @@ codeunit 99001505 "Subcontracting Management" if not GetSubcontractor(PlanningRoutingLine."No.", Vendor) then Clear(Vendor); - if PlanningComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase] then + if PlanningComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase] then VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; OrigLocationCode := PlanningComponent."Orig. Location Code"; OrigBinCode := PlanningComponent."Orig. Bin Code"; @@ -467,7 +467,7 @@ codeunit 99001505 "Subcontracting Management" Clear(Vendor); VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; - if not (ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase]) then + if not (ProdOrderComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; @@ -502,7 +502,7 @@ codeunit 99001505 "Subcontracting Management" if not ConfirmManagement.GetResponseOrDefault(StrSubstNo(RoutingLinkUpdConfQst, ProdOrderRoutingLine."Routing Link Code"), true) then Error(UpdateIsCanceledErr); repeat - if not (ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase]) then + if not (ProdOrderComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/SubcontractingType.Enum.al b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al similarity index 79% rename from src/Apps/W1/Subcontracting/App/src/Process/Enumerations/SubcontractingType.Enum.al rename to src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al index 12fe4e0e59..fe060b737b 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/SubcontractingType.Enum.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al @@ -4,7 +4,7 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Manufacturing.Subcontracting; -enum 99001500 "Subcontracting Type" +enum 99001500 "Component Supply Method" { Extensible = true; value(0; Empty) @@ -13,14 +13,14 @@ enum 99001500 "Subcontracting Type" } value(1; Purchase) { - Caption = 'Purchase with Service'; + Caption = 'Vendor-Supplied'; } value(2; InventoryByVendor) { - Caption = 'Inventory by Vendor'; + Caption = 'Consignment at Vendor'; } value(3; Transfer) { - Caption = 'Transfer'; + Caption = 'Transfer to Vendor'; } } \ No newline at end of file diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al index deeeed78da..35f2552004 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al @@ -15,7 +15,7 @@ pageextension 99001514 "Subc. ProdBOMVersionLines" extends "Production BOM Versi field("Subcontracting Type"; Rec."Subcontracting Type") { ApplicationArea = Manufacturing; - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production BOM Line.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production BOM line.'; } } } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al index 3ab2b314bc..4ba265a457 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al @@ -15,7 +15,7 @@ pageextension 99001513 "Subc. ProdOrderCompLine" extends "Prod. Order Comp. Line field("Subcontracting Type"; Rec."Subcontracting Type") { ApplicationArea = Manufacturing; - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production Component.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production component.'; } field("Routing Link Code"; Rec."Routing Link Code") { diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al index ce5d8f339f..7befc25487 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al @@ -24,7 +24,7 @@ page 99001503 "Subc. Prod. Order Components" ShowCaption = false; field("Subcontracting Type"; Rec."Subcontracting Type") { - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production Order Component.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; } field("Item No."; Rec."Item No.") { diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al index aa1f5a0b59..ac39439469 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al @@ -49,7 +49,7 @@ codeunit 99001555 "Subc. ProdOrderCreateBind" ManufacturingSetup.SetLoadFields("Rtng. Link Code Purch. Prov."); ManufacturingSetup.Get(); if (ProdOrderComponent."Routing Link Code" <> ManufacturingSetup."Rtng. Link Code Purch. Prov.") or - (ProdOrderComponent."Subcontracting Type" <> "Subcontracting Type"::Transfer) then + (ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer) then exit; ComponentsLocationCode := SubcontractingManagement.GetComponentsLocationCode(SubcontractingPurchaseLine); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al index a17a90e9ba..a489fc69f8 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al @@ -167,7 +167,7 @@ codeunit 99001552 "Subc. Temp Data Initializer" TempGlobalProductionBOMLine.Validate("No.", SubcManagementSetup."Preset Component Item No."); TempGlobalProductionBOMLine."Quantity per" := 1; TempGlobalProductionBOMLine."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; - TempGlobalProductionBOMLine."Subcontracting Type" := "Subcontracting Type"::InventoryByVendor; + TempGlobalProductionBOMLine."Subcontracting Type" := "Component Supply Method"::InventoryByVendor; TempGlobalProductionBOMLine.Insert(); end; @@ -569,13 +569,13 @@ codeunit 99001552 "Subc. Temp Data Initializer" if TempGlobalProdOrderComponent."Routing Link Code" = ManufacturingSetup."Rtng. Link Code Purch. Prov." then case TempGlobalProdOrderComponent."Subcontracting Type" of - "Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase: + "Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase: begin GetVendor(); TempGlobalProdOrderComponent.Validate("Location Code", TempGlobalVendor."Subcontr. Location Code"); TempGlobalProdOrderComponent."Orig. Location Code" := ComponentsLocationCode; end; - "Subcontracting Type"::Transfer: + "Component Supply Method"::Transfer: TempGlobalProdOrderComponent.Validate("Location Code", ComponentsLocationCode); end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al index c23b9e3b5c..29abb1d4d8 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al @@ -84,7 +84,7 @@ page 99001506 "Subc. Temp BOM Lines" } field("Subcontracting Type"; Rec."Subcontracting Type") { - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production BOM Line.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production BOM line.'; ApplicationArea = Manufacturing; trigger OnValidate() begin diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al index 7def40c9b9..c3255d621d 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al @@ -79,7 +79,7 @@ page 99001508 "Subc. Temp Prod Order Comp" } field("Subcontracting Type"; Rec."Subcontracting Type") { - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production BOM Line.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; trigger OnValidate() begin if Rec."Subcontracting Type" = Rec."Subcontracting Type"::Purchase then diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al index a48c1e7c1b..169771e5b6 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al @@ -13,11 +13,11 @@ tableextension 99001503 "Subc. Planning Comp Ext." extends "Planning Component" AllowInCustomizations = AsReadOnly; fields { - field(99001524; "Subcontracting Type"; Enum "Subcontracting Type") + field(99001524; "Subcontracting Type"; Enum "Component Supply Method") { - Caption = 'Subcontracting Type'; + Caption = 'Component Supply Method'; DataClassification = CustomerContent; - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Planning Component.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the planning component.'; trigger OnValidate() var SubcontractingManagement: Codeunit "Subcontracting Management"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al index 04c2fade18..e45b02627f 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al @@ -11,11 +11,11 @@ tableextension 99001531 "Subc. Prod BOM Line Ext." extends "Production BOM Line" AllowInCustomizations = AsReadOnly; fields { - field(99001522; "Subcontracting Type"; Enum "Subcontracting Type") + field(99001522; "Subcontracting Type"; Enum "Component Supply Method") { - Caption = 'Subcontracting Type'; + Caption = 'Component Supply Method'; DataClassification = CustomerContent; - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production BOM Line.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production BOM line.'; } } } \ No newline at end of file diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al index 243f1b765a..721870e508 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al @@ -16,11 +16,11 @@ tableextension 99001502 "Subc. Prod Order Comp Ext." extends "Prod. Order Compon AllowInCustomizations = AsReadOnly; fields { - field(99001522; "Subcontracting Type"; Enum "Subcontracting Type") + field(99001522; "Subcontracting Type"; Enum "Component Supply Method") { - Caption = 'Subcontracting Type'; + Caption = 'Component Supply Method'; DataClassification = CustomerContent; - ToolTip = 'Specifies the Type of Subcontracting that is assigned to the Production Order Component.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; trigger OnValidate() var SubcontractingManagement: Codeunit "Subcontracting Management"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al index 83d2f29766..1a33d706f8 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al @@ -357,7 +357,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -404,7 +404,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -526,7 +526,7 @@ codeunit 139981 "Subc. Location Handler Test" ProdOrderRtngLine.Insert(); end; - local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Subcontracting Type") + local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al index 6194698c68..140b61c385 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al @@ -69,7 +69,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -334,7 +334,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" ProductionBOMHeader.Modify(true); end; - local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Subcontracting Type") + local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al index 9a2958aaa8..980565e0dc 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al @@ -216,7 +216,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -324,7 +324,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -372,7 +372,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -448,7 +448,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -465,7 +465,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", "Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -534,7 +534,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -552,7 +552,7 @@ codeunit 139989 "Subc. Subcontracting Test" LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", "Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Location Code" := Location.Code; @@ -627,7 +627,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1075,7 +1075,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1151,7 +1151,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1236,7 +1236,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1324,7 +1324,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1416,7 +1416,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1607,7 +1607,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1675,7 +1675,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1879,7 +1879,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -2058,7 +2058,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -2140,7 +2140,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2240,7 +2240,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2557,7 +2557,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProductionBOMHeader.Modify(true); end; - local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Subcontracting Type") + local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al index a5a429adb1..9e3e94afbb 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al @@ -6,6 +6,7 @@ namespace Microsoft.Manufacturing.Subcontracting.Test; using Microsoft.Inventory.Planning; using Microsoft.Inventory.Requisition; +using Microsoft.Manufacturing.Document; using Microsoft.Manufacturing.ProductionBOM; using Microsoft.Manufacturing.Subcontracting; using Microsoft.Manufacturing.WorkCenter; @@ -454,6 +455,28 @@ codeunit 139990 "Subc. Subcontracting UI Test" WorkCenterList.Close(); end; + [Test] + procedure ComponentSupplyMethodCaptionsAreClear() + var + ProductionBOMLine: Record "Production BOM Line"; + PlanningComponent: Record "Planning Component"; + ProdOrderComponent: Record "Prod. Order Component"; + ComponentSupplyMethod: Enum "Component Supply Method"; + begin + // [SCENARIO 633674] Subcontracting Type captions are renamed to Component Supply Method terminology. + Initialize(); + + // [THEN] Field captions clearly describe the component supply behavior. + Assert.AreEqual('Component Supply Method', ProductionBOMLine.FieldCaption("Subcontracting Type"), 'Production BOM Line field caption must be updated.'); + Assert.AreEqual('Component Supply Method', PlanningComponent.FieldCaption("Subcontracting Type"), 'Planning Component field caption must be updated.'); + Assert.AreEqual('Component Supply Method', ProdOrderComponent.FieldCaption("Subcontracting Type"), 'Prod. Order Component field caption must be updated.'); + + // [THEN] Enum value captions use the new names from bug 633674. + Assert.AreEqual('Vendor-Supplied', Format(ComponentSupplyMethod::Purchase), 'Purchase caption must be Vendor-Supplied.'); + Assert.AreEqual('Consignment at Vendor', Format(ComponentSupplyMethod::InventoryByVendor), 'InventoryByVendor caption must be Consignment at Vendor.'); + Assert.AreEqual('Transfer to Vendor', Format(ComponentSupplyMethod::Transfer), 'Transfer caption must be Transfer to Vendor.'); + end; + var Assert: Codeunit Assert; LibraryERMCountryData: Codeunit "Library - ERM Country Data"; From 84d02fd680acae5a7e6012d3f3daec5e7d35b2df Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Sun, 10 May 2026 23:02:11 +0200 Subject: [PATCH 2/8] rename --- .../SubcCalcProdOrderExt.Codeunit.al | 2 +- .../SubcCarryOutActionExt.Codeunit.al | 2 +- .../SubcPlanningCompExt.Codeunit.al | 2 +- .../SubcProdOrderCompExt.Codeunit.al | 8 +- .../Codeunits/SubcCompFactboxMgmt.Codeunit.al | 8 +- .../SubcPurchaseOrderCreator.Codeunit.al | 4 +- .../SubcontractingManagement.Codeunit.al | 24 +++--- .../ComponentSupplyMethod.Enum.al | 10 ++- .../Manufacturing/SubcPlanningComp.PageExt.al | 2 +- .../Manufacturing/SubcProdBOMLines.PageExt.al | 2 +- .../SubcProdBOMVersionLines.PageExt.al | 2 +- .../SubcProdOrderComp.PageExt.al | 2 +- .../SubcProdOrderCompLine.PageExt.al | 2 +- .../Pages/SubcProdOrderComponents.Page.al | 2 +- .../SubcCreateProdOrdOpt.Codeunit.al | 4 +- .../SubcProdOrderCreateBind.Codeunit.al | 2 +- .../SubcTempDataInitializer.Codeunit.al | 10 +-- .../Pages/SubcTempBOMLines.Page.al | 10 +-- .../Pages/SubcTempProdOrderComp.Page.al | 12 +-- .../SubcCreateSubCReturnOrder.Report.al | 2 +- .../Reports/SubcCreateTransfOrder.Report.al | 2 +- .../SubcPlanningCompExt.TableExt.al | 2 +- .../SubcProdBOMLineExt.TableExt.al | 2 +- .../SubcProdOrderCompExt.TableExt.al | 2 +- .../SubcProdOrderCheckLib.Codeunit.al | 2 +- .../Tests/SubcLocationHandlerTest.Codeunit.al | 10 +-- .../SubcSubcontractingSyncTest.Codeunit.al | 6 +- .../Tests/SubcSubcontractingTest.Codeunit.al | 80 +++++++++---------- 28 files changed, 111 insertions(+), 107 deletions(-) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCalcProdOrderExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCalcProdOrderExt.Codeunit.al index c870be1885..a8f7426bb3 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCalcProdOrderExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCalcProdOrderExt.Codeunit.al @@ -31,7 +31,7 @@ codeunit 99001517 "Subc. Calc. Prod. Order Ext." begin ProdOrderComponent."Orig. Location Code" := ProdOrderComponent."Location Code"; ProdOrderComponent."Orig. Bin Code" := ProdOrderComponent."Bin Code"; - ProdOrderComponent."Subcontracting Type" := ProductionBOMLine."Subcontracting Type"; + ProdOrderComponent."Component Supply Method" := ProductionBOMLine."Component Supply Method"; OnAfterTransferSubcontractingFieldsBOMComponent(ProductionBOMLine, ProdOrderComponent); end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCarryOutActionExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCarryOutActionExt.Codeunit.al index 05e0e013bb..c0bc655eda 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCarryOutActionExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcCarryOutActionExt.Codeunit.al @@ -19,7 +19,7 @@ codeunit 99001523 "Subc. Carry Out Action Ext." #endif local procedure OnAfterTransferPlanningComp(var PlanningComponent: Record "Planning Component"; var ProdOrderComponent: Record "Prod. Order Component") begin - ProdOrderComponent."Subcontracting Type" := PlanningComponent."Subcontracting Type"; + ProdOrderComponent."Component Supply Method" := PlanningComponent."Component Supply Method"; ProdOrderComponent."Orig. Location Code" := PlanningComponent."Orig. Location Code"; ProdOrderComponent."Orig. Bin Code" := PlanningComponent."Orig. Bin Code"; end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcPlanningCompExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcPlanningCompExt.Codeunit.al index 9c009218a2..2c9b9194d3 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcPlanningCompExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcPlanningCompExt.Codeunit.al @@ -23,7 +23,7 @@ codeunit 99001522 "Subc. Planning Comp. Ext." [EventSubscriber(ObjectType::Table, Database::"Planning Component", OnAfterTransferFromComponent, '', false, false)] local procedure OnAfterTransferFromComponent(var PlanningComponent: Record "Planning Component"; var ProdOrderComp: Record "Prod. Order Component") begin - PlanningComponent."Subcontracting Type" := ProdOrderComp."Subcontracting Type"; + PlanningComponent."Component Supply Method" := ProdOrderComp."Component Supply Method"; PlanningComponent."Orig. Location Code" := ProdOrderComp."Orig. Location Code"; PlanningComponent."Orig. Bin Code" := ProdOrderComp."Orig. Bin Code"; end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al index 504e6897be..820b8b650f 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al @@ -72,7 +72,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." TransferShipmentLine: Record "Transfer Shipment Line"; ConfirmManagement: Codeunit "Confirm Management"; begin - if ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer then + if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor then exit; TransferShipmentLine.SetRange("Prod. Order No.", ProdOrderComponent."Prod. Order No."); @@ -107,7 +107,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." PurchaseLine: Record "Purchase Line"; TempPurchaseLine: Record "Purchase Line" temporary; begin - if ProdOrderComponent."Subcontracting Type" <> ProdOrderComponent."Subcontracting Type"::Purchase then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then exit; PurchaseLine.SetRange("Prod. Order No.", ProdOrderComponent."Prod. Order No."); @@ -143,7 +143,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." if ProdOrderComponent."Location Code" = xProdOrderComponent."Location Code" then exit; - if ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer then + if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor then exit; TransferLine.SetCurrentKey("Prod. Order No.", "Routing No.", "Routing Reference No.", "Operation No.", "Subcontr. Purch. Order No."); @@ -258,7 +258,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." PlanningGetParameters: Codeunit "Planning-Get Parameters"; SubcontractingManagement: Codeunit "Subcontracting Management"; begin - if ProdOrderComponent."Subcontracting Type" = ProdOrderComponent."Subcontracting Type"::Transfer then + if ProdOrderComponent."Component Supply Method" = ProdOrderComponent."Component Supply Method"::TransferToVendor then exit; ProdOrderLine.SetLoadFields("Routing No.", "Routing Reference No.", "Item No.", "Variant Code", "Location Code"); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al index 6014c583e9..2587a63a3a 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al @@ -67,7 +67,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit(0); - if ProdOrderComponent."Subcontracting Type" <> ProdOrderComponent."Subcontracting Type"::Purchase then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then exit(0); GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -94,7 +94,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit; - if ProdOrderComponent."Subcontracting Type" <> ProdOrderComponent."Subcontracting Type"::Purchase then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then exit; GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -121,7 +121,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit(0); - if ProdOrderComponent."Subcontracting Type" <> ProdOrderComponent."Subcontracting Type"::Purchase then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then exit(0); GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -148,7 +148,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit; - if ProdOrderComponent."Subcontracting Type" <> ProdOrderComponent."Subcontracting Type"::Purchase then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then exit; GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al index d6fde755b9..a8944a9c66 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al @@ -125,7 +125,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Prod. Order Line No.", RequisitionLine."Prod. Order Line No."); - ProdOrderComponent.SetRange("Subcontracting Type", "Component Supply Method"::Purchase); + ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::VendorSupplied); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); if ProdOrderComponent.FindSet() then repeat @@ -285,7 +285,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); - ProdOrderComponent.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); + ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); ProdOrderComponent.SetRange("Location Code", ''); if not ProdOrderComponent.IsEmpty() then diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al index 57253b2c67..b902fbf3df 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al @@ -50,13 +50,13 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin - case ProdOrderComponent."Subcontracting Type" of - "Component Supply Method"::InventoryByVendor, - "Component Supply Method"::Purchase: + case ProdOrderComponent."Component Supply Method" of + "Component Supply Method"::ConsignmentAtVendor, + "Component Supply Method"::VendorSupplied: if (VendorSubcontrLocation <> '') and (ProdOrderComponent."Location Code" <> VendorSubcontrLocation) then ProdOrderComponent.Validate("Location Code", VendorSubcontrLocation); - "Component Supply Method"::Transfer, + "Component Supply Method"::TransferToVendor, "Component Supply Method"::Empty: begin if (ProdOrderComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin @@ -73,13 +73,13 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnPlanningComponent(var PlanningComponent: Record "Planning Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin - case PlanningComponent."Subcontracting Type" of - "Component Supply Method"::InventoryByVendor, - "Component Supply Method"::Purchase: + case PlanningComponent."Component Supply Method" of + "Component Supply Method"::ConsignmentAtVendor, + "Component Supply Method"::VendorSupplied: if (VendorSubcontrLocation <> '') and (PlanningComponent."Location Code" <> VendorSubcontrLocation) then PlanningComponent.Validate("Location Code", VendorSubcontrLocation); - "Component Supply Method"::Transfer, + "Component Supply Method"::TransferToVendor, "Component Supply Method"::Empty: begin if (PlanningComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin @@ -409,7 +409,7 @@ codeunit 99001505 "Subcontracting Management" if not GetSubcontractor(PlanningRoutingLine."No.", Vendor) then Clear(Vendor); - if PlanningComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase] then + if PlanningComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied] then VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; OrigLocationCode := PlanningComponent."Orig. Location Code"; OrigBinCode := PlanningComponent."Orig. Bin Code"; @@ -460,14 +460,14 @@ codeunit 99001505 "Subcontracting Management" end; until (PurchaseLine.Next() = 0) or ProdOrderCompFound; if ProdOrderCompFound then - Error(PurchOrderExistErr, ProdOrderComponent."Item No.", PurchOrderNo, ProdOrderComponent.FieldCaption(ProdOrderComponent."Subcontracting Type")); + Error(PurchOrderExistErr, ProdOrderComponent."Item No.", PurchOrderNo, ProdOrderComponent.FieldCaption(ProdOrderComponent."Component Supply Method")); if ProdOrderRoutingLine.Type = "Capacity Type"::"Work Center" then begin if not GetSubcontractor(ProdOrderRoutingLine."No.", Vendor) then Clear(Vendor); VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; - if not (ProdOrderComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase]) then + if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; @@ -502,7 +502,7 @@ codeunit 99001505 "Subcontracting Management" if not ConfirmManagement.GetResponseOrDefault(StrSubstNo(RoutingLinkUpdConfQst, ProdOrderRoutingLine."Routing Link Code"), true) then Error(UpdateIsCanceledErr); repeat - if not (ProdOrderComponent."Subcontracting Type" in ["Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase]) then + if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al index fe060b737b..c657bf5af5 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al @@ -7,19 +7,23 @@ namespace Microsoft.Manufacturing.Subcontracting; enum 99001500 "Component Supply Method" { Extensible = true; + // No supply method is selected. value(0; Empty) { Caption = ' ', Locked = true; } - value(1; Purchase) + // The subcontractor provides the required component materials. + value(1; VendorSupplied) { Caption = 'Vendor-Supplied'; } - value(2; InventoryByVendor) + // Your company owns the components and stores them at the subcontractor location (consignment stock). + value(2; ConsignmentAtVendor) { Caption = 'Consignment at Vendor'; } - value(3; Transfer) + // Components are sent to the subcontractor through a transfer order. + value(3; TransferToVendor) { Caption = 'Transfer to Vendor'; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcPlanningComp.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcPlanningComp.PageExt.al index 3ebf278bf2..bd11101a75 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcPlanningComp.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcPlanningComp.PageExt.al @@ -12,7 +12,7 @@ pageextension 99001511 "Subc. Planning Comp" extends "Planning Components" { addlast(Control1) { - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ApplicationArea = Manufacturing; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMLines.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMLines.PageExt.al index b273639a5b..9da96efdeb 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMLines.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMLines.PageExt.al @@ -12,7 +12,7 @@ pageextension 99001510 "Subc. Prod BOM Lines" extends "Production BOM Lines" { addlast(Control1) { - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ApplicationArea = Manufacturing; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al index 35f2552004..0d8a035ef1 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdBOMVersionLines.PageExt.al @@ -12,7 +12,7 @@ pageextension 99001514 "Subc. ProdBOMVersionLines" extends "Production BOM Versi { addlast(Control1) { - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ApplicationArea = Manufacturing; ToolTip = 'Specifies how components are supplied to the subcontractor for the production BOM line.'; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderComp.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderComp.PageExt.al index 952786834f..15d5262e54 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderComp.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderComp.PageExt.al @@ -28,7 +28,7 @@ pageextension 99001512 "Subc. Prod Order Comp" extends "Prod. Order Components" } addlast(Control1) { - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ApplicationArea = Manufacturing; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al index 4ba265a457..13cf2b834b 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderCompLine.PageExt.al @@ -12,7 +12,7 @@ pageextension 99001513 "Subc. ProdOrderCompLine" extends "Prod. Order Comp. Line { addlast(Control1) { - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ApplicationArea = Manufacturing; ToolTip = 'Specifies how components are supplied to the subcontractor for the production component.'; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al index 7befc25487..14d9e982e0 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Pages/SubcProdOrderComponents.Page.al @@ -22,7 +22,7 @@ page 99001503 "Subc. Prod. Order Components" repeater(Components) { ShowCaption = false; - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcCreateProdOrdOpt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcCreateProdOrdOpt.Codeunit.al index 6ed59743e4..64dbc38324 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcCreateProdOrdOpt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcCreateProdOrdOpt.Codeunit.al @@ -1175,10 +1175,10 @@ codeunit 99001556 "Subc. Create Prod. Ord. Opt." ProdOrderComponent.Validate("Bin Code", TempProdOrderComponent."Bin Code"); ProdOrderComponent."Routing Link Code" := TempProdOrderComponent."Routing Link Code"; ProdOrderComponent."Flushing Method" := TempProdOrderComponent."Flushing Method"; - ProdOrderComponent."Subcontracting Type" := TempProdOrderComponent."Subcontracting Type"; + ProdOrderComponent."Component Supply Method" := TempProdOrderComponent."Component Supply Method"; ProdOrderComponent."Orig. Location Code" := TempProdOrderComponent."Orig. Location Code"; ProdOrderComponent."Orig. Bin Code" := TempProdOrderComponent."Orig. Bin Code"; - ProdOrderComponent."Subcontracting Type" := TempProdOrderComponent."Subcontracting Type"; + ProdOrderComponent."Component Supply Method" := TempProdOrderComponent."Component Supply Method"; ProdOrderComponent.Modify(true); end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al index ac39439469..82426059f3 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al @@ -49,7 +49,7 @@ codeunit 99001555 "Subc. ProdOrderCreateBind" ManufacturingSetup.SetLoadFields("Rtng. Link Code Purch. Prov."); ManufacturingSetup.Get(); if (ProdOrderComponent."Routing Link Code" <> ManufacturingSetup."Rtng. Link Code Purch. Prov.") or - (ProdOrderComponent."Subcontracting Type" <> "Component Supply Method"::Transfer) then + (ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor) then exit; ComponentsLocationCode := SubcontractingManagement.GetComponentsLocationCode(SubcontractingPurchaseLine); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al index a489fc69f8..18956719a1 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al @@ -167,7 +167,7 @@ codeunit 99001552 "Subc. Temp Data Initializer" TempGlobalProductionBOMLine.Validate("No.", SubcManagementSetup."Preset Component Item No."); TempGlobalProductionBOMLine."Quantity per" := 1; TempGlobalProductionBOMLine."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; - TempGlobalProductionBOMLine."Subcontracting Type" := "Component Supply Method"::InventoryByVendor; + TempGlobalProductionBOMLine."Component Supply Method" := "Component Supply Method"::ConsignmentAtVendor; TempGlobalProductionBOMLine.Insert(); end; @@ -324,7 +324,7 @@ codeunit 99001552 "Subc. Temp Data Initializer" TempGlobalProdOrderComponent.Validate("Unit of Measure Code", ProductionBOMLine."Unit of Measure Code"); TempGlobalProdOrderComponent.Validate("Routing Link Code", ProductionBOMLine."Routing Link Code"); - TempGlobalProdOrderComponent."Subcontracting Type" := ProductionBOMLine."Subcontracting Type"; + TempGlobalProdOrderComponent."Component Supply Method" := ProductionBOMLine."Component Supply Method"; PresetComponentLocationCode(); if not SubcVersionMgmt.CheckBOMExists(ProductionBOMLine."Production BOM No.", '') then @@ -568,14 +568,14 @@ codeunit 99001552 "Subc. Temp Data Initializer" ComponentsLocationCode := SubcontractingManagement.GetComponentsLocationCode(TempGlobalPurchaseLine); if TempGlobalProdOrderComponent."Routing Link Code" = ManufacturingSetup."Rtng. Link Code Purch. Prov." then - case TempGlobalProdOrderComponent."Subcontracting Type" of - "Component Supply Method"::InventoryByVendor, "Component Supply Method"::Purchase: + case TempGlobalProdOrderComponent."Component Supply Method" of + "Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied: begin GetVendor(); TempGlobalProdOrderComponent.Validate("Location Code", TempGlobalVendor."Subcontr. Location Code"); TempGlobalProdOrderComponent."Orig. Location Code" := ComponentsLocationCode; end; - "Component Supply Method"::Transfer: + "Component Supply Method"::TransferToVendor: TempGlobalProdOrderComponent.Validate("Location Code", ComponentsLocationCode); end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al index 29abb1d4d8..6d176a6faa 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al @@ -82,16 +82,16 @@ page 99001506 "Subc. Temp BOM Lines" { ToolTip = 'Specifies the routing link code.'; } - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ToolTip = 'Specifies how components are supplied to the subcontractor for the production BOM line.'; ApplicationArea = Manufacturing; trigger OnValidate() begin - if Rec."Subcontracting Type" = Rec."Subcontracting Type"::Purchase then - Rec.FieldError("Subcontracting Type"); + if Rec."Component Supply Method" = Rec."Component Supply Method"::VendorSupplied then + Rec.FieldError("Component Supply Method"); - if (Rec."Routing Link Code" = '') and (Rec."Subcontracting Type" <> Rec."Subcontracting Type"::Empty) then begin + if (Rec."Routing Link Code" = '') and (Rec."Component Supply Method" <> Rec."Component Supply Method"::Empty) then begin GetManufacturingSetup(); Rec."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; end; @@ -110,7 +110,7 @@ page 99001506 "Subc. Temp BOM Lines" Rec."Production BOM No." := xRec."Production BOM No."; Rec."Version Code" := xRec."Version Code"; Rec."Routing Link Code" := xRec."Routing Link Code"; - Rec."Subcontracting Type" := xRec."Subcontracting Type"; + Rec."Component Supply Method" := xRec."Component Supply Method"; GetManufacturingSetup(); Rec."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al index c3255d621d..58d3d5265d 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al @@ -77,20 +77,20 @@ page 99001508 "Subc. Temp Prod Order Comp" { ToolTip = 'Specifies the routing link code when you calculate the production order.'; } - field("Subcontracting Type"; Rec."Subcontracting Type") + field("Component Supply Method"; Rec."Component Supply Method") { ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; trigger OnValidate() begin - if Rec."Subcontracting Type" = Rec."Subcontracting Type"::Purchase then - Rec.FieldError("Subcontracting Type"); + if Rec."Component Supply Method" = Rec."Component Supply Method"::VendorSupplied then + Rec.FieldError("Component Supply Method"); - if (Rec."Routing Link Code" = '') and (Rec."Subcontracting Type" <> Rec."Subcontracting Type"::Empty) then begin + if (Rec."Routing Link Code" = '') and (Rec."Component Supply Method" <> Rec."Component Supply Method"::Empty) then begin GetManufacturingSetup(); Rec."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; end; - if Rec."Subcontracting Type" <> Rec."Subcontracting Type"::Transfer then + if Rec."Component Supply Method" <> Rec."Component Supply Method"::TransferToVendor then Rec.Validate("Location Code", CopyStr(SubcSessionState.GetCode('SetSubcontractingLocationCodeFromVendor'), 1, MaxStrLen(Rec."Location Code"))) else Rec.Validate("Location Code", Rec."Orig. Location Code"); @@ -110,7 +110,7 @@ page 99001508 "Subc. Temp Prod Order Comp" Rec."Prod. Order Line No." := xRec."Prod. Order Line No."; Rec.Status := xRec.Status; Rec."Routing Link Code" := xRec."Routing Link Code"; - Rec."Subcontracting Type" := xRec."Subcontracting Type"; + Rec."Component Supply Method" := xRec."Component Supply Method"; Rec."Location Code" := xRec."Location Code"; Rec."Orig. Location Code" := xRec."Orig. Location Code"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al index 408fe17595..b186a4b90b 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al @@ -175,7 +175,7 @@ report 99001502 "Subc. Create SubCReturnOrder" ProdOrderComponent.SetRange("Prod. Order Line No.", PurchaseLine."Prod. Order Line No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); ProdOrderComponent.SetRange("Purchase Order Filter", PurchaseLine."Document No."); - ProdOrderComponent.SetRange("Subcontracting Type", ProdOrderComponent."Subcontracting Type"::Transfer); + ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::TransferToVendor); if ProdOrderComponent.FindSet() then begin CheckTransferLineExists(PurchaseLine); repeat diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al index c7825b9d84..fa0732917a 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al @@ -173,7 +173,7 @@ report 99001501 "Subc. Create Transf. Order" ProdOrderComponent.SetRange("Prod. Order Line No.", PurchaseLine."Prod. Order Line No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); ProdOrderComponent.SetRange("Purchase Order Filter", PurchaseLine."Document No."); - ProdOrderComponent.SetRange("Subcontracting Type", ProdOrderComponent."Subcontracting Type"::Transfer); + ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::TransferToVendor); if ProdOrderComponent.FindSet() then repeat Item.SetLoadFields("Rounding Precision", "Order Tracking Policy"); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al index 169771e5b6..c60f461cd7 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al @@ -13,7 +13,7 @@ tableextension 99001503 "Subc. Planning Comp Ext." extends "Planning Component" AllowInCustomizations = AsReadOnly; fields { - field(99001524; "Subcontracting Type"; Enum "Component Supply Method") + field(99001524; "Component Supply Method"; Enum "Component Supply Method") { Caption = 'Component Supply Method'; DataClassification = CustomerContent; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al index e45b02627f..8299dec072 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdBOMLineExt.TableExt.al @@ -11,7 +11,7 @@ tableextension 99001531 "Subc. Prod BOM Line Ext." extends "Production BOM Line" AllowInCustomizations = AsReadOnly; fields { - field(99001522; "Subcontracting Type"; Enum "Component Supply Method") + field(99001522; "Component Supply Method"; Enum "Component Supply Method") { Caption = 'Component Supply Method'; DataClassification = CustomerContent; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al index 721870e508..8ae3d04a30 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al @@ -16,7 +16,7 @@ tableextension 99001502 "Subc. Prod Order Comp Ext." extends "Prod. Order Compon AllowInCustomizations = AsReadOnly; fields { - field(99001522; "Subcontracting Type"; Enum "Component Supply Method") + field(99001522; "Component Supply Method"; Enum "Component Supply Method") { Caption = 'Component Supply Method'; DataClassification = CustomerContent; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al index a936d516f5..89e149c780 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al @@ -333,7 +333,7 @@ codeunit 139987 "Subc. ProdOrderCheckLib" TempProdOrderComponent."Unit of Measure Code" := ProductionBOMLine."Unit of Measure Code"; TempProdOrderComponent."Routing Link Code" := ProductionBOMLine."Routing Link Code"; TempProdOrderComponent."Description 2" := ProductionBOMLine."Description 2"; - if ProductionBOMLine."Subcontracting Type" in [ProductionBOMLine."Subcontracting Type"::"Purchase", ProductionBOMLine."Subcontracting Type"::InventoryByVendor] then + if ProductionBOMLine."Component Supply Method" in [ProductionBOMLine."Component Supply Method"::VendorSupplied, ProductionBOMLine."Component Supply Method"::ConsignmentAtVendor] then TempProdOrderComponent."Location Code" := GetVendorSubcontractingLocation(PurchLine."Buy-from Vendor No.") else TempProdOrderComponent."Location Code" := PurchLine."Location Code"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al index 1a33d706f8..ecff052812 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al @@ -357,7 +357,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -404,7 +404,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -488,7 +488,7 @@ codeunit 139981 "Subc. Location Handler Test" ProdOrderComp."Location Code" := CompLocationCode; if CompOrigLocationCode <> '' then ProdOrderComp."Orig. Location Code" := CompOrigLocationCode; - ProdOrderComp."Subcontracting Type" := ProdOrderComp."Subcontracting Type"::Transfer; + ProdOrderComp."Component Supply Method" := ProdOrderComp."Component Supply Method"::TransferToVendor; ProdOrderComp."Routing Link Code" := RoutingLink.Code; ProdOrderComp.Modify(); @@ -537,7 +537,7 @@ codeunit 139981 "Subc. Location Handler Test" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Subcontracting Type" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := SubcontractingType; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); @@ -563,7 +563,7 @@ codeunit 139981 "Subc. Location Handler Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Location Code" := LocationCode; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al index 140b61c385..92e7d62cea 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al @@ -69,7 +69,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -86,7 +86,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" PurchLine.DeleteAll(); ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); #pragma warning disable AA0210 - ProductionBOMLine.SetRange("Subcontracting Type", ProductionBOMLine."Subcontracting Type"::Purchase); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); #pragma warning restore AA0210 ProductionBOMLine.FindFirst(); #pragma warning restore @@ -345,7 +345,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Subcontracting Type" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := SubcontractingType; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al index 980565e0dc..1c92e146bb 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al @@ -216,7 +216,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -231,7 +231,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); #pragma warning disable AA0210 - ProductionBOMLine.SetRange("Subcontracting Type", ProductionBOMLine."Subcontracting Type"::Purchase); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); #pragma warning restore AA0210 ProductionBOMLine.FindFirst(); @@ -324,7 +324,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -334,7 +334,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Production BOM Line with additional Component for Subcontracting Type exists ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); - ProductionBOMLine.SetRange("Subcontracting Type", ProductionBOMLine."Subcontracting Type"::Purchase); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); Assert.RecordIsNotEmpty(ProductionBOMLine); end; @@ -372,7 +372,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -402,7 +402,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -448,7 +448,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -465,7 +465,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -534,7 +534,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -552,7 +552,7 @@ codeunit 139989 "Subc. Subcontracting Test" LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", "Component Supply Method"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Location Code" := Location.Code; @@ -627,7 +627,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -659,7 +659,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -695,7 +695,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -753,7 +753,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetFilter("Routing Link Code", '<>%1', ''); ProdOrderComp.FindFirst(); ActualLocationCode := ProdOrderComp."Location Code"; - ProdOrderComp.Validate("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Purchase); + ProdOrderComp.Validate("Component Supply Method", ProdOrderComp."Component Supply Method"::VendorSupplied); ProdOrderComp.Modify(); // [THEN] Check if Component Location differs from Origin Location Code ==> Vendor Subcontracting Location Code @@ -1075,7 +1075,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1151,7 +1151,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1182,7 +1182,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1236,7 +1236,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1269,7 +1269,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Compare Due Date from Prod Order Comp with Receipt Date from Subc. Transfer Line ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1324,7 +1324,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1355,7 +1355,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1369,7 +1369,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1416,7 +1416,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1447,7 +1447,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists, Mock Reservation Entries on TransferLine and try to open Item Tracking Lines from Prod order Comp. Page ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1607,7 +1607,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1675,7 +1675,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1692,7 +1692,7 @@ codeunit 139989 "Subc. Subcontracting Test" PlanningComponent.FindFirst(); // [THEN] - Assert.Equal(ProductionBOMLine."Subcontracting Type", PlanningComponent."Subcontracting Type"); + Assert.Equal(ProductionBOMLine."Component Supply Method", PlanningComponent."Component Supply Method"); Vendor.Get(WorkCenter[2]."Subcontractor No."); Assert.Equal(Vendor."Subcontr. Location Code", PlanningComponent."Location Code"); end; @@ -1879,7 +1879,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Purchase); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -1891,7 +1891,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange(Status, ProdOrderComp.Status::Released); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Purchase); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::VendorSupplied); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ExpectedDescription2 := 'TestDescription2_Comp'; @@ -2058,7 +2058,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -2081,7 +2081,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2140,7 +2140,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2163,7 +2163,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2240,7 +2240,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2262,7 +2262,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2568,7 +2568,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Subcontracting Type" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := SubcontractingType; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); @@ -2582,7 +2582,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); @@ -2598,7 +2598,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); @@ -2619,7 +2619,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Due Date" := CalcDate('<+10D>', WorkDate()); @@ -2963,7 +2963,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange(Status, ProductionOrder.Status); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateInTransitLocation(TransitLocation); From 79fbdb11ec33c073fe6d26d9eefac9747bacb759 Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Sun, 10 May 2026 23:02:33 +0200 Subject: [PATCH 3/8] Rename --- .../SubcSubcontractingUITest.Codeunit.al | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al index 9e3e94afbb..d45a48c1f7 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al @@ -271,11 +271,11 @@ codeunit 139990 "Subc. Subcontracting UI Test" // [WHEN] Find Control on Page PageControl.SetRange(TableNo, Database::"Production BOM Line"); PageControl.SetRange(PageNo, Page::"Production BOM Lines"); - PageControl.SetRange(FieldNo, ProdBOMLine.FieldNo("Subcontracting Type")); + PageControl.SetRange(FieldNo, ProdBOMLine.FieldNo("Component Supply Method")); ControlExist := not PageControl.IsEmpty(); // [THEN] - Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, ProdBOMLine.FieldCaption("Subcontracting Type"))); + Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, ProdBOMLine.FieldCaption("Component Supply Method"))); end; [Test] @@ -294,10 +294,10 @@ codeunit 139990 "Subc. Subcontracting UI Test" // [WHEN] Find Control on Page PageControl.SetRange(TableNo, Database::"Production BOM Line"); PageControl.SetRange(PageNo, Page::"Production BOM Version Lines"); - PageControl.SetRange(FieldNo, ProdBOMLine.FieldNo("Subcontracting Type")); + PageControl.SetRange(FieldNo, ProdBOMLine.FieldNo("Component Supply Method")); ControlExist := not PageControl.IsEmpty(); // [THEN] - Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, ProdBOMLine.FieldCaption("Subcontracting Type"))); + Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, ProdBOMLine.FieldCaption("Component Supply Method"))); end; [Test] @@ -316,11 +316,11 @@ codeunit 139990 "Subc. Subcontracting UI Test" // [WHEN] Find Control on Page PageControl.SetRange(TableNo, Database::"Planning Component"); PageControl.SetRange(PageNo, Page::"Planning Components"); - PageControl.SetRange(FieldNo, PlanComp.FieldNo("Subcontracting Type")); + PageControl.SetRange(FieldNo, PlanComp.FieldNo("Component Supply Method")); ControlExist := not PageControl.IsEmpty(); // [THEN] - Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, PlanComp.FieldCaption("Subcontracting Type"))); + Assert.AreEqual(true, ControlExist, StrSubstNo(ControlNotExistMsg, PlanComp.FieldCaption("Component Supply Method"))); end; [Test] @@ -467,14 +467,14 @@ codeunit 139990 "Subc. Subcontracting UI Test" Initialize(); // [THEN] Field captions clearly describe the component supply behavior. - Assert.AreEqual('Component Supply Method', ProductionBOMLine.FieldCaption("Subcontracting Type"), 'Production BOM Line field caption must be updated.'); - Assert.AreEqual('Component Supply Method', PlanningComponent.FieldCaption("Subcontracting Type"), 'Planning Component field caption must be updated.'); - Assert.AreEqual('Component Supply Method', ProdOrderComponent.FieldCaption("Subcontracting Type"), 'Prod. Order Component field caption must be updated.'); + Assert.AreEqual('Component Supply Method', ProductionBOMLine.FieldCaption("Component Supply Method"), 'Production BOM Line field caption must be updated.'); + Assert.AreEqual('Component Supply Method', PlanningComponent.FieldCaption("Component Supply Method"), 'Planning Component field caption must be updated.'); + Assert.AreEqual('Component Supply Method', ProdOrderComponent.FieldCaption("Component Supply Method"), 'Prod. Order Component field caption must be updated.'); // [THEN] Enum value captions use the new names from bug 633674. - Assert.AreEqual('Vendor-Supplied', Format(ComponentSupplyMethod::Purchase), 'Purchase caption must be Vendor-Supplied.'); - Assert.AreEqual('Consignment at Vendor', Format(ComponentSupplyMethod::InventoryByVendor), 'InventoryByVendor caption must be Consignment at Vendor.'); - Assert.AreEqual('Transfer to Vendor', Format(ComponentSupplyMethod::Transfer), 'Transfer caption must be Transfer to Vendor.'); + Assert.AreEqual('Vendor-Supplied', Format(ComponentSupplyMethod::VendorSupplied), 'Purchase caption must be Vendor-Supplied.'); + Assert.AreEqual('Consignment at Vendor', Format(ComponentSupplyMethod::ConsignmentAtVendor), 'InventoryByVendor caption must be Consignment at Vendor.'); + Assert.AreEqual('Transfer to Vendor', Format(ComponentSupplyMethod::TransferToVendor), 'Transfer caption must be Transfer to Vendor.'); end; var From 0ab01d0912725a356de1e217e969a82278d9b5ec Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Wed, 13 May 2026 09:34:45 +0200 Subject: [PATCH 4/8] Update src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../src/Process/Enumerations/ComponentSupplyMethod.Enum.al | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al index c657bf5af5..001ea950bc 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al @@ -27,4 +27,9 @@ enum 99001500 "Component Supply Method" { Caption = 'Transfer to Vendor'; } + // Transfer to Vendor + value(3; TransferToVendor) + { + Caption = 'Transfer to Vendor'; + } } \ No newline at end of file From afacb45e62341596f3714416deae65c36642ccc1 Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Wed, 13 May 2026 09:38:16 +0200 Subject: [PATCH 5/8] Update src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al index d45a48c1f7..56b1b02ad0 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al @@ -458,7 +458,11 @@ codeunit 139990 "Subc. Subcontracting UI Test" [Test] procedure ComponentSupplyMethodCaptionsAreClear() var - ProductionBOMLine: Record "Production BOM Line"; +var + ProductionBOMLine: Record "Production BOM Line"; + PlanningComponent: Record "Planning Component"; + ProdOrderComponent: Record "Prod. Order Component"; +begin PlanningComponent: Record "Planning Component"; ProdOrderComponent: Record "Prod. Order Component"; ComponentSupplyMethod: Enum "Component Supply Method"; From 6e30feca3e1c754732b237a84e8108af3ce2e7ba Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Wed, 13 May 2026 10:34:24 +0200 Subject: [PATCH 6/8] Bug 633674: Add explanatory comments to Component Supply Method enum values --- .../SubcProdOrderCompExt.Codeunit.al | 8 ++-- .../Codeunits/SubcCompFactboxMgmt.Codeunit.al | 8 ++-- .../SubcPurchaseOrderCreator.Codeunit.al | 4 +- .../SubcontractingManagement.Codeunit.al | 18 ++++----- .../ComponentSupplyMethod.Enum.al | 11 ++---- .../SubcProdOrderCreateBind.Codeunit.al | 2 +- .../SubcTempDataInitializer.Codeunit.al | 6 +-- .../Pages/SubcTempBOMLines.Page.al | 2 +- .../Pages/SubcTempProdOrderComp.Page.al | 4 +- .../SubcCreateSubCReturnOrder.Report.al | 2 +- .../Reports/SubcCreateTransfOrder.Report.al | 2 +- .../SubcPlanningCompExt.TableExt.al | 2 +- .../SubcProdOrderCheckLib.Codeunit.al | 2 +- .../Tests/SubcLocationHandlerTest.Codeunit.al | 4 +- .../SubcSubcontractingSyncTest.Codeunit.al | 2 +- .../Tests/SubcSubcontractingTest.Codeunit.al | 38 +++++++++---------- 16 files changed, 55 insertions(+), 60 deletions(-) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al index 820b8b650f..027fce1807 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcProdOrderCompExt.Codeunit.al @@ -72,7 +72,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." TransferShipmentLine: Record "Transfer Shipment Line"; ConfirmManagement: Codeunit "Confirm Management"; begin - if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor then + if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::"Transfer to Vendor" then exit; TransferShipmentLine.SetRange("Prod. Order No.", ProdOrderComponent."Prod. Order No."); @@ -107,7 +107,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." PurchaseLine: Record "Purchase Line"; TempPurchaseLine: Record "Purchase Line" temporary; begin - if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::"Vendor-Supplied" then exit; PurchaseLine.SetRange("Prod. Order No.", ProdOrderComponent."Prod. Order No."); @@ -143,7 +143,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." if ProdOrderComponent."Location Code" = xProdOrderComponent."Location Code" then exit; - if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor then + if ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::"Transfer to Vendor" then exit; TransferLine.SetCurrentKey("Prod. Order No.", "Routing No.", "Routing Reference No.", "Operation No.", "Subcontr. Purch. Order No."); @@ -258,7 +258,7 @@ codeunit 99001524 "Subc. Prod. Order Comp. Ext." PlanningGetParameters: Codeunit "Planning-Get Parameters"; SubcontractingManagement: Codeunit "Subcontracting Management"; begin - if ProdOrderComponent."Component Supply Method" = ProdOrderComponent."Component Supply Method"::TransferToVendor then + if ProdOrderComponent."Component Supply Method" = ProdOrderComponent."Component Supply Method"::"Transfer to Vendor" then exit; ProdOrderLine.SetLoadFields("Routing No.", "Routing Reference No.", "Item No.", "Variant Code", "Location Code"); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al index 2587a63a3a..178b73644b 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcCompFactboxMgmt.Codeunit.al @@ -67,7 +67,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit(0); - if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::"Vendor-Supplied" then exit(0); GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -94,7 +94,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit; - if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::"Vendor-Supplied" then exit; GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -121,7 +121,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit(0); - if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::"Vendor-Supplied" then exit(0); GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); @@ -148,7 +148,7 @@ codeunit 99001562 "Subc. Comp. Factbox Mgmt." begin if ProdOrderComponent."Routing Link Code" = '' then exit; - if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::VendorSupplied then + if ProdOrderComponent."Component Supply Method" <> ProdOrderComponent."Component Supply Method"::"Vendor-Supplied" then exit; GetProdOrderRtngLineFromProdOrderComp(ProdOrderRoutingLine, ProdOrderComponent); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al index a8944a9c66..1e0427b70b 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcPurchaseOrderCreator.Codeunit.al @@ -125,7 +125,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Prod. Order Line No.", RequisitionLine."Prod. Order Line No."); - ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::VendorSupplied); + ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::"Vendor-Supplied"); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); if ProdOrderComponent.FindSet() then repeat @@ -285,7 +285,7 @@ codeunit 99001557 "Subc. Purchase Order Creator" ProdOrderComponent.SetRange(Status, ProdOrderRoutingLine.Status); ProdOrderComponent.SetRange("Prod. Order No.", ProdOrderRoutingLine."Prod. Order No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); - ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); + ProdOrderComponent.SetRange("Component Supply Method", "Component Supply Method"::"Transfer to Vendor"); ProdOrderComponent.SetRange("Location Code", ''); if not ProdOrderComponent.IsEmpty() then diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al index d01c43b741..f5cbc814b6 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al @@ -51,12 +51,12 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin case ProdOrderComponent."Component Supply Method" of - "Component Supply Method"::ConsignmentAtVendor, - "Component Supply Method"::VendorSupplied: + "Component Supply Method"::"Consignment at Vendor", + "Component Supply Method"::"Vendor-Supplied": if (VendorSubcontrLocation <> '') and (ProdOrderComponent."Location Code" <> VendorSubcontrLocation) then ProdOrderComponent.Validate("Location Code", VendorSubcontrLocation); - "Component Supply Method"::TransferToVendor, + "Component Supply Method"::"Transfer to Vendor", "Component Supply Method"::Empty: begin if (ProdOrderComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin @@ -74,12 +74,12 @@ codeunit 99001505 "Subcontracting Management" procedure ChangeLocationOnPlanningComponent(var PlanningComponent: Record "Planning Component"; VendorSubcontrLocation: Code[10]; OriginalLocationCode: Code[10]; OriginalBinCode: Code[20]) begin case PlanningComponent."Component Supply Method" of - "Component Supply Method"::ConsignmentAtVendor, - "Component Supply Method"::VendorSupplied: + "Component Supply Method"::"Consignment at Vendor", + "Component Supply Method"::"Vendor-Supplied": if (VendorSubcontrLocation <> '') and (PlanningComponent."Location Code" <> VendorSubcontrLocation) then PlanningComponent.Validate("Location Code", VendorSubcontrLocation); - "Component Supply Method"::TransferToVendor, + "Component Supply Method"::"Transfer to Vendor", "Component Supply Method"::Empty: begin if (PlanningComponent."Location Code" <> OriginalLocationCode) and (OriginalLocationCode <> '') then begin @@ -409,7 +409,7 @@ codeunit 99001505 "Subcontracting Management" if not GetSubcontractor(PlanningRoutingLine."No.", Vendor) then Clear(Vendor); - if PlanningComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied] then + if PlanningComponent."Component Supply Method" in ["Component Supply Method"::"Consignment at Vendor", "Component Supply Method"::"Vendor-Supplied"] then VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; OrigLocationCode := PlanningComponent."Orig. Location Code"; OrigBinCode := PlanningComponent."Orig. Bin Code"; @@ -467,7 +467,7 @@ codeunit 99001505 "Subcontracting Management" Clear(Vendor); VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code"; - if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied]) then + if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::"Consignment at Vendor", "Component Supply Method"::"Vendor-Supplied"]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; @@ -502,7 +502,7 @@ codeunit 99001505 "Subcontracting Management" if not ConfirmManagement.GetResponseOrDefault(StrSubstNo(RoutingLinkUpdConfQst, ProdOrderRoutingLine."Routing Link Code"), true) then Error(UpdateIsCanceledErr); repeat - if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied]) then + if not (ProdOrderComponent."Component Supply Method" in ["Component Supply Method"::"Consignment at Vendor", "Component Supply Method"::"Vendor-Supplied"]) then Clear(VendorSubcontractingLocationCode); OrigLocationCode := ProdOrderComponent."Orig. Location Code"; OrigBinCode := ProdOrderComponent."Orig. Bin Code"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al index 001ea950bc..fed94caf9e 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Enumerations/ComponentSupplyMethod.Enum.al @@ -13,22 +13,17 @@ enum 99001500 "Component Supply Method" Caption = ' ', Locked = true; } // The subcontractor provides the required component materials. - value(1; VendorSupplied) + value(1; "Vendor-Supplied") { Caption = 'Vendor-Supplied'; } // Your company owns the components and stores them at the subcontractor location (consignment stock). - value(2; ConsignmentAtVendor) + value(2; "Consignment at Vendor") { Caption = 'Consignment at Vendor'; } // Components are sent to the subcontractor through a transfer order. - value(3; TransferToVendor) - { - Caption = 'Transfer to Vendor'; - } - // Transfer to Vendor - value(3; TransferToVendor) + value(3; "Transfer to Vendor") { Caption = 'Transfer to Vendor'; } diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al index 82426059f3..c4675c2dff 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcProdOrderCreateBind.Codeunit.al @@ -49,7 +49,7 @@ codeunit 99001555 "Subc. ProdOrderCreateBind" ManufacturingSetup.SetLoadFields("Rtng. Link Code Purch. Prov."); ManufacturingSetup.Get(); if (ProdOrderComponent."Routing Link Code" <> ManufacturingSetup."Rtng. Link Code Purch. Prov.") or - (ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::TransferToVendor) then + (ProdOrderComponent."Component Supply Method" <> "Component Supply Method"::"Transfer to Vendor") then exit; ComponentsLocationCode := SubcontractingManagement.GetComponentsLocationCode(SubcontractingPurchaseLine); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al index 18956719a1..4c0f8585c6 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Codeunits/SubcTempDataInitializer.Codeunit.al @@ -167,7 +167,7 @@ codeunit 99001552 "Subc. Temp Data Initializer" TempGlobalProductionBOMLine.Validate("No.", SubcManagementSetup."Preset Component Item No."); TempGlobalProductionBOMLine."Quantity per" := 1; TempGlobalProductionBOMLine."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; - TempGlobalProductionBOMLine."Component Supply Method" := "Component Supply Method"::ConsignmentAtVendor; + TempGlobalProductionBOMLine."Component Supply Method" := "Component Supply Method"::"Consignment at Vendor"; TempGlobalProductionBOMLine.Insert(); end; @@ -569,13 +569,13 @@ codeunit 99001552 "Subc. Temp Data Initializer" if TempGlobalProdOrderComponent."Routing Link Code" = ManufacturingSetup."Rtng. Link Code Purch. Prov." then case TempGlobalProdOrderComponent."Component Supply Method" of - "Component Supply Method"::ConsignmentAtVendor, "Component Supply Method"::VendorSupplied: + "Component Supply Method"::"Consignment at Vendor", "Component Supply Method"::"Vendor-Supplied": begin GetVendor(); TempGlobalProdOrderComponent.Validate("Location Code", TempGlobalVendor."Subcontr. Location Code"); TempGlobalProdOrderComponent."Orig. Location Code" := ComponentsLocationCode; end; - "Component Supply Method"::TransferToVendor: + "Component Supply Method"::"Transfer to Vendor": TempGlobalProdOrderComponent.Validate("Location Code", ComponentsLocationCode); end; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al index 6d176a6faa..5ba312694e 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempBOMLines.Page.al @@ -88,7 +88,7 @@ page 99001506 "Subc. Temp BOM Lines" ApplicationArea = Manufacturing; trigger OnValidate() begin - if Rec."Component Supply Method" = Rec."Component Supply Method"::VendorSupplied then + if Rec."Component Supply Method" = Rec."Component Supply Method"::"Vendor-Supplied" then Rec.FieldError("Component Supply Method"); if (Rec."Routing Link Code" = '') and (Rec."Component Supply Method" <> Rec."Component Supply Method"::Empty) then begin diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al index 58d3d5265d..8f2effce01 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Prod Order Creation Wizard/Pages/SubcTempProdOrderComp.Page.al @@ -82,7 +82,7 @@ page 99001508 "Subc. Temp Prod Order Comp" ToolTip = 'Specifies how components are supplied to the subcontractor for the production order component.'; trigger OnValidate() begin - if Rec."Component Supply Method" = Rec."Component Supply Method"::VendorSupplied then + if Rec."Component Supply Method" = Rec."Component Supply Method"::"Vendor-Supplied" then Rec.FieldError("Component Supply Method"); if (Rec."Routing Link Code" = '') and (Rec."Component Supply Method" <> Rec."Component Supply Method"::Empty) then begin @@ -90,7 +90,7 @@ page 99001508 "Subc. Temp Prod Order Comp" Rec."Routing Link Code" := ManufacturingSetup."Rtng. Link Code Purch. Prov."; end; - if Rec."Component Supply Method" <> Rec."Component Supply Method"::TransferToVendor then + if Rec."Component Supply Method" <> Rec."Component Supply Method"::"Transfer to Vendor" then Rec.Validate("Location Code", CopyStr(SubcSessionState.GetCode('SetSubcontractingLocationCodeFromVendor'), 1, MaxStrLen(Rec."Location Code"))) else Rec.Validate("Location Code", Rec."Orig. Location Code"); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al index b186a4b90b..84e6402408 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateSubCReturnOrder.Report.al @@ -175,7 +175,7 @@ report 99001502 "Subc. Create SubCReturnOrder" ProdOrderComponent.SetRange("Prod. Order Line No.", PurchaseLine."Prod. Order Line No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); ProdOrderComponent.SetRange("Purchase Order Filter", PurchaseLine."Document No."); - ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::TransferToVendor); + ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::"Transfer to Vendor"); if ProdOrderComponent.FindSet() then begin CheckTransferLineExists(PurchaseLine); repeat diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al index fa0732917a..8e1906079e 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Reports/SubcCreateTransfOrder.Report.al @@ -173,7 +173,7 @@ report 99001501 "Subc. Create Transf. Order" ProdOrderComponent.SetRange("Prod. Order Line No.", PurchaseLine."Prod. Order Line No."); ProdOrderComponent.SetRange("Routing Link Code", ProdOrderRoutingLine."Routing Link Code"); ProdOrderComponent.SetRange("Purchase Order Filter", PurchaseLine."Document No."); - ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::TransferToVendor); + ProdOrderComponent.SetRange("Component Supply Method", ProdOrderComponent."Component Supply Method"::"Transfer to Vendor"); if ProdOrderComponent.FindSet() then repeat Item.SetLoadFields("Rounding Precision", "Order Tracking Policy"); diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al index c60f461cd7..7b965ad257 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al @@ -17,7 +17,7 @@ tableextension 99001503 "Subc. Planning Comp Ext." extends "Planning Component" { Caption = 'Component Supply Method'; DataClassification = CustomerContent; - ToolTip = 'Specifies how components are supplied to the subcontractor for the planning component.'; + ToolTip = 'Specifies how components are supplied to the subcontractor for the planning component. Vendor-supplied - components are provided by the subcontractor. Consignment at Vendor - components are owned by your company but stored at the subcontractor location. Transfer to Vendor - components are sent to the subcontractor through a transfer order.'; trigger OnValidate() var SubcontractingManagement: Codeunit "Subcontracting Management"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al index 89e149c780..de34a6a266 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcProdOrderCheckLib.Codeunit.al @@ -333,7 +333,7 @@ codeunit 139987 "Subc. ProdOrderCheckLib" TempProdOrderComponent."Unit of Measure Code" := ProductionBOMLine."Unit of Measure Code"; TempProdOrderComponent."Routing Link Code" := ProductionBOMLine."Routing Link Code"; TempProdOrderComponent."Description 2" := ProductionBOMLine."Description 2"; - if ProductionBOMLine."Component Supply Method" in [ProductionBOMLine."Component Supply Method"::VendorSupplied, ProductionBOMLine."Component Supply Method"::ConsignmentAtVendor] then + if ProductionBOMLine."Component Supply Method" in [ProductionBOMLine."Component Supply Method"::"Vendor-Supplied", ProductionBOMLine."Component Supply Method"::"Consignment at Vendor"] then TempProdOrderComponent."Location Code" := GetVendorSubcontractingLocation(PurchLine."Buy-from Vendor No.") else TempProdOrderComponent."Location Code" := PurchLine."Location Code"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al index ef5ff645ef..4feaed1700 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al @@ -534,7 +534,7 @@ codeunit 139981 "Subc. Location Handler Test" ProdOrderComp."Location Code" := CompLocationCode; if CompOrigLocationCode <> '' then ProdOrderComp."Orig. Location Code" := CompOrigLocationCode; - ProdOrderComp."Component Supply Method" := ProdOrderComp."Component Supply Method"::TransferToVendor; + ProdOrderComp."Component Supply Method" := ProdOrderComp."Component Supply Method"::"Transfer to Vendor"; ProdOrderComp."Routing Link Code" := RoutingLink.Code; ProdOrderComp.Modify(); @@ -609,7 +609,7 @@ codeunit 139981 "Subc. Location Handler Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Location Code" := LocationCode; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al index 54be8fccb5..cdef9ce489 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al @@ -86,7 +86,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" PurchLine.DeleteAll(); ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); #pragma warning disable AA0210 - ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::"Vendor-Supplied"); #pragma warning restore AA0210 ProductionBOMLine.FindFirst(); #pragma warning restore diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al index 8c546a7b34..1b344727f7 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al @@ -288,7 +288,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); #pragma warning disable AA0210 - ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::"Vendor-Supplied"); #pragma warning restore AA0210 ProductionBOMLine.FindFirst(); @@ -391,7 +391,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Production BOM Line with additional Component for Subcontracting Type exists ProductionBOMLine.SetRange("Production BOM No.", Item."Production BOM No."); - ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::VendorSupplied); + ProductionBOMLine.SetRange("Component Supply Method", ProductionBOMLine."Component Supply Method"::"Vendor-Supplied"); Assert.RecordIsNotEmpty(ProductionBOMLine); end; @@ -459,7 +459,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -716,7 +716,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -752,7 +752,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -810,7 +810,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetFilter("Routing Link Code", '<>%1', ''); ProdOrderComp.FindFirst(); ActualLocationCode := ProdOrderComp."Location Code"; - ProdOrderComp.Validate("Component Supply Method", ProdOrderComp."Component Supply Method"::VendorSupplied); + ProdOrderComp.Validate("Component Supply Method", ProdOrderComp."Component Supply Method"::"Vendor-Supplied"); ProdOrderComp.Modify(); // [THEN] Check if Component Location differs from Origin Location Code ==> Vendor Subcontracting Location Code @@ -1239,7 +1239,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1326,7 +1326,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Compare Due Date from Prod Order Comp with Receipt Date from Subc. Transfer Line ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1412,7 +1412,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1426,7 +1426,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1504,7 +1504,7 @@ codeunit 139989 "Subc. Subcontracting Test" // [THEN] Check if Purchase Line with additional Component for Subcontracting Type exists, Mock Reservation Entries on TransferLine and try to open Item Tracking Lines from Prod order Comp. Page ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -1948,7 +1948,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange(Status, ProdOrderComp.Status::Released); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::VendorSupplied); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Vendor-Supplied"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ExpectedDescription2 := 'TestDescription2_Comp'; @@ -2138,7 +2138,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2220,7 +2220,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2319,7 +2319,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -2639,7 +2639,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); @@ -2655,7 +2655,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); @@ -2676,7 +2676,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Due Date" := CalcDate('<+10D>', WorkDate()); @@ -3020,7 +3020,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange(Status, ProductionOrder.Status); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateInTransitLocation(TransitLocation); From 1b4b0bea0c61b154728222f52e1217f8cbd6be66 Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Wed, 13 May 2026 11:16:32 +0200 Subject: [PATCH 7/8] update tests --- .../Tests/SubcLocationHandlerTest.Codeunit.al | 4 +- .../SubcSubcontractingSyncTest.Codeunit.al | 2 +- .../Tests/SubcSubcontractingTest.Codeunit.al | 44 +++++++++---------- .../SubcSubcontractingUITest.Codeunit.al | 12 ++--- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al index 4feaed1700..33f4058486 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al @@ -357,7 +357,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -404,7 +404,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al index cdef9ce489..da926c8955 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al @@ -69,7 +69,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al index 7820db5b52..6dce22e872 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al @@ -82,7 +82,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(ProductionLocation); @@ -190,7 +190,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); // [GIVEN] A Released Production Order (not created from a Purchase Order) @@ -388,7 +388,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -496,7 +496,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -544,7 +544,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -620,7 +620,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -637,7 +637,7 @@ codeunit 139989 "Subc. Subcontracting Test" ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); @@ -706,7 +706,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -724,7 +724,7 @@ codeunit 139989 "Subc. Subcontracting Test" LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::TransferToVendor); + ProdOrderComp.SetRange("Component Supply Method", "Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); ProdOrderComp."Location Code" := Location.Code; @@ -799,7 +799,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1247,7 +1247,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1323,7 +1323,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1408,7 +1408,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1496,7 +1496,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1588,7 +1588,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1779,7 +1779,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1847,7 +1847,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -2051,7 +2051,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::VendorSupplied); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -2230,7 +2230,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( @@ -2312,7 +2312,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2412,7 +2412,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::TransferToVendor); + UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2775,7 +2775,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 if ProdOrderComp.FindSet() then repeat diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al index 56b1b02ad0..35a78a6902 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al @@ -458,11 +458,7 @@ codeunit 139990 "Subc. Subcontracting UI Test" [Test] procedure ComponentSupplyMethodCaptionsAreClear() var -var - ProductionBOMLine: Record "Production BOM Line"; - PlanningComponent: Record "Planning Component"; - ProdOrderComponent: Record "Prod. Order Component"; -begin + ProductionBOMLine: Record "Production BOM Line"; PlanningComponent: Record "Planning Component"; ProdOrderComponent: Record "Prod. Order Component"; ComponentSupplyMethod: Enum "Component Supply Method"; @@ -476,9 +472,9 @@ begin Assert.AreEqual('Component Supply Method', ProdOrderComponent.FieldCaption("Component Supply Method"), 'Prod. Order Component field caption must be updated.'); // [THEN] Enum value captions use the new names from bug 633674. - Assert.AreEqual('Vendor-Supplied', Format(ComponentSupplyMethod::VendorSupplied), 'Purchase caption must be Vendor-Supplied.'); - Assert.AreEqual('Consignment at Vendor', Format(ComponentSupplyMethod::ConsignmentAtVendor), 'InventoryByVendor caption must be Consignment at Vendor.'); - Assert.AreEqual('Transfer to Vendor', Format(ComponentSupplyMethod::TransferToVendor), 'Transfer caption must be Transfer to Vendor.'); + Assert.AreEqual('Vendor-Supplied', Format(ComponentSupplyMethod::"Vendor-Supplied"), 'Purchase caption must be Vendor-Supplied.'); + Assert.AreEqual('Consignment at Vendor', Format(ComponentSupplyMethod::"Consignment at Vendor"), 'InventoryByVendor caption must be Consignment at Vendor.'); + Assert.AreEqual('Transfer to Vendor', Format(ComponentSupplyMethod::"Transfer to Vendor"), 'Transfer caption must be Transfer to Vendor.'); end; var From 5e58233076e6b308cc400f54e6b6ebaf459146a8 Mon Sep 17 00:00:00 2001 From: Chethan Thopaiah <41570277+ChethanT@users.noreply.github.com> Date: Fri, 15 May 2026 14:55:01 +0200 Subject: [PATCH 8/8] propogated renames --- .../SubcontractingManagement.Codeunit.al | 4 +- .../SubcPlanningCompExt.TableExt.al | 2 +- .../SubcProdOrderCompExt.TableExt.al | 2 +- .../SubcManagementLibrary.Codeunit.al | 8 ++-- .../Tests/SubcLocationHandlerTest.Codeunit.al | 8 ++-- .../Tests/SubcPurchSubcontTest.Codeunit.al | 2 +- .../SubcSubcontractingSyncTest.Codeunit.al | 6 +-- .../Tests/SubcSubcontractingTest.Codeunit.al | 47 +++++++++---------- .../SubcSubcontractingUITest.Codeunit.al | 6 +-- .../Tests/SubcWIPTransCreateTest.Codeunit.al | 6 +-- 10 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al index f5cbc814b6..c265e3e868 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al @@ -388,7 +388,7 @@ codeunit 99001505 "Subcontracting Management" end; end; - procedure UpdateSubcontractingTypeForPlanningComponent(var PlanningComponent: Record "Planning Component") + procedure UpdateComponentSupplyMethodForPlanningComponent(var PlanningComponent: Record "Planning Component") var PlanningRoutingLine: Record "Planning Routing Line"; Vendor: Record Vendor; @@ -420,7 +420,7 @@ codeunit 99001505 "Subcontracting Management" end; end; - procedure UpdateSubcontractingTypeForProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component") + procedure UpdateComponentSupplyMethodForProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component") var ProdOrderLine: Record "Prod. Order Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al index 7b965ad257..dbed67f0b2 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcPlanningCompExt.TableExt.al @@ -22,7 +22,7 @@ tableextension 99001503 "Subc. Planning Comp Ext." extends "Planning Component" var SubcontractingManagement: Codeunit "Subcontracting Management"; begin - SubcontractingManagement.UpdateSubcontractingTypeForPlanningComponent(Rec); + SubcontractingManagement.UpdateComponentSupplyMethodForPlanningComponent(Rec); end; } field(99001525; "Orig. Location Code"; Code[10]) diff --git a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al index 8ae3d04a30..0c7b8c3940 100644 --- a/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al +++ b/src/Apps/W1/Subcontracting/App/src/Process/Tableextensions/Manufacturing/SubcProdOrderCompExt.TableExt.al @@ -25,7 +25,7 @@ tableextension 99001502 "Subc. Prod Order Comp Ext." extends "Prod. Order Compon var SubcontractingManagement: Codeunit "Subcontracting Management"; begin - SubcontractingManagement.UpdateSubcontractingTypeForProdOrderComponent(Rec); + SubcontractingManagement.UpdateComponentSupplyMethodForProdOrderComponent(Rec); end; } field(99001523; "Orig. Location Code"; Code[10]) diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcManagementLibrary.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcManagementLibrary.Codeunit.al index 10621b0f43..61eec7ea2b 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcManagementLibrary.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Libraries/SubcManagementLibrary.Codeunit.al @@ -75,7 +75,7 @@ codeunit 139983 "Subc. Management Library" end; end; - procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Subcontracting Type") + procedure UpdateProdBomWithComponentSupplyMethod(Item: Record Item; ComponentSupplyMethod: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; @@ -86,7 +86,7 @@ codeunit 139983 "Subc. Management Library" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Subcontracting Type" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := ComponentSupplyMethod; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); @@ -101,7 +101,7 @@ codeunit 139983 "Subc. Management Library" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location); @@ -182,7 +182,7 @@ codeunit 139983 "Subc. Management Library" ProdOrderComp.SetRange(Status, ProductionOrder.Status); ProdOrderComp.SetRange("Prod. Order No.", ProductionOrder."No."); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 ProdOrderComp.FindFirst(); LibraryWarehouse.CreateInTransitLocation(TransitLocation); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al index 71f04d1d95..174f6e50a2 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcLocationHandlerTest.Codeunit.al @@ -366,7 +366,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -413,7 +413,7 @@ codeunit 139981 "Subc. Location Handler Test" SubcWarehouseLibrary.CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter, true); SubcWarehouseLibrary.CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcWarehouseLibrary.CreateAndRefreshProductionOrder( @@ -581,7 +581,7 @@ codeunit 139981 "Subc. Location Handler Test" ProdOrderRtngLine.Insert(); end; - local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Component Supply Method") + local procedure UpdateProdBomWithComponentSupplyMethod(Item: Record Item; ComponentSupplyMethod: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; @@ -592,7 +592,7 @@ codeunit 139981 "Subc. Location Handler Test" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Component Supply Method" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := ComponentSupplyMethod; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcPurchSubcontTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcPurchSubcontTest.Codeunit.al index 24884d92f5..eda49f6b52 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcPurchSubcontTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcPurchSubcontTest.Codeunit.al @@ -454,7 +454,7 @@ codeunit 139991 "Subc. Purch. Subcont. Test" LibraryManufacturing.CreateProductionBOMLine( ProductionBOMHeader, ProductionBOMLine, '', ProductionBOMLine.Type::Item, ComponentItem."No.", 1); ProductionBOMLine.Validate("Routing Link Code", RoutingLink.Code); - ProductionBOMLine.Validate("Subcontracting Type", "Subcontracting Type"::Purchase); + ProductionBOMLine.Validate("Component Supply Method", "Component Supply Method"::"Vendor-Supplied"); ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); ProductionBOMHeader.Modify(true); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al index da926c8955..8816f25c8d 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingSyncTest.Codeunit.al @@ -69,7 +69,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); + UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Vendor-Supplied"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -334,7 +334,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" ProductionBOMHeader.Modify(true); end; - local procedure UpdateProdBomWithSubcontractingType(Item: Record Item; SubcontractingType: Enum "Component Supply Method") + local procedure UpdateProdBomWithComponentSupplyMethod(Item: Record Item; ComponentSupplyMethod: Enum "Component Supply Method") var ProductionBOMHeader: Record "Production BOM Header"; ProductionBOMLine: Record "Production BOM Line"; @@ -345,7 +345,7 @@ codeunit 139992 "Subc. Subcontracting Sync Test" ProductionBOMLine.SetRange("Production BOM No.", ProductionBOMHeader."No."); ProductionBOMLine.FindLast(); - ProductionBOMLine."Component Supply Method" := SubcontractingType; + ProductionBOMLine."Component Supply Method" := ComponentSupplyMethod; ProductionBOMLine.Modify(true); ProductionBOMHeader.Validate(Status, ProductionBOMHeader.Status::Certified); diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al index 5b4e13b279..8896878558 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingTest.Codeunit.al @@ -14,7 +14,6 @@ using Microsoft.Inventory.Ledger; using Microsoft.Inventory.Location; using Microsoft.Inventory.Planning; using Microsoft.Inventory.Requisition; -using Microsoft.Inventory.Setup; using Microsoft.Inventory.Tracking; using Microsoft.Inventory.Transfer; using Microsoft.Manufacturing.Capacity; @@ -82,7 +81,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); LibraryWarehouse.CreateLocationWithInventoryPostingSetup(ProductionLocation); @@ -190,7 +189,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); // [GIVEN] A Released Production Order (not created from a Purchase Order) @@ -388,7 +387,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Vendor-Supplied"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -471,7 +470,7 @@ codeunit 139989 "Subc. Subcontracting Test" end; [Test] - procedure TestTransferOfSubcontractingTypeProdBOMLineToProdOrderComp() + procedure TestTransferOfComponentSupplyMethodProdBOMLineToProdOrderComp() var Item: Record Item; MachineCenter: array[2] of Record "Machine Center"; @@ -496,7 +495,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Vendor-Supplied"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -544,7 +543,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -620,7 +619,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -706,7 +705,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -799,7 +798,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -889,7 +888,7 @@ codeunit 139989 "Subc. Subcontracting Test" end; [Test] - procedure TestChangeLocationOnProdOrderCompWithSubcontractingTypePurchase() + procedure TestChangeLocationOnProdOrderCompWithComponentSupplyMethodPurchase() var Item: Record Item; MachineCenter: array[2] of Record "Machine Center"; @@ -1237,7 +1236,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1313,7 +1312,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1398,7 +1397,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1486,7 +1485,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1577,7 +1576,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1767,7 +1766,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -1802,7 +1801,7 @@ codeunit 139989 "Subc. Subcontracting Test" end; [Test] - procedure TestTransferSubcontractingTypeAndVendorLocationIntoPlanningComponent() + procedure TestTransferComponentSupplyMethodAndVendorLocationIntoPlanningComponent() var Customer: Record Customer; Item: Record Item; @@ -1835,7 +1834,7 @@ codeunit 139989 "Subc. Subcontracting Test" UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Vendor-Supplied"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); @@ -2097,7 +2096,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Vendor-Supplied"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Vendor-Supplied"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcontractingMgmtLibrary.CreateAndRefreshProductionOrder( @@ -2276,7 +2275,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcontractingMgmtLibrary.CreateAndRefreshProductionOrder( @@ -2358,7 +2357,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcontractingMgmtLibrary.CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2458,7 +2457,7 @@ codeunit 139989 "Subc. Subcontracting Test" CreateAndCalculateNeededWorkAndMachineCenter(WorkCenter, MachineCenter); CreateItemForProductionIncludeRoutingAndProdBOM(Item, WorkCenter, MachineCenter); UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Component Supply Method"::"Transfer to Vendor"); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcontractingMgmtLibrary.CreateAndRefreshProductionOrder( ProductionOrder, "Production Order Status"::Released, ProductionOrder."Source Type"::Item, Item."No.", LibraryRandom.RandInt(10) + 5); @@ -2743,7 +2742,7 @@ codeunit 139989 "Subc. Subcontracting Test" begin ProdOrderComp.SetRange("Prod. Order No.", ProdOrderNo); #pragma warning disable AA0210 - ProdOrderComp.SetRange("Subcontracting Type", ProdOrderComp."Subcontracting Type"::Transfer); + ProdOrderComp.SetRange("Component Supply Method", ProdOrderComp."Component Supply Method"::"Transfer to Vendor"); #pragma warning restore AA0210 if ProdOrderComp.FindSet() then repeat diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al index 35a78a6902..0b35dfaf73 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcSubcontractingUITest.Codeunit.al @@ -256,7 +256,7 @@ codeunit 139990 "Subc. Subcontracting UI Test" end; [Test] - procedure CheckCustCtrl_PageProductionBOMLinesSubcontractingType() + procedure CheckCustCtrl_PageProductionBOMLinesComponentSupplyMethod() var PageControl: Record "Page Control Field"; ProdBOMLine: Record "Production BOM Line"; @@ -279,7 +279,7 @@ codeunit 139990 "Subc. Subcontracting UI Test" end; [Test] - procedure CheckCustCtrl_PageProductionBOMVersionLinesSubcontractingType() + procedure CheckCustCtrl_PageProductionBOMVersionLinesComponentSupplyMethod() var PageControl: Record "Page Control Field"; ProdBOMLine: Record "Production BOM Line"; @@ -301,7 +301,7 @@ codeunit 139990 "Subc. Subcontracting UI Test" end; [Test] - procedure CheckCustCtrl_PagePlanningComponentSubcontractingType() + procedure CheckCustCtrl_PagePlanningComponentComponentSupplyMethod() var PageControl: Record "Page Control Field"; PlanComp: Record "Planning Component"; diff --git a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcWIPTransCreateTest.Codeunit.al b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcWIPTransCreateTest.Codeunit.al index 41a48c569a..4943856970 100644 --- a/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcWIPTransCreateTest.Codeunit.al +++ b/src/Apps/W1/Subcontracting/Test/src/Codeunits/Tests/SubcWIPTransCreateTest.Codeunit.al @@ -213,7 +213,7 @@ codeunit 149911 "Subc. WIP Trans. Create Test" // [GIVEN] Set up component transfer infrastructure SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); // [GIVEN] Create and refresh production order @@ -302,7 +302,7 @@ codeunit 149911 "Subc. WIP Trans. Create Test" // [GIVEN] Set up component transfer infrastructure SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); // [GIVEN] Create and refresh production order @@ -383,7 +383,7 @@ codeunit 149911 "Subc. WIP Trans. Create Test" // Do NOT set Transfer WIP Item on routing line SubcWarehouseLibrary.UpdateProdBomAndRoutingWithRoutingLink(Item, WorkCenter[2]."No."); - SubcontractingMgmtLibrary.UpdateProdBomWithSubcontractingType(Item, "Subcontracting Type"::Transfer); + SubcontractingMgmtLibrary.UpdateProdBomWithComponentSupplyMethod(Item, "Component Supply Method"::"Transfer to Vendor"); SubcontractingMgmtLibrary.UpdateVendorWithSubcontractingLocationCode(WorkCenter[2]); SubcontractingMgmtLibrary.CreateAndRefreshProductionOrder(