Budget by Fiscal Period not Month

leewhite1234leewhite1234 Member Posts: 45
I have a client who input their budget using fiscal periods which start on the first Sunday of each month, not the calendar period. No problem inputting, but when we go to export the budget to Excel, the only option is Month and the results are zero for all periods. Any ideas on how to export this budget? Do we need to customize this routine? This is report object 82.

Comments

  • ufukufuk Member Posts: 514
    If your accounting periods are set up as starting on first Sunday in each month:

    Put an option on request form for date type selection (base date or accounting period),

    On OnPreDataItem of GL Budget Entry (after FOR i := 1 TO NoOfPeriods DO BEGIN) add some code like:
    IF UseAccPeriod THEN BEGIN
    
      IF i = 1 THEN BEGIN
     
        AccPeriod.SETFILTER("Starting Date",'%1..',StartDate);
    
        IF AccPeriod.FINDFIRST THEN
          TempPeriod."Period Start" := AccPeriod."Starting Date";
    
      END ELSE BEGIN
    
        AccPeriod.SETFILTER("Starting Date",'%1..',
                              CALCDATE('<+1D>',
                                AccPeriod."Starting Date"));
    
        IF AccPeriod.FINDFIRST THEN
          TempPeriod."Period Start" := AccPeriod."Starting Date";
    
      END;
    
      AccPeriod.SETFILTER("Starting Date",'%1..',
                            CALCDATE('<+1D>',
                              AccPeriod."Starting Date"));
    
      IF AccPeriod.FINDFIRST THEN
        TempPeriod."Period End" := CALCDATE('<-1D>',
                                     AccPeriod."Starting Date");
    
    END;
    
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.