Page 9063 Purchase Agent Activities, source in 29
Source29
src/Layers/W1/BaseApp/Purchases/RoleCenters/PurchaseAgentActivities.Page.al167 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.RoleCenters;
using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Foundation.Navigate;
using Microsoft.Purchases.Document;
page 9063 "Purchase Agent Activities"
{
Caption = 'Activities';
PageType = CardPart;
RefreshOnActivate = true;
SourceTable = "Purchase Cue";
layout
{
area(content)
{
cuegroup("Pre-arrival Follow-up on Purchase Orders")
{
Caption = 'Pre-arrival Follow-up on Purchase Orders';
field("To Send or Confirm"; Rec."To Send or Confirm")
{
ApplicationArea = Basic, Suite;
DrillDownPageID = "Purchase Order List";
}
field("Upcoming Orders"; Rec."Upcoming Orders")
{
ApplicationArea = Suite;
DrillDownPageID = "Purchase Order List";
}
actions
{
action("New Purchase Quote")
{
ApplicationArea = Suite;
Caption = 'New Purchase Quote';
RunObject = Page "Purchase Quote";
RunPageMode = Create;
ToolTip = 'Prepare a request for quote';
}
action("New Purchase Order")
{
ApplicationArea = Suite;
Caption = 'New Purchase Order';
RunObject = Page "Purchase Order";
RunPageMode = Create;
ToolTip = 'Purchase goods or services from a vendor.';
}
action("Edit Purchase Journal")
{
ApplicationArea = Basic, Suite;
Caption = 'Edit Purchase Journal';
RunObject = Page "Purchase Journal";
ToolTip = 'Post purchase invoices in a purchase journal that may already contain journal lines.';
}
}
}
cuegroup("Post Arrival Follow-up")
{
Caption = 'Post Arrival Follow-up';
field(OutstandingOrders; Rec."Outstanding Purchase Orders")
{
ApplicationArea = Basic, Suite;
Caption = 'Outstanding Purchase Orders';
DrillDownPageID = "Purchase Order List";
trigger OnDrillDown()
begin
Rec.ShowOrders(Rec.FieldNo("Outstanding Purchase Orders"));
end;
}
field("Purchase Return Orders - All"; Rec."Purchase Return Orders - All")
{
ApplicationArea = PurchReturnOrder;
DrillDownPageID = "Purchase Return Order List";
}
actions
{
action(Navigate)
{
ApplicationArea = Basic, Suite;
Caption = 'Find entries...';
RunObject = Page 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.)';
}
action("New Purchase Return Order")
{
ApplicationArea = PurchReturnOrder;
Caption = 'New Purchase Return Order';
RunObject = Page "Purchase Return Order";
RunPageMode = Create;
ToolTip = 'Process a return or refund that requires inventory handling by creating a new purchase return order.';
}
}
}
cuegroup("Purchase Orders - Authorize for Payment")
{
Caption = 'Purchase Orders - Authorize for Payment';
field(NotInvoiced; Rec."Not Invoiced")
{
ApplicationArea = Suite;
Caption = 'Received, Not Invoiced';
DrillDownPageID = "Purchase Order List";
trigger OnDrillDown()
begin
Rec.ShowOrders(Rec.FieldNo("Not Invoiced"));
end;
}
field(PartiallyInvoiced; Rec."Partially Invoiced")
{
ApplicationArea = Suite;
Caption = 'Partially Invoiced';
DrillDownPageID = "Purchase Order List";
trigger OnDrillDown()
begin
Rec.ShowOrders(Rec.FieldNo("Partially Invoiced"));
end;
}
}
}
}
actions
{
}
trigger OnAfterGetRecord()
begin
CalculateCueFieldValues();
end;
trigger OnOpenPage()
begin
Rec.Reset();
if not Rec.Get() then begin
Rec.Init();
Rec.Insert();
end;
Rec.SetRespCenterFilter();
Rec.SetFilter("Date Filter", '>=%1', WorkDate());
Rec.SetRange("User ID Filter", UserId());
end;
local procedure CalculateCueFieldValues()
begin
if Rec.FieldActive("Outstanding Purchase Orders") then
Rec."Outstanding Purchase Orders" := Rec.CountOrders(Rec.FieldNo("Outstanding Purchase Orders"));
if Rec.FieldActive("Not Invoiced") then
Rec."Not Invoiced" := Rec.CountOrders(Rec.FieldNo("Not Invoiced"));
if Rec.FieldActive("Partially Invoiced") then
Rec."Partially Invoiced" := Rec.CountOrders(Rec.FieldNo("Partially Invoiced"));
end;
}