Reverse consumption on Finished Production Order?

Alex_ChowAlex_Chow Member Posts: 5,063
Hi, is there an easy way to reverse consumption postings on a production order that's Finished?

Answers

  • nunomaianunomaia Member Posts: 1,153
    No, unfortunately isn’t. The main issue is related to costing. You must always correct in those cases item consumption with item journals to increase / decrease inventory.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • Alex_ChowAlex_Chow Member Posts: 5,063
    nunomaia wrote:
    No, unfortunately isn’t. The main issue is related to costing. You must always correct in those cases item consumption with item journals to increase / decrease inventory.

    The problem is if an item adjustment is done, it'll have a different Entry Type... :(
  • AdamRoueAdamRoue Member Posts: 1,283
    Hi Alex

    If you go to the production journal of the production order you can enter negative consumption lines to "reverse" the entries from an item ledger perspective, but depending upon your costing method you will still have issues as Nuno says.
    The art of teaching is clarity and the art of learning is to listen
  • Alex_ChowAlex_Chow Member Posts: 5,063
    AdamRoue wrote:
    Hi Alex

    If you go to the production journal of the production order you can enter negative consumption lines to "reverse" the entries from an item ledger perspective, but depending upon your costing method you will still have issues as Nuno says.

    The production journal is not available for finished production orders...
  • nunomaianunomaia Member Posts: 1,153
    I think that adam meant was to create new manufacturing order and then use it only to post negative consumption.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • Alex_ChowAlex_Chow Member Posts: 5,063
    nunomaia wrote:
    I think that adam meant was to create new manufacturing order and then use it only to post negative consumption.

    But won't that stay in WIP forever?
  • ayhan06ayhan06 Member Posts: 210
    If Prod. order is finished, consumpion entry must be reversed by positive adjmt. . while doing this in the Item journal, you should fill in "Applies-from Item Entry" field with the Item ledger entry number of consumption.. then run AC-IE btach job..revaluate output entry with the cost amount of consumption entry..

    while doing these transactions, you should consider posting groups carefully to correctly reconcile inventory g/l account balances with item cost amount on item ledger entries..
  • Alex_ChowAlex_Chow Member Posts: 5,063
    ayhan06 wrote:
    If Prod. order is finished, consumpion entry must be reversed by positive adjmt. . while doing this in the Item journal, you should fill in "Applies-from Item Entry" field with the Item ledger entry number of consumption.. then run AC-IE btach job..revaluate output entry with the cost amount of consumption entry..

    while doing these transactions, you should consider posting groups carefully to correctly reconcile inventory g/l account balances with item cost amount on item ledger entries..

    Well.. I know you can do the adjustments in the item journal. Perhaps, I should've made this clear on my original post.

    What I was asking if there was an easy way to reverse consumption on a finished production order so the entry type can be consumption as well.
  • nunomaianunomaia Member Posts: 1,153
    Alex Chow wrote:
    nunomaia wrote:
    I think that adam meant was to create new manufacturing order and then use it only to post negative consumption.

    But won't that stay in WIP forever?

    Yes in this way it will be in WIP forever. That’s why adam told you your costing can be affected has well.

    Sadly there isn’t way straight way.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • ssinglassingla Member Posts: 2,973
    In the same way is it possible to do consumption on the finished production order.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Alex_ChowAlex_Chow Member Posts: 5,063
    ssingla wrote:
    In the same way is it possible to do consumption on the finished production order.

    Nope... :(
  • ayhan06ayhan06 Member Posts: 210
    Alex Chow wrote:
    ayhan06 wrote:
    If Prod. order is finished, consumpion entry must be reversed by positive adjmt. . while doing this in the Item journal, you should fill in "Applies-from Item Entry" field with the Item ledger entry number of consumption.. then run AC-IE btach job..revaluate output entry with the cost amount of consumption entry..

    while doing these transactions, you should consider posting groups carefully to correctly reconcile inventory g/l account balances with item cost amount on item ledger entries..

    Well.. I know you can do the adjustments in the item journal. Perhaps, I should've made this clear on my original post.

    What I was asking if there was an easy way to reverse consumption on a finished production order so the entry type can be consumption as well.

    no simple way to do that... some minor code changes in cu 22 that must update some fields in prod. order line, is needed..
  • nunomaianunomaia Member Posts: 1,153
    ayhan06 wrote:
    Alex Chow wrote:
    ayhan06 wrote:
    If Prod. order is finished, consumpion entry must be reversed by positive adjmt. . while doing this in the Item journal, you should fill in "Applies-from Item Entry" field with the Item ledger entry number of consumption.. then run AC-IE btach job..revaluate output entry with the cost amount of consumption entry..

    while doing these transactions, you should consider posting groups carefully to correctly reconcile inventory g/l account balances with item cost amount on item ledger entries..

    Well.. I know you can do the adjustments in the item journal. Perhaps, I should've made this clear on my original post.

    What I was asking if there was an easy way to reverse consumption on a finished production order so the entry type can be consumption as well.

    no simple way to do that... some minor code changes in cu 22 that must update some fields in prod. order line, is needed..

    If you do this way, you will mess costing.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Yeah, modify Navision costing coding is the sure-fire way to messing things up. Would rather not go down that road.
  • TomasTomas Member Posts: 420
    So, what is the hard (but correct way) of dealing with this?
    If I posted a consumption for production order, and then realised, that I should not have done this. How can I reverse it? (Well, instead of saying reverse, how can I fix it?)
  • ssinglassingla Member Posts: 2,973
    Masters have answered in negative for any option of rectifying mistakes like this. Would like to see MS remarks on the same keeping in view "To err is human".
    CA Sandeep Singla
    http://ssdynamics.co.in
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Tomas wrote:
    So, what is the hard (but correct way) of dealing with this?
    If I posted a consumption for production order, and then realised, that I should not have done this. How can I reverse it? (Well, instead of saying reverse, how can I fix it?)

    The correction way is to do item journal adjustments... :(
  • AdamRoueAdamRoue Member Posts: 1,283
    Sorry this one slipped past me.

    Yes once the order is finished you cannot enter negative consumption. What you need is a process that ensures the production order is not "finished" until a set time, a control mechanism if you like. Whilst this does not ensure no human error occurs it can help. Once the order is finished the only option then is the item journal which has no costing affect on the order. It is not perfect but if you look at AX it has something similar, you can do lots whilst the production order is of any status prior to ended, once ended that is it, WIP is posted all the costs are updated and everything is kindly written in concrete. Not perfect I am sure but it is what we have to live with today. Personnally I would prefer the ability to reopen a finished production order and then do what I want, but I am sure this is a development nightmate from all aspects.
    The art of teaching is clarity and the art of learning is to listen
  • mdraskovicmdraskovic Member Posts: 24
    well...there IS a quite simple way to do changes of Production Order Status from Finished to Released.
    this is the ONLY way, to reverse postings and clear WIP correct.
    In all other cases, at the end you must do manual corrections in G/L.

    If anyone competent in Microsoft is interested, I'll be glad to do this modification for them.
    It's a about 60 min job. :D
  • Alex_ChowAlex_Chow Member Posts: 5,063
    You might want to post it on Microsoft Connect. Although the people they assigned to go through the list to give responses is very very disappointing... :(

    https://connect.microsoft.com/dynamicssuggestions/
  • mdraskovicmdraskovic Member Posts: 24
    Well, there it is. Enjoy, folks :wink:
    lally wrote:
    Hi,

    Congratulations for your success.

    I am also try to do this customization.

    But we are not able to understand from where we need to start this customization.

    I request you please let me know the functionality wise how and what are the points i need to consider to do this customization.

    Please help me.

    Thanks and Regards

    k.Lally.

    lally_kani@yahoo.com

    Well,

    First of all, this feature must be controlled by finance department.
    If periods are allready closed, they must allow posting for this prod. order.
    Why - if it's finished, Output is probably allready Sold or Consumed - so all
    this postings will be affected too.
    So we made a checkmark (additional field) on G/L setup, to allow this or not.
    1. Tab98, added field "Finished Prod.Order Status" Boolean
    Add (or not) on Form.

    Then
    2. Tab5405 Prod. Order changes
    2.1. add global variable ChangeFinishedProdOrderStatus boolean

    2.2. add trigger to call for reference
    CallFromFinishedProdOrder()
    ChangeFinishedProdOrderStatus := TRUE;  // MFGF
    

    2.3. it's all in the code on OnInsert trigger
    
    OnInsert()
    MfgSetup.GET;
    IF "No." = '' THEN BEGIN
      TestNoSeries;
      NoSeriesMgt.InitSeries(GetNoSeriesCode,xRec."No. Series","Due Date","No.","No. Series");
    END;
    
    IF Status = Status::Released THEN
      IF ProdOrder.GET(Status::Finished,"No.") THEN
        IF NOT (ChangeFinishedProdOrderStatus) THEN // MFGF
          ERROR(Text007,Status,TABLECAPTION,ProdOrder."No.",ProdOrder.Status);
    
    InitRecord;
    
    "Starting Time" := MfgSetup."Normal Starting Time";
    "Ending Time" := MfgSetup."Normal Ending Time";
    "Creation Date" := TODAY;
    UpdateDatetime;
    DimMgt.InsertProdDocDim(
      DATABASE::"Production Order",Status,"No.",0,0,
      "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
    
    

    3. changes in CU5407 Prod. Order Status Management

    3.1. add global variable ChangeFinishedProdOrder boolean

    3.2. add trigger CallFromFinishedProdOrder()
    CallFromFinishedProdOrder()
    ChangeFinishedProdOrder := TRUE // MFGF ;
    

    3.3. modification trigger TransProdOrder
    TransProdOrder(VAR FromProdOrder : Record "Production Order")
    WITH FromProdOrder DO BEGIN
      ToProdOrderLine.LOCKTABLE;
    
      ToProdOrder := FromProdOrder;
      ToProdOrder.Status := NewStatus;
    
      CASE Status OF
        Status::Simulated:
          ToProdOrder."Simulated Order No." := "No.";
        Status::Planned:
          ToProdOrder."Planned Order No." := "No.";
        Status::"Firm Planned":
          ToProdOrder."Firm Planned Order No." := "No.";
        Status::Released:
          ToProdOrder."Finished Date" := NewPostingDate;
        Status::Finished:   // MFGF
          ToProdOrder."Finished Date" := 0D;
      END;
    
      ToProdOrder.TestNoSeries;
      IF (ToProdOrder.GetNoSeriesCode <> "No. Series") AND
         (ToProdOrder.Status <> ToProdOrder.Status::Finished)
      THEN
        ToProdOrder."No." := '';
    
      // MFGF
      IF ChangeFinishedProdOrder THEN BEGIN
         ToProdOrder.CallFromFinishedProdOrder;  // to allow insert 
      END;
      ToProdOrder.INSERT(TRUE);
      ToProdOrder."Starting Time" := "Starting Time";
      ToProdOrder."Starting Date" := "Starting Date";
      ToProdOrder."Ending Time" := "Ending Time";
      ToProdOrder."Ending Date" := "Ending Date";
      ToProdOrder."Due Date" := "Due Date";
      ToProdOrder.VALIDATE("Shortcut Dimension 1 Code",'');
      ToProdOrder.VALIDATE("Shortcut Dimension 2 Code",'');
      ToProdOrder."Shortcut Dimension 1 Code" := "Shortcut Dimension 1 Code";
      ToProdOrder."Shortcut Dimension 2 Code" := "Shortcut Dimension 2 Code";
      ToProdOrder.MODIFY;
    
      TransProdOrderLine(FromProdOrder);
      TransProdOrderRtngLine(FromProdOrder);
      TransProdOrderComp(FromProdOrder);
      TransProdOrderRtngTool(FromProdOrder);
      TransProdOrderRtngPersnl(FromProdOrder);
      TransProdOrdRtngQltyMeas(FromProdOrder);
      TransProdOrderCmtLine(FromProdOrder);
      TransProdOrderRtngCmtLn(FromProdOrder);
      TransProdOrderBOMCmtLine(FromProdOrder);
      TransProdOrderDocDim(FromProdOrder);
      TransProdOrderCapNeed(FromProdOrder);
      DELETE;
      FromProdOrder := ToProdOrder;
    END;
    
    

    3.4. modification trigger TransProdOrderLine
    TransProdOrderLine(FromProdOrder : Record "Production Order")
    WITH FromProdOrderLine DO BEGIN
      SETRANGE(Status,FromProdOrder.Status);
      SETRANGE("Prod. Order No.",FromProdOrder."No.");
      LOCKTABLE;
      IF FIND('-') THEN BEGIN
        REPEAT
          ToProdOrderLine := FromProdOrderLine;
          ToProdOrderLine.Status := ToProdOrder.Status;
          ToProdOrderLine."Prod. Order No." := ToProdOrder."No.";
    
           IF ChangeFinishedProdOrder THEN BEGIN // MFGF
             ToProdOrderLine."Completely Invoiced" := FALSE;
             // MFGF - depending on version of Nav include other inventory costing flags !!!
          END;
          ToProdOrderLine.INSERT;
          IF NewStatus = NewStatus::Finished THEN BEGIN
            ToProdOrderLine."Cost is Adjusted" := FALSE;
            IF NewUpdateUnitCost THEN
              UpdateProdOrderCost.UpdateUnitCostOnProdOrder(FromProdOrderLine,TRUE,TRUE);
            ToProdOrderLine."Unit Cost (ACY)" :=
              ACYMgt.CalcACYAmt(ToProdOrderLine."Unit Cost",NewPostingDate,TRUE);
            ToProdOrderLine."Cost Amount (ACY)" :=
              ACYMgt.CalcACYAmt(ToProdOrderLine."Cost Amount",NewPostingDate,FALSE);
            ReservMgt.SetProdOrderLine(FromProdOrderLine);
            ReservMgt.DeleteReservEntries(TRUE,0);
          END ELSE BEGIN
            IF Item.GET(FromProdOrderLine."Item No.") THEN BEGIN
              IF (Item."Costing Method" <> Item."Costing Method"::Standard) AND NewUpdateUnitCost THEN
                UpdateProdOrderCost.UpdateUnitCostOnProdOrder(FromProdOrderLine,FALSE,TRUE);
            END;
            ToProdOrderLine.BlockDynamicTracking(TRUE);
            ToProdOrderLine.VALIDATE(Quantity);
            ReserveProdOrderLine.TransferPOLineToPOLine(FromProdOrderLine,ToProdOrderLine,0,TRUE);
          END;
          ToProdOrderLine.VALIDATE("Unit Cost",FromProdOrderLine."Unit Cost");
          ToProdOrderLine.MODIFY;
        UNTIL NEXT = 0;
        DELETEALL;
      END;
    END;
    

    4. changes Form 99000867 "Finished Production Order"
    4.1. Add button Functions from form Released Prod. Orders, and name it ButtonFunctions
    Leave required Menu options (Change Status for sure )
    4.2. Menu options Change status code:
    ProdOrderStatusMgt.CallFromFinishedProdOrder; // added MFGF
    ProdOrderStatusMgt.RUN(Rec);
    

    4.3. Add code OnOpenForm, add local variable GLSetup
    GLSetup.GET; // MFGF
    IF GLSetup."Finished Prod.Order Status" THEN BEGIN
       CurrForm.ButtonFunctions.VISIBLE := TRUE;
     END
    ELSE
     BEGIN
       CurrForm.ButtonFunctions.VISIBLE := FALSE;
     END;
    

    5. Modifications Form 99000882 "Change Status on Prod. Order"
    5.1. Add Option Finished for global variable NewStatus
    5.2. Modify Request Form accordingly
    5.2. modify trigger Set
    Set(ProdOrder : Record "Production Order")
    // MFGF
    IF ProdOrder.Status <> ProdOrder.Status::Finished THEN BEGIN
    
      CurrForm.FirmPlannedStatus.EDITABLE := ProdOrder.Status < ProdOrder.Status::"Firm Planned";
      CurrForm.ReleasedStatus.EDITABLE := ProdOrder.Status <> ProdOrder.Status::Released;
      CurrForm.FinishedStatus.EDITABLE := ProdOrder.Status = ProdOrder.Status::Released;
    
      IF ProdOrder.Status > ProdOrder.Status::Simulated THEN
        NewStatus := ProdOrder.Status + 1
      ELSE
       NewStatus := NewStatus::"Firm Planned";
    
    // MFGF begin
     END
    ELSE
     BEGIN
      CurrForm.FirmPlannedStatus.EDITABLE := FALSE;
      CurrForm.ReleasedStatus.EDITABLE := TRUE;
      CurrForm.FinishedStatus.EDITABLE := FALSE;
    
      NewStatus := NewStatus::Released;
     END;
    // MFGF end
    
    PostingDate := WORKDATE;
    

    That's procedure, more or less.
    But be aware, that you may cause a lot of issues, regarding inventory costing !
    Cost adjustment will surely do it's thing and it must be expected to have impact on
    all data, using this production order Output, which you have re-opened and corrected.
    You must be VERY careful, to do this and not allow automatically to post in PO's history again.
    Users can be very intuitive regarding this issue :D

    Beer or two ? :wink:
Sign In or Register to comment.