OBSOLETE. Catalysis of the reactions: glyceraldehyde 3-phosphate + phosphate + NAD(P)+ = 3-phospho-D-glyceroyl-phosphate + NAD(P)H + H+, and glyceraldehyde 3-phosphate + H2O + NAD(P)+ = 3-phospho-D-glycerate + NAD(P)H + H+.