Functional Description
Purpose
This function will advance the date that passed in to a new date based on the recurring frequency 
passed in.
Setup Notes and Prerequisites
Pass in the Company and the date you want to advance along with the desired recurring frequency 
value.  Valid values are:
"WK" - Weekly - adds 1 week to the given date.
"MO" - Monthly - sets date to the next period's Period End Date.
"QT" - Quarterly - Sets date to Period End Date of 3 periods away.
"SA" - Semi-Annually - Sets date to same day of month, 6 months away.
"AN" - Annually - Sets date to same day of month, 12 months away.
An updated date will be passed back in the Updated Date parameter.  This function is enabled to 
handle leap years.
Technical Specification
If Recurring Frequency is "MO"
   Call Return FYPN (X0903)
   Add 1 to returned Period
   Call Get Normal Number Of Periods (B1400010)
   Compare New Period to Normal Number of Periods
   If New Period is greater than Normal Number Of Periods
      Add 1 to New Fiscal Year
      Subtract Normal Number Of Periods from New Period
   Call Return Date (X0903)
If Recurring Frequency is "SA"
   Add 6 to Date's month
   If Date's Month is greater than 12
      Add 1 to Date's Fiscal Year
      Subtract 12 from Date's Month
   If Day of Date's Month is greater than Normal Days in Month
      Add 1 to Date's Month
      Subtract Normal Days in Month from Day of Date's Month 
      If Date's Month is greater than 12
         Add 1 to Date's Fiscal Year
         Subtract 12 from Date's Month
If Recurring Frequency is "QT"
   Call Return FYPN (X0903)
   Add 3 to returned Period
   Call Get Normal Number Of Periods (B1400010)
   Compare New Period to Normal Number of Periods
   If New Period is greater than Normal Number Of Periods
      Add 1 to New Fiscal Year
      Subtract Normal Number Of Periods from New Period
   Call Return Date (X0903)
If Recurring Frequency is "WK"
   Add 7 to Date's day
   If Day of Date's Month is greater than Normal Days in Month
      Add 1 to Date's Month
      Subtract Normal Days in Month from Day of Date's Month 
      If Date's Month is greater than 12
         Add 1 to Date's Fiscal Year
         Subtract 12 from Date's Month
If Recurring Frequency is "AN"
   Add 1 to Date's year
   If Date's Month is greater than 12
      Add 1 to Date's Fiscal Year
      Subtract 12 from Date's Month
   If Day of Date's Month is greater than Normal Days in Month
      Add 1 to Date's Month
      Subtract Normal Days in Month from Day of Date's Month 
      If Date's Month is greater than 12
         Add 1 to Date's Fiscal Year
         Subtract 12 from Date's Month
^
D0900058 - Recurring Frequency Update
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| szCompany | CO | char | NONE | NONE | 
Special Input Expected
  | ||||
| jdDateforglandvoucherjulia | DGJ | JDEDATE | NONE | NONE | 
Special Input Expected
  | ||||
| szFrequencyrecurring | RF | char | NONE | NONE | 
Special Input Expected
  | ||||
| jdDate_Updated_GLDate | DGJ | JDEDATE | NONE | NONE | 
Special Output Returned
  | ||||
| B1400010 Get Normal Number of Periods | ||||
| X0903 Fiscal Date Edits + | 
| None |