Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    // Condition for when to create/handle a custom UoM step
    localprocedure CanSelectUoM(_ItemNo: Code[20]): Boolean
    var
        MobSetup: Record "MOB Setup";
        ItemTrackingCode: Record "Item Tracking Code";
        Item: Record Item;
        MobWMSToolbox: Codeunit "MOB WMS Toolbox";
    begin
        MobSetup.Get();
        if MobSetup."Use Base Unit of Measure" then
            exit(false);

        if Item.Get(_ItemNo) and ItemTrackingCode.Get(Item."Item Tracking Code") then
            ifnot ItemTrackingCode."SN Manuf. Inbound Tracking" then   // We collect only a single Serial No. from Mobile Device and cannot handle UoM other than base
                if MobWMSToolbox.GetItemHasMultipleUoM(Item."No.") then
                    exit(true);

        exit(false);
    end;

...