Skip to content
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

GP - Correct issue with IRS 1099 data migration #27784

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 2 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
@@ -1,11 +1,13 @@
namespace Microsoft.DataMigration.GP;

using System.Integration;
#if not CLEAN25
using System.Environment.Configuration;
#if not CLEAN25
using Microsoft.Finance.VAT.Reporting;
#endif
using Microsoft.Purchases.Vendor;


codeunit 42004 "GP Cloud Migration US"
{
var
Expand All @@ -31,6 +33,9 @@ codeunit 42004 "GP Cloud Migration US"
begin
if GPCompanyAdditionalSettings.GetMigrateVendor1099Enabled() then begin
EnsureSupportedReportingYear();
#if not CLEAN25
EnsureOriginalIRS1099FeatureInitializedIfNeeded();
#endif
SetupIRSFormsFeatureIfNeeded();
BindSubscription(GPPopulateVendor1099Data);
GPPopulateVendor1099Data.Run();
Expand Down Expand Up @@ -73,17 +78,10 @@ codeunit 42004 "GP Cloud Migration US"

internal procedure IsIRSFormsFeatureEnabled(): Boolean
var
#if not CLEAN25
FeatureManagementFacade: Codeunit "Feature Management Facade";
#endif
IsEnabled: Boolean;
begin
IsEnabled := true;

#if not CLEAN25
IsEnabled := FeatureManagementFacade.IsEnabled(IRSFormFeatureKeyIdTok);
jaymckinney-enavate marked this conversation as resolved.
Show resolved Hide resolved
#endif

exit(IsEnabled);
end;

Expand All @@ -101,4 +99,18 @@ codeunit 42004 "GP Cloud Migration US"

GPIRSFormData.CreateIRSFormsReportingPeriodIfNeeded(ReportingYear);
end;

#if not CLEAN25
local procedure EnsureOriginalIRS1099FeatureInitializedIfNeeded()
var
#pragma warning disable AL0432
IRS1099FormBox: Record "IRS 1099 Form-Box";
#pragma warning restore AL0432
begin
if IsIRSFormsFeatureEnabled() then
exit;

IRS1099FormBox.InitIRS1099FormBoxes();
end;
#endif
}
Loading