lib/finished_goods/interactors/pi_document_interactor.rb
# Checks selected pallets:
#  - Not already in stock.
#  - Are local pallets.
#  - Not in WIP state
#  - Not already on another PI
Checks selected pallets:
Not already in stock.
Are local pallets.
Not in WIP state
Not already on another PI
Checks selected pallets : Not already in stock . Are local pallets . Not in WIP state Not already on another PI
def validate_pallet_ids_are_local_and_not_yet_stock(pallet_ids)
      res = MesscadaApp::TaskPermissionCheck::Pallet.call(%i[not_in_stock local_pallets not_wip not_pi], pallet_id: pallet_ids)
      return failed_response(res.message) unless res.success
      ok_response
    end
def validate_pallet_ids_are_local_and_not_yet_stock ( pallet_ids ) res = MesscadaApp :: TaskPermissionCheck :: Pallet . call ( %i[ not_in_stock local_pallets not_wip not_pi ] , pallet_id : pallet_ids ) return failed_response ( res . message ) unless res . success ok_response end
Checks selected pallets:
 Not already in stock.
Checks selected pallets : Not already in stock .
pallet_ids
<not_specific>