vf之扣稅計算

vingling發表於2009-08-07
2005[@more@]clos data
use tt
repl all gs1gs with '',gs3gs with ''
go top
do while .not.eof()
if subs(rq1,1,4)='2005' then
n_js=1000
else
n_js=1600
endif
n_ys1=ze-n_js
if n_ys1>0.and.n_ys1<=500 then
repl gs1 with n_ys1*0.05
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.05'
else
if n_ys1>500.and.n_ys1<=2000 then
repl gs1 with n_ys1*0.1-25
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.1-25'
else
if n_ys1>2000.and.n_ys1<=5000 then
repl gs1 with n_ys1*0.15-125
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.15-125'
else
if n_ys1>5000.and.n_ys1<=20000 then
repl gs1 with n_ys1*0.2-375
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.2-375'
else
if n_ys1>20000.and.n_ys1<=40000 then
repl gs1 with n_ys1*0.25-1375
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.25-1375'
else
if n_ys1>40000.and.n_ys1<=60000 then
repl gs1 with n_ys1*0.3-3375
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.3-3375'
else
if n_ys1>60000.and.n_ys1<=80000 then
repl gs1 with n_ys1*0.35-6375
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.35-6375'
else
if n_ys1>80000 then
repl gs1 with n_ys1*0.4-10375
repl gs1gs with '('+allt(str(ze,12,2))+'-'+allt(str(n_js))+')'+'*0.4-10375'
endif
endif
endif
endif
endif
endif
endif
endif
skip
enddo
go top
do while .not.eof()
if subs(rq1,1,4)='2005' then
n_js=1000
else
n_js=1600
endif
n_ys3=ze+ze2-n_js
if n_ys3>0.and.n_ys3<=500 then
repl gs3 with n_ys3*0.05
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.05'
else
if n_ys3>500.and.n_ys3<=2000 then
repl gs3 with n_ys3*0.1-25
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.1-25'
else
if n_ys3>2000.and.n_ys3<=5000 then
repl gs3 with n_ys3*0.15-125
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.15-125'
else
if n_ys3>5000.and.n_ys3<=20000 then
repl gs3 with n_ys3*0.2-375
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.2-375'
else
if n_ys3>20000.and.n_ys3<=40000 then
repl gs3 with n_ys3*0.25-1375
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.25-1375'
else
if n_ys3>40000.and.n_ys3<=60000 then
repl gs3 with n_ys3*0.3-3375
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.3-3375'
else
if n_ys3>60000.and.n_ys3<=80000 then
repl gs3 with n_ys3*0.35-6375
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.35-6375'
else
if n_ys3>80000 then
repl gs3 with n_ys3*0.4-10375
repl gs3gs with '('+allt(str(ze,12,2))+'+'+allt(str(ze2,12,2))+'-'+allt(str(n_js))+')'+'*0.4-10375'
endif
endif
endif
endif
endif
endif
endif
endif
skip
enddo
repl all gs2 with gs3-gs1
repl all gs2gs with allt(str(gs3,12,3))+'-'+allt(str(gs1,12,3))

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69450/viewspace-1025000/,如需轉載,請註明出處,否則將追究法律責任。

相關文章