Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/PowerShell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/UpdateALGoProjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
updateBranches: ${{ steps.getOfficialBranches.outputs.branchesJson }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/UpdateBCArtifactVersion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
updateBranches: ${{ steps.getOfficialBranches.outputs.branchesJson }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/UpdatePackageVersions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
updateBranches: ${{ steps.getOfficialBranches.outputs.branchesJson }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/WorkitemValidation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand All @@ -40,7 +40,7 @@ jobs:
needs: GitHubIssueValidation
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
using Microsoft.eServices.EDocument.Service.Participant;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.eServices.EDocument.Service.Participant;

permissionset 6103 "E-Doc. Core - Basic"
{
Expand Down
4 changes: 3 additions & 1 deletion src/Apps/W1/EDocument/App/src/Document/EDocument.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ table 6121 "E-Document"
Caption = 'Last Clearance Request Time';
DataClassification = SystemMetadata;
}

#endregion
}
keys
Expand All @@ -314,6 +313,9 @@ table 6121 "E-Document"
key(Key4; SystemCreatedAt)
{
}
key(DueDate; "Due Date")
{
}
}

trigger OnDelete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.Foundation.Attachment;
using Microsoft.Purchases.Vendor;
using System.Agents;
using System.Agents.TaskPane;

page 6105 "Inbound E-Documents"
{
Expand All @@ -19,7 +23,7 @@ page 6105 "Inbound E-Documents"
DeleteAllowed = true;
InsertAllowed = false;
ModifyAllowed = false;
SourceTableView = sorting(SystemCreatedAt) order(descending) where(Direction = const("E-Document Direction"::Incoming));
SourceTableView = sorting("Due Date") order(ascending) where(Direction = const("E-Document Direction"::Incoming));

layout
{
Expand All @@ -45,6 +49,68 @@ page 6105 "Inbound E-Documents"
EDocumentHelper.OpenDraftPage(Rec);
end;
}
field(ConfirmedVendorName; ConfirmedVendorTxt)
{
Caption = 'Vendor Name';
ToolTip = 'Specifies the bill-to/pay-to name of the document that was confirmed by the user during processing.';
trigger OnDrillDown()
var
Vendor: Record Vendor;
VendorCardPage: Page "Vendor Card";
begin
if Rec."Bill-to/Pay-to No." = '' then
exit;
Vendor.Get(Rec."Bill-to/Pay-to No.");
Vendor.SetRecFilter();
VendorCardPage.SetRecord(Vendor);
VendorCardPage.RunModal();
end;
}
field("Import Processing Status"; Rec."Import Processing Status")
{
Caption = 'Processing Status';
ToolTip = 'Specifies the stage in which the processing of this document is in.';
}
field("Document Date"; Rec."Document Date")
{
Caption = 'Document Date';
ToolTip = 'Specifies the date of the document.';
}
field("Due Date"; Rec."Due Date")
{
Caption = 'Due Date';
ToolTip = 'Specifies the due date of the document.';
}
field(TaskID; AgentTask.ID)
{
Caption = 'Agent Task No.';
ToolTip = 'Specifies the task number for the document.';
Editable = false;
ExtendedDatatype = Task;
BlankNumbers = BlankZero;

trigger OnDrillDown()
var
Task: Record "Agent Task";
TaskPane: Codeunit "Task Pane";
begin
if AgentTask.ID = 0 then
exit;
Task.Get(AgentTask.ID);
TaskPane.ShowTask(Task);
end;
}
field(TaskStatus; AgentTask.Status)
{
Caption = 'Task Status';
ToolTip = 'Specifies the status of the agent task for this document.';
Editable = false;
}
field("Vendor Name"; EDocumentPurchaseHeader."Vendor Company Name")
{
Caption = 'Sender';
ToolTip = 'Specifies the vendor name of the document.';
}
field(SystemCreatedAt; Rec.SystemCreatedAt)
{
Caption = 'Received At';
Expand All @@ -66,16 +132,6 @@ page 6105 "Inbound E-Documents"
Caption = 'Source Details';
ToolTip = 'Specifies the details about the source of the document.';
}
field("Vendor Name"; VendorNameTxt)
{
Caption = 'Sender';
ToolTip = 'Specifies the vendor name of the document.';
}
field("Import Processing Status"; Rec."Import Processing Status")
{
Caption = 'Processing Status';
ToolTip = 'Specifies the stage in which the processing of this document is in.';
}
field("Document Type"; Rec."Document Type")
{
Caption = 'Document Type';
Expand Down Expand Up @@ -342,9 +398,11 @@ page 6105 "Inbound E-Documents"
var
EDocumentProcessing: Codeunit "E-Document Processing";
begin
if EDocumentPurchaseHeader.Get(Rec."Entry No") then;
RecordLinkTxt := EDocumentProcessing.GetRecordLinkText(Rec);
PopulateDocumentNameTxt();
PopulateVendorNameTxt();
PopulateConfirmedVendorNameTxt();
PopulateTaskInfo();
SetDocumentTypeStyleExpression();

HasPdf := false;
Expand All @@ -368,9 +426,17 @@ page 6105 "Inbound E-Documents"
DocumentNameTxt := CaptionBuilder.ToText();
end;

local procedure PopulateVendorNameTxt()
local procedure PopulateConfirmedVendorNameTxt()
begin
ConfirmedVendorTxt := Rec."Bill-to/Pay-to Name"
end;

local procedure PopulateTaskInfo()
begin
VendorNameTxt := Rec."Bill-to/Pay-to Name";
AgentTask.SetRange("Company Name", CompanyName());
AgentTask.SetRange("External ID", Format(Rec."Entry No"));
if not AgentTask.IsEmpty() then
Clear(AgentTask);
end;

trigger OnOpenPage()
Expand Down Expand Up @@ -494,8 +560,10 @@ page 6105 "Inbound E-Documents"

var
EDocDataStorage: Record "E-Doc. Data Storage";
EDocumentPurchaseHeader: Record "E-Document Purchase Header";
AgentTask: Record "Agent Task";
EDocumentHelper: Codeunit "E-Document Helper";
RecordLinkTxt, VendorNameTxt, DocumentNameTxt, DocumentTypeStyleTxt : Text;
RecordLinkTxt, DocumentNameTxt, DocumentTypeStyleTxt, ConfirmedVendorTxt : Text;
HasPdf: Boolean;
#if not CLEAN27
EmailVisibilityFlag: Boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Microsoft.eServices.EDocument.Processing.AI;
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.Purchases.Document;
using Microsoft.Finance.AllocationAccount;
using Microsoft.Purchases.History;
using Microsoft.Purchases.Vendor;
using System.AI;
Expand Down Expand Up @@ -177,6 +178,7 @@ codeunit 6177 "E-Doc. Historical Matching" implements "AOAI Function", IEDocAISy
local procedure LoadHistoricalDataIntoTempTable(var TempPurchInvLine: Record "Purch. Inv. Line" temporary; VendorNo: Code[20]; HistoricalMatchingConfig: Text)
var
PurchInvLine: Record "Purch. Inv. Line";
AllocationAccount: Record "Allocation Account";
FeatureTelemetry: Codeunit "Feature Telemetry";
OneYearAgoDate: Date;
RecordCount: Integer;
Expand All @@ -202,6 +204,9 @@ codeunit 6177 "E-Doc. Historical Matching" implements "AOAI Function", IEDocAISy
TempPurchInvLine.Copy(PurchInvLine);
repeat
TempPurchInvLine := PurchInvLine;
if TempPurchInvLine."Allocation Account No." <> '' then
if AllocationAccount.Get(TempPurchInvLine."Allocation Account No.") then
TempPurchInvLine.Description := AllocationAccount.Name;
TempPurchInvLine.Insert();
RecordCount += 1;
until (PurchInvLine.Next() = 0) or (RecordCount >= MaxHistoricalRecords);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// ------------------------------------------------------------------------------------------------
namespace Microsoft.EServices.EDocument.Processing.Import.Purchase;

using System.Utilities;
using System.IO;
using System.Utilities;

/// <summary>
/// Facade codeunit for managing sample purchase invoice PDF generation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
// ------------------------------------------------------------------------------------------------
namespace Microsoft.EServices.EDocument.Processing.Import.Purchase;

using Microsoft.Purchases.Document;
using System.Utilities;
using Microsoft.Purchases.Vendor;
using Microsoft.Inventory.Item;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Foundation.Period;
using Microsoft.Foundation.UOM;
using Microsoft.Foundation.Company;
using Microsoft.Finance.GeneralLedger.Setup;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.Company;
using Microsoft.Foundation.Period;
using Microsoft.Foundation.UOM;
using Microsoft.Inventory.Item;
using Microsoft.Purchases.Document;
using Microsoft.Purchases.Vendor;
using System.Utilities;

/// <summary>
/// The purpose of the codeunit is to generate sample purchase invoices in PDF format.
Expand Down Expand Up @@ -119,23 +119,7 @@ codeunit 6209 "E-Doc Sample Purchase Invoice"
/// Adds a sample purchase invoice line to the current temporary header.
/// </summary>
procedure AddLine(LineType: Enum "Purchase Line Type"; No: Code[20]; Description: Text[100]; Quantity: Decimal; DirectUnitCost: Decimal; DeferralCode: Code[10]; UnitOfMeasureCode: Code[10])
var
Item: Record Item;
GLAccount: Record "G/L Account";
begin
if Description = '' then
case LineType of
Enum::"Purchase Line Type"::Item:
begin
Item.Get(No);
Description := Item.Description;
end;
Enum::"Purchase Line Type"::"G/L Account":
begin
GLAccount.Get(No);
Description := GLAccount.Name;
end;
end;
AddLine(TempEDocPurchLine, TempEDocPurchHeader, LineType, No, Description, Quantity, DirectUnitCost, DeferralCode, UnitOfMeasureCode);
end;

Expand Down Expand Up @@ -166,7 +150,7 @@ codeunit 6209 "E-Doc Sample Purchase Invoice"
EDocPurchaseLine."[BC] Purchase Line Type" := LineType;
EDocPurchaseLine."[BC] Purchase Type No." := No;
EDocPurchaseLine."Product Code" := No;
EDocPurchaseLine.Description := Description;
EDocPurchaseLine.Description := GetLineDescription(LineType, No, Description);
EDocPurchaseLine.Quantity := Quantity;
if UnitOfMeasureCode <> '' then
UnitOfMeasure.Get(UnitOfMeasureCode)
Expand Down Expand Up @@ -210,4 +194,26 @@ codeunit 6209 "E-Doc Sample Purchase Invoice"
begin
exit(CopyStr(TempEDocPurchHeader."Sales Invoice No.", 1, MaxStrLen(SamplePurchInvFile."File Name")))
end;

local procedure GetLineDescription(LineType: Enum "Purchase Line Type"; No: Code[20]; Description: Text[100]): Text[100]
var
Item: Record Item;
GLAccount: Record "G/L Account";
begin
if Description <> '' then
exit(Description);
case LineType of
Enum::"Purchase Line Type"::Item:
begin
Item.Get(No);
exit(Item.Description);
end;
Enum::"Purchase Line Type"::"G/L Account":
begin
GLAccount.Get(No);
exit(GLAccount.Name);
end;
end;
exit('');
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Microsoft.EServices.EDocument.Processing.Import.Purchase;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.Company;
using Microsoft.Inventory.Location;
using System.Utilities;
using Microsoft.Purchases.Vendor;
using System.Utilities;

/// <summary>
/// Report for generating sample purchase invoice PDFs
Expand Down
Loading
Loading