'COUNT' and location.disabled=false ]]> 0 and inventory.warehouse=#{SESSION_WAREHOUSE} and item.id=(select d.item.id from PickTicketDetail d where d.id={id} ) and (inventory.SOI=(select d.pickTicket.relatedBill3 from PickTicketDetail d where d.id={id}) /~ordersAll: or true = {ordersAll}~/ ) /~company.id: AND company.id = {company.id}~/ /~location.id: AND inventory.location.id = {location.id}~/ /~zone.id: AND inventory.location.zone.id = {zone.id}~/ /~location.type: AND inventory.location.type = {location.type}~/ /~item.code: AND item.code LIKE {item.code}~/ /~item.name: AND item.name LIKE {item.name}~/ /~packageUnit.unit: AND inventory.packageUnit.unit LIKE {packageUnit.unit}~/ /~LP: AND inventory.LP.LP LIKE {LP}~/ /~itemKeyLot: AND inventory.itemKey.lot LIKE {itemKeyLot}~/ /~inventory.SOI: AND inventory.SOI LIKE {inventory.SOI}~/ /~storageDate1: AND inventory.storageDate >= {storageDate1}~/ /~storageDate1: AND inventory.storageDate <= {storageDate1}~/ /~itemKey.content: AND inventory.itemKey.content LIKE {itemKey.content}~/ /~minQuantity: AND inventory.quantity >= {minQuantity}~/ /~maxQuantity: AND inventory.quantity <= {maxQuantity}~/ order by inventory.location.code ,inventory.id desc ]]>