Codeunit 8057 Date Formula Management

Subscription Billing, Microsoft.SubscriptionBilling

Source AL, 162 lines

src/Apps/W1/Subscription Billing/App/Base/Codeunits/DateFormulaManagement.Codeunit.allines 3 to 18 of 162, Copyright (c) Microsoft Corporation. MIT

codeunit 8057 "Date Formula Management"{    var        DateFormulaNegativeErr: Label 'The date formula cannot be negative.';        DateFormulaEmptyErr: Label 'The %1 must be filled out. Please enter a date formula.', Comment = '%1=Field Caption';        DateEmptyErr: Label 'The %1 must be filled out. Please enter a date.', Comment = '%1=Field Caption';        CurrentPeriodErr: Label 'Current Period cannot be used for The Date Formula.';        EmptyFormulaErr: Label 'The Date Formula cannot be empty.';        ComplexFormulaErr: Label 'The Date Formula cannot be complex.';        NaturalNumberRatioErr: Label 'The ratio of ''%1'' and ''%2'' or vice versa must give a natural number.', Comment = '%1=Field Caption, %2=Field Caption';    internal procedure ErrorIfDateFormulaEmpty(DateFormula: DateFormula; FieldCaption: Text)    begin        if Format(DateFormula) = '' then            Error(DateFormulaEmptyErr, FieldCaption);    end;

All 162 lines

Public procedures 4 in 29

CheckIntegerRatioForDateFormulas(DateFormula1: DateFormula; DateFormula1Caption: Text; DateFormula2: DateFormula; DateFormula2Caption: Text)new in 26
FindDateFormulaType(InputDateFormula: DateFormula; var PeriodCount: Integer; var Letter: Char): Enum "Date Formula Type"new in 26
FindDateFormulaTypeForComparison(InputDateFormula: DateFormula; var PeriodCountForComparison: Integer): Enum "Date Formula Type"new in 26
CalculateRenewalTermRatioByBillingRhythm(StartDate: Date; RenewalTermDateFormula: DateFormula; BillingRhythmFormula: DateFormula): Decimalnew in 26

All 7 procedures in 26-29