Page 165 Bank Acc. Ledg. Entr. Preview, source in 29
Source29
src/Layers/W1/BaseApp/Bank/Ledger/BankAccLedgEntrPreview.Page.al291 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.Bank.Ledger;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Preview;
using System.Security.User;
/// <summary>
/// Preview page for bank account ledger entries before posting transactions.
/// Displays temporary bank account ledger entries to show the expected results of posting operations
/// without committing the data to the database, used in posting preview functionality.
/// </summary>
page 165 "Bank Acc. Ledg. Entr. Preview"
{
Caption = 'Bank Acc. Ledg. Entr. Preview';
DataCaptionFields = "Bank Account No.";
Editable = false;
PageType = List;
SourceTable = "Bank Account Ledger Entry";
SourceTableTemporary = true;
layout
{
area(content)
{
repeater(Control1)
{
ShowCaption = false;
field("Posting Date"; Rec."Posting Date")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the entry''s Posting Date.';
}
field("Document Type"; Rec."Document Type")
{
ApplicationArea = Basic, Suite;
}
field("Document No."; Rec."Document No.")
{
ApplicationArea = Basic, Suite;
}
field("Bank Account No."; Rec."Bank Account No.")
{
ApplicationArea = Basic, Suite;
}
field(Description; Rec.Description)
{
ApplicationArea = Basic, Suite;
}
field("Global Dimension 1 Code"; Rec."Global Dimension 1 Code")
{
ApplicationArea = Dimensions;
Visible = Dim1Visible;
}
field("Global Dimension 2 Code"; Rec."Global Dimension 2 Code")
{
ApplicationArea = Dimensions;
Visible = Dim2Visible;
}
field("Our Contact Code"; Rec."Our Contact Code")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Currency Code"; Rec."Currency Code")
{
ApplicationArea = Suite;
ToolTip = 'Specifies the currency code used in the entry.';
Visible = false;
}
field(Amount; Rec.Amount)
{
ApplicationArea = Basic, Suite;
}
field("Amount (LCY)"; Rec."Amount (LCY)")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the amount of the entry in LCY.';
Visible = false;
}
field("Debit Amount"; Rec."Debit Amount")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
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 = false;
}
field("Credit Amount"; Rec."Credit Amount")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
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 = false;
}
field("Remaining Amount"; Rec."Remaining Amount")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the amount that remains to be applied to if the entry has not been completely applied to.';
Visible = false;
}
field("Bal. Account Type"; Rec."Bal. Account Type")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Bal. Account No."; Rec."Bal. Account No.")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field(Open; Rec.Open)
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies whether the amount on the bank account entry has been fully applied to or if there is still a remaining amount that must be applied to.';
}
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(Reversed; Rec.Reversed)
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Reversed by Entry No."; Rec."Reversed by Entry No.")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Reversed Entry No."; Rec."Reversed Entry No.")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
field("Dimension Set ID"; Rec."Dimension Set ID")
{
ApplicationArea = Dimensions;
Visible = false;
}
field("Shortcut Dimension 3 Code"; Rec."Shortcut Dimension 3 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim3Visible;
}
field("Shortcut Dimension 4 Code"; Rec."Shortcut Dimension 4 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim4Visible;
}
field("Shortcut Dimension 5 Code"; Rec."Shortcut Dimension 5 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim5Visible;
}
field("Shortcut Dimension 6 Code"; Rec."Shortcut Dimension 6 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim6Visible;
}
field("Shortcut Dimension 7 Code"; Rec."Shortcut Dimension 7 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim7Visible;
}
field("Shortcut Dimension 8 Code"; Rec."Shortcut Dimension 8 Code")
{
ApplicationArea = Dimensions;
Editable = false;
Visible = Dim8Visible;
}
}
}
}
actions
{
area(navigation)
{
group("Ent&ry")
{
Caption = 'Ent&ry';
Image = Entry;
action(Dimensions)
{
AccessByPermission = TableData Dimension = R;
ApplicationArea = Dimensions;
Caption = 'Dimensions';
Ellipsis = true;
Image = Dimensions;
ShortCutKey = 'Alt+D';
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';
trigger OnAction()
var
GenJnlPostPreview: Codeunit "Gen. Jnl.-Post Preview";
begin
GenJnlPostPreview.ShowDimensions(DATABASE::"Bank Account Ledger Entry", Rec."Entry No.", Rec."Dimension Set ID");
end;
}
action(SetDimensionFilter)
{
ApplicationArea = Dimensions;
Caption = 'Set Dimension Filter';
Ellipsis = true;
Image = "Filter";
ToolTip = 'Limit the entries according to the dimension filters that you specify. NOTE: If you use a high number of dimension combinations, this function may not work and can result in a message that the SQL server only supports a maximum of 2100 parameters.';
trigger OnAction()
begin
Rec.SetFilter("Dimension Set ID", DimensionSetIDFilter.LookupFilter());
end;
}
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process';
actionref(Dimensions_Promoted; Dimensions)
{
}
actionref(SetDimensionFilter_Promoted; SetDimensionFilter)
{
}
}
}
}
trigger OnOpenPage()
begin
SetDimVisibility();
end;
var
DimensionSetIDFilter: Page "Dimension Set ID Filter";
protected var
Dim1Visible: Boolean;
Dim2Visible: Boolean;
Dim3Visible: Boolean;
Dim4Visible: Boolean;
Dim5Visible: Boolean;
Dim6Visible: Boolean;
Dim7Visible: Boolean;
Dim8Visible: Boolean;
local procedure SetDimVisibility()
var
DimensionManagement: Codeunit DimensionManagement;
begin
DimensionManagement.UseShortcutDims(Dim1Visible, Dim2Visible, Dim3Visible, Dim4Visible, Dim5Visible, Dim6Visible, Dim7Visible, Dim8Visible);
end;
}