Artificial intelligent assistant

How to solve for a variable inside a summatory? I have a business where we buy cashier checks. The amount paid for a check is calculated as follows: $$T = m -\frac{m*t*d_{i}}{30} - m*c,$$ where $T$ is the total paid, $m$ is the amount of the check, $t$ is the monthly interest rate, $d$ are the days remaining to the check date, and $c$ is a fixed cost. Sometimes a person can bring multiple checks: $$T = \sum_{i=1}^n \left( m_{i} - \frac{m_{i}*t*d_{i}}{30} - m_{i}*c \right).$$ Let's say the result in a case like this is not a rounded number, for example $\$1020$, and I want to charge the customer only $\$1000$. How can I know the new $t$ given an arbitrary $T$ in the previous formula so I can know what was the interest rate applied?

You mean, something like this? \begin{align} T &= \sum_{i=1}^n \left( m_{i} - \frac{m_i t d_i}{30} -m_i c\right) \\\ &= \sum_{i=1}^n m_i(1-c) -\frac{t}{30} \sum_{i=1}^n m_i d_i \\\ \\\ \implies t &= 30 \cdot \dfrac{\displaystyle -T +\sum_{i=1}^n m_i(1-c)}{\displaystyle \sum_{k=1}^n m_k d_k} \\\ \end{align}

But it may be easier to just write down the values ot $t$ in a list.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e51ef0658c943c62a4108c95a5f02f49