You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local procedure TestGLAccounts()
var
AccountToTest: Record "G/L Account";
begin
// First test within the Subsidiary Chart of Accounts
AccountToTest := TempSubsidGLAcc;
if AccountToTest.TranslationMethodConflict(TempSubsidGLAcc) then begin
if TempSubsidGLAcc.GetFilter("Consol. Debit Acc.") <> '' then
ReportError(
StrSubstNo(
Text021,
TempSubsidGLAcc."No.",
TempSubsidGLAcc.FieldCaption("Consol. Debit Acc."),
TempSubsidGLAcc.FieldCaption("Consol. Translation Method"),
AccountToTest."No.", BusUnit.TableCaption()))
else
ReportError(
StrSubstNo(Text021,
TempSubsidGLAcc."No.",
TempSubsidGLAcc.FieldCaption("Consol. Credit Acc."),
TempSubsidGLAcc.FieldCaption("Consol. Translation Method"),
AccountToTest."No.", BusUnit.TableCaption()));
end else begin
TempSubsidGLAcc.Reset();
TempSubsidGLAcc := AccountToTest;
TempSubsidGLAcc.Find('=');
end;
// NEW
// OnBeforeTestForConflictsTestGLAccounts(TempSubsidGLAcc);
//
// Then, test for conflicts between subsidiary and parent (consolidated)
if TempSubsidGLAcc."Consol. Debit Acc." <> '' then begin
if not ConsolidGLAcc.Get(TempSubsidGLAcc."Consol. Debit Acc.") then
ReportError(
StrSubstNo(Text022,
TempSubsidGLAcc.FieldCaption("Consol. Debit Acc."), TempSubsidGLAcc."Consol. Debit Acc.",
TempSubsidGLAcc.TableCaption(), TempSubsidGLAcc."No.", BusUnit.TableCaption()));
if (TempSubsidGLAcc."Consol. Translation Method" <> ConsolidGLAcc."Consol. Translation Method") and
(BusUnit."File Format" <> BusUnit."File Format"::"Version 3.70 or Earlier (.txt)")
then
ReportError(
StrSubstNo(Text023,
TempSubsidGLAcc.TableCaption(), TempSubsidGLAcc."No.",
TempSubsidGLAcc.FieldCaption("Consol. Translation Method"), ConsolidGLAcc."No.",
TempSubsidGLAcc."Consol. Translation Method", ConsolidGLAcc."Consol. Translation Method",
BusUnit.TableCaption()));
end;
[IntegrationEvent(true, false)]
local procedure OnBeforeTestForConflictsTestGLAccounts(TempSubsidGLAcc: Record "G/L Account" temporary)
begin
end;
Additional context
To be able to control or create accounts according to customer's request.
The text was updated successfully, but these errors were encountered:
Describe the request
Additional context
To be able to control or create accounts according to customer's request.
The text was updated successfully, but these errors were encountered: