ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 5407 Prod. Order Component - Function GetNeededQty

Open IngoStender opened this issue 7 years ago • 1 comments

In table 5407 Prod. Order Component, function GetNeededQty, please add the following event. If the last operation is found with ProdOrderRtngLine.FINDFIRST, we have additinonal code to check whether a different prod. order routing line must be used to calculation the quantity.

[...]

  ProdOrderRtngLine.SETRANGE("Routing No.",ProdOrderLine."Routing No.");
  ProdOrderRtngLine.SETRANGE("Routing Reference No.",ProdOrderLine."Routing Reference No.");
  ProdOrderRtngLine.SETRANGE("Routing Link Code","Routing Link Code");
  IF NOT ProdOrderRtngLine.FINDFIRST OR ("Routing Link Code" = '') THEN BEGIN
    ProdOrderRtngLine.SETRANGE("Routing Link Code");
    ProdOrderRtngLine.SETFILTER("Next Operation No.",'%1','');
    IF NOT ProdOrderRtngLine.FINDFIRST THEN
      ProdOrderRtngLine."Operation No." := '';
  
    // >> NEW
    OnAfterCheckLastOperationNo(Rec, ProdOrderRtngLine);
    // << NEW

  END;
  IF Status IN [Status::Released,Status::Finished] THEN BEGIN
    CapLedgEntry.SETCURRENTKEY("Order Type","Order No.","Order Line No.");
    CapLedgEntry.SETRANGE("Order Type",CapLedgEntry."Order Type"::Production);

[...]

LOCAL [IntegrationEvent] 
OnAfterCheckLastOperationNo(ProdOrderComponent : Record "Prod. Order Component";VAR ProdOrderRtngLine : Record "Prod. Order Routing Line")

IngoStender avatar Mar 27 '19 15:03 IngoStender

Note: implemented as OnGetNeededQtyOnAfterLastOperationFound LOCAL [IntegrationEvent] OnGetNeededQtyOnAfterLastOperationFound(VAR ProdOrderComponent : Record "Prod. Order Component";VAR ProdOrderRoutingLine : Record "Prod. Order Routing Line")

NKarolak avatar Jul 31 '19 13:07 NKarolak