What is processing when clickedon New Fiscal Year A/C Period

smmurugansmmurugan Member Posts: 33
Here is the scenario.

Accounting period is manually created for 2014 (January to December). User forgot to tick New Fiscal Year field.

2013 Year is not yet closed. Now they want close the year 2013.

When clicked on New Fiscal Year for January 2014 to indicate as new start period system started processing items.

Progressing message like this

Processing Items...
Item No. : xxxxxxxx
Valuation Date : xxxxxx

Since it took long time the user stopped the process.

I would like to know what is happening actually. What this process is doing?

One of our consultant is saying you can delete the periods which were manually created and create the same periods using Create Year function. What is the correct procedure to resolve the situation.


Murugan

Comments

  • pvrbpvrb Member Posts: 17
    Nav 2009, W1: The "New Fiscal Year" fld in Table 50 [Accounting Period] when changed from False to True => if Items are set up with Costing Method = Average, quite a few things happen, here is a list of objects and procedures I trust are employed:

    Table 50: New Fiscal Year - OnValidate()
    TESTFIELD("Date Locked",FALSE);
    IF "New Fiscal Year" THEN BEGIN
      IF NOT InvtSetup.GET THEN
        EXIT;
      "Average Cost Calc. Type" := InvtSetup."Average Cost Calc. Type";
      "Average Cost Period" := InvtSetup."Average Cost Period";
    END ELSE BEGIN
      "Average Cost Calc. Type" := "Average Cost Calc. Type"::" ";
      "Average Cost Period" := "Average Cost Period"::" ";
    END;
    

    Table 50: OnModify()
    UpdateAvgItems(2);
    


    Table 50: UpdateAvgItems(UpdateType : Option)
    ChangeAvgCostSetting.UpdateAvgCostFromAccPeriodChg(Rec,xRec,UpdateType);
    


    CU 5810: UpdateAvgCostFromAccPeriodChg(VAR AccPeriod : Record "Accounting Period";PrevAccPeriod : Record "Accounting Period";UpdateType : ' ,Ins
    IF NOT InvtSetup.GET THEN
      EXIT;
    
    WITH AccPeriod DO BEGIN
      IF NOT (("New Fiscal Year" OR PrevAccPeriod."New Fiscal Year" OR
              (InvtSetup."Average Cost Period" = InvtSetup."Average Cost Period"::"Accounting Period")))
      THEN
        EXIT;
    
      StartingValuationDate := 0D;
      AccPeriod2 := AccPeriod;
      CASE UpdateType OF
        UpdateType::Insert:
          INSERT;
        UpdateType::Delete:
          DELETE;
        UpdateType::Modify:
          MODIFY;
        UpdateType::Rename:
          BEGIN
            INSERT;
            PrevAccPeriod.DELETE;
            IF (PrevAccPeriod."Starting Date" < "Starting Date") AND
               (PrevAccPeriod."Starting Date" <> 0D)
            THEN
              AccPeriod2 := PrevAccPeriod;
          END;
      END;
    
      IF AccPeriod2.NEXT(-1) <> 0 THEN
        StartingValuationDate := AccPeriod2."Starting Date";
      ProcessItemsFromDate(StartingValuationDate);
    
      CASE UpdateType OF
        UpdateType::Insert:
          DELETE;
        UpdateType::Delete:
          INSERT;
        UpdateType::Rename:
          BEGIN
            DELETE;
            PrevAccPeriod.INSERT;
          END;
      END;
    END;
    


    CU 5810: ProcessItemsFromDate(StartingValuationDate : Date)
    IF Item.FIND('-') THEN
      REPEAT
        IF Item."Costing Method" = Item."Costing Method"::Average THEN
          ProcessItemAvgCostPoint(Item,StartingValuationDate);
      UNTIL Item.NEXT = 0;
    


    CU 5810: ProcessItemAvgCostPoint(VAR Item : Record Item;StartingValuationDate : Date)
    InvtSetup.GET;
    AvgCostAdjmtEntryPoint.RESET;
    AvgCostAdjmtEntryPoint.SETRANGE("Item No.",Item."No.");
    AvgCostAdjmtEntryPoint.SETFILTER("Valuation Date",'>=%1',StartingValuationDate);
    AvgCostAdjmtEntryPoint.DELETEALL;
    
    WITH ValueEntry DO BEGIN
      RESET;
      SETCURRENTKEY("Item No.","Valuation Date","Location Code","Variant Code");
    
      SETRANGE("Item No.",Item."No.");
      SETFILTER("Valuation Date",'>=%1',StartingValuationDate);
      IF FIND('-') THEN BEGIN
        REPEAT
          UpDateWindow("Item No.","Valuation Date");
    
          AvgCostAdjmtEntryPoint.UpdateValuationDate(ValueEntry);
    
          SETRANGE("Valuation Date","Valuation Date");
          IF InvtSetup."Average Cost Calc. Type" =
             InvtSetup."Average Cost Calc. Type"::"Item & Location & Variant"
          THEN BEGIN
            SETRANGE("Location Code","Location Code");
            SETRANGE("Variant Code","Variant Code");
          END;
          IF FIND('+') THEN;
          SETRANGE("Valuation Date");
          SETRANGE("Location Code");
          SETRANGE("Variant Code");
        UNTIL NEXT = 0;
        Item."Cost is Adjusted" := FALSE;
        Item.MODIFY;
      END;
    END;
    


    T 5804: UpdateValuationDate(ValueEntry : Record "Value Entry")
    IF ValuationExists(ValueEntry) THEN BEGIN
      IF NOT "Cost Is Adjusted" THEN
        EXIT;
      "Cost Is Adjusted" := FALSE;
      MODIFY;
    END ELSE BEGIN
      INIT;
      INSERT;
    END;
    
    UpdateNextValuations;
    


    T 5804: UpdateNextValuations()
    CopyOfAvgCostAdjmtPoint.COPY(Rec);
    SETCURRENTKEY("Item No.","Cost Is Adjusted");
    SETRANGE("Item No.","Item No.");
    SETRANGE("Cost Is Adjusted",TRUE);
    IF TRUE IN [Item."Costing Method" <> Item."Costing Method"::Average,
                NOT (IsAvgCostCalcTypeItem("Valuation Date") OR
                     AvgCostCalcTypeIsChanged("Valuation Date"))]
    THEN BEGIN
      SETRANGE("Location Code","Location Code");
      SETRANGE("Variant Code","Variant Code");
    END;
    SETFILTER("Valuation Date",'>%1',"Valuation Date");
    MODIFYALL("Cost Is Adjusted",FALSE);
    COPY(CopyOfAvgCostAdjmtPoint);
    
  • KowaKowa Member Posts: 918
    If you change anything in the accounting period table and also have items with costing method "Average" the cost for all items has to be recalculated
    depending on the current values in "Average Cost Period" and "Average Cost Calc. Type".
    http://msdn.microsoft.com/en-us/library ... 70%29.aspx

    You should always use only the "Create Year" (and "Close Year") functions for this table, if you do not want the usual 12 months but a shortened fiscal year or a stub period instead you can select the number of periods and their lenghts you need in the report. Manual entries will only cause trouble here.
    Kai Kowalewski
  • smmurugansmmurugan Member Posts: 33
    Thanks a lot to both of you.

    So it is resetting the valuation date and affects only items with Average cost.

    Will there be any financial impact?. Because the client's reporting period is monthly and once reporting is finalized no entries allowed in the previous period.

    Yes I know the best practice of using Create Year function. The user has created the period manually not knowing the procedure.

    Murugan
  • KowaKowa Member Posts: 918
    smmurugan wrote:
    Will there be any financial impact?.
    If "Automatic cost posting" is activated in the Inventory Setup, it will have an immediate effect.
    If not, it will also have it as soon as you run report 1002 "Post Inventory Cost to G/L".
    Only if neither of these options is used, the inventory, COGS, inventory adjustments etc. accounts remain untouched.
    http://msdn.microsoft.com/en-us/library ... 70%29.aspx
    Kai Kowalewski
  • pvrbpvrb Member Posts: 17
    Good afternoon,

    Some companies have their reporting based on General Ledger Entries only, in which case the answer by "Kowa" is 100% correct.

    There are some companies that report also based on data from other Navision modules.
    In case your organization reporting includes figures based on Value Entries or Item Ledger Entries (with values calculated based on Value Entries), e.g. Report 1001 Inventory Valuation) - I would like to suggest that you double check the value entries, maybe you could go via the Item Register (not sure whether you would be able to identify records by Date and/or user id).
    If you could identify any value entries created by this "fiscal year" change, well, you would know for sure what the Posting Date was used.

    As I’m used to FIFO, I’m afraid, there’s unlikely to be any more from me on the subject.

    Good luck,
    Pavel
  • KowaKowa Member Posts: 918
    pvrb wrote:
    There are some companies that report also based on data from other Navision modules.
    True, but those companies are exactly the ones in which neither of the options I mentioned are used.
    If they are and NAV posts to the G/L automatically you are using a perpetual inventory system.

    If the company prefers not to, they may use the results of Report 1001, or create their own report to value their stock. If he CPA agrees to this there is nothing wrong with it.
    A common method is to calculate a weighted average based on the purchase prices and to compare this to the last purchase price, and then take the lower of the two.
    That is called the Lowest Value Principle. Inventory value represents an asset and needs to be valued "at the lower of cost or market".
    Whatever you use, after the stocktaking, you will usually have either a build-up of inventory or a reduction compared to the results of the last fiscal year, those figures represent revenue or expense in the income statement.
    These will have to posted manually then (at least once a year), the company is then using a periodic inventory system.

    I posted an example here some years ago on how the average cost for an item will change if you change the cost period. This recalculation is done for all items in the accounting period, and that can take a long time.
    Kai Kowalewski
Sign In or Register to comment.