Page 99000891 Work Center Group Load
- App
- Base Application
- Namespace
- Microsoft.Manufacturing.WorkCenter
- Versions
- 17-28
- Source table
- 99000756
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Manufacturing/WorkCenter/WorkCenterGroupLoad.Page.al193 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Manufacturing.WorkCenter;
using Microsoft.Foundation.Enums;
using Microsoft.Manufacturing.Capacity;
using Microsoft.Manufacturing.Setup;
page 99000891 "Work Center Group Load"
{
Caption = 'Work Center Group Load';
DeleteAllowed = false;
InsertAllowed = false;
LinksAllowed = false;
PageType = ListPlus;
SaveValues = true;
SourceTable = "Work Center Group";
layout
{
area(content)
{
group(Options)
{
Caption = 'Options';
field(PeriodType; PeriodType)
{
ApplicationArea = Manufacturing;
Caption = 'View by';
ToolTip = 'Specifies by which period amounts are displayed.';
trigger OnValidate()
begin
if PeriodType = PeriodType::"Accounting Period" then
PeriodPeriodTypeOnValidate();
if PeriodType = PeriodType::Year then
YearPeriodTypeOnValidate();
if PeriodType = PeriodType::Quarter then
QuarterPeriodTypeOnValidate();
if PeriodType = PeriodType::Month then
MonthPeriodTypeOnValidate();
if PeriodType = PeriodType::Week then
WeekPeriodTypeOnValidate();
if PeriodType = PeriodType::Day then
DayPeriodTypeOnValidate();
end;
}
field(AmountType; AmountType)
{
ApplicationArea = Manufacturing;
Caption = 'View as';
ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.';
trigger OnValidate()
begin
if AmountType = AmountType::"Balance at Date" then
BalanceatDateAmountTypeOnValid();
if AmountType = AmountType::"Net Change" then
NetChangeAmountTypeOnValidate();
end;
}
}
part(WorkCtrGroupLoadLines; "Work Center Group Load Lines")
{
ApplicationArea = Manufacturing;
}
field(CapacityUoM; CapacityUoM)
{
ApplicationArea = Manufacturing;
Caption = 'Capacity Shown In';
TableRelation = "Capacity Unit of Measure".Code;
ToolTip = 'Specifies how the capacity is shown (minutes, days, or hours).';
trigger OnValidate()
begin
UpdateSubForm();
end;
}
}
}
actions
{
}
trigger OnAfterGetRecord()
begin
UpdateSubForm();
end;
trigger OnOpenPage()
var
MgfSetup: Record "Manufacturing Setup";
begin
MgfSetup.Get();
MgfSetup.TestField("Show Capacity In");
CapacityUoM := MgfSetup."Show Capacity In";
end;
protected var
PeriodType: Enum "Analysis Period Type";
AmountType: Enum "Analysis Amount Type";
CapacityUoM: Code[10];
local procedure UpdateSubForm()
begin
CurrPage.WorkCtrGroupLoadLines.PAGE.SetLines(Rec, PeriodType, AmountType, CapacityUoM);
end;
local procedure DayPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure WeekPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure MonthPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure QuarterPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure YearPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure PeriodPeriodTypeOnPush()
begin
UpdateSubForm();
end;
local procedure BalanceatDateAmountTypeOnPush()
begin
UpdateSubForm();
end;
local procedure NetChangeAmountTypeOnPush()
begin
UpdateSubForm();
end;
local procedure DayPeriodTypeOnValidate()
begin
DayPeriodTypeOnPush();
end;
local procedure WeekPeriodTypeOnValidate()
begin
WeekPeriodTypeOnPush();
end;
local procedure MonthPeriodTypeOnValidate()
begin
MonthPeriodTypeOnPush();
end;
local procedure QuarterPeriodTypeOnValidate()
begin
QuarterPeriodTypeOnPush();
end;
local procedure YearPeriodTypeOnValidate()
begin
YearPeriodTypeOnPush();
end;
local procedure PeriodPeriodTypeOnValidate()
begin
PeriodPeriodTypeOnPush();
end;
local procedure NetChangeAmountTypeOnValidate()
begin
NetChangeAmountTypeOnPush();
end;
local procedure BalanceatDateAmountTypeOnValid()
begin
BalanceatDateAmountTypeOnPush();
end;
}