public void DetectMaxAmount(string text)
    {
        if (text == "")
        {
            text = "0";
        }
        float amount        = float.Parse(text);
        int   charsDecimals = text.Contains(".") ? text.Substring(text.IndexOf(".")).Length - 1 : 0;

        if (amount < 0)
        {
            amountField.text = "0";
        }
        else if (charsDecimals > 2)
        {
            amountField.text = text.Substring(0, text.Length - charsDecimals + 2);
        }
    }