I'd suggest a combination of tptacek answer (take the so-called promotion and try to position yourself for a raise in 6 months) while looking for somewhere else, since the company doesn't seem to be the best place to work as a programmer, according to what you say.
You'll be able to sell your promotion better that way.
You'll be able to sell your promotion better that way.