Skip to content

Commit

Permalink
Merge pull request #50 from fluxxus-nl/finalAdjustmentsAfterTestingV2
Browse files Browse the repository at this point in the history
Final Version for the Conference Planner after testing
  • Loading branch information
lvanvugt authored Sep 30, 2024
2 parents 20de63f + 0fc148c commit 90f75a4
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 85 deletions.
1 change: 1 addition & 0 deletions app/src/codeunit/ConferenceJnlCheckLine.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ codeunit 50000 "Conference Jnl.-Check Line ASD"
ConferenceASD.TestField(ConferenceLocation);
ConferenceASD.TestField(DocumentDate);
ConferenceASD.TestField(PostingDate);
ConferenceASD.TestField("VAT Bus. Posting Group");
CheckPostingDate(ConferenceASD.PostingDate);
CheckDocumentDate(ConferenceASD.DocumentDate);
case ConferenceLineASD.type of
Expand Down
109 changes: 64 additions & 45 deletions app/src/codeunit/ConferenceJnlPostLine.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"
ConferenceRegister: Record "Conference Register ASD";
ResourceRegister: Record "Resource Register";
ResJnlLine: Record "Res. Journal Line";
ItemJournalLine: Record "Item Journal Line";
ResourceLedgerEntry: Record "Res. Ledger Entry";
ConferenceJnlCheckLineASD: Codeunit "Conference Jnl.-Check Line ASD";
NextEntryNo: Integer;
Expand All @@ -31,54 +32,54 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"

PostConferenceLocationToJournal(ConferenceASD, ConferenceLineASD);
ConferenceJnlCheckLineASD.DoCheckConferenceLocation(ConferenceLocationASD);
PostConferenceLocationJournal(ConferenceJournalASD);
PostConferenceLocationJournal();
end;
end;

local procedure Code(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
local procedure Code(ConferenceASD: Record "Conference ASD"; LocalConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceJnlCheckLineASD.DoCheckConferenceDoc(ConferenceASD, ConferenceLineASD);
PostConferenceDocToJournal(ConferenceASD, ConferenceLineASD);
PostConferenceJournal(ConferenceJournalASD);
ConferenceJnlCheckLineASD.DoCheckConferenceDoc(ConferenceASD, LocalConferenceLineASD);
PostConferenceDocToJournal(ConferenceASD, LocalConferenceLineASD);
PostConferenceJournal();


if ConferenceLineASD.type = ConferenceLineASD.type::Resource then begin
PostResourceToJournal(ConferenceASD, ConferenceLineASD);
PostResourceJournal(ResJnlLine);
if LocalConferenceLineASD.type = LocalConferenceLineASD.type::Resource then begin
PostResourceToJournal(ConferenceASD, LocalConferenceLineASD);
PostResourceJournal();
end;

/*if ConferenceLineASD.type = ConferenceLineASD.type::Item then begin
PostItemJournal(ConferenceJournalASD);
Message('Item Journal Posted');
end;*/
if LocalConferenceLineASD.type = LocalConferenceLineASD.type::Item then begin
PostItemToJournal(ConferenceASD, LocalConferenceLineASD);
PostItemJournal();
end;
end;

local procedure PostConferenceDocToJournal(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
local procedure PostConferenceDocToJournal(ConferenceASD: Record "Conference ASD"; LocalConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceJournalASD.Description := ConferenceLineASD.Description;
ConferenceJournalASD.Description := LocalConferenceLineASD.Description;
ConferenceJournalASD."Document Date" := ConferenceASD.DocumentDate;
ConferenceJournalASD."Posting Date" := ConferenceASD.PostingDate;
ConferenceJournalASD."Entry Type" := ConferenceLineASD.type;
ConferenceJournalASD."Entry Type" := LocalConferenceLineASD.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.No := LocalConferenceLineASD."No.";
ConferenceJournalASD.Description := LocalConferenceLineASD.Description;
ConferenceJournalASD.Quantity := LocalConferenceLineASD.Quantity;
ConferenceJournalASD."Unit of Measure Code" := LocalConferenceLineASD."Unit of Measure Code";
ConferenceJournalASD."Unit Price" := LocalConferenceLineASD."Unit Price";
ConferenceJournalASD."Total Price" := LocalConferenceLineASD.Amount;
ConferenceJournalASD."Source Code" := ConferenceASD."Source Code";
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";
ConferenceJournalASD."Gen. Prod. Posting Group" := LocalConferenceLineASD."Gen. Prod. Posting Group";
ConferenceJournalASD."Gen. Bus. Posting Group" := LocalConferenceLineASD."Gen. Bus. Posting Group";
ConferenceJournalASD."VAT Prod. Posting Group" := LocalConferenceLineASD."VAT Prod. Posting Group";
end;

local procedure PostConferenceLocationToJournal(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
local procedure PostConferenceLocationToJournal(ConferenceASD: Record "Conference ASD"; LocalConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceLocationASD.Get(ConferenceASD.ConferenceLocation);

ConferenceJournalASD."Posting Date" := ConferenceASD.PostingDate;
ConferenceJournalASD."Entry Type" := ConferenceLineASD.type::Location;
ConferenceJournalASD."Entry Type" := LocalConferenceLineASD.type::Location;
ConferenceJournalASD."Document No." := ConferenceASD.DocumentNo;
ConferenceJournalASD."Unit of Measure Code" := ConferenceLocationASD."Base Unit of Measure";
ConferenceJournalASD.No := ConferenceLocationASD."No.";
Expand All @@ -88,36 +89,54 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"
ConferenceJournalASD."VAT Prod. Posting Group" := ConferenceLocationASD."VAT Prod. Posting Group";
end;

local procedure PostResourceToJournal(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
local procedure PostResourceToJournal(ConferenceASD: Record "Conference ASD"; LocalConferenceLineASD: Record "Conference Line ASD")
var
Resource: Record Resource;
begin
Resource.Get(ConferenceLineASD."No.");
Resource.Get(LocalConferenceLineASD."No.");
ResJnlLine."Entry Type" := ResJnlLine."Entry Type"::Usage;
ResJnlLine."Document No." := ConferenceASD.DocumentNo;
ResJnlLine."Resource No." := Resource."No.";
ResJnlLine."Posting Date" := ConferenceASD.PostingDate;
//ResJnlLine."Reason Code" := ConferenceLineASD.re;
ResJnlLine.Description := ConferenceLineASD.Description;
ResJnlLine."Gen. Prod. Posting Group" := ConferenceLineASD."Gen. Prod. Posting Group";
ResJnlLine."Gen. Bus. Posting Group" := ConferenceLineASD."Gen. Bus. Posting Group";
ResJnlLine."Source Code" := ConferenceLineASD."Source Code";
ResJnlLine.Description := LocalConferenceLineASD.Description;
ResJnlLine."Gen. Prod. Posting Group" := LocalConferenceLineASD."Gen. Prod. Posting Group";
ResJnlLine."Gen. Bus. Posting Group" := LocalConferenceLineASD."Gen. Bus. Posting Group";
ResJnlLine."Source Code" := LocalConferenceLineASD."Source Code";
ResJnlLine."Resource No." := Resource."No.";
ResJnlLine."Unit Price" := Resource."Unit Price";
ResjnlLine."Total Price" := ConferenceLineASD.Amount;
ResjnlLine."Total Price" := LocalConferenceLineASD.Amount;
ResJnlLine."Unit of Measure Code" := Resource."Base Unit of Measure";
ResJnlLine."Unit Cost" := Resource."Unit Cost";
ResJnlLine."Qty. per Unit of Measure" := 1;
ResJnlLine."Document Date" := ConferenceASD.DocumentDate;
//ResJnlLine."Posting No. Series" := ;
ResJnlLine.Quantity := ConferenceLineASD.Quantity;
ResJnlLine.Quantity := LocalConferenceLineASD.Quantity;
ResJnlLine."Total Cost" := ResJnlLine."Unit Cost" * ResJnlLine.Quantity;
//ResJnlLine."Shortcut Dimension 1 Code" := ResJnlLine."Shortcut Dimension 1 Code";
//ResJnlLine."Shortcut Dimension 2 Code" := ResJnlLine."Shortcut Dimension 2 Code";
//ResJnlLine."Dimension Set ID" := ResJnlLine."Dimension Set ID";
end;

local procedure PostConferenceJournal(ConferenceJournalASD: Record "Conference Journal ASD")
local procedure PostItemToJournal(ConferenceASD: Record "Conference ASD"; LocalConferenceLineASD: Record "Conference Line ASD")
var
Item: Record Item;
begin
Item.Get(ConferenceLineASD."No.");
ItemJournalLine."Entry Type" := ItemJournalLine."Entry Type"::Sale;
ItemJournalLine."Document Type" := ItemJournalLine."Document Type"::Conference;
ItemJournalLine."Document No." := ConferenceASD.DocumentNo;
ItemJournalLine."Item No." := Item."No.";
ItemJournalLine."Posting Date" := ConferenceASD.PostingDate;
ItemJournalLine.Description := LocalConferenceLineASD.Description;
ItemJournalLine."Gen. Prod. Posting Group" := LocalConferenceLineASD."Gen. Prod. Posting Group";
ItemJournalLine."Gen. Bus. Posting Group" := LocalConferenceLineASD."Gen. Bus. Posting Group";
ItemJournalLine."Source Code" := LocalConferenceLineASD."Source Code";
ItemJournalLine."Unit Cost (Calculated)" := Item."Unit Price";
ItemJournalLine."Unit of Measure Code" := Item."Base Unit of Measure";
ItemJournalLine."Unit Cost" := Item."Unit Cost";
ItemJournalLine."Qty. per Unit of Measure" := 1;
ItemJournalLine."Document Date" := ConferenceASD.DocumentDate;
ItemJournalLine.Quantity := LocalConferenceLineASD.Quantity;
ItemJournalLine."Quantity (Base)" := LocalConferenceLineASD.Quantity;
ItemJournalLine."Item Shpt. Entry No." := 0;
end;

local procedure PostConferenceJournal()
var
ConferenceLedgerEntryASD: Record "Conference Ledger Entry ASD";
begin
Expand Down Expand Up @@ -155,7 +174,7 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"
NextEntryNo := NextEntryNo + 1;
end;

local procedure PostConferenceLocationJournal(ConferenceJournalASD: Record "Conference Journal ASD")
local procedure PostConferenceLocationJournal()
var
ConferenceLedgerEntryASD: Record "Conference Ledger Entry ASD";
begin
Expand Down Expand Up @@ -193,17 +212,17 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"
NextEntryNo := NextEntryNo + 1;
end;

local procedure PostResourceJournal(ResourceJournalASD: Record "Res. Journal Line")
local procedure PostResourceJournal()
var
ResJnlPostLine: Codeunit "Res. Jnl.-Post Line";
begin
ResJnlPostLine.RunWithCheck(ResJnlLine);
end;

local procedure PostItemJournal(ItemJournalASD: Record "Item Journal Line")
local procedure PostItemJournal()
var
ItemJnlPostLine: Codeunit "Item Jnl.-Post Line";
begin
ItemJnlPostLine.RunWithCheck(ItemJournalASD);
ItemJnlPostLine.RunWithCheck(ItemJournalLine);
end;
}
7 changes: 7 additions & 0 deletions app/src/enumextension/ItemLedgerDocumentype.EnumExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enumextension 50002 "ItemLedgerDocumentype ASD" extends "Item Ledger Document Type"
{
value(22; Conference)
{
Caption = 'Conference';
}
}
36 changes: 13 additions & 23 deletions app/src/page/ConferenceManagerRC.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ page 50019 "Conference Manager RC ASD"
{
action(ConferenceRegistration)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Conference';
Image = NewTimesheet;
RunObject = Page "Conference Card ASD";
Expand All @@ -56,50 +56,50 @@ page 50019 "Conference Manager RC ASD"
{
action(ConferenceRegistrations)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Conference';
RunObject = Page "Conference List ASD";
}
action(PostedConferenceRegistrations1)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Posted Conference';
RunObject = Page "Posted Conference List ASD";
}
action(Locations)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Conference Locations';
RunObject = Page "Conference Location List ASD";
}
action(ConferenceLedger)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Conference Ledger Entries';
RunObject = Page "Conference Ledger Entries ASD";
}
action(ConferenceSetup)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Conference Setup';
RunObject = Page "Conference Setup ASD";
}
action(Customers)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Customers';
RunObject = Page "Customer List";
}
action(Item)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Item';
RunObject = Page "Item List";
}
action(Resources)
{
ApplicationArea = Basic;
Caption = 'Resource';
ApplicationArea = Basic, Suite;
Caption = 'Resources';
RunObject = Page "Resource List";
}
}
Expand All @@ -111,13 +111,13 @@ page 50019 "Conference Manager RC ASD"
Image = RegisteredDocs;
action(PostedConferenceRegistrations)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Posted Conference Registrations';
RunObject = Page "Posted Conference List ASD";
}
action(Registers)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Registers';
RunObject = Page "Conference List ASD";
}
Expand All @@ -127,21 +127,11 @@ page 50019 "Conference Manager RC ASD"
{
action(Navigate)
{
ApplicationArea = Basic;
ApplicationArea = Basic, Suite;
Caption = 'Navigate';
Image = Navigate;
RunObject = Page Navigate;
}
}
area(Reporting)
{
// action(ParticipantList)
// {
// ApplicationArea = Basic;
// Caption = 'Participant List';
// Image = "Report";
// RunObject = Report "Conference Reg.-Participant List";
// }
}
}
}
16 changes: 0 additions & 16 deletions app/src/page/ConferenceRCHeadlines.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,6 @@ page 50018 "Conference RC Headlines ASD"
}
}

actions
{
area(Processing)
{
action(ActionName)
{
ApplicationArea = All;

trigger OnAction()
begin

end;
}
}
}

var
DefaultfieldsVisible: Boolean;
UserGreetingVisible: boolean;
Expand Down
2 changes: 1 addition & 1 deletion app/src/page/Conferencelocationlist.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ page 50000 "Conference Location List ASD"
field("No."; Rec."No.")
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the No. field.', Comment = '%';
}
field(Name; Rec.Name)
{
Expand Down Expand Up @@ -63,7 +64,6 @@ page 50000 "Conference Location List ASD"
{
Caption = 'Category_Process';
actionref(Create_Promoted; CreateConferenceDocument) { }

}
}
}
Expand Down
15 changes: 15 additions & 0 deletions app/src/table/Conference.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ table 50002 "Conference ASD"
if ConferenceLocation <> '' then begin
ConferenceLocationASD.Get(ConferenceLocation);
"Unit Price" := ConferenceLocationASD."Unit Price";
end
else begin
"Total Price" := 0;
"Unit Price" := 0;
end;

end;
Expand All @@ -47,6 +51,17 @@ table 50002 "Conference ASD"
{
Caption = 'Conference Date';
Tooltip = 'Specifies the value of the Starting Date field';

trigger OnValidate()
begin
if StartingDate = 0D then begin
EndingDate := 0D;
StartingTime := 0T;
EndingTime := 0T;
Duration := 0;
NoAttendees := 0;
end;
end;
}
field(5; EndingDate; Date)
{
Expand Down

0 comments on commit 90f75a4

Please sign in to comment.