-
Notifications
You must be signed in to change notification settings - Fork 687
[BC Idea]: Add 'Remaining amount' field to G/L entries for partially reviewed entries #28791
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
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5c04f77
Add Remaining Amount field to Review G/L Entries and G/L Entry Review…
Bertverbeek4PS aa5b9d7
Add TODO comment for Remaining Amount field logic in Review G/L Entri…
Bertverbeek4PS 6b0785c
Initial commit
Bertverbeek4PS c934ec4
Refactor G/L Entry Review logic and add upgrade handling for review e…
Bertverbeek4PS b9c82fa
Add G/L Account No. field to review log and related entries; update p…
Bertverbeek4PS 0490bc3
Add G/L Account No. handling and update caption logic in Reviewed G/L…
Bertverbeek4PS c616da0
Fix balance calculation in OnModifyRecord trigger to account for chan…
Bertverbeek4PS 85f8e21
Added 3 tests
Bertverbeek4PS d21f903
Reorder using directives for consistency in Reviewed G/L Entries page
Bertverbeek4PS 5ca8d19
Refactor Reviewed Amount calculation for consistency
Bertverbeek4PS 35361f1
Remove unnecessary permissions for "G/L Entry Review Setup" in Review…
Bertverbeek4PS ea5149c
Update obsolete state handling in G/L Entry Review Entry table
Bertverbeek4PS 5761342
Add missing properties for G/L Entry Review Log table
Bertverbeek4PS 36a11b4
Remove "Reviewed Amount" field from G/L Entry Review Entry table
Bertverbeek4PS f96fbde
Update DataClassification for "Reviewed Amount" and "G/L Account No."…
Bertverbeek4PS 8066d14
Update Reviewed Amount handling in G/L Entry Review Log and Entry tables
Bertverbeek4PS 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
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
51 changes: 51 additions & 0 deletions
51
Apps/W1/ReviewGLEntries/app/src/codeunits/Upgrade.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,51 @@ | ||
| namespace Microsoft.Finance.GeneralLedger.Review; | ||
|
|
||
| using System.Upgrade; | ||
| using Microsoft.Finance.GeneralLedger.Ledger; | ||
| codeunit 22201 "Upgrade" | ||
| { | ||
| Access = Internal; | ||
| Subtype = Upgrade; | ||
|
|
||
| trigger OnUpgradePerCompany() | ||
| begin | ||
| MovetoGLEntryReviewLog(); | ||
| end; | ||
|
|
||
| local procedure MovetoGLEntryReviewLog() | ||
| var | ||
| GLEntryReviewEntry: Record "G/L Entry Review Entry"; | ||
| GLEntryReviewLog: Record "G/L Entry Review Log"; | ||
| GlEntry: Record "G/L Entry"; | ||
| UpgradeTag: Codeunit "Upgrade Tag"; | ||
| begin | ||
| if UpgradeTag.HasUpgradeTag(UpgradeReviewGLEntryTag) then exit; | ||
|
|
||
| if GLEntryReviewEntry.FindSet() then | ||
| repeat | ||
| GLEntryReviewLog.Init(); | ||
| GLEntryReviewLog."G/L Entry No." := GLEntryReviewEntry."G/L Entry No."; | ||
JesperSchulz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| GLEntryReviewLog."Reviewed Identifier" := GLEntryReviewEntry."Reviewed Identifier"; | ||
| GLEntryReviewLog."Reviewed By" := GLEntryReviewEntry."Reviewed By"; | ||
| if GlEntry.Get(GLEntryReviewEntry."G/L Entry No.") then begin | ||
| GLEntryReviewLog."G/L Account No." := GlEntry."G/L Account No."; | ||
| GLEntryReviewLog."Reviewed Amount" := GlEntry.Amount; | ||
| end; | ||
| GLEntryReviewLog.Insert(true); | ||
| until GLEntryReviewEntry.Next() = 0; | ||
|
|
||
| UpgradeTag.SetUpgradeTag(UpgradeReviewGLEntryTag); | ||
| end; | ||
|
|
||
|
|
||
| [EventSubscriber(ObjectType::Codeunit, Codeunit::"Upgrade Tag", 'OnGetPerCompanyUpgradeTags', '', false, false)] | ||
| local procedure RegisterPerCompanyTags(var PerCompanyUpgradeTags: List of [Code[250]]) | ||
| begin | ||
| PerCompanyUpgradeTags.Add(UpgradeReviewGLEntryTag()); | ||
| end; | ||
|
|
||
| local procedure UpgradeReviewGLEntryTag(): Code[250] | ||
| begin | ||
| exit('MS-547765-UpdateReviewGLEntry-20250704'); | ||
| end; | ||
| } | ||
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
54 changes: 54 additions & 0 deletions
54
Apps/W1/ReviewGLEntries/app/src/pages/ReviewedGLEntries.Page.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,54 @@ | ||
| namespace Microsoft.Finance.GeneralLedger.Review; | ||
|
|
||
| using Microsoft.Finance.GeneralLedger.Account; | ||
Bertverbeek4PS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| using Microsoft.Finance.GeneralLedger.Ledger; | ||
| page 22208 "Reviewed G/L Entries" | ||
| { | ||
| Caption = 'Reviewed G/L Entries'; | ||
| PageType = List; | ||
| DataCaptionExpression = GetCaption(); | ||
| ApplicationArea = Basic, Suite; | ||
| DeleteAllowed = false; | ||
| InsertAllowed = false; | ||
| ModifyAllowed = false; | ||
| Editable = false; | ||
| Permissions = tabledata "G/L Entry" = r; | ||
| SourceTable = "G/L Entry Review Log"; | ||
|
|
||
| layout | ||
| { | ||
| area(Content) | ||
| { | ||
| repeater(Group) | ||
| { | ||
| field("Posting Date"; GLEntry."Posting Date") { } | ||
| field("Document Type"; GLEntry."Document Type") { } | ||
| field("Document No."; GLEntry."Document No.") { } | ||
| field(Description; GLEntry.Description) { } | ||
| field(Amount; GLEntry.Amount) { } | ||
| field("Reviewed Identifier"; Rec."Reviewed Identifier") { } | ||
| field("Reviewed By"; Rec."Reviewed By") { } | ||
| field("Reviewed Amount"; Rec."Reviewed Amount") { } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| var | ||
| GLEntry: Record "G/L Entry"; | ||
| CaptionLbl: Label '%1 %2', Comment = '%1 is the G/L Account No. and %2 is the G/L Account Name'; | ||
|
|
||
| trigger OnAfterGetRecord() | ||
| begin | ||
| GLEntry.Get(Rec."G/L Entry No."); | ||
| end; | ||
|
|
||
| local procedure GetCaption(): Text[250] | ||
| var | ||
| GLAccount: record "G/L Account"; | ||
| begin | ||
| if not GLAccount.Get(Rec."G/L Account No.") then | ||
| if Rec.GetFilter(Rec."G/L Account No.") <> '' then | ||
| GLAccount.Get(Rec.GetRangeMin(Rec."G/L Account No.")); | ||
| exit(StrSubstNo(CaptionLbl, GLAccount."No.", GLAccount.Name)); | ||
| end; | ||
| } | ||
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.