-
Notifications
You must be signed in to change notification settings - Fork 459
[Master] - Slice 641591: EUDR Certificate Capture for Items #11217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
v-rohangarg20
merged 13 commits into
main
from
features/Slice-641591-EUDR-Certificate-Capture-for-Items
Sep 15, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f705cdc
Add EUDR certificate capture
v-rohangarg20 64b6255
Add namespace to EUDR certificate capture test
v-rohangarg20 742793b
Remove Base App Changes
v-rohangarg20 0bbf5fb
Add EUDR certificate capture
v-rohangarg20 b0be936
Address EUDR review findings
v-rohangarg20 87fe72c
Update Sustainability object permissions
v-rohangarg20 27c3aea
Fix EUDR item tracking declaration
v-rohangarg20 0b6bd0f
Refine EUDR item tracking lookup
v-rohangarg20 841c6bd
BB Fix
v-rohangarg20 b85b286
BB Fix 2
v-rohangarg20 8c22e4e
Fix EUDR certificate test date
v-rohangarg20 4da20b1
BB Fix 3
v-rohangarg20 27fdc2a
Initialize company payment information for EUDR tests
v-rohangarg20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/Apps/W1/Sustainability/app/src/EUDR/EUDRCommodity.Enum.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // ------------------------------------------------------------------------------------------------ | ||
| namespace Microsoft.Sustainability.EUDR; | ||
|
|
||
| enum 6234 "EUDR Commodity" | ||
| { | ||
| Extensible = false; | ||
|
|
||
| value(0; " ") | ||
| { | ||
| Caption = ' '; | ||
| } | ||
| value(1; Cattle) | ||
| { | ||
| Caption = 'Cattle'; | ||
| } | ||
| value(2; Cocoa) | ||
| { | ||
| Caption = 'Cocoa'; | ||
| } | ||
| value(3; Coffee) | ||
| { | ||
| Caption = 'Coffee'; | ||
| } | ||
| value(4; "Oil palm") | ||
| { | ||
| Caption = 'Oil palm'; | ||
| } | ||
| value(5; Rubber) | ||
| { | ||
| Caption = 'Rubber'; | ||
| } | ||
| value(6; Soya) | ||
| { | ||
| Caption = 'Soya'; | ||
| } | ||
| value(7; Wood) | ||
| { | ||
| Caption = 'Wood'; | ||
| } | ||
| } |
42 changes: 42 additions & 0 deletions
42
src/Apps/W1/Sustainability/app/src/EUDR/EUDRLotInfoTrackingMgmt.Codeunit.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.Sustainability.EUDR; | ||
|
|
||
| using Microsoft.Inventory.Tracking; | ||
| using Microsoft.Purchases.Document; | ||
|
|
||
| codeunit 6288 "EUDR Lot Info. Tracking Mgmt" | ||
|
v-rohangarg20 marked this conversation as resolved.
v-rohangarg20 marked this conversation as resolved.
|
||
| { | ||
| SingleInstance = true; | ||
|
|
||
| var | ||
| CurrentCountryRegionCode: Code[10]; | ||
|
|
||
| internal procedure SetCountryRegionCode(TrackingSpecification: Record "Tracking Specification") | ||
|
v-rohangarg20 marked this conversation as resolved.
v-rohangarg20 marked this conversation as resolved.
|
||
| var | ||
| PurchaseHeader: Record "Purchase Header"; | ||
| begin | ||
|
v-rohangarg20 marked this conversation as resolved.
|
||
| if TrackingSpecification."Source Type" = 0 then | ||
| exit; | ||
|
|
||
| if TrackingSpecification."Source Type" <> Database::"Purchase Line" then begin | ||
| ClearCountryRegionCode(); | ||
| exit; | ||
| end; | ||
|
|
||
| if PurchaseHeader.Get(Enum::"Purchase Document Type".FromInteger(TrackingSpecification."Source Subtype"), TrackingSpecification."Source ID") then | ||
| CurrentCountryRegionCode := PurchaseHeader."Buy-from Country/Region Code"; | ||
| end; | ||
|
|
||
| internal procedure GetCurrentCountryRegionCode(): Code[10] | ||
| begin | ||
| exit(CurrentCountryRegionCode); | ||
| end; | ||
|
|
||
| internal procedure ClearCountryRegionCode() | ||
| begin | ||
| Clear(CurrentCountryRegionCode); | ||
| end; | ||
| } | ||
75 changes: 75 additions & 0 deletions
75
src/Apps/W1/Sustainability/app/src/EUDR/EUDRLotNoInformation.TableExt.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // ------------------------------------------------------------------------------------------------ | ||
| namespace Microsoft.Sustainability.EUDR; | ||
|
|
||
| using Microsoft.Foundation.Address; | ||
| using Microsoft.Inventory.Tracking; | ||
|
|
||
| tableextension 6288 "EUDR Lot No. Information" extends "Lot No. Information" | ||
| { | ||
| fields | ||
| { | ||
| field(6210; "EUDR Certificate No."; Code[50]) | ||
| { | ||
| Caption = 'EUDR Certificate No.'; | ||
| ToolTip = 'Specifies the certificate number that documents EUDR compliance for this lot.'; | ||
| DataClassification = CustomerContent; | ||
| } | ||
| field(6211; "Certification Scheme"; Text[100]) | ||
| { | ||
| Caption = 'Certification Scheme'; | ||
| ToolTip = 'Specifies the certification scheme that applies to this lot, such as FSC, PEFC, RSPO, Rainforest Alliance, or Fairtrade.'; | ||
| DataClassification = CustomerContent; | ||
| } | ||
| field(6212; "EUDR Valid From"; Date) | ||
|
v-rohangarg20 marked this conversation as resolved.
|
||
| { | ||
| Caption = 'Valid From'; | ||
| ToolTip = 'Specifies the first date that the EUDR certificate is valid for this lot.'; | ||
| DataClassification = CustomerContent; | ||
|
|
||
| trigger OnValidate() | ||
|
v-rohangarg20 marked this conversation as resolved.
v-rohangarg20 marked this conversation as resolved.
|
||
| begin | ||
| if (Rec."EUDR Valid From" <> 0D) and (Rec."EUDR Valid To" <> 0D) then | ||
| if Rec."EUDR Valid From" > Rec."EUDR Valid To" then | ||
| Error(EUDRValidFromAfterValidToErr, Rec.FieldCaption("EUDR Valid From"), Rec.FieldCaption("EUDR Valid To")); | ||
|
v-rohangarg20 marked this conversation as resolved.
|
||
| end; | ||
| } | ||
| field(6213; "EUDR Valid To"; Date) | ||
| { | ||
| Caption = 'Valid To'; | ||
| ToolTip = 'Specifies the last date that the EUDR certificate is valid for this lot.'; | ||
| DataClassification = CustomerContent; | ||
|
|
||
| trigger OnValidate() | ||
| begin | ||
| if (Rec."EUDR Valid From" <> 0D) and (Rec."EUDR Valid To" <> 0D) then | ||
| if Rec."EUDR Valid To" < Rec."EUDR Valid From" then | ||
| Error(EUDRValidFromAfterValidToErr, Rec.FieldCaption("EUDR Valid From"), Rec.FieldCaption("EUDR Valid To")); | ||
| end; | ||
| } | ||
| field(6214; "Country/Region of Prod. Code"; Code[10]) | ||
| { | ||
| Caption = 'Country/Region of Production Code'; | ||
| TableRelation = "Country/Region"; | ||
| ToolTip = 'Specifies the country or region where the goods in this lot were produced. You can change the value if the distributor provides different origin information.'; | ||
| DataClassification = CustomerContent; | ||
| } | ||
| field(6215; "DDS Reference Number"; Code[50]) | ||
| { | ||
| Caption = 'DDS Reference Number'; | ||
| ToolTip = 'Specifies the reference number issued when the due diligence statement is registered in the EU Information System, TRACES.'; | ||
| DataClassification = CustomerContent; | ||
| } | ||
| field(6216; "DDS Verification No."; Code[50]) | ||
| { | ||
| Caption = 'DDS Verification No.'; | ||
| ToolTip = 'Specifies the verification number for the EUDR due diligence statement.'; | ||
| DataClassification = CustomerContent; | ||
| } | ||
| } | ||
|
|
||
| var | ||
| EUDRValidFromAfterValidToErr: Label '%1 must not be after %2.', Comment = '%1 = Valid From field caption, %2 = Valid To field caption'; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.