Skip to content

Commit

Permalink
Merge pull request #49 from fluxxus-nl/finalAdjustmentsBeforeTestingV2
Browse files Browse the repository at this point in the history
final Adjustments from Cassio
  • Loading branch information
lvanvugt authored Sep 27, 2024
2 parents 7b08ff5 + 41267f8 commit 20de63f
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 67 deletions.
2 changes: 2 additions & 0 deletions app/src/codeunit/ConferenceJnlPostLine.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ codeunit 50001 "Conference Jnl.-Post Line ASD"
ResJnlLine."Gen. Bus. Posting Group" := ConferenceLineASD."Gen. Bus. Posting Group";
ResJnlLine."Source Code" := ConferenceLineASD."Source Code";
ResJnlLine."Resource No." := Resource."No.";
ResJnlLine."Unit Price" := Resource."Unit Price";
ResjnlLine."Total Price" := ConferenceLineASD.Amount;
ResJnlLine."Unit of Measure Code" := Resource."Base Unit of Measure";
ResJnlLine."Unit Cost" := Resource."Unit Cost";
ResJnlLine."Qty. per Unit of Measure" := 1;
Expand Down
4 changes: 2 additions & 2 deletions app/src/page/ConferenceLedgerEntries.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ page 50020 "Conference Ledger Entries ASD"
{
ToolTip = 'Specifies the value of the Gen. Bus. Posting Group field.';
}
/*field("VAT. Bus. Posting Group"; Rec."VAT. Bus. Posting Group")
field("VAT. Bus. Posting Group"; Rec."VAT. Bus. Posting Group")
{
ToolTip = 'Specifies the value of the VAT. Bus. Posting Group field.';
}*/
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions app/src/page/ConferenceList.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ page 50004 "Conference List ASD"
{
area(Processing)
{
/*action(Statistics)
action(Statistics)
{
Caption = 'Statistics';
ToolTip = 'View Statistical Information';
image = Statistics;
RunObject = Page "Conference Statistics ASD";
RunPageLink = DocumentNo = field(DocumentNo), DocumentDate = field(DocumentDate);
ShortcutKey = 'f7';
}*/
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process';
//actionref(Statistics_Promoted; Statistics) { }
actionref(Statistics_Promoted; Statistics) { }
}
}
}
Expand Down
104 changes: 44 additions & 60 deletions app/src/page/ConferenceStatistics.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ page 50021 "Conference Statistics ASD"
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Conference Location ASD";
SourceTable = "Conference ASD";
Editable = false;
LinksAllowed = false;

Expand All @@ -15,143 +15,127 @@ page 50021 "Conference Statistics ASD"
group(ThisPeriod)
{
caption = 'This Period';
field(ConferenceDateName1; ConferenceDateName[1])
field(conferenceDateName1; conferenceDateName[1])
{
ApplicationArea = All;
ShowCaption = false;
}
field("Number of Atendees[1]"; TotalAmount[1])
field("TotalPrice[1]"; TotalPrice[1])
{
Caption = 'Number of Ateendes';
Caption = 'Total Price';
ApplicationArea = All;
}
field("Number of Locations[1]"; NumberofParticipants[1])
field("TotalPriceNotChargeable[1]"; TotalPriceNotChargeable[1])
{
Caption = 'Number of Locations';
Caption = 'Total Price (Not Chargeable)';
ApplicationArea = All;
}
field("Total Amount[1]"; NumberofParticipants[1])
field("TotalPriceChargeable[1]"; TotalPriceChargeable[1])
{
Caption = 'Total Amount';
Caption = 'Total Price (Chargeable)';
ApplicationArea = All;
}
}
group(ThisYear)
{
caption = 'This Year';
field(ConferenceDateName2; ConferenceDateName[2])
field(conferenceDateName2; conferenceDateName[2])
{
ApplicationArea = All;
ShowCaption = false;
}
field("Number of Atendees[2]"; TotalAmount[2])
field("TotalPrice[2]"; TotalPrice[2])
{
Caption = 'Number of Ateendes';
Caption = 'Total Price';
ApplicationArea = All;
}
field("Number of Locations[2]"; NumberofParticipants[2])
field("TotalPriceNotChargeable[2]"; TotalPriceNotChargeable[2])
{
Caption = 'Number of Locations';
Caption = 'Total Price (Not Chargeable)';
ApplicationArea = All;
}
field("Total Amount[2]"; NumberofParticipants[2])
field("TotalPriceChargeable[2]"; TotalPriceChargeable[2])
{
Caption = 'Total Amount';
Caption = 'Total Price (Chargeable)';
ApplicationArea = All;
}
}
group(ThisLastYear)
{
caption = 'This Last Year';
field(ConferenceDateName3; ConferenceDateName[3])
field(conferenceDateName3; conferenceDateName[3])
{
ApplicationArea = All;
ShowCaption = false;
}
field("Number of Atendees[3]"; TotalAmount[3])
field("TotalPrice[3]"; TotalPrice[3])
{
Caption = 'Number of Ateendes';
Caption = 'Total Price';
ApplicationArea = All;
}
field("Number of Locations[3]"; NumberofParticipants[3])
field("TotalPriceNotChargeable[3]"; TotalPriceNotChargeable[3])
{
Caption = 'Number of Locations';
Caption = 'Total Price (Not Chargeable)';
ApplicationArea = All;
}
field("Total Amount[3]"; NumberofParticipants[3])
field("TotalPriceChargeable[3]"; TotalPriceChargeable[3])
{
Caption = 'Total Amount';
Caption = 'Total Price (Chargeable)';
ApplicationArea = All;
}
}
group(Todate)
{
caption = 'To Date';
field(ConferenceDateName4; ConferenceDateName[4])
field(conferenceDateName4; conferenceDateName[4])
{
ApplicationArea = All;
ShowCaption = false;
}
field("Number of Atendees[4]"; TotalAmount[4])
field("TotalPrice[4]"; TotalPrice[4])
{
Caption = 'Number of Ateendes';
Caption = 'Total Price';
ApplicationArea = All;
}
field("Number of Locations[4]"; NumberofParticipants[4])
field("TotalPriceNotChargeable[4]"; TotalPriceNotChargeable[4])
{
Caption = 'Number of Locations';
Caption = 'Total Price (Not Chargeable)';
ApplicationArea = All;
}
field("Total Amount[4]"; NumberofParticipants[4])
field("TotalPriceChargeable[4]"; TotalPriceChargeable[4])
{
Caption = 'Total Amount';
Caption = 'Total Price (Chargeable)';
ApplicationArea = All;
}
}
}
}

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

trigger OnAction()
begin

end;
}
}
}
trigger OnAfterGetRecord()
begin
Rec.SetRange("No.", rec."No.");
Rec.SetRange(DocumentDate, Rec.DocumentDate);
if CurrentDate <> WorkDate() then begin
CurrentDate := WorkDate();
DateFilterCalc.CreateAccountingPeriodFilter(ConferenceDateFilter[1], ConferenceDateName[1], CurrentDate, 0);
DateFilterCalc.CreateFiscalYearFilter(ConferenceDateFilter[2], ConferenceDateName[2], CurrentDate, 0);
DateFilterCalc.CreateFiscalYearFilter(ConferenceDateFilter[3], ConferenceDateName[3], CurrentDate, -1);
DateFilterCalc.CreateAccountingPeriodFilter(conferenceDateFilter[1], conferenceDateName[1], CurrentDate, 0);
DateFilterCalc.CreateFiscalYearFilter(conferenceDateFilter[2], conferenceDateName[2], CurrentDate, 0);
DateFilterCalc.CreateFiscalYearFilter(conferenceDateFilter[3], conferenceDateName[3], CurrentDate, -1);
end;
for i := 1 to 4 do begin
Rec.SetFilter("Document Date", ConferenceDateFilter[i]);
Rec.CalcFields("Total Amount", "Number of Participants", "Number of Locations");
TotalAmount[i] := Rec."Total Amount";
NumberofLocations[i] := Rec."Number of Locations";
NumberofParticipants[i] := rec."Number of Participants";
Rec.SetFilter(DocumentDate, conferenceDateFilter[i]);
Rec.CalcFields("Total Price", "Unit Price");
TotalPrice[i] := Rec."Total Price";
TotalPriceNotChargeable[i] := Rec."Unit Price";
end;
Rec.SetRange("Document Date", 0D, CurrentDate);
Rec.SetRange(DocumentDate, 0D, CurrentDate);
end;

var
DatefilterCalc: Codeunit "DateFilter-Calc";
CurrentDate: Date;
NumberofLocations: array[4] of Decimal;
NumberofParticipants: array[4] of Decimal;
TotalAmount: array[4] of Decimal;
TotalPrice: array[4] of Decimal;
TotalPriceChargeable: array[4] of Decimal;
TotalPriceNotChargeable: array[4] of Decimal;
i: integer;
ConferenceDateFilter: array[4] of text[30];
ConferenceDateName: array[4] of text[30];
}
conferenceDateFilter: array[4] of text[30];
conferenceDateName: array[4] of text[30];
}
2 changes: 1 addition & 1 deletion app/src/table/Conference.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ table 50002 "Conference ASD"
Customer: record Customer;
begin
if Rec.Customer <> '' then begin
Customer.Get(Customer);
Customer.Get(Rec.Customer);
Rec.CustomerName := Customer.Name;
Rec."VAT Bus. Posting Group" := Customer."VAT Bus. Posting Group";
Rec."Gen. Bus. Posting Group" := Customer."Gen. Bus. Posting Group";
Expand Down
7 changes: 6 additions & 1 deletion app/src/table/ConferenceLedgerEntry.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,16 @@ table 50010 "Conference Ledger Entry ASD"
{
Caption = 'Quantity';
}
field(31; "VAT. Bus. Posting Group"; Code[20])
{
Caption = 'VAT Bus. Posting Group';
TableRelation = "VAT Business Posting Group";
}
}

keys
{
key(PK1; "Entry No.", "Document No.")
key(PK1; "Entry No.", "Document No.", Description, "Posting Date")
{
Clustered = true;
}
Expand Down

0 comments on commit 20de63f

Please sign in to comment.