ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Codeunit 7314 - Warehouse Availability Mgt. - OnAfterCalcQtyRcvdNotAvailable

Open SchoKa opened this issue 7 years ago • 0 comments

Hello AL-Team, I need the following publisher, to calculate availability based on extra conditions:

LOCAL CalcQtyRcvdNotAvailable(LocationCode : Code[10];ItemNo : Code[20];VariantCode : Code[10]) : Decimal // Returns the quantity received but not yet put-away for a given item // for pick/ship/receipt/put-away locations without directed put-away and pick WITH PostedWhseRcptLine DO BEGIN SETCURRENTKEY("Item No.","Location Code","Variant Code"); SETRANGE("Item No.",ItemNo); SETRANGE("Location Code",LocationCode); SETRANGE("Variant Code",VariantCode); CALCSUMS("Qty. (Base)","Qty. Put Away (Base)");

// >> New OnAfterCalcQtyRcvdNotAvailable(PostedWhseRcptLine,ItemNo,VariantCode); // << New

EXIT("Qty. (Base)" - "Qty. Put Away (Base)"); END;

Publisher definition currently used by us IncludeSender: false GlobaVarAccess: false LOCAL [IntegrationEvent] OnAfterCalcQtyRcvdNotAvailable(VAR PostedWhseRcptLine : Record "Posted Whse. Receipt Line";VAR ItemNo : Code[20];VAR VariantCode : Code[10])

SchoKa avatar Mar 12 '19 09:03 SchoKa