Page 574 Detailed Vendor Ledg. Entries

Base Application, Microsoft.Purchases.Payables

src/Layers/W1/BaseApp/Purchases/Payables/DetailedVendorLedgEntries.Page.al256 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.Purchases.Payables;using Microsoft.Finance.GeneralLedger.Setup;using Microsoft.Foundation.Navigate;using System.Security.User;page 574 "Detailed Vendor Ledg. Entries"{    AdditionalSearchTerms = 'purchase transaction,payment';    ApplicationArea = Basic, Suite;    Caption = 'Detailed Vendor Ledger Entries';    DataCaptionFields = "Vendor Ledger Entry No.", "Vendor No.";    Editable = false;    InsertAllowed = false;    PageType = List;    AboutTitle = 'About Detailed Vendor Ledger Entries';    AboutText = 'Review, analyze, and reconcile individual vendor transactions, including invoices, payments, credits, and adjustments, to ensure accurate accounts payable records and support audit and month-end closing activities.';    SourceTable = "Detailed Vendor Ledg. Entry";    UsageCategory = History;    layout    {        area(content)        {            repeater(Control1)            {                ShowCaption = false;                field("Posting Date"; Rec."Posting Date")                {                    ApplicationArea = Basic, Suite;                }                field("Entry Type"; Rec."Entry Type")                {                    ApplicationArea = Basic, Suite;                }                field("Document Type"; Rec."Document Type")                {                    ApplicationArea = Basic, Suite;                }                field("Document No."; Rec."Document No.")                {                    ApplicationArea = Basic, Suite;                }                field("Vendor No."; Rec."Vendor No.")                {                    ApplicationArea = Basic, Suite;                }                field("Initial Entry Global Dim. 1"; Rec."Initial Entry Global Dim. 1")                {                    ApplicationArea = Dimensions;                    Visible = false;                }                field("Initial Entry Global Dim. 2"; Rec."Initial Entry Global Dim. 2")                {                    ApplicationArea = Dimensions;                    Visible = false;                }                field("Posting Group"; Rec."Posting Group")                {                    ApplicationArea = Basic, Suite;                    Visible = false;                }                field("Currency Code"; Rec."Currency Code")                {                    ApplicationArea = Suite;                }                field(Amount; Rec.Amount)                {                    ApplicationArea = Basic, Suite;                    Editable = false;                    Visible = AmountVisible;                }                field("Amount (LCY)"; Rec."Amount (LCY)")                {                    ApplicationArea = Basic, Suite;                    ToolTip = 'Specifies the amount of the entry in LCY.';                    Visible = AmountVisible;                }                field("Debit Amount"; Rec."Debit Amount")                {                    ApplicationArea = Basic, Suite;                    Visible = DebitCreditVisible;                }                field("Debit Amount (LCY)"; Rec."Debit Amount (LCY)")                {                    ApplicationArea = Basic, Suite;                    ToolTip = 'Specifies the total of the ledger entries that represent debits, expressed in LCY.';                    Visible = DebitCreditVisible;                }                field("Credit Amount"; Rec."Credit Amount")                {                    ApplicationArea = Basic, Suite;                    Visible = DebitCreditVisible;                }                field("Credit Amount (LCY)"; Rec."Credit Amount (LCY)")                {                    ApplicationArea = Basic, Suite;                    ToolTip = 'Specifies the total of the ledger entries that represent credits, expressed in LCY.';                    Visible = DebitCreditVisible;                }                field("Initial Entry Due Date"; Rec."Initial Entry Due Date")                {                    ApplicationArea = Basic, Suite;                }                field("User ID"; Rec."User ID")                {                    ApplicationArea = Basic, Suite;                    Visible = false;                    trigger OnDrillDown()                    var                        UserMgt: Codeunit "User Management";                    begin                        UserMgt.DisplayUserInformation(Rec."User ID");                    end;                }                field("Source Code"; Rec."Source Code")                {                    ApplicationArea = Suite;                    Visible = false;                }                field("Reason Code"; Rec."Reason Code")                {                    ApplicationArea = Suite;                    Visible = false;                }                field(Unapplied; Rec.Unapplied)                {                    ApplicationArea = Basic, Suite;                    Visible = false;                }                field("Unapplied by Entry No."; Rec."Unapplied by Entry No.")                {                    ApplicationArea = Basic, Suite;                    Visible = false;                }                field("Vendor Ledger Entry No."; Rec."Vendor Ledger Entry No.")                {                    ApplicationArea = Basic, Suite;                    Visible = false;                }                field("Entry No."; Rec."Entry No.")                {                    ApplicationArea = Basic, Suite;                }            }        }        area(factboxes)        {            systempart(Control1900383207; Links)            {                ApplicationArea = RecordLinks;                Visible = false;            }            systempart(Control1905767507; Notes)            {                ApplicationArea = Notes;                Visible = false;            }        }    }    actions    {        area(processing)        {            group("F&unctions")            {                Caption = 'F&unctions';                Image = "Action";                action("Unapply Entries")                {                    ApplicationArea = Basic, Suite;                    Caption = 'Unapply Entries';                    Ellipsis = true;                    Image = UnApply;                    ToolTip = 'Unselect one or more ledger entries that you want to unapply this record.';                    trigger OnAction()                    var                        VendEntryApplyPostedEntries: Codeunit "VendEntry-Apply Posted Entries";                    begin                        VendEntryApplyPostedEntries.UnApplyDtldVendLedgEntry(Rec);                    end;                }            }            action("&Navigate")            {                ApplicationArea = Basic, Suite;                Caption = 'Find entries...';                Image = Navigate;                ShortCutKey = 'Ctrl+Alt+Q';                ToolTip = 'Find entries and documents that exist for the document number and posting date on the selected document. (Formerly this action was named Navigate.)';                trigger OnAction()                begin                    Navigate.SetDoc(Rec."Posting Date", Rec."Document No.");                    Navigate.Run();                end;            }        }        area(Promoted)        {            group(Category_Process)            {                Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';                actionref("&Navigate_Promoted"; "&Navigate")                {                }                actionref("Unapply Entries_Promoted"; "Unapply Entries")                {                }            }            group(Category_Category4)            {                Caption = 'Entry', Comment = 'Generated from the PromotedActionCategories property index 3.';            }            group(Category_Report)            {                Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';            }        }    }    trigger OnInit()    begin        AmountVisible := true;    end;    trigger OnOpenPage()    begin        SetControlVisibility();    end;    var        Navigate: Page Navigate;        AmountVisible: Boolean;        DebitCreditVisible: Boolean;    local procedure SetControlVisibility()    var        GLSetup: Record "General Ledger Setup";    begin        GLSetup.Get();        AmountVisible := not (GLSetup."Show Amounts" = GLSetup."Show Amounts"::"Debit/Credit Only");        DebitCreditVisible := not (GLSetup."Show Amounts" = GLSetup."Show Amounts"::"Amount Only");    end;}