"""This file contains sql for retrieving product physical inventory.""" from sqlalchemy import text # Select nonzero inventory records for physical product SELECT_PRODUCT_PHYSICAL_INVENTORY_BY_PRODUCT_ID = text(""" SELECT on_hand, allocated, faulty, consignment, available FROM proper_stock_essn WHERE NOT (on_hand='0' AND available='0' AND allocated='0' AND faulty='0' AND consignment='0') AND release_id=:product_id; """)