Skip to content

Commit

Permalink
Merge pull request #44 from fluxxus-nl/Release_Before_Main
Browse files Browse the repository at this point in the history
Release before main
  • Loading branch information
lvanvugt authored Sep 19, 2024
2 parents 3fd055b + f15e22c commit 4d3815f
Show file tree
Hide file tree
Showing 40 changed files with 3,083 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/demodata/ToBeRemoved.txt

This file was deleted.

19 changes: 19 additions & 0 deletions app/src/Pageextension/SourceCodeSetupExt.PageExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pageextension 50000 "Source Code Setup Ext ASD" extends "Source Code Setup"
{
layout
{
addafter("Resources")
{
group("Conference ASD")
{
Visible = true;
Caption = 'Conference';
field("Conference Location ASD"; Rec."Conference Location ASD")
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Conference Location Source Code.', Comment = '%';
}
}
}
}
}
9 changes: 9 additions & 0 deletions app/src/Profile/Conference.Profile.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
profile "Conference ASD"

Check warning on line 1 in app/src/Profile/Conference.Profile.al

View workflow job for this annotation

GitHub Actions / Build . (Default) / . (Default)

AL0571 The property 'Description' should only be used for internal comments. Use the property 'Caption' or 'CaptionML' in order to specify the profile caption displayed to end users. This warning will become an error in a future release.
{
Description = 'Conference Manager ASD';
RoleCenter = "Conference Manager RC ASD";
Customizations = "My Dummy Customization ASD";
}
pagecustomization "My Dummy Customization ASD" customizes "Customer List"
{
}
1 change: 0 additions & 1 deletion app/src/ToBeRemoved.txt

This file was deleted.

26 changes: 26 additions & 0 deletions app/src/codeunit/ConferenceDocumentMgmt.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codeunit 50002 "Conference Document Mgmt ASD"
{

TableNo = "Conference ASD";

procedure TransferConferenceDocument(ConferenceASD: Record "Conference ASD")
var
ConferenceLineASD: Record "Conference Line ASD";
PostedConferenceHeaderASD: Record "Posted Conference Header ASD";
PostedConferenceLineASD: Record "Posted Conference Line ASD";
begin
PostedConferenceHeaderASD.Init();
PostedConferenceHeaderASD.TransferFields(ConferenceASD);
PostedConferenceHeaderASD.Insert(true);

ConferenceLineASD.Reset();
ConferenceLineASD.SetRange("No.", ConferenceASD.DocumentNo);
if ConferenceLineASD.FindSet() then
repeat
PostedConferenceLineASD.Init();
PostedConferenceLineASD.TransferFields(ConferenceLineASD);
PostedConferenceLineASD.Insert(true);
until ConferenceLineASD.Next() = 0;
ConferenceASD.Delete(true);
end;
}
63 changes: 63 additions & 0 deletions app/src/codeunit/ConferenceJnlCheckLine.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
codeunit 50000 "Conference Jnl.-Check Line ASD"
{
internal procedure DoCheck(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceASD.TestField(Customer);
ConferenceASD.TestField(ConferenceLocation);
ConferenceASD.TestField(DocumentDate);
ConferenceASD.TestField(PostingDate);
ConferenceASD.TestField(StartingDate);
ConferenceASD.TestField(StartingTime);
ConferenceASD.TestField(Duration);
case ConferenceLineASD.type of
ConferenceLineASD.type::Item:
ConferenceLineASD.TestField("No.");
ConferenceLineASD.type::Resource:
ConferenceLineASD.TestField("No.");
end;
ConferenceLineASD.TestField("No.");
ConferenceLineASD.TestField("Unit of Measure Code");
ConferenceLineASD.TestField(Quantity);
ConferenceLineASD.TestField("Unit Price");
ConferenceLineASD.TestField(Amount);
ConferenceLineASD.TestField("Gen. Bus. Posting Group");
ConferenceLineASD.TestField("Gen. Prod. Posting Group");
ConferenceLineASD.TestField("VAT Prod. Posting Group");

CheckPostingDate(ConferenceASD.PostingDate);
CheckDocumentDate(ConferenceASD.DocumentDate);
CheckQty(ConferenceLineASD.Quantity);
end;

local procedure CheckPostingDate(LocalPostingDate: Date)
var
PostingDateEmptyErr: Label 'Posting Date Field cannot be empty';
begin
if LocalPostingDate <> NormalDate(LocalPostingDate) then
Error(PostingDateEmptyErr);
end;

local procedure CheckDocumentDate(LocalDocumentDate: Date)
var
PostingDateEmptyErr: Label 'Posting Date Field cannot be empty';
begin
if LocalDocumentDate <> NormalDate(LocalDocumentDate) then
Error(PostingDateEmptyErr);
end;

local procedure CheckQty(LocalQty: Decimal)
var
QuantityNotLessZeroErr: Label 'Quantity cannot be less than 0';
QuantityNotEqualZeroErr: Label 'Quantity cannot be equal to 0';
begin
if LocalQty < 0 then
Error(QuantityNotLessZeroErr);
if LocalQty = 0 then
Error(QuantityNotEqualZeroErr);
end;

local procedure GetResource()
begin

end;
}
54 changes: 54 additions & 0 deletions app/src/codeunit/ConferenceJnlPostLine.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
codeunit 50001 "Conference Jnl.-Post Line ASD"
{
TableNo = "Conference ASD";

var
ConferenceJournalASD: Record "Conference Journal ASD";
ConferenceLineASD: Record "Conference Line ASD";
ConferenceJnlCheckLineASD: Codeunit "Conference Jnl.-Check Line ASD";

trigger OnRun()
begin
GetConferenceLines(Rec);
end;

procedure GetConferenceLines(ConferenceASD: Record "Conference ASD")
begin
ConferenceLineASD.Reset();
ConferenceLineASD.SetRange("Document No.", ConferenceASD.DocumentNo);
if ConferenceLineASD.FindSet() then
repeat
Code(ConferenceASD, ConferenceLineASD);
until ConferenceLineASD.Next() = 0;
end;

local procedure Code(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
begin
PostDocumentToJournal(ConferenceASD, ConferenceLineASD);
ConferenceJnlCheckLineASD.DoCheck(ConferenceASD, ConferenceLineASD);
PostJournalToLedger(ConferenceJournalASD);
end;

local procedure PostDocumentToJournal(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceJournalASD."Posting Date" := ConferenceASD.PostingDate;
ConferenceJournalASD."Entry Type" := ConferenceLineASD.type;
ConferenceJournalASD."Document No." := ConferenceASD.DocumentNo;
ConferenceJournalASD.No := ConferenceLineASD."No.";
ConferenceJournalASD.Description := ConferenceLineASD.Description;
ConferenceJournalASD.Quantity := ConferenceLineASD.Quantity;
ConferenceJournalASD."Unit of Measure Code" := ConferenceLineASD."Unit of Measure Code";
ConferenceJournalASD."Unit Price" := ConferenceLineASD."Unit Price";
ConferenceJournalASD."Total Price" := ConferenceLineASD.Amount;
ConferenceJournalASD."Line Discount" := ConferenceLineASD."Line Discount %";
ConferenceJournalASD."Gen. Prod. Posting Group" := ConferenceLineASD."Gen. Prod. Posting Group";
ConferenceJournalASD."Gen. Bus. Posting Group" := ConferenceLineASD."Gen. Bus. Posting Group";
ConferenceJournalASD."VAT Prod. Posting Group" := ConferenceLineASD."VAT Prod. Posting Group";
end;

local procedure PostJournalToLedger(ConferenceJournalASD: Record "Conference Journal ASD")
var
ConferenceLedgerEntryASD: Record "Conference Ledger Entry ASD";
begin
end;
}
17 changes: 17 additions & 0 deletions app/src/enum/JournalLineType.Enum.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
enum 50002 "Journal Line Type ASD"
{
Extensible = false;

value(0; Item)
{
Caption = 'Item';
}
value(1; Resource)
{
Caption = 'Resource';
}
value(2; Location)
{
Caption = 'Location';
}
}
31 changes: 31 additions & 0 deletions app/src/enum/Status.Enum.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
enum 50000 "Status ASD"
{
Extensible = false;


value(0; Open)
{
Caption = 'Open';
}
value(1; Requested)
{
Caption = 'Requested';
}
value(2; Approved)
{
Caption = 'Approved';
}
value(3; Active)
{
Caption = 'Active';
}
value(4; Closed)
{
Caption = 'Closed';
}
value(5; Canceled)
{
Caption = 'Canceled';
}

}
7 changes: 7 additions & 0 deletions app/src/enumextension/CommentLineTableName.EnumExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enumextension 50000 "Comment Line Table Name ASD" extends "Comment Line Table Name"
{
value(123456700; Conference)
{
Caption = 'Conference';
}
}
7 changes: 7 additions & 0 deletions app/src/enumextension/ResourceTypeExtension.EnumExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enumextension 50001 "Resource Type Extension ASD" extends "Resource Type"
{
value(123456700; Equipment)
{
Caption = 'Equipment';
}
}
95 changes: 95 additions & 0 deletions app/src/page/ConferenceActivities.Page.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
page 50016 "Conference Activities ASD"
{
Caption = 'Conference Activities';
PageType = CardPart;
RefreshOnActivate = true;
SourceTable = "Conference Cue ASD";
ShowFilter = false;

layout
{
area(Content)
{
cuegroup(Registrations)
{
CuegroupLayout = Wide;

field(Active; Rec.Active)
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Active field.', Comment = '%';
DrillDownPageId = "Conference List ASD";
}
field(Approved; Rec.Approved)
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Approved field.', Comment = '%';
DrillDownPageId = "Conference List ASD";
}
field(Open; Rec.Open)
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Open field.', Comment = '%';
DrillDownPageId = "Conference List ASD";
}
field(Requested; Rec.Requested)
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Requested field.', Comment = '%';
DrillDownPageId = "Conference List ASD";
}
actions
{
action(New)
{
ApplicationArea = All;
Caption = 'New';
ToolTip = 'Create a new Conference registration.';
Image = TileNew;
RunObject = Page "Conference Card ASD";
RunPageMode = Create;
}
}
}
cuegroup("For Posting")
{
field(Closed; Rec.Closed)
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Closed field.', Comment = '%';
DrillDownPageId = "Conference List ASD";
}
}
}
}
actions
{
area(Processing)
{
action(SetupCues)
{
caption = 'Set Up Cues';
tooltip = 'Set up Cues related to the role';
image = Setup;
ApplicationArea = All;

trigger OnAction()
var
CueRecordRef: RecordRef;
CueSetup: Codeunit "Cues And KPIs";
begin
CueRecordRef.GetTable(Rec);
CueSetup.OpenCustomizePageForCurrentUser(CueRecordRef.Number());
end;
}
}
}
trigger OnOpenPage()
begin
Rec.InsertRecord();
end;
}




Loading

0 comments on commit 4d3815f

Please sign in to comment.