updated for single-use and legacy invoice amounts fix