public void RefillInfoFromExistingPatron(CheckOutItem patron_item_unit_thingy)
    {
        CancelButton.SetActive(true);
        SaveButton.SetActive(true);
        ItemSidePanel.SetActive(true);
        namePanel.SetActive(true);
        current_scanned_patron_barcode = PatronInputField.text;
        nameInputField.text            = patron_item_unit_thingy.patron_name;


        ItemInputField.Select();

        int item_counter = patron_item_unit_thingy.items.Length;

        for (int i = 0; i < item_counter; i++)
        {
            //add it into the view
            GameObject item_obj = Instantiate(item_prefab) as GameObject;
            item_obj.GetComponent <ItemBox>().SetBarcodeText(patron_item_unit_thingy.items[i]);
            //add item string into list
            current_scanned_items_list.Add(patron_item_unit_thingy.items[i]);
            item_obj.transform.SetParent(item_holder.content, false);
        }

        item_cart_label__with_counter.text = label_string + current_scanned_items_list.Count.ToString();
    }
    public void PatronScanned()
    {
        if (PatronInputField.text != current_scanned_patron_barcode && current_scanned_items_list.Count > 0)
        {
            ItemInputField.text = string.Empty;
            current_scanned_items_list.Clear();
            item_cart_label__with_counter.text = label_string + current_scanned_items_list.Count.ToString();

            ItemBox[] item_boxes = FindObjectsOfType <ItemBox>();
            if (item_boxes != null)
            {
                for (int i = 0; i < item_boxes.Length; i++)
                {
                    Destroy(item_boxes[i].gameObject);
                }
            }
        }



        if (PatronInputField.text.Length == patron_barcode_length)
        {
            //first check if we already have this number in the list
            CheckOutItem doesItExist = FindIfExisting(PatronInputField.text);
            if (doesItExist != null)
            {
                Debug.Log("need to recall this card numbers checked out items");
                DisplayMessage("Recalled patron from list");
                RefillInfoFromExistingPatron(doesItExist);
            }
            else
            {
                CancelButton.SetActive(true);
                SaveButton.SetActive(true);
                ItemSidePanel.SetActive(true);
                namePanel.SetActive(true);
                current_scanned_patron_barcode = PatronInputField.text;
                ClearMessage();

                if (!PatronInputField.text.StartsWith("21"))
                {
                    Debug.Log("trying to display warning in red");
                    DisplayMessage("<color=red>this may not be a valid number</color>");
                }

                ItemInputField.Select();
            }
        }
        else
        {
            if (!(PatronInputField.text.Length == 0))
            {
                DisplayMessage("Invalid patron barcode. Must be 14 digits.");
            }
        }
    }
    public void DeleteIndividualItem(string barcode2delete)
    {
        bool isDeleted = current_scanned_items_list.Remove(barcode2delete);

        if (isDeleted)
        {
            Debug.Log("deleted this item: " + barcode2delete);
        }
        else
        {
            DisplayMessage("COULD NOT DELETE ITEM: " + barcode2delete);
            Debug.Log("COULD NOT DELETE ITEM: " + barcode2delete);
        }
        item_cart_label__with_counter.text = label_string + current_scanned_items_list.Count.ToString();

        ItemInputField.Select();
    }
 public void ReselectItemInputField()
 {
     ItemInputField.Select();
 }