update vs4tpostrans set tptasubtotal=(select sum(tptsnetamount) from vs4tpostranssub where tptstptano=tptano)
update vs4tpostrans set tptawtaxrate=tptasubtotal-tptadiscounttotal,tptagrandtotalvat=tptasubtotal-tptadiscounttotal