Page 5633 FA Journal Batches

Base Application, Microsoft.FixedAssets.Journal

src/Layers/W1/BaseApp/FixedAssets/FixedAsset/FAJournalBatches.Page.al186 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.FixedAssets.Journal;using Microsoft.FixedAssets.Posting;using Microsoft.Foundation.Reporting;page 5633 "FA Journal Batches"{    Caption = 'FA Journal Batches';    DataCaptionExpression = DataCaption();    Editable = true;    PageType = List;    RefreshOnActivate = true;    SourceTable = "FA Journal Batch";    AnalysisModeEnabled = false;    AboutTitle = 'About FA Journal Batches';    AboutText = 'With the **FA journal batches** you can setup multiple journal batches, which are individual journals for each journal template.';    layout    {        area(content)        {            repeater(Control1)            {                ShowCaption = false;                field(Name; Rec.Name)                {                    ApplicationArea = FixedAssets;                    AboutTitle = 'Manage name and No. Series';                    AboutText = 'Specify the batch name and no. series to be used.';                }                field(Description; Rec.Description)                {                    ApplicationArea = FixedAssets;                }                field("No. Series"; Rec."No. Series")                {                    ApplicationArea = FixedAssets;                }                field("Posting No. Series"; Rec."Posting No. Series")                {                    ApplicationArea = FixedAssets;                    Visible = true;                }                field("Reason Code"; Rec."Reason Code")                {                    ApplicationArea = FixedAssets;                    Visible = true;                }                field("No. of Lines"; Rec."No. of Lines")                {                    ApplicationArea = FixedAssets;                    ToolTip = 'Specifies the number of lines in this journal batch.';                    Visible = false;                }            }        }        area(factboxes)        {            systempart(Control1900383207; Links)            {                ApplicationArea = RecordLinks;                Visible = false;            }            systempart(Control1905767507; Notes)            {                ApplicationArea = Notes;                Visible = false;            }        }    }    actions    {        area(processing)        {            action("Edit Journal")            {                ApplicationArea = FixedAssets;                Caption = 'Edit Journal';                Image = OpenJournal;                ShortCutKey = 'Return';                ToolTip = 'Open a journal based on the journal batch.';                trigger OnAction()                begin                    FAJnlMgt.TemplateSelectionFromBatch(Rec);                end;            }            group("P&osting")            {                Caption = 'P&osting';                Image = Post;                action("Test Report")                {                    ApplicationArea = FixedAssets;                    Caption = 'Test Report';                    Ellipsis = true;                    Image = TestReport;                    ToolTip = 'View a test report so that you can find and correct any errors before you perform the actual posting of the journal or document.';                    trigger OnAction()                    begin                        ReportPrint.PrintFAJnlBatch(Rec);                    end;                }                action("P&ost")                {                    ApplicationArea = FixedAssets;                    Caption = 'P&ost';                    Image = PostOrder;                    RunObject = Codeunit "FA. Jnl.-B.Post";                    ShortCutKey = 'F9';                    ToolTip = 'Finalize the document or journal by posting the amounts and quantities to the related accounts in your company books.';                }                action("Post and &Print")                {                    ApplicationArea = FixedAssets;                    Caption = 'Post and &Print';                    Image = PostPrint;                    RunObject = Codeunit "FA. Jnl.-B.Post+Print";                    ShortCutKey = 'Shift+F9';                    ToolTip = 'Finalize and prepare to print the document or journal. The values and quantities are posted to the related accounts. A report request window where you can specify what to include on the print-out.';                }            }        }        area(Promoted)        {            group(Category_Process)            {                Caption = 'Process';                actionref("Edit Journal_Promoted"; "Edit Journal")                {                }                group(Category_Posting)                {                    Caption = 'Posting';                    ShowAs = SplitButton;                    actionref("P&ost_Promoted"; "P&ost")                    {                    }                    actionref("Post and &Print_Promoted"; "Post and &Print")                    {                    }                }            }        }    }    trigger OnInit()    begin        Rec.SetRange("Journal Template Name");    end;    trigger OnNewRecord(BelowxRec: Boolean)    begin        Rec.SetupNewBatch();    end;    trigger OnOpenPage()    begin        FAJnlMgt.OpenJnlBatch(Rec);    end;    var        ReportPrint: Codeunit "Test Report-Print";        FAJnlMgt: Codeunit FAJnlManagement;    local procedure DataCaption(): Text[250]    var        FAJnlTemplate: Record "FA Journal Template";    begin        if not CurrPage.LookupMode then            if Rec.GetFilter("Journal Template Name") <> '' then                if Rec.GetRangeMin("Journal Template Name") = Rec.GetRangeMax("Journal Template Name") then                    if FAJnlTemplate.Get(Rec.GetRangeMin("Journal Template Name")) then                        exit(FAJnlTemplate.Name + ' ' + FAJnlTemplate.Description);    end;}