Skip to content

Commit

Permalink
public SetNoSeriesCurrentLineFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDurrer committed Nov 14, 2024
1 parent 8fc5fb4 commit 1c346ae
Showing 1 changed file with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ codeunit 305 "No. Series - Setup Impl."
#endif
begin
NoSeriesLine.Reset();
NoSeriesLine.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine.SetRange("Series Code", NoSeriesRec.Code);
NoSeriesLine.SetRange("Starting Date", 0D, WorkDate());
NoSeries.OnGetNoSeriesLineOnBeforeFindLast(NoSeriesLine);
GetNoSeriesLineFilters(NoSeriesLine, NoSeriesRec.Code, WorkDate());
#if not CLEAN24
#pragma warning disable AL0432
NoSeriesManagement.RaiseObsoleteOnNoSeriesLineFilterOnBeforeFindLast(NoSeriesLine);
Expand Down Expand Up @@ -138,6 +135,23 @@ codeunit 305 "No. Series - Setup Impl."
exit(NoSeriesSingle.MayProduceGaps());
end;

local procedure GetNoSeriesLineFilters(var NoSeriesLine: Record "No. Series Line"; NoSeriesCode: Code[20]; StartingDate: Date)
var
NoSeries: Codeunit "No. Series";

Check failure on line 140 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Translated) / Business Foundation (Translated)

AA0137 Variable 'NoSeries' is unused in 'GetNoSeriesLineFilters'.

Check failure on line 140 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Clean) / Business Foundation (Clean)

AA0137 Variable 'NoSeries' is unused in 'GetNoSeriesLineFilters'.

Check failure on line 140 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Default) / System Application Modules (Default)

AA0137 Variable 'NoSeries' is unused in 'GetNoSeriesLineFilters'.

Check failure on line 140 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Clean) / System Application Modules (Clean)

AA0137 Variable 'NoSeries' is unused in 'GetNoSeriesLineFilters'.

Check failure on line 140 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Default) / Business Foundation (Default)

AA0137 Variable 'NoSeries' is unused in 'GetNoSeriesLineFilters'.
NoSeriesLine2: Record "No. Series Line";

Check failure on line 141 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Translated) / Business Foundation (Translated)

AA0021 Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted.

Check failure on line 141 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Clean) / Business Foundation (Clean)

AA0021 Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted.

Check failure on line 141 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Default) / System Application Modules (Default)

AA0021 Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted.

Check failure on line 141 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Clean) / System Application Modules (Clean)

AA0021 Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted.

Check failure on line 141 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Default) / Business Foundation (Default)

AA0021 Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted.
CodeFieldChangedErr: Label 'Change of Series Code Field is on this Record not allowed.';
begin
NoSeriesLine2.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine2.SetRange("Starting Date", 0D, StartingDate);
NoSeriesLine2.SetRange("Series Code", NoSeriesCode);
RaiseSetAdditionalNoSeriesLineFilters(NoSeriesLine2);
If NoSeriesLine2."Series Code" <> NoSeriesCode then

Check failure on line 148 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Translated) / Business Foundation (Translated)

AA0241 You must use all lowercase letters for reserved keyword 'If'.

Check failure on line 148 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Clean) / Business Foundation (Clean)

AA0241 You must use all lowercase letters for reserved keyword 'If'.

Check failure on line 148 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Default) / System Application Modules (Default)

AA0241 You must use all lowercase letters for reserved keyword 'If'.

Check failure on line 148 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Clean) / System Application Modules (Clean)

AA0241 You must use all lowercase letters for reserved keyword 'If'.

Check failure on line 148 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Default) / Business Foundation (Default)

AA0241 You must use all lowercase letters for reserved keyword 'If'.
Error(CodeFieldChangedErr); // Extensions should never change the code field range, this is a bug that developers should know immediately.

NoSeriesLine.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine.CopyFilters(NoSeriesLine2);
end;

procedure CalculateOpen(NoSeriesLine: Record "No. Series Line"): Boolean
var
NoSeries: Codeunit "No. Series";
Expand Down Expand Up @@ -390,4 +404,9 @@ codeunit 305 "No. Series - Setup Impl."
if NumberSequence.Exists(Rec."Sequence Name") then
NumberSequence.Delete(Rec."Sequence Name");
end;

[IntegrationEvent(false, false)]
internal procedure RaiseSetAdditionalNoSeriesLineFilters(var NoSeriesLine: Record "No. Series Line");
begin
end;
}

0 comments on commit 1c346ae

Please sign in to comment.