Skip to content

[Event Request] codeunit 7600 "Calendar Management" #30209

Description

@Simon110394

Why do you need this change?

We need an event in ReverseSign procedure in order to be able to calculate NewDateFormulaExpr differently.
More in details, with the event OnAfterCalcNewDateFormulaExpr, we will be able to overwrite the already calculated NewDateFormulaExpr before exiting it.

Describe the request

In procedure ReverseSign of codeunit 7600 "Calendar Management" we need an event:

[IntegrationEvent(false, false)]
local procedure OnAfterCalcNewDateFormulaExpr(DateFormulaExpr: Text[30]; var NewDateFormulaExpr: Text[30])
begin
end;

Changes between **:

local procedure ReverseSign(DateFormulaExpr: Text[30]): Text[30]
    var
        Formula: DateFormula;
        NewDateFormulaExpr: Text[30];
    begin
			Evaluate(Formula, DateFormulaExpr);
			NewDateFormulaExpr := ConvertStr(Format(Formula), '+-', '-+');
			if not (DateFormulaExpr[1] in ['+', '-']) then
				if NewDateFormulaExpr <> '<0D>' then
					NewDateFormulaExpr := '-' + NewDateFormulaExpr;
		**OnAfterCalcNewDateFormulaExpr(IDateFormulaExpr, NewDateFormulaExpr);**
        exit(NewDateFormulaExpr);
    end;

Internal work item: AB#640583

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an event

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions