Minimum-Cost Flow Problem with Constraint on the Total Incoming/Outgoing Flow for the Vertices
This is a standard variant (if not the standard variant) of the minimum-cost flow problem.  The "flow requirements" are sometimes called balance conditions and sometimes called vertex supplies/demands.  It can be solved in polynomial time using any number of algorithms.

In particular, you can reduce to the single-source single-target variant in polynomial time as follows:


Compute a conservative upper bound $M$ on the cost of any flow in your network; for example, let $M = \sum_e cap(e)\cdot |cost(e)|$.  Alternatively, treat $M$ as a symbolic infinite value.
Add new nodes $s^*$ and $t^*$.
Add arcs $s^*\to s$ and $t\to t^*$ with infinite capacity and zero cost.
For every node $v_i$ with $r_i&gt;0$, add an arc $s^*\to v_i$ with capacity $r_i$ and cost $-M$.
For every node $v_i$ with $r_i&lt;0$, add an arc $v_i\to t^*$ with capacity $-r_i$ and cost $-M$.
Set all vertex requirements to zero.


The minimum-cost feasible flow from $s^*$ to $t^*$ in this modified network saturates every arc $s^*\to v_i$ and $v_i\to t^*$, and the remaining arcs carry the minimum-cost flow from from $s$ to $t$ in the original network that meets all the flow requirements.