Page 88 Job Card
- App
- Base Application
- Namespace
- Microsoft.Projects.Project.Job
- Versions
- 17-28
- Source table
- 167
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Projects/Project/Job/JobCard.Page.al1946 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.Projects.Project.Job;
using Microsoft.Assembly.Document;
using Microsoft.CRM.Contact;
using Microsoft.Finance.Dimension;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.Attachment;
using Microsoft.Foundation.Comment;
using Microsoft.Foundation.Reporting;
using Microsoft.Inventory.BOM;
using Microsoft.Inventory.Ledger;
using Microsoft.Pricing.Calculation;
using Microsoft.Pricing.PriceList;
using Microsoft.Pricing.Source;
using Microsoft.Projects.Project.Analysis;
using Microsoft.Projects.Project.Archive;
using Microsoft.Projects.Project.Ledger;
using Microsoft.Projects.Project.Planning;
using Microsoft.Projects.Project.Pricing;
using Microsoft.Projects.Project.Reports;
using Microsoft.Projects.Project.WIP;
using Microsoft.Projects.TimeSheet;
using Microsoft.Purchases.Document;
using Microsoft.Purchases.Pricing;
using Microsoft.Sales.Customer;
using Microsoft.Sales.Document;
using Microsoft.Sales.Pricing;
using Microsoft.Utilities;
using Microsoft.Warehouse.Activity;
using Microsoft.Warehouse.Activity.History;
using Microsoft.Warehouse.Ledger;
using Microsoft.Warehouse.Structure;
using System.Telemetry;
page 88 "Job Card"
{
Caption = 'Project Card';
PageType = Document;
RefreshOnActivate = true;
SourceTable = Job;
AdditionalSearchTerms = 'Job Card';
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = All;
Importance = Standard;
Visible = NoFieldVisible;
trigger OnAssistEdit()
begin
if Rec.AssistEdit(xRec) then
CurrPage.Update();
end;
}
field(Description; Rec.Description)
{
ApplicationArea = Jobs;
}
field("Sell-to Customer No."; Rec."Sell-to Customer No.")
{
ApplicationArea = Jobs;
Caption = 'Customer No.';
Importance = Additional;
NotBlank = true;
trigger OnValidate()
begin
CurrPage.Update();
end;
}
field("Sell-to Customer Name"; Rec."Sell-to Customer Name")
{
ApplicationArea = Jobs;
Caption = 'Customer Name';
Importance = Promoted;
NotBlank = true;
ShowMandatory = true;
trigger OnValidate()
begin
Rec.SelltoCustomerNoOnAfterValidate(Rec, xRec);
CurrPage.Update();
end;
trigger OnLookup(var Text: Text): Boolean
begin
exit(Rec.LookupSellToCustomerName(Text));
end;
}
field("Sell-to Customer Name 2"; Rec."Sell-to Customer Name 2")
{
ApplicationArea = Jobs;
Caption = 'Customer Name 2';
Importance = Additional;
QuickEntry = false;
Visible = false;
}
group("Sell-to")
{
Caption = 'Sell-to';
field("Sell-to Address"; Rec."Sell-to Address")
{
ApplicationArea = Jobs;
Caption = 'Address';
Importance = Additional;
QuickEntry = false;
}
field("Sell-to Address 2"; Rec."Sell-to Address 2")
{
ApplicationArea = Jobs;
Caption = 'Address 2';
Importance = Additional;
QuickEntry = false;
}
field("Sell-to City"; Rec."Sell-to City")
{
ApplicationArea = Jobs;
Caption = 'City';
Importance = Additional;
QuickEntry = false;
}
group(Control60)
{
ShowCaption = false;
Visible = IsSellToCountyVisible;
field("Sell-to County"; Rec."Sell-to County")
{
ApplicationArea = Jobs;
CaptionClass = '5,1,' + Rec."Sell-to Country/Region Code";
Importance = Additional;
QuickEntry = false;
}
}
field("Sell-to Post Code"; Rec."Sell-to Post Code")
{
ApplicationArea = Jobs;
Caption = 'Post Code';
Importance = Additional;
QuickEntry = false;
}
field("Sell-to Country/Region Code"; Rec."Sell-to Country/Region Code")
{
ApplicationArea = Jobs;
Caption = 'Country/Region Code';
Importance = Additional;
QuickEntry = false;
trigger OnValidate()
begin
IsSellToCountyVisible := FormatAddress.UseCounty(Rec."Sell-to Country/Region Code");
end;
}
field("Sell-to Contact No."; Rec."Sell-to Contact No.")
{
ApplicationArea = Jobs;
Caption = 'Contact No.';
Importance = Additional;
trigger OnLookup(var Text: Text): Boolean
begin
if not Rec.SelltoContactLookup() then
exit(false);
Text := Rec."Sell-to Contact No.";
SellToContact.Get(Rec."Sell-to Contact No.");
Rec."Sell-to Contact" := SellToContact.Name;
CurrPage.Update();
exit(true);
end;
trigger OnValidate()
begin
SellToContact.Get(Rec."Sell-to Contact No.");
Rec."Sell-to Contact" := SellToContact.Name;
CurrPage.Update();
end;
}
field(SellToPhoneNo; SellToContact."Phone No.")
{
ApplicationArea = Jobs;
Caption = 'Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the contact person that the sales document will be sent to.';
}
field(SellToMobilePhoneNo; SellToContact."Mobile Phone No.")
{
ApplicationArea = Jobs;
Caption = 'Mobile Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the contact person that the sales document will be sent to.';
}
field(SellToEmail; SellToContact."E-Mail")
{
ApplicationArea = Jobs;
Caption = 'Email';
Importance = Additional;
Editable = false;
ExtendedDatatype = EMail;
ToolTip = 'Specifies the email address of the contact person that the sales document will be sent to.';
}
field("Sell-to Contact"; Rec."Sell-to Contact")
{
ApplicationArea = Jobs;
Caption = 'Contact';
Importance = Additional;
Editable = Rec."Sell-to Customer No." <> '';
}
}
field("Search Description"; Rec."Search Description")
{
ApplicationArea = Jobs;
Importance = Additional;
ToolTip = 'Specifies an additional description of the project for searching purposes.';
}
field("External Document No."; Rec."External Document No.")
{
ApplicationArea = Jobs;
Importance = Promoted;
Tooltip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.';
}
field("Your Reference"; Rec."Your Reference")
{
ApplicationArea = Jobs;
Importance = Additional;
Tooltip = 'Specifies the customer''s reference. The content will be printed on sales documents.';
}
field("Person Responsible"; Rec."Person Responsible")
{
ApplicationArea = Jobs;
Importance = Promoted;
}
field(Blocked; Rec.Blocked)
{
ApplicationArea = Jobs;
}
field("Last Date Modified"; Rec."Last Date Modified")
{
ApplicationArea = Jobs;
}
field("Project Manager"; Rec."Project Manager")
{
ApplicationArea = Jobs;
}
field("No. of Archived Versions"; Rec."No. of Archived Versions")
{
ApplicationArea = Jobs;
Importance = Additional;
}
}
part(JobTaskLines; "Job Task Lines Subform")
{
ApplicationArea = Jobs;
Caption = 'Tasks';
SubPageLink = "Job No." = field("No.");
SubPageView = sorting("Job Task No.")
order(ascending);
UpdatePropagation = Both;
Editable = JobTaskLinesEditable;
Enabled = JobTaskLinesEditable;
}
group(Posting)
{
Caption = 'Posting';
field(Status; Rec.Status)
{
ApplicationArea = Jobs;
Importance = Promoted;
ToolTip = 'Specifies a current status of the project. You can change the status for the project as it progresses. Final calculations can be made on completed projects.';
trigger OnValidate()
begin
if (Rec.Status = Rec.Status::Completed) and Rec.Complete then begin
Rec.RecalculateJobWIP();
CurrPage.Update(false);
end;
end;
}
field("Job Posting Group"; Rec."Job Posting Group")
{
ApplicationArea = Jobs;
}
field("Location Code"; Rec."Location Code")
{
ApplicationArea = Jobs;
Importance = Promoted;
}
field("Bin Code"; Rec."Bin Code")
{
ApplicationArea = Jobs;
Importance = Promoted;
}
field("WIP Method"; Rec."WIP Method")
{
ApplicationArea = Jobs;
Importance = Additional;
}
field("WIP Posting Method"; Rec."WIP Posting Method")
{
ApplicationArea = Jobs;
Importance = Additional;
}
field("Allow Schedule/Contract Lines"; Rec."Allow Schedule/Contract Lines")
{
ApplicationArea = Jobs;
Caption = 'Allow Budget/Billable Lines';
Importance = Additional;
}
field("Apply Usage Link"; Rec."Apply Usage Link")
{
ApplicationArea = Jobs;
Importance = Additional;
}
field("% Completed"; Rec.PercentCompleted())
{
ApplicationArea = Jobs;
AutoFormatType = 0;
Caption = '% Completed';
Editable = false;
Importance = Promoted;
ToolTip = 'Specifies the percentage of the project''s estimated resource usage that has been posted as used.';
}
field("% Invoiced"; Rec.PercentInvoiced())
{
ApplicationArea = Jobs;
AutoFormatType = 0;
Caption = '% Invoiced';
Editable = false;
Importance = Promoted;
ToolTip = 'Specifies the percentage of the project''s invoice value that has been posted as invoiced.';
}
field("% of Overdue Planning Lines"; Rec.PercentOverdue())
{
ApplicationArea = Jobs;
AutoFormatType = 0;
Caption = '% of Overdue Planning Lines';
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the percentage of the project''s planning lines where the planned delivery date has been exceeded.';
}
}
group("Invoice and Shipping")
{
Caption = 'Invoice and Shipping';
field("Task Billing Method"; Rec."Task Billing Method")
{
ApplicationArea = Jobs;
trigger OnValidate()
begin
CurrPage.JobTaskLines.Page.SetPerTaskBillingFieldsVisible(Rec."Task Billing Method" = Rec."Task Billing Method"::"Multiple customers");
CurrPage.Update(false);
end;
}
group("Bill-to")
{
Caption = 'Bill-to';
field(BillToOptions; BillToOptions)
{
ApplicationArea = Jobs;
Caption = 'Bill-to';
ToolTip = 'Specifies the customer that the sales invoice will be sent to. Default (Customer): The same as the customer on the sales invoice. Another Customer: Any customer that you specify in the fields below.';
trigger OnValidate()
begin
if BillToOptions = BillToOptions::"Default (Customer)" then begin
Rec.Validate("Bill-to Customer No.", Rec."Sell-to Customer No.");
Rec.Validate("Bill-to Contact No.", Rec."Sell-to Contact No.");
end;
UpdateBillToInformationEditable();
end;
}
group(Control205)
{
ShowCaption = false;
Visible = not (BillToOptions = BillToOptions::"Default (Customer)");
field("Bill-to Customer No."; Rec."Bill-to Customer No.")
{
ApplicationArea = Jobs;
Importance = Promoted;
ShowMandatory = true;
Visible = false;
trigger OnValidate()
begin
CurrPage.Update();
end;
}
field("Bill-to Name"; Rec."Bill-to Name")
{
Caption = 'Name';
ApplicationArea = Jobs;
Importance = Promoted;
ToolTip = 'Specifies the name of the customer who pays for the project.';
Editable = ((BillToOptions = BillToOptions::"Another Customer") or ((BillToOptions = BillToOptions::"Custom Address") and not ShouldSearchForCustByName));
Enabled = ((BillToOptions = BillToOptions::"Another Customer") or ((BillToOptions = BillToOptions::"Custom Address") and not ShouldSearchForCustByName));
NotBlank = true;
trigger OnValidate()
begin
if not ((BillToOptions = BillToOptions::"Custom Address") and not ShouldSearchForCustByName) then begin
if Rec.GetFilter("Bill-to Customer No.") = xRec."Bill-to Customer No." then
if Rec."Bill-to Customer No." <> xRec."Bill-to Customer No." then
Rec.SetRange("Bill-to Customer No.");
CurrPage.Update();
end;
end;
}
field("Bill-to Name 2"; Rec."Bill-to Name 2")
{
ApplicationArea = Jobs;
Caption = 'Name 2';
Editable = (BillToOptions = BillToOptions::"Another Customer");
Enabled = (BillToOptions = BillToOptions::"Another Customer");
Importance = Additional;
QuickEntry = false;
Visible = false;
}
field("Bill-to Address"; Rec."Bill-to Address")
{
Caption = 'Address';
ApplicationArea = Jobs;
Importance = Additional;
QuickEntry = false;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
field("Bill-to Address 2"; Rec."Bill-to Address 2")
{
Caption = 'Address 2';
ApplicationArea = Jobs;
Importance = Additional;
QuickEntry = false;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
field("Bill-to City"; Rec."Bill-to City")
{
Caption = 'City';
ApplicationArea = Jobs;
Importance = Additional;
QuickEntry = false;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
group(Control56)
{
ShowCaption = false;
Visible = IsBillToCountyVisible;
field("Bill-to County"; Rec."Bill-to County")
{
ApplicationArea = Jobs;
CaptionClass = '5,1,' + Rec."Bill-to Country/Region Code";
QuickEntry = false;
Importance = Additional;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
}
field("Bill-to Post Code"; Rec."Bill-to Post Code")
{
Caption = 'Post Code';
ApplicationArea = Jobs;
Importance = Additional;
QuickEntry = false;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
field("Bill-to Country/Region Code"; Rec."Bill-to Country/Region Code")
{
Caption = 'Country/Region';
ApplicationArea = Jobs;
Importance = Additional;
QuickEntry = false;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
trigger OnValidate()
begin
IsBillToCountyVisible := FormatAddress.UseCounty(Rec."Bill-to Country/Region Code");
end;
}
field("Bill-to Contact No."; Rec."Bill-to Contact No.")
{
Caption = 'Contact No.';
ApplicationArea = Jobs;
Importance = Additional;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
trigger OnLookup(var Text: Text): Boolean
begin
if not Rec.BilltoContactLookup() then
exit(false);
BillToContact.Get(Rec."Bill-to Contact No.");
Text := Rec."Bill-to Contact No.";
exit(true);
end;
trigger OnValidate()
begin
BillToContact.Get(Rec."Bill-to Contact No.");
end;
}
field(ContactPhoneNo; BillToContact."Phone No.")
{
Caption = 'Phone No.';
ApplicationArea = Jobs;
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the customer contact person for the project.';
}
field(ContactMobilePhoneNo; BillToContact."Mobile Phone No.")
{
Caption = 'Mobile Phone No.';
ApplicationArea = Jobs;
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the customer contact person for the project.';
}
field(ContactEmail; BillToContact."E-Mail")
{
Caption = 'Email';
ApplicationArea = Jobs;
ExtendedDatatype = EMail;
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the email address of the customer contact person for the project.';
}
field("Bill-to Contact"; Rec."Bill-to Contact")
{
Caption = 'Contact';
ApplicationArea = Jobs;
Importance = Additional;
Editable = BillToInformationEditable;
Enabled = BillToInformationEditable;
}
}
}
group("Payment Terms")
{
caption = 'Payment Terms';
field("Payment Terms Code"; Rec."Payment Terms Code")
{
ApplicationArea = Jobs;
Tooltip = 'Specifies a formula that calculates the payment due date, payment discount date, and payment discount amount.';
}
field("Payment Method Code"; Rec."Payment Method Code")
{
ApplicationArea = Jobs;
Tooltip = 'Specifies how to make payment, such as with bank transfer, cash, or check.';
Importance = Additional;
}
}
group("Ship-to")
{
Caption = 'Ship-to';
field(ShippingOptions; ShipToOptions)
{
ApplicationArea = Jobs;
Caption = 'Ship-to';
ToolTip = 'Specifies the address that the products on the sales document are shipped to. Default (Sell-to Address): The same as the customer''s sell-to address. Alternate Ship-to Address: One of the customer''s alternate ship-to addresses. Custom Address: Any ship-to address that you specify in the fields below.';
trigger OnValidate()
var
ShipToAddress: Record "Ship-to Address";
ShipToAddressList: Page "Ship-to Address List";
begin
case ShipToOptions of
ShipToOptions::"Default (Sell-to Address)":
begin
Rec.Validate("Ship-to Code", '');
Rec.SyncShipToWithSellTo();
end;
ShipToOptions::"Alternate Shipping Address":
begin
ShipToAddress.SetRange("Customer No.", Rec."Sell-to Customer No.");
ShipToAddressList.LookupMode := true;
ShipToAddressList.SetTableView(ShipToAddress);
if ShipToAddressList.RunModal() = ACTION::LookupOK then begin
ShipToAddressList.GetRecord(ShipToAddress);
Rec.Validate("Ship-to Code", ShipToAddress.Code);
IsShipToCountyVisible := FormatAddress.UseCounty(ShipToAddress."Country/Region Code");
end else
ShipToOptions := ShipToOptions::"Custom Address";
end;
ShipToOptions::"Custom Address":
begin
Rec.Validate("Ship-to Code", '');
IsShipToCountyVisible := FormatAddress.UseCounty(Rec."Ship-to Country/Region Code");
end;
end;
end;
}
group(Control202)
{
ShowCaption = false;
Visible = not (ShipToOptions = ShipToOptions::"Default (Sell-to Address)");
field("Ship-to Code"; Rec."Ship-to Code")
{
ApplicationArea = Jobs;
Caption = 'Code';
Editable = ShipToOptions = ShipToOptions::"Alternate Shipping Address";
Importance = Promoted;
trigger OnValidate()
var
ShipToAddress: Record "Ship-to Address";
begin
if (xRec."Ship-to Code" <> '') and (Rec."Ship-to Code" = '') then
Error(EmptyShipToCodeErr);
if Rec."Ship-to Code" <> '' then begin
ShipToAddress.Get(Rec."Sell-to Customer No.", Rec."Ship-to Code");
IsShipToCountyVisible := FormatAddress.UseCounty(ShipToAddress."Country/Region Code");
end else
IsShipToCountyVisible := false;
end;
}
field("Ship-to Name"; Rec."Ship-to Name")
{
ApplicationArea = Jobs;
Caption = 'Name';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
}
field("Ship-to Name 2"; Rec."Ship-to Name 2")
{
ApplicationArea = Jobs;
Caption = 'Name 2';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
Importance = Additional;
QuickEntry = false;
Visible = false;
}
field("Ship-to Address"; Rec."Ship-to Address")
{
ApplicationArea = Jobs;
Caption = 'Address';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
QuickEntry = false;
}
field("Ship-to Address 2"; Rec."Ship-to Address 2")
{
ApplicationArea = Jobs;
Caption = 'Address 2';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
QuickEntry = false;
}
field("Ship-to City"; Rec."Ship-to City")
{
ApplicationArea = Jobs;
Caption = 'City';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
QuickEntry = false;
}
group(Control82)
{
ShowCaption = false;
Visible = IsShipToCountyVisible;
field("Ship-to County"; Rec."Ship-to County")
{
ApplicationArea = Jobs;
CaptionClass = '5,1,' + Rec."Ship-to Country/Region Code";
Editable = ShipToOptions = ShipToOptions::"Custom Address";
QuickEntry = false;
}
}
field("Ship-to Post Code"; Rec."Ship-to Post Code")
{
ApplicationArea = Jobs;
Caption = 'Post Code';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
QuickEntry = false;
}
field("Ship-to Country/Region Code"; Rec."Ship-to Country/Region Code")
{
ApplicationArea = Jobs;
Caption = 'Country/Region';
Editable = ShipToOptions = ShipToOptions::"Custom Address";
Importance = Additional;
QuickEntry = false;
trigger OnValidate()
begin
IsShipToCountyVisible := FormatAddress.UseCounty(Rec."Ship-to Country/Region Code");
end;
}
}
field("Ship-to Phone No."; Rec."Ship-to Phone No.")
{
ApplicationArea = Jobs;
Caption = 'Phone No.';
}
field("Ship-to Contact"; Rec."Ship-to Contact")
{
ApplicationArea = Jobs;
Caption = 'Contact';
}
}
}
group(Duration)
{
Caption = 'Duration';
field("Starting Date"; Rec."Starting Date")
{
ApplicationArea = Jobs;
Importance = Promoted;
}
field("Ending Date"; Rec."Ending Date")
{
ApplicationArea = Jobs;
Importance = Promoted;
}
field("Creation Date"; Rec."Creation Date")
{
ApplicationArea = Jobs;
}
}
group("Foreign Trade")
{
Caption = 'Foreign Trade';
field("Currency Code"; Rec."Currency Code")
{
ApplicationArea = Suite;
Importance = Promoted;
}
field("Invoice Currency Code"; Rec."Invoice Currency Code")
{
ApplicationArea = Suite;
}
field("Price Calculation Method"; Rec."Price Calculation Method")
{
Visible = ExtendedPriceEnabled;
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Cost Calculation Method"; Rec."Cost Calculation Method")
{
Visible = ExtendedPriceEnabled;
ApplicationArea = Basic, Suite;
Importance = Promoted;
}
field("Exch. Calculation (Cost)"; Rec."Exch. Calculation (Cost)")
{
ApplicationArea = Suite;
ToolTip = 'Specifies how project costs are calculated if you change the Currency Date or the Currency Code fields on a project planning Line or run the Change Project Planning Line Dates batch job. Fixed LCY option: The project costs in the local currency are fixed. Any change in the currency exchange rate will change the value of project costs in a foreign currency. Fixed FCY option: The project costs in a foreign currency are fixed. Any change in the currency exchange rate will change the value of project costs in the local currency.';
}
field("Exch. Calculation (Price)"; Rec."Exch. Calculation (Price)")
{
ApplicationArea = Suite;
ToolTip = 'Specifies how project sales prices are calculated if you change the Currency Date or the Currency Code fields on a project planning Line or run the Change Project Planning Line Dates batch job. Fixed LCY option: The project prices in the local currency are fixed. Any change in the currency exchange rate will change the value of project prices in a foreign currency. Fixed FCY option: The project prices in a foreign currency are fixed. Any change in the currency exchange rate will change the value of project prices in the local currency.';
}
field("Language Code"; Rec."Language Code")
{
ApplicationArea = Basic, Suite;
Visible = false;
}
}
group("WIP and Recognition")
{
Caption = 'WIP and Recognition';
group("To Post")
{
Caption = 'To Post';
field("WIP Posting Date"; Rec."WIP Posting Date")
{
ApplicationArea = Jobs;
}
field("Total WIP Sales Amount"; Rec."Total WIP Sales Amount")
{
ApplicationArea = Jobs;
ToolTip = 'Specifies the total WIP sales amount that was last calculated for the project. The WIP sales amount is the value in the WIP Sales Project WIP Entries window minus the value of the Recognized Sales Project WIP Entries window. For projects with the Cost Value or Cost of Sales WIP methods, the WIP sales amount is normally 0.';
}
field("Applied Sales G/L Amount"; Rec."Applied Sales G/L Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
field("Total WIP Cost Amount"; Rec."Total WIP Cost Amount")
{
ApplicationArea = Jobs;
ToolTip = 'Specifies the total WIP cost amount that was last calculated for the project. The WIP cost amount is the value in the WIP Cost Project WIP Entries window minus the value of the Recognized Cost Project WIP Entries window. For projects with Sales Value or Percentage of Completion WIP methods, the WIP cost amount is normally 0.';
}
field("Applied Costs G/L Amount"; Rec."Applied Costs G/L Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
field("Recog. Sales Amount"; Rec."Recog. Sales Amount")
{
ApplicationArea = Jobs;
}
field("Recog. Costs Amount"; Rec."Recog. Costs Amount")
{
ApplicationArea = Jobs;
ToolTip = 'Specifies the recognized cost amount that was last calculated for the project. The value is the sum of the entries in the Recognized Cost Project WIP Entries window.';
}
field("Recog. Profit Amount"; Rec.CalcRecognizedProfitAmount())
{
ApplicationArea = Jobs;
AutoFormatType = 1;
AutoFormatExpression = Rec."Currency Code";
Caption = 'Recog. Profit Amount';
ToolTip = 'Specifies the recognized profit amount for the project.';
}
field("Recog. Profit %"; Rec.CalcRecognizedProfitPercentage())
{
ApplicationArea = Jobs;
AutoFormatType = 0;
Caption = 'Recog. Profit %';
ToolTip = 'Specifies the recognized profit percentage for the project.';
}
field("Acc. WIP Costs Amount"; Rec.CalcAccWIPCostsAmount())
{
ApplicationArea = Jobs;
AutoFormatType = 1;
AutoFormatExpression = Rec."Currency Code";
Caption = 'Acc. WIP Costs Amount';
ToolTip = 'Specifies the total WIP costs for the project.';
Visible = false;
}
field("Acc. WIP Sales Amount"; Rec.CalcAccWIPSalesAmount())
{
ApplicationArea = Jobs;
AutoFormatType = 1;
AutoFormatExpression = Rec."Currency Code";
Caption = 'Acc. WIP Sales Amount';
ToolTip = 'Specifies the total WIP sales for the project.';
Visible = false;
}
field("Calc. Recog. Sales Amount"; Rec."Calc. Recog. Sales Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
field("Calc. Recog. Costs Amount"; Rec."Calc. Recog. Costs Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
}
group(Posted)
{
Caption = 'Posted';
field("WIP G/L Posting Date"; Rec."WIP G/L Posting Date")
{
ApplicationArea = Jobs;
}
field("Total WIP Sales G/L Amount"; Rec."Total WIP Sales G/L Amount")
{
ApplicationArea = Jobs;
}
field("Total WIP Cost G/L Amount"; Rec."Total WIP Cost G/L Amount")
{
ApplicationArea = Jobs;
}
field("Recog. Sales G/L Amount"; Rec."Recog. Sales G/L Amount")
{
ApplicationArea = Jobs;
ToolTip = 'Specifies the total recognized sales amount that was last posted to the general ledger for the project. The recognized sales G/L amount for the project is the sum of the entries in the Recognized Sales Project WIP G/L Entries window.';
}
field("Recog. Costs G/L Amount"; Rec."Recog. Costs G/L Amount")
{
ApplicationArea = Jobs;
}
field("Recog. Profit G/L Amount"; Rec.CalcRecognizedProfitGLAmount())
{
ApplicationArea = Jobs;
AutoFormatType = 1;
AutoFormatExpression = Rec."Currency Code";
Caption = 'Recog. Profit G/L Amount';
ToolTip = 'Specifies the profit amount that is recognized with the general ledger for the project.';
}
field("Recog. Profit G/L %"; Rec.CalcRecognProfitGLPercentage())
{
ApplicationArea = Jobs;
AutoFormatType = 0;
Caption = 'Recog. Profit G/L %';
ToolTip = 'Specifies the profit percentage that is recognized with the general ledger for the project.';
}
field("Calc. Recog. Sales G/L Amount"; Rec."Calc. Recog. Sales G/L Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
field("Calc. Recog. Costs G/L Amount"; Rec."Calc. Recog. Costs G/L Amount")
{
ApplicationArea = Jobs;
Visible = false;
}
}
}
}
area(factboxes)
{
part(Control1902018507; "Customer Statistics FactBox")
{
ApplicationArea = Jobs;
SubPageLink = "No." = field("Bill-to Customer No.");
Visible = false;
}
part("Attached Documents List"; "Doc. Attachment List Factbox")
{
ApplicationArea = All;
Caption = 'Documents';
UpdatePropagation = Both;
SubPageLink = "Table ID" = const(Database::Job),
"No." = field("No.");
}
part(Control1902136407; "Job No. of Prices FactBox")
{
ApplicationArea = Suite;
SubPageLink = "No." = field("No."),
"Resource Filter" = field("Resource Filter"),
"Posting Date Filter" = field("Posting Date Filter"),
"Resource Gr. Filter" = field("Resource Gr. Filter"),
"Planning Date Filter" = field("Planning Date Filter");
Visible = true;
}
part(Control1905650007; "Job WIP/Recognition FactBox")
{
ApplicationArea = Jobs;
SubPageLink = "No." = field("No."),
"Resource Filter" = field("Resource Filter"),
"Posting Date Filter" = field("Posting Date Filter"),
"Resource Gr. Filter" = field("Resource Gr. Filter"),
"Planning Date Filter" = field("Planning Date Filter");
Visible = false;
}
part("Job Details"; "Job Cost Factbox")
{
ApplicationArea = Jobs;
Caption = 'Project Details';
SubPageLink = "No." = field("No.");
}
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = true;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
Visible = true;
}
}
}
actions
{
area(navigation)
{
group("&Job")
{
Caption = '&Project';
Image = Job;
action(JobPlanningLines)
{
ApplicationArea = Jobs;
Caption = 'Project &Planning Lines';
Image = JobLines;
ToolTip = 'View all planning lines for the project. You use this window to plan what items, resources, and general ledger expenses that you expect to use on a project (Budget) or you can specify what you actually agreed with your customer that he should pay for the project (Billable).';
trigger OnAction()
var
JobPlanningLine: Record "Job Planning Line";
JobPlanningLines: Page "Job Planning Lines";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeJobPlanningLinesAction(Rec, IsHandled);
if IsHandled then
exit;
Rec.TestField("No.");
JobPlanningLine.SetRange("Job No.", Rec."No.");
JobPlanningLines.SetJobTaskNoVisible(true);
JobPlanningLines.SetTableView(JobPlanningLine);
JobPlanningLines.Editable := true;
JobPlanningLines.Run();
end;
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
RunObject = Page "Job Assigned Resources";
RunPageLink = "Job No." = field("No."),
"Job Task No." = const('');
ToolTip = 'View or edit the resources that are assigned to this project. Project-level assignments apply to all tasks of the project.';
}
action("&Dimensions")
{
ApplicationArea = Dimensions;
Caption = '&Dimensions';
Image = Dimensions;
RunObject = Page "Default Dimensions";
RunPageLink = "Table ID" = const(167),
"No." = field("No.");
ShortCutKey = 'Alt+D';
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.';
}
action("&Statistics")
{
ApplicationArea = Jobs;
Caption = '&Statistics';
Image = Statistics;
RunObject = Page "Job Statistics";
RunPageLink = "No." = field("No.");
ShortCutKey = 'F7';
ToolTip = 'View this project''s statistics.';
}
action(TimeSheetLines)
{
ApplicationArea = Jobs;
Caption = 'Time Sheet Lines';
Image = LinesFromTimesheet;
ToolTip = 'View which time sheet lines are referencing this project.';
trigger OnAction()
var
TimeSheetLine: Record "Time Sheet Line";
TimeSheetLineList: Page "Time Sheet Line List";
begin
TimeSheetLine.FilterGroup(2);
TimeSheetLine.SetRange(Type, TimeSheetLine.Type::Job);
TimeSheetLine.SetRange("Job No.", Rec."No.");
TimeSheetLine.SetRange(Posted, false);
TimeSheetLine.FilterGroup(0);
TimeSheetLineList.SetTableView(TimeSheetLine);
TimeSheetLineList.Run();
end;
}
action(SalesInvoicesCreditMemos)
{
ApplicationArea = Jobs;
Caption = 'Sales &Invoices/Credit Memos';
Image = GetSourceDoc;
ToolTip = 'View sales invoices or sales credit memos that are related to the selected project.';
trigger OnAction()
var
JobInvoices: Page "Job Invoices";
begin
JobInvoices.SetPrJob(Rec);
JobInvoices.RunModal();
end;
}
separator(Action64)
{
}
action("Co&mments")
{
ApplicationArea = Comments;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Comment Sheet";
RunPageLink = "Table Name" = const(Job),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
action("&Online Map")
{
ApplicationArea = Jobs;
Caption = '&Online Map';
Image = Map;
ToolTip = 'View online map for addresses assigned to this project.';
trigger OnAction()
begin
Rec.DisplayMap();
end;
}
action(Attachments)
{
ApplicationArea = All;
Caption = 'Attachments';
Image = Attach;
ToolTip = 'Add a file as an attachment. You can attach images as well as documents.';
trigger OnAction()
var
DocumentAttachmentDetails: Page "Document Attachment Details";
RecRef: RecordRef;
begin
RecRef.GetTable(Rec);
DocumentAttachmentDetails.OpenForRecRef(RecRef);
DocumentAttachmentDetails.RunModal();
end;
}
action(AssemblyOrders)
{
AccessByPermission = TableData "BOM Component" = R;
ApplicationArea = Assembly;
Caption = 'Assembly Orders';
Image = AssemblyOrder;
ToolTip = 'View ongoing assembly orders related to the project. ';
trigger OnAction()
var
AssembleToOrderLink: Record "Assemble-to-Order Link";
begin
AssembleToOrderLink.ShowAsmOrders(Rec, '');
end;
}
action(PurchaseLines)
{
ApplicationArea = Basic, Suite;
Caption = 'Purchase Lines';
Image = LinesFromJob;
ToolTip = 'View purchase lines for products that are related to this project.';
trigger OnAction()
var
PurchaseLine: Record "Purchase Line";
begin
Rec.SetPurchLineFilters(PurchaseLine);
PurchaseLine.SetFilter(Quantity, '<> 0');
Page.RunModal(Page::"Purchase Lines", PurchaseLine);
end;
}
}
group("W&IP")
{
Caption = 'W&IP';
Image = WIP;
action("&WIP Entries")
{
ApplicationArea = Jobs;
Caption = '&WIP Entries';
Image = WIPEntries;
RunObject = Page "Job WIP Entries";
RunPageLink = "Job No." = field("No.");
RunPageView = sorting("Job No.", "Job Posting Group", "WIP Posting Date")
order(descending);
ToolTip = 'View entries for the project that are posted as work in process.';
}
action("WIP &G/L Entries")
{
ApplicationArea = Jobs;
Caption = 'WIP &G/L Entries';
Image = WIPLedger;
RunObject = Page "Job WIP G/L Entries";
RunPageLink = "Job No." = field("No.");
RunPageView = sorting("Job No.")
order(descending);
ToolTip = 'View the project''s WIP G/L entries.';
}
}
group("&Prices")
{
Caption = '&Prices';
Image = Price;
Visible = not ExtendedPriceEnabled;
action("&Resource")
{
ApplicationArea = Suite;
Caption = '&Resource';
Image = Resource;
Visible = not ExtendedPriceEnabled;
RunObject = Page "Job Resource Prices";
RunPageLink = "Job No." = field("No.");
ToolTip = 'View this project''s resource prices.';
}
action("&Item")
{
ApplicationArea = Suite;
Caption = '&Item';
Image = Item;
Visible = not ExtendedPriceEnabled;
RunObject = Page "Job Item Prices";
RunPageLink = "Job No." = field("No.");
ToolTip = 'View this project''s item prices.';
}
action("&G/L Account")
{
ApplicationArea = Suite;
Caption = '&G/L Account';
Image = JobPrice;
Visible = not ExtendedPriceEnabled;
RunObject = Page "Job G/L Account Prices";
RunPageLink = "Job No." = field("No.");
ToolTip = 'View this project''s G/L account prices.';
}
}
group(Prices)
{
Caption = 'Prices & Discounts';
Visible = ExtendedPriceEnabled;
action(SalesPriceLists)
{
ApplicationArea = Basic, Suite;
Caption = 'Sales Price Lists';
Image = Price;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up sales price lists for products that you sell to the customer. A product price is automatically granted on invoice lines when the specified criteria are met, such as customer, quantity, or ending date.';
trigger OnAction()
var
PriceUXManagement: Codeunit "Price UX Management";
begin
PriceUXManagement.ShowPriceLists(Rec, Enum::"Price Type"::Sale, Enum::"Price Amount Type"::Any);
end;
}
action(SalesPriceLines)
{
AccessByPermission = TableData "Sales Price Access" = R;
ApplicationArea = Basic, Suite;
Caption = 'Sales Prices';
Image = Price;
Scope = Repeater;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up sales price lines for products that you sell to the customer. A product price is automatically granted on invoice lines when the specified criteria are met, such as customer, quantity, or ending date.';
trigger OnAction()
var
PriceSource: Record "Price Source";
PriceUXManagement: Codeunit "Price UX Management";
begin
Rec.ToPriceSource(PriceSource, Enum::"Price Type"::Sale);
PriceUXManagement.ShowPriceListLines(PriceSource, Enum::"Price Amount Type"::Price);
end;
}
action(SalesDiscountLines)
{
AccessByPermission = TableData "Sales Discount Access" = R;
ApplicationArea = Basic, Suite;
Caption = 'Sales Discounts';
Image = LineDiscount;
Scope = Repeater;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up different discounts for products that you sell to the customer. A product line discount is automatically granted on invoice lines when the specified criteria are met, such as customer, quantity, or ending date.';
trigger OnAction()
var
PriceSource: Record "Price Source";
PriceUXManagement: Codeunit "Price UX Management";
begin
Rec.ToPriceSource(PriceSource, Enum::"Price Type"::Sale);
PriceUXManagement.ShowPriceListLines(PriceSource, Enum::"Price Amount Type"::Discount);
end;
}
action(SalesPriceListsDiscounts)
{
ApplicationArea = Basic, Suite;
Caption = 'Sales Price Lists (Discounts)';
Image = LineDiscount;
Visible = false;
ToolTip = 'View or set up different discounts for products that you sell to the customer. A product line discount is automatically granted on invoice lines when the specified criteria are met, such as customer, quantity, or ending date.';
trigger OnAction()
var
PriceUXManagement: Codeunit "Price UX Management";
AmountType: Enum "Price Amount Type";
PriceType: Enum "Price Type";
begin
PriceUXManagement.ShowPriceLists(Rec, PriceType::Sale, AmountType::Discount);
end;
}
action(PurchasePriceLists)
{
ApplicationArea = Basic, Suite;
Caption = 'Purchase Price Lists';
Image = ResourceCosts;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up purchase price lists for products that you buy from the vendor. An product price is automatically granted on invoice lines when the specified criteria are met, such as vendor, quantity, or ending date.';
trigger OnAction()
var
PriceUXManagement: Codeunit "Price UX Management";
begin
PriceUXManagement.ShowPriceLists(Rec, Enum::"Price Type"::Purchase, Enum::"Price Amount Type"::Any);
end;
}
action(PurchPriceLines)
{
AccessByPermission = TableData "Purchase Price Access" = R;
ApplicationArea = Basic, Suite;
Caption = 'Purchase Prices';
Image = Price;
Scope = Repeater;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up purchase price lines for products that you buy from the vendor. A product price is automatically granted on invoice lines when the specified criteria are met, such as vendor, quantity, or ending date.';
trigger OnAction()
var
PriceSource: Record "Price Source";
PriceUXManagement: Codeunit "Price UX Management";
begin
Rec.ToPriceSource(PriceSource, Enum::"Price Type"::Purchase);
PriceUXManagement.ShowPriceListLines(PriceSource, Enum::"Price Amount Type"::Price);
end;
}
action(PurchDiscountLines)
{
AccessByPermission = TableData "Purchase Discount Access" = R;
ApplicationArea = Basic, Suite;
Caption = 'Purchase Discounts';
Image = LineDiscount;
Scope = Repeater;
Visible = ExtendedPriceEnabled;
ToolTip = 'View or set up different discounts for products that you buy from the vendor. A product line discount is automatically granted on invoice lines when the specified criteria are met, such as vendor, quantity, or ending date.';
trigger OnAction()
var
PriceSource: Record "Price Source";
PriceUXManagement: Codeunit "Price UX Management";
begin
Rec.ToPriceSource(PriceSource, Enum::"Price Type"::Purchase);
PriceUXManagement.ShowPriceListLines(PriceSource, Enum::"Price Amount Type"::Discount);
end;
}
action(PurchasePriceListsDiscounts)
{
ApplicationArea = Basic, Suite;
Caption = 'Purchase Price Lists (Discounts)';
Image = LineDiscount;
Visible = false;
ToolTip = 'View or set up different discounts for products that you buy from the vendor. An product discount is automatically granted on invoice lines when the specified criteria are met, such as vendor, quantity, or ending date.';
trigger OnAction()
var
PriceUXManagement: Codeunit "Price UX Management";
AmountType: Enum "Price Amount Type";
PriceType: Enum "Price Type";
begin
PriceUXManagement.ShowPriceLists(Rec, PriceType::Purchase, AmountType::Discount);
end;
}
}
group("Plan&ning")
{
Caption = 'Plan&ning';
Image = Planning;
action("Resource &Allocated per Job")
{
ApplicationArea = Jobs;
Caption = 'Resource &Allocated per Project';
Image = ViewJob;
RunObject = Page "Resource Allocated per Job";
ToolTip = 'View this project''s resource allocation.';
}
action("Res. Gr. All&ocated per Job")
{
ApplicationArea = Jobs;
Caption = 'Res. Gr. All&ocated per Project';
Image = ResourceGroup;
RunObject = Page "Res. Gr. Allocated per Job";
ToolTip = 'View the project''s resource group allocation.';
}
}
group(Warehouse_Related)
{
Caption = 'Warehouse';
Image = Worksheets;
action("Put-away/Pick Lines/Movement Lines")
{
ApplicationArea = Warehouse;
Caption = 'Put-away/Pick Lines/Movement Lines';
Image = PutawayLines;
ToolTip = 'View the list of ongoing inventory put-aways, picks, or movements for the project.';
trigger OnAction()
begin
OpenWhseActivityLines();
end;
}
action("Registered P&ick Lines")
{
ApplicationArea = Warehouse;
Caption = 'Registered Pick Lines';
Image = RegisteredDocs;
RunObject = Page "Registered Whse. Act.-Lines";
RunPageLink = "Source Type" = filter(167),
"Source Subtype" = const("0"),
"Source No." = field("No.");
RunPageView = sorting("Source Type", "Source Subtype", "Source No.", "Source Line No.", "Source Subline No.");
ToolTip = 'View the list of warehouse picks that have been made for the project.';
}
}
group(History)
{
Caption = 'History';
Image = History;
action("Ledger E&ntries")
{
ApplicationArea = Jobs;
Caption = 'Ledger E&ntries';
Image = JobLedger;
RunObject = Page "Job Ledger Entries";
RunPageLink = "Job No." = field("No.");
RunPageView = sorting("Job No.", "Job Task No.", "Entry Type", "Posting Date")
order(descending);
ShortCutKey = 'Ctrl+F7';
ToolTip = 'View the history of transactions that have been posted for the selected record.';
}
action("Item Ledger Entries")
{
ApplicationArea = Jobs;
Caption = 'Item Ledger Entries';
Image = ItemLedger;
RunObject = Page "Item Ledger Entries";
RunPageLink = "Job No." = field("No.");
ToolTip = 'View the item ledger entries of items consumed by the project.';
}
action("Whse. Ledger E&ntries")
{
ApplicationArea = Jobs;
Caption = 'Warehouse Entries';
Image = Warehouse;
RunObject = Page "Warehouse Entries";
RunPageLink = "Source Type" = filter(210 | 167),
"Source No." = field("No.");
ToolTip = 'View the warehouse entries of items consumed by the project.';
}
}
}
area(processing)
{
group("&Copy")
{
Caption = '&Copy';
Image = Copy;
action("Copy Job Tasks &from...")
{
ApplicationArea = Jobs;
Caption = 'Copy Project Tasks &from...';
Ellipsis = true;
Image = CopyToTask;
ToolTip = 'Open the Copy Project Tasks page.';
trigger OnAction()
var
CopyJobTasks: Page "Copy Job Tasks";
begin
CopyJobTasks.SetToJob(Rec);
CopyJobTasks.RunModal();
end;
}
action("Copy Job Tasks &to...")
{
ApplicationArea = Jobs;
Caption = 'Copy Project Tasks &to...';
Ellipsis = true;
Image = CopyFromTask;
ToolTip = 'Open the Copy Projects To page.';
trigger OnAction()
var
CopyJobTasks: Page "Copy Job Tasks";
begin
CopyJobTasks.SetFromJob(Rec);
CopyJobTasks.RunModal();
end;
}
}
group(Action26)
{
Caption = 'W&IP';
Image = WIP;
action("<Action82>")
{
ApplicationArea = Jobs;
Caption = '&Calculate WIP';
Ellipsis = true;
Image = CalculateWIP;
ToolTip = 'Run the Project Calculate WIP batch job.';
trigger OnAction()
var
Job: Record Job;
JobCalculateWIP: Report "Job Calculate WIP";
begin
Rec.TestField(Rec."No.");
Job.Copy(Rec);
Job.SetRange("No.", Rec."No.");
JobCalculateWIP.SetTableView(Job);
JobCalculateWIP.Run();
end;
}
action("<Action83>")
{
ApplicationArea = Jobs;
Caption = '&Post WIP to G/L';
Ellipsis = true;
Image = PostOrder;
ShortCutKey = 'F9';
ToolTip = 'Run the Project Post WIP to G/L batch job.';
trigger OnAction()
var
Job: Record Job;
begin
Rec.TestField("No.");
Job.Copy(Rec);
Job.SetRange("No.", Rec."No.");
REPORT.RunModal(REPORT::"Job Post WIP to G/L", true, false, Job);
end;
}
}
group(Warehouse)
{
Caption = 'Warehouse';
Image = Worksheets;
action("Create Inventory Pick")
{
ApplicationArea = Warehouse;
Caption = 'Create Inventory Pick';
Image = CreateInventoryPick;
ToolTip = 'Create inventory picks for the item on the project planning lines.';
trigger OnAction()
begin
FeatureTelemetry.LogUsage('0000GQU', 'Picks on jobs', 'create inventory picks');
Rec.CreateInvtPutAwayPick();
end;
}
action("Create Warehouse Pick")
{
AccessByPermission = TableData "Bin Content" = R;
ApplicationArea = Warehouse;
Caption = 'Create Warehouse Pick';
Image = CreateWarehousePick;
ToolTip = 'Create warehouse pick documents for the project planning lines.';
trigger OnAction()
begin
FeatureTelemetry.LogUsage('0000GQV', 'Picks on jobs', 'create warehouse picks');
Rec.CreateWarehousePick();
end;
}
}
group("F&unctions")
{
Caption = 'F&unctions';
Image = "Action";
action(CreatePurchaseOrder)
{
ApplicationArea = Suite;
Caption = 'Create Purchase Orders';
Image = Document;
ToolTip = 'Create one or more new purchase orders to buy the items that are required by this project, deducting any quantity that is already available.';
trigger OnAction()
var
PurchaseDocFromJob: Codeunit "Purchase Doc. From Job";
begin
PurchaseDocFromJob.CreatePurchaseOrder(Rec);
end;
}
action("Archive Job")
{
ApplicationArea = Jobs;
Caption = 'Archi&ve Project';
Image = Archive;
ToolTip = 'Send the project to the archive. Later, you can restore the archived project.';
trigger OnAction()
begin
JobArchiveManagement.ArchiveJob(Rec);
CurrPage.Update(false);
end;
}
action("Create Job &Sales Invoice")
{
ApplicationArea = Jobs;
Caption = 'Create Project &Sales Invoice';
Image = JobSalesInvoice;
ToolTip = 'Use a batch job to help you create project sales invoices for the involved project planning lines.';
trigger OnAction()
var
JobTask: Record "Job Task";
begin
Rec.TestField("No.");
if Rec.Blocked = Rec.Blocked::All then
Rec.TestBlocked();
JobTask.SetRange("Job No.", Rec."No.");
REPORT.RunModal(REPORT::"Job Create Sales Invoice", true, false, JobTask);
end;
}
}
}
area(reporting)
{
action("Job Actual to Budget")
{
ApplicationArea = Suite;
Caption = 'Project Actual to Budget';
Image = "Report";
RunObject = Report "Job Actual To Budget";
}
action("Job Analysis")
{
ApplicationArea = Suite;
Caption = 'Project Analysis';
Image = "Report";
RunObject = Report "Job Analysis";
}
action("Job - Planning Lines")
{
ApplicationArea = Suite;
Caption = 'Project - Planning Lines';
Image = "Report";
RunObject = Report "Job - Planning Lines";
}
action("Job - Suggested Billing")
{
ApplicationArea = Suite;
Caption = 'Project - Suggested Billing';
Image = "Report";
RunObject = Report "Job Suggested Billing";
}
action("Report Job Quote")
{
ApplicationArea = Suite;
Caption = 'Preview Project Quote';
Image = "Report";
ToolTip = 'Open the Project Quote report.';
trigger OnAction()
var
Job: Record Job;
ReportSelection: Record "Report Selections";
begin
Job.SetCurrentKey("No.");
Job.SetRange("No.", Rec."No.");
ReportSelection.PrintWithDialogForCust(
ReportSelection.Usage::JQ, Job, true, Rec.FieldNo("Bill-to Customer No."));
end;
}
action("Send Job Quote")
{
ApplicationArea = Suite;
Caption = 'Send Project Quote';
Image = SendTo;
ToolTip = 'Send the project quote to the customer. You can change the way that the document is sent in the window that appears.';
trigger OnAction()
begin
CODEUNIT.Run(CODEUNIT::"Jobs-Send", Rec);
end;
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
actionref("Copy Job Tasks &from..._Promoted"; "Copy Job Tasks &from...")
{
}
actionref("Copy Job Tasks &to..._Promoted"; "Copy Job Tasks &to...")
{
}
actionref("Create Inventory Pick_Promoted"; "Create Inventory Pick")
{
}
actionref("Create Warehouse Pick_Promoted"; "Create Warehouse Pick")
{
}
}
group(Category_Category8)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 7.';
actionref("Report Job Quote_Promoted"; "Report Job Quote")
{
}
actionref("Send Job Quote_Promoted"; "Send Job Quote")
{
}
}
group(Category_Category4)
{
Caption = 'Prices & Discounts', Comment = 'Generated from the PromotedActionCategories property index 3.';
actionref(SalesPriceLists_Promoted; SalesPriceLists)
{
}
actionref(SalesPriceLines_Promoted; SalesPriceLines)
{
}
actionref(PurchasePriceLists_Promoted; PurchasePriceLists)
{
}
actionref(PurchPriceLines_Promoted; PurchPriceLines)
{
}
actionref(SalesDiscountLines_Promoted; SalesDiscountLines)
{
}
actionref(PurchDiscountLines_Promoted; PurchDiscountLines)
{
}
actionref(SalesPriceListsDiscounts_Promoted; SalesPriceListsDiscounts)
{
}
actionref(PurchasePriceListsDiscounts_Promoted; PurchasePriceListsDiscounts)
{
}
actionref("&Resource_Promoted"; "&Resource")
{
}
actionref("&Item_Promoted"; "&Item")
{
}
actionref("&G/L Account_Promoted"; "&G/L Account")
{
}
}
group(Category_Category5)
{
Caption = 'WIP', Comment = 'Generated from the PromotedActionCategories property index 4.';
actionref("<Action82>_Promoted"; "<Action82>")
{
}
actionref("<Action83>_Promoted"; "<Action83>")
{
}
actionref("&WIP Entries_Promoted"; "&WIP Entries")
{
}
actionref("WIP &G/L Entries_Promoted"; "WIP &G/L Entries")
{
}
}
group(Category_Category7)
{
Caption = 'Project', Comment = 'Generated from the PromotedActionCategories property index 6.';
actionref("&Dimensions_Promoted"; "&Dimensions")
{
}
actionref("&Statistics_Promoted"; "&Statistics")
{
}
actionref("Ledger E&ntries_Promoted"; "Ledger E&ntries")
{
}
actionref(Attachments_Promoted; Attachments)
{
}
actionref("Co&mments_Promoted"; "Co&mments")
{
}
separator(Navigate_Separator)
{
}
actionref(JobPlanningLines_Promoted; JobPlanningLines)
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
actionref(SalesInvoicesCreditMemos_Promoted; SalesInvoicesCreditMemos)
{
}
}
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("Job Actual to Budget_Promoted"; "Job Actual to Budget")
{
}
actionref("Job Analysis_Promoted"; "Job Analysis")
{
}
actionref("Job - Planning Lines_Promoted"; "Job - Planning Lines")
{
}
actionref("Job - Suggested Billing_Promoted"; "Job - Suggested Billing")
{
}
}
}
}
trigger OnOpenPage()
var
PriceCalculationMgt: Codeunit "Price Calculation Mgt.";
begin
SetNoFieldVisible();
ActivateFields();
ExtendedPriceEnabled := PriceCalculationMgt.IsExtendedPriceCalculationEnabled();
end;
trigger OnAfterGetCurrRecord()
begin
if GuiAllowed() then
SetControlVisibility();
end;
trigger OnAfterGetRecord()
begin
if GuiAllowed() then
SetControlVisibility();
UpdateShipToBillToGroupVisibility();
SellToContact.GetOrClear(Rec."Sell-to Contact No.");
BillToContact.GetOrClear(Rec."Bill-to Contact No.");
UpdateBillToInformationEditable();
JobTaskLinesEditable := Rec.CalcJobTaskLinesEditable();
CurrPage.JobTaskLines.Page.SetPerTaskBillingFieldsVisible(Rec."Task Billing Method" = Rec."Task Billing Method"::"Multiple customers");
CurrPage.Update(false);
end;
var
FormatAddress: Codeunit "Format Address";
FeatureTelemetry: Codeunit "Feature Telemetry";
JobArchiveManagement: Codeunit "Job Archive Management";
EmptyShipToCodeErr: Label 'The Code field can only be empty if you select Custom Address in the Ship-to field.';
NoFieldVisible: Boolean;
JobTaskLinesEditable: Boolean;
ExtendedPriceEnabled: Boolean;
IsBillToCountyVisible: Boolean;
IsSellToCountyVisible: Boolean;
IsShipToCountyVisible: Boolean;
BillToInformationEditable: Boolean;
ShouldSearchForCustByName: Boolean;
protected var
SellToContact: Record Contact;
BillToContact: Record Contact;
ShipToOptions: Enum "Sales Ship-to Options";
BillToOptions: Enum "Sales Bill-to Options";
local procedure SetNoFieldVisible()
var
DocumentNoVisibility: Codeunit DocumentNoVisibility;
begin
NoFieldVisible := DocumentNoVisibility.JobNoIsVisible();
end;
local procedure ActivateFields()
begin
IsBillToCountyVisible := FormatAddress.UseCounty(Rec."Bill-to Country/Region Code");
IsSellToCountyVisible := FormatAddress.UseCounty(Rec."Sell-to Country/Region Code");
IsShipToCountyVisible := FormatAddress.UseCounty(Rec."Ship-to Country/Region Code");
end;
local procedure UpdateShipToBillToGroupVisibility()
begin
case true of
(Rec."Ship-to Code" = '') and Rec.ShipToNameEqualsSellToName() and Rec.ShipToAddressEqualsSellToAddress():
ShipToOptions := ShipToOptions::"Default (Sell-to Address)";
(Rec."Ship-to Code" = '') and (not Rec.ShipToNameEqualsSellToName() or not Rec.ShipToAddressEqualsSellToAddress()):
ShipToOptions := ShipToOptions::"Custom Address";
Rec."Ship-to Code" <> '':
ShipToOptions := ShipToOptions::"Alternate Shipping Address";
end;
case true of
(Rec."Bill-to Customer No." = Rec."Sell-to Customer No.") and Rec.BillToAddressEqualsSellToAddress():
BillToOptions := BillToOptions::"Default (Customer)";
(Rec."Bill-to Customer No." = Rec."Sell-to Customer No.") and (not Rec.BillToAddressEqualsSellToAddress()):
BillToOptions := BillToOptions::"Custom Address";
Rec."Bill-to Customer No." <> Rec."Sell-to Customer No.":
BillToOptions := BillToOptions::"Another Customer";
end;
end;
local procedure OpenWhseActivityLines()
var
WarehouseActivityLine: Record "Warehouse Activity Line";
TempWarehouseActivityLine: Record "Warehouse Activity Line" temporary;
begin
WarehouseActivityLine.SetCurrentKey("Whse. Document No.", "Whse. Document Type", "Activity Type");
WarehouseActivityLine.SetRange("Whse. Document Type", WarehouseActivityLine."Whse. Document Type"::Job);
WarehouseActivityLine.SetRange("Whse. Document No.", Rec."No.");
if WarehouseActivityLine.FindSet() then
repeat
TempWarehouseActivityLine := WarehouseActivityLine;
if TempWarehouseActivityLine.Insert() then;
until WarehouseActivityLine.Next() = 0;
WarehouseActivityLine.Reset();
WarehouseActivityLine.SetCurrentKey("Source Type", "Source Subtype", "Source No.", "Source Line No.", "Source Subline No.", "Unit of Measure Code", "Action Type", "Breakbulk No.", "Original Breakbulk");
WarehouseActivityLine.SetFilter("Source Type", '%1|%2', Database::Job, Database::"Job Planning Line");
WarehouseActivityLine.SetFilter("Source Subtype", '%1|%2', 0, "Job Planning Line Status"::Order.AsInteger());
WarehouseActivityLine.SetRange("Source No.", Rec."No.");
if WarehouseActivityLine.FindSet() then
repeat
TempWarehouseActivityLine := WarehouseActivityLine;
if TempWarehouseActivityLine.Insert() then;
until WarehouseActivityLine.Next() = 0;
TempWarehouseActivityLine.Reset();
Page.Run(Page::"Warehouse Activity Lines", TempWarehouseActivityLine);
end;
local procedure UpdateBillToInformationEditable()
begin
BillToInformationEditable :=
(BillToOptions = BillToOptions::"Custom Address") or
(Rec."Bill-to Customer No." <> Rec."Sell-to Customer No.");
end;
local procedure SetControlVisibility()
begin
ShouldSearchForCustByName := Rec.ShouldSearchForCustomerByName(Rec."Sell-to Customer No.");
end;
[IntegrationEvent(true, false)]
local procedure OnBeforeJobPlanningLinesAction(var Job: Record Job; var IsHandled: Boolean)
begin
end;
}