ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 5760 Whse.-Post Receipt - PostUpdateWhseDocuments

Open ttaeufer opened this issue 7 years ago • 0 comments

Could we have an Publisher OnbeforeCreatePutAwayDoc (with handled Pattern) in CreatePutAwayDoc Codeunit 5760 Whse.-Post Receipt please?

LOCAL CreatePutAwayDoc(WhseRcptHeader : Record "Warehouse Receipt Header")
PostedWhseRcptLine.SETRANGE("No.",WhseRcptHeader."Receiving No.");
IF NOT PostedWhseRcptLine.FIND('-') THEN
  EXIT;

REPEAT
  RemQtyToHandleBase := PostedWhseRcptLine."Qty. (Base)";

  // >>>>>>>>  
  OnBeforeCreatePutAwayDoc(<var>WhseRcptHeader,<var>PostedWhseRcptLine,<var>Handled);
  if not Handled then begin
  // <<<<<<<<
    
    CreatePutAway.SetCrossDockValues(TRUE);
    ..
    TempPostedWhseRcptLine.RESET;
    IF TempPostedWhseRcptLine.FIND('-') THEN
      REPEAT
        TempPostedWhseRcptLine2 := TempPostedWhseRcptLine;
        TempPostedWhseRcptLine2."Line No." := PostedWhseRcptLine."Line No.";
        WhseSourceCreateDocument.SetQuantity(TempPostedWhseRcptLine2,DATABASE::"Posted Whse. Receipt Line",RemQtyToHandleBase);
        CreatePutAway.RUN(TempPostedWhseRcptLine2);
      UNTIL TempPostedWhseRcptLine.NEXT = 0;

   // >>>>>>>>    
  end;
  // <<<<<<<<

UNTIL PostedWhseRcptLine.NEXT = 0;

ttaeufer avatar Jan 28 '19 14:01 ttaeufer