Page 450 Issued Finance Charge Memo
- App
- Base Application
- Namespace
- Microsoft.Sales.FinanceCharge
- Versions
- 17-28
- Source table
- 304
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Sales/FinanceCharge/IssuedFinanceChargeMemo.Page.al435 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.Sales.FinanceCharge;
using Microsoft.CRM.Contact;
using Microsoft.Finance.Currency;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.VAT.Calculation;
using Microsoft.Sales.Customer;
using Microsoft.Sales.Reports;
/// <summary>
/// Displays a posted finance charge memo document with print, email, navigation, and cancellation actions.
/// </summary>
page 450 "Issued Finance Charge Memo"
{
Caption = 'Issued Finance Charge Memo';
Editable = false;
InsertAllowed = false;
ModifyAllowed = false;
PageType = Document;
SourceTable = "Issued Fin. Charge Memo Header";
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Customer No."; Rec."Customer No.")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field(Name; Rec.Name)
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field(Address; Rec.Address)
{
ApplicationArea = Basic, Suite;
}
field("Address 2"; Rec."Address 2")
{
ApplicationArea = Basic, Suite;
}
field("Post Code"; Rec."Post Code")
{
ApplicationArea = Basic, Suite;
}
field(City; Rec.City)
{
ApplicationArea = Basic, Suite;
}
field(Contact; Rec.Contact)
{
ApplicationArea = Basic, Suite;
}
field(ContactPhoneNo; PrimaryContact."Phone No.")
{
Caption = 'Phone No.';
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the customer contact person the finance charge is for.';
}
field(ContactMobilePhoneNo; PrimaryContact."Mobile Phone No.")
{
Caption = 'Mobile Phone No.';
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the customer contact person the finance charge is for.';
}
field(ContactEmail; PrimaryContact."E-Mail")
{
Caption = 'Email';
ApplicationArea = Basic, Suite;
ExtendedDatatype = EMail;
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the email address of the customer contact person the finance charge is for.';
}
field("Your Reference"; Rec."Your Reference")
{
ApplicationArea = Basic, Suite;
Importance = Additional;
}
field("Posting Date"; Rec."Posting Date")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("VAT Reporting Date"; Rec."VAT Reporting Date")
{
ApplicationArea = VAT;
Editable = false;
Visible = VATDateEnabled;
}
field("Document Date"; Rec."Document Date")
{
ApplicationArea = Basic, Suite;
}
field("Pre-Assigned No."; Rec."Pre-Assigned No.")
{
ApplicationArea = Basic, Suite;
}
field("No. Printed"; Rec."No. Printed")
{
ApplicationArea = Basic, Suite;
}
field(Canceled; Rec.Canceled)
{
ApplicationArea = Basic, Suite;
}
}
part(FinChrgMemoLines; "Issued Fin. Charge Memo Lines")
{
ApplicationArea = Basic, Suite;
SubPageLink = "Finance Charge Memo No." = field("No.");
}
group(Posting)
{
Caption = 'Posting';
field("Fin. Charge Terms Code"; Rec."Fin. Charge Terms Code")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Due Date"; Rec."Due Date")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Currency Code"; Rec."Currency Code")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
trigger OnAssistEdit()
begin
ChangeExchangeRate.SetParameter(
Rec."Currency Code",
CurrExchRate.ExchangeRate(Rec."Posting Date", Rec."Currency Code"),
Rec."Posting Date");
ChangeExchangeRate.Editable(false);
if ChangeExchangeRate.RunModal() = ACTION::OK then;
Clear(ChangeExchangeRate);
end;
}
field("Company Bank Account Code"; Rec."Company Bank Account Code")
{
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code")
{
ApplicationArea = Dimensions;
}
field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code")
{
ApplicationArea = Dimensions;
}
field("Customer Posting Group"; Rec."Customer Posting Group")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the customer''s market type to link business transactions to.';
Visible = false;
}
}
}
area(factboxes)
{
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = false;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
Visible = true;
}
}
}
actions
{
area(navigation)
{
group("&Memo")
{
Caption = '&Memo';
Image = Notes;
action(List)
{
ApplicationArea = Basic, Suite;
Caption = 'List';
Image = OpportunitiesList;
ToolTip = 'View all issued finance charges that exist.';
trigger OnAction()
begin
IssuedFinChrgMemoHeader.Copy(Rec);
if PAGE.RunModal(0, IssuedFinChrgMemoHeader) = ACTION::LookupOK then
Rec := IssuedFinChrgMemoHeader;
end;
}
action("Co&mments")
{
ApplicationArea = Basic, Suite;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Fin. Charge Comment Sheet";
RunPageLink = Type = const("Issued Finance Charge Memo"),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
action("C&ustomer")
{
ApplicationArea = Basic, Suite;
Caption = 'C&ustomer';
Image = Customer;
RunObject = Page "Customer List";
RunPageLink = "No." = field("Customer No.");
ToolTip = 'Open the card of the customer that the reminder or finance charge applies to. ';
}
action(Dimensions)
{
AccessByPermission = TableData Dimension = R;
ApplicationArea = Dimensions;
Caption = 'Dimensions';
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()
begin
Rec.ShowDimensions();
end;
}
separator(Action6)
{
}
action(Statistics)
{
ApplicationArea = Basic, Suite;
Caption = 'Statistics';
Image = Statistics;
RunObject = Page "Issued Fin. Charge Memo Stat.";
RunPageLink = "No." = field("No.");
ShortCutKey = 'F7';
ToolTip = 'View statistical information, such as the value of posted entries, for the record.';
}
}
}
area(processing)
{
action("&Print")
{
ApplicationArea = Basic, Suite;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Prepare to print the document. The report request window for the document opens where you can specify what to include on the print-out.';
trigger OnAction()
begin
CurrPage.SetSelectionFilter(IssuedFinChrgMemoHeader);
IssuedFinChrgMemoHeader.PrintRecords(true, false, false);
end;
}
action("Send by &Email")
{
ApplicationArea = Basic, Suite;
Caption = 'Send by &Email';
Image = Email;
ToolTip = 'Prepare to send the document by email. The Send Email window opens prefilled for the customer where you can add or change information before you send the email.';
trigger OnAction()
begin
IssuedFinChrgMemoHeader := Rec;
CurrPage.SetSelectionFilter(IssuedFinChrgMemoHeader);
IssuedFinChrgMemoHeader.PrintRecords(false, true, false);
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
Rec.Navigate();
end;
}
action(Cancel)
{
ApplicationArea = Basic, Suite;
Caption = 'Cancel';
Ellipsis = true;
Image = Cancel;
ToolTip = 'Cancel the issued finance charge memo.';
trigger OnAction()
var
IssuedFinChargeMemoHeader: Record "Issued Fin. Charge Memo Header";
begin
IssuedFinChargeMemoHeader := Rec;
IssuedFinChargeMemoHeader.SetRecFilter();
Rec.RunCancelIssuedFinChargeMemo(IssuedFinChargeMemoHeader);
end;
}
}
area(reporting)
{
action("Finance Charge Memo")
{
ApplicationArea = Basic, Suite;
Caption = 'Finance Charge Memo';
Image = FinChargeMemo;
RunObject = Report "Finance Charge Memo";
}
action("Customer - Balance to Date")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer - Balance to Date';
Image = "Report";
RunObject = Report "Customer - Balance to Date";
}
action("Customer - Detail Trial Bal.")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer - Detail Trial Bal.';
Image = "Report";
//The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true'
//PromotedCategory = "Report";
RunObject = Report "Customer - Detail Trial Bal.";
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
actionref("&Print_Promoted"; "&Print")
{
}
actionref("Send by &Email_Promoted"; "Send by &Email")
{
}
actionref("&Navigate_Promoted"; "&Navigate")
{
}
actionref(Cancel_Promoted; Cancel)
{
}
}
group(Category_Category4)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 3.';
}
group(Category_Category5)
{
Caption = 'Memo', Comment = 'Generated from the PromotedActionCategories property index 4.';
actionref(Dimensions_Promoted; Dimensions)
{
}
actionref(Statistics_Promoted; Statistics)
{
}
actionref("Co&mments_Promoted"; "Co&mments")
{
}
actionref("C&ustomer_Promoted"; "C&ustomer")
{
}
}
group(Category_Category6)
{
Caption = 'Navigate', Comment = 'Generated from the PromotedActionCategories property index 5.';
}
group(Category_Report)
{
Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';
actionref("Finance Charge Memo_Promoted"; "Finance Charge Memo")
{
}
actionref("Customer - Balance to Date_Promoted"; "Customer - Balance to Date")
{
}
}
}
}
trigger OnOpenPage()
var
VATReportingDateMgt: Codeunit "VAT Reporting Date Mgt";
begin
VATDateEnabled := VATReportingDateMgt.IsVATDateEnabled();
end;
trigger OnAfterGetRecord()
var
Customer: Record Customer;
begin
Customer.GetPrimaryContact(Rec."Customer No.", PrimaryContact);
end;
var
PrimaryContact: Record Contact;
IssuedFinChrgMemoHeader: Record "Issued Fin. Charge Memo Header";
CurrExchRate: Record "Currency Exchange Rate";
ChangeExchangeRate: Page "Change Exchange Rate";
VATDateEnabled: Boolean;
}