update VS4TEmpSlipDoc SET TEpsSTAXOffice=(SELECT TOP 1 TGVMOfficePay FROM VS4TGovPaymentMB WHERE TGvMTEmpCode=TEpsTEmpCode
AND tgvmtgvpyear =2020 and tgvmtgvpmonth=3 and tgvmtgvptype=1)
where TEpsSTAXOffRate=4 and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 and TEpsSTAXOffice is null
GO

update VS4TEmpSlipDoc SET TEpsSTAXOffice=0  
where TEpsSTAXOffRate=4 and TEpsCheckGroup=0 and TEpsApproveStatus=1 and TEpsCancelStatus=0 and TEpsSTAXOffice is null
GO