Skip to content

[MAIN]-Bug 644801-IRS Reporting Period - Copy Setup process will copy the 1099 Adjustments as part of the process of copying from one IRS Reporting Period to a new Period setup. - #9868

Open
v-praghav wants to merge 1 commit into
mainfrom
bugs/Bug-644801-IRS-Reporting-Period-Copy-Setup-process-will-copy-main
Open

[MAIN]-Bug 644801-IRS Reporting Period - Copy Setup process will copy the 1099 Adjustments as part of the process of copying from one IRS Reporting Period to a new Period setup.#9868
v-praghav wants to merge 1 commit into
mainfrom
bugs/Bug-644801-IRS-Reporting-Period-Copy-Setup-process-will-copy-main

Conversation

@v-praghav

@v-praghav v-praghav commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What & why

Issue: Copy Setup was incorrectly carrying 1099 adjustment amounts from source period to target period.

Cause: The copy logic duplicated the full adjustment record, including the Amount field, instead of resetting it for the new period.

Linked work

AB#644801

Fixes #
Solution: Update copy logic to explicitly set Amount = 0 before insert in target period, and add an automated test to validate this behavior during setup copy.

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)

Risk & compatibility

@github-actions github-actions Bot added the Finance GitHub request for Finance area label Jul 31, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 31, 2026
@v-praghav
v-praghav marked this pull request as ready for review July 31, 2026 16:52
@v-praghav
v-praghav requested a review from a team July 31, 2026 16:52
@v-praghav
v-praghav requested a review from a team as a code owner July 31, 2026 16:52
@v-praghav v-praghav changed the title Bug 644801-IRS Reporting Period - Copy Setup process will copy the 1099 Adjustments as part of the process of copying from one IRS Reporting Period to a new Period setup. [MAIN]-Bug 644801-IRS Reporting Period - Copy Setup process will copy the 1099 Adjustments as part of the process of copying from one IRS Reporting Period to a new Period setup. Jul 31, 2026
LibraryTestInitialize.OnAfterTestSuiteInitialize(Codeunit::"IRS Reporting Period Tests");
end;

[MessageHandler]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟠\ High\ Severity\ —\ Testing}$

CopySetupMessageHandler is an empty [MessageHandler] with no Enqueue/Dequeue verification, so the new test VendorFormBoxAdjustmentAmountIsResetWhenCopyingSetup only proves that some Message(...) call was raised during CopyPeriodSetup. It never asserts the expected message text (e.g. via LibraryVariableStorage.Enqueue/Dequeue and Assert.ExpectedMessage) or that it fired the expected number of times, so the test would stay green even if the wrong message, or an unexpected extra message, were shown.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.26.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants