update VS4TEmpSlipDoc SET TEpsSTAXOffice=round((TEpsSTAXOffRate*15000/100),0)
where TEpsTSaPDate<'2020-03-01' and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 
and TEpsSTAXBase >=15000
GO

update VS4TEmpSlipDoc SET TEpsSTAXOffice=round((TEpsSTAXOffRate*1650/100),0)
where TEpsTSaPDate<'2020-03-01' and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 
and TEpsSTAXBase <=1650
GO

update VS4TEmpSlipDoc SET TEpsSTAXOffice=round((TEpsSTAXOffRate*TEpsSTAXBase/100),0)
where TEpsTSaPDate<'2020-03-01' and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 
and TEpsSTAXBase <15000 and TEpsSTAXBase >1650
GO


update VS4TEmpSlipDoc SET TEpsSTAXOffice=0  
where TEpsTSaPDate<'2020-03-01' and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 and TEpsSTAXOffice is null
GO