Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// ------------------------------------------------------------------------------------------------
namespace Microsoft.QualityManagement.Installation;

using Microsoft.QualityManagement.Configuration;
using Microsoft.QualityManagement.Setup.ApplicationAreas;

/// <summary>
Expand All @@ -15,8 +16,10 @@ codeunit 20421 "Qlty. Install"

trigger OnInstallAppPerCompany()
var
QltyAutoConfigure: Codeunit "Qlty. Auto Configure";
QltyApplicationAreaMgmt: Codeunit "Qlty. Application Area Mgmt.";
begin
QltyAutoConfigure.EnsureBasicSetupExists(false);
QltyApplicationAreaMgmt.RefreshExperienceTierCurrentCompany();
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Microsoft.DemoData.QualityManagement;

using Microsoft.DemoTool.Helpers;
using Microsoft.QualityManagement.Configuration.Template;

codeunit 5596 "Create QM Insp. Template Hdr"
{
Expand All @@ -23,6 +24,7 @@ codeunit 5596 "Create QM Insp. Template Hdr"
ContosoQualityManagement.InsertQualityInspectionTemplateHdr(ProductionFood(), ProductionFoodDescLbl);
ContosoQualityManagement.InsertQualityInspectionTemplateHdr(Receive(), ReceiveDescLbl);
ContosoQualityManagement.InsertQualityInspectionTemplateHdr(ScheduleChange(), ScheduleChangeDescLbl);
ContosoQualityManagement.InsertQualityInspectionTemplateHdr(Beans(), BeansDescLbl, Enum::"Qlty. Sample Size Source"::"Percent of Quantity", 2);
end;

procedure BicycleChecklist(): Code[20]
Expand Down Expand Up @@ -75,6 +77,11 @@ codeunit 5596 "Create QM Insp. Template Hdr"
exit(ScheduleChangeTok);
end;

procedure Beans(): Code[20]
begin
exit(BeansTok);
end;

var
BicycleChecklistTok: Label 'BICYCLECHECKLIST', MaxLength = 20;
CarTok: Label 'CAR', MaxLength = 20;
Expand All @@ -84,6 +91,7 @@ codeunit 5596 "Create QM Insp. Template Hdr"
ProductionFoodTok: Label 'PRODUCTIONFOOD', MaxLength = 20;
ReceiveTok: Label 'RECEIVE', MaxLength = 20;
ScheduleChangeTok: Label 'SCHEDULECHANGE', MaxLength = 20;
BeansTok: Label 'BEANS', MaxLength = 20;

BicycleChecklistDescLbl: Label 'Bicycle Checklist', MaxLength = 100;
CorrectiveActionDescLbl: Label 'Corrective Action', MaxLength = 100;
Expand All @@ -93,4 +101,5 @@ codeunit 5596 "Create QM Insp. Template Hdr"
ProductionFoodDescLbl: Label 'Food Production Example', MaxLength = 100;
ReceiveDescLbl: Label 'Receiving Example', MaxLength = 100;
ScheduleChangeDescLbl: Label 'Scheduler Change', MaxLength = 100;
BeansDescLbl: Label 'Coffee beans, receipt, bag', MaxLength = 100;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,13 @@ codeunit 5597 "Create QM Insp. Template Line"

ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.ScheduleChange(), 10000, CreateQualityTest.ReasonCode(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.ScheduleChange(), 20000, CreateQualityTest.Explanation(), '');

ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 10000, CreateQualityTest.BagWeight(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 20000, CreateQualityTest.PackagingVisual(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 30000, CreateQualityTest.Labeling(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 40000, CreateQualityTest.CoffeeDefect(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 50000, CreateQualityTest.CoffeeUniformity(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 60000, CreateQualityTest.Moisture(), '');
ContosoQualityManagement.InsertQualityInspectionTemplateLine(CreateQMInspTemplateHdr.Beans(), 70000, CreateQualityTest.Comment(), '');
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ codeunit 5592 "Quality Management Module" implements "Contoso Demo Data Module"

procedure CreateSetupData()
begin
Codeunit.Run(Codeunit::"Create Quality Lookup Value");
Codeunit.Run(Codeunit::"Create Quality Test");
Codeunit.Run(Codeunit::"Create Quality Insp. Result");
end;

procedure CreateMasterData()
begin
Codeunit.Run(Codeunit::"Create Quality Lookup Value");
Codeunit.Run(Codeunit::"Create Quality Test");
Codeunit.Run(Codeunit::"Create Quality Insp. Result");
Codeunit.Run(Codeunit::"Create QM Insp. Template Hdr");
Codeunit.Run(Codeunit::"Create QM Insp. Template Line");
Codeunit.Run(Codeunit::"Create QM Result Condit. Conf.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,29 @@ codeunit 5710 "Contoso Quality Management"
QltyInspectionTemplateHdr.Insert(true);
end;

procedure InsertQualityInspectionTemplateHdr(Code: Code[20]; Description: Text[100]; SampleSource: Enum "Qlty. Sample Size Source"; SamplePercentage: Decimal)
var
QltyInspectionTemplateHdr: Record "Qlty. Inspection Template Hdr.";
Exists: Boolean;
begin
if QltyInspectionTemplateHdr.Get(Code) then begin
Exists := true;

if not OverwriteData then
exit;
end;

QltyInspectionTemplateHdr.Validate(Code, Code);
QltyInspectionTemplateHdr.Validate(Description, Description);
QltyInspectionTemplateHdr.Validate("Sample Source", SampleSource);
QltyInspectionTemplateHdr.Validate("Sample Percentage", SamplePercentage);

if Exists then
QltyInspectionTemplateHdr.Modify(true)
else
QltyInspectionTemplateHdr.Insert(true);
end;

procedure InsertQualityInspectionTemplateLine(TemplateCode: Code[20]; LineNo: Integer; TestCode: Code[20]; Description: Text[100])
var
QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line";
Expand Down
Loading