Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ permissionset 6100 "E-Doc. Core - Objects"
codeunit "E-Doc. Sales Providers" = X,
codeunit "E-Doc. Create Sales Order" = X,
codeunit "E-Doc. Sales Doc. Helper" = X,
codeunit "E-Doc. Item Charge Mapping" = X,
codeunit "Receive Documents" = X,
codeunit ReceiveContext = X,
codeunit "Send Runner" = X,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Inventory.Item;

using Microsoft.eServices.EDocument;

tableextension 6536 "E-Doc. Item Charge" extends "Item Charge"
{
fields
{
field(6530; "E-Invoice Mapping"; Enum "Item Charge Mapping Override")
{
Caption = 'E-Invoice Mapping';
ToolTip = 'Specifies how this item charge is represented in exported e-documents, overriding the Item Charge Mapping setting of the exporting e-document service. If empty, the setting of the service applies. Automatic is itself an override: the item charge is classified based on its assignment to invoice lines, even if the service enforces a fixed representation.';
DataClassification = CustomerContent;
}
field(6531; "E-Invoice Reason Text"; Text[100])
{
Caption = 'E-Invoice Reason Text';
ToolTip = 'Specifies the allowance or charge reason text that is exported for this item charge in e-documents.';
DataClassification = CustomerContent;
}
field(6532; "E-Invoice Reason Code"; Code[10])
{
Caption = 'E-Invoice Reason Code';
ToolTip = 'Specifies the allowance or charge reason code that is exported for this item charge in e-documents.';
DataClassification = CustomerContent;
}
field(6533; "E-Invoice Unit Code"; Code[10])
{
Caption = 'E-Invoice Unit Code';
ToolTip = 'Specifies the unit code that is exported when this item charge is represented as an invoice line in e-documents. If empty, the unit code C62 is exported.';
DataClassification = CustomerContent;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Extensions;

using Microsoft.Inventory.Item;

/// <summary>
/// A page extension for the Item Charges page that offers the per item charge e-document overrides.
/// The columns are hidden, because they only take effect for e-document formats whose export evaluates them.
/// An extension for such a format makes the columns visible.
/// </summary>
pageextension 6537 "E-Doc. Item Charges" extends "Item Charges"
{
layout
{
addlast(Control1)
{
field("E-Invoice Mapping"; Rec."E-Invoice Mapping")
{
ApplicationArea = All;
Visible = false;
}
field("E-Invoice Reason Text"; Rec."E-Invoice Reason Text")
{
ApplicationArea = All;
Visible = false;
}
field("E-Invoice Reason Code"; Rec."E-Invoice Reason Code")
{
ApplicationArea = All;
Visible = false;
}
field("E-Invoice Unit Code"; Rec."E-Invoice Unit Code")
{
ApplicationArea = All;
Visible = false;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument;

/// <summary>
/// Overrides per item charge how the charge is represented in an exported e-document.
/// The blank value means that no override is set and the setting of the exporting service applies.
/// Automatic is a real override: it forces the automatic classification even if the service forces a structure.
/// </summary>
/// <remarks>
/// The enum is extensible, but the built-in classification only resolves the members declared here.
/// An extension that adds a member is responsible for turning it into a structure: subscribe to
/// "E-Doc. Item Charge Mapping".OnAfterGetItemChargeStructure and OnAfterGetSalesCrMemoItemChargeStructure,
/// read the value from the "Item Charge" the "No." of the charge line the event passes points at, and set
/// the Structure parameter accordingly. Both events are raised last, so the structure a subscriber sets wins
/// over the built-in classification.
/// </remarks>
enum 6535 "Item Charge Mapping Override"
{
Extensible = true;
Caption = 'Item Charge Mapping Override';

value(0; " ")
{
Caption = ' ', Locked = true;
}
value(1; Automatic)
{
Caption = 'Automatic';
}
value(2; "Document Allowance/Charge")
{
Caption = 'Document Level Allowance/Charge';
}
value(3; "Line Allowance/Charge")
{
Caption = 'Invoice Line Allowance/Charge';
}
value(4; "Line with Unit Code")
{
Caption = 'Invoice Line with Unit Code';
}
}
Loading
Loading