Codeunit 7314 - Warehouse Availability Mgt. - OnAfterCalcQtyRcvdNotAvailable
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])