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 AB#644801
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
Comment thread src/Apps/US/IRSForms/test/src/IRSReportingPeriodTests.Codeunit.al
@v-praghav v-praghav self-assigned this Aug 1, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Request Changes

What this PR does

This PR changes CopyReportingPeriodSetupPerCompany so copied IRS 1099 Vendor Form Box Adj. records keep their key fields for the new period but reset Amount to 0. It also adds a test that creates an adjustment in the source period, copies setup, and expects a zero-amount adjustment in the target period.

The amount carryover is fixed, but the target period still gets an adjustment record. That matters because adjustment records are not only storage for an amount: the vendor/form-box calculation code creates a buffer row when an adjustment record exists, even if the amount is zero. So the fix still copies the adjustment artifact into the new period instead of leaving the new period without adjustments.

Suggestions

S1 - Copied zero adjustments still affect target period
Do not copy IRS 1099 Vendor Form Box Adj. records unless the product requirement is to create zero-amount adjustment placeholders. A zero-amount adjustment record still exists in the target period and can create vendor/form-box buffer rows, so the bug is only partly fixed.

Risk assessment and necessity

Risk: This area affects US 1099 reporting amounts. Resetting the amount removes the direct financial carryover, but copied zero adjustment records can still change what the target period shows in vendor/form-box calculations and adjustment pages.

Necessity: The change is needed because Copy Setup should not bring prior-period 1099 adjustment amounts into a new reporting period. The linked ADO item is a Bug, but there was no [AI-REPRO] comment available, so this review relies on the work item description, PR diff, and adjustment consumer code.


[AI-PR-REVIEW] version=1 system=github pr=9868 round=1 by=alexei-dobriansky at=2026-08-03T10:03:14.847Z lastSha=884ecd3fe94a1bef69131b3182c74c47b32c64e7 suggestions=S1

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.

3 participants