if you want money to upgrade, raise your taxes and you'll get all the money you need.
Yes, this will lower your science but it is meant to, you can't be strong economically, militarly AND scientificaly, not without a lot of work, there must be a deficit somewhere, with cheaper upgrades one...