【正文】
d(rq2) CASE =7 whe= where allt()=39。雜品39。 AND =ctod(rq1) AND =ctod(rq2) CASE =8 whe= where allt()=39。消耗品39。 AND =ctod(rq1) AND =ctod(rq2) CASE =9 whe= where allt()=39。油料39。 AND =ctod(rq1) AND =ctod(rq2) CASE =10 whe= where allt()=39。勞保39。 AND =ctod(rq1) AND =ctod(rq2) CASE =11 whe= where allt()=39。閥門39。 AND =ctod(rq1) AND =ctod(rq2) endcase =sel+whe =4endifsele tempsum rkje to rkhjsum ckje to ckhjkchj=rkhjckhj=入庫金額:+str(rkhj)+ 出庫金額:+str(ckhj)+ 庫存金額:+str(kchj) ()(20):=sel=SELE ,qcmc,ggxh,lb,dj,pzbh,rksl,rkje,fzr,bgy,jhy,lh,dw FROM main INTO CURSOR TEMP if empt() or empt()DO CASE CASE =1 whe= where 0 CASE =2 whe= where allt()=39。鋼材39。 and 0 CASE =3 whe= where allt()=39。管件39。 and 0 CASE =4 whe= where allt()=39。配件39。 and 0 CASE =5 whe= where allt()=39。工器具39。 and 0 CASE =6 whe= where allt()=39。量具39。 and 0 CASE =7 whe= where allt()=39。雜品39。 and 0 CASE =8 whe= where allt()=39。消耗品39。 and 0 CASE =9 whe= where allt()=39。油料39。 and 0 CASE =10 whe= where allt()=39。勞保39。 and 0 CASE =11 whe= where allt()=39。閥門39。 and 0 endcase =sel+whe =4elseDO CASE CASE =1 whe=where =ctod(rq1) AND =ctod(rq2) and 0 CASE =2 whe= where allt()=39。鋼材39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =3 whe= where allt()=39。管件39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =4 whe= where allt()=39。配件39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =5 whe= where allt()=39。工器具39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =6 whe= where allt()=39。量具39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =7 whe= where allt()=39。雜品39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =8 whe= where allt()=39。消耗品39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =9 whe= where allt()=39。油料39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =10 whe= where allt()=39。勞保39。 AND =ctod(rq1) AND =ctod(rq2) and 0 CASE =11 whe= where allt()=39。閥門39。 AND =ctod(rq1) AND =ctod(rq2) and 0 endcase =sel+whe =4endifsele tempsum rkje to rkhj=入庫金額:+str(rkhj) ()(21):if empt()bzu= elsebzu= and =allt()endifsel=SELE ,qcmc,ggxh,lb,dj,ckbh,cksl,ckje,bz,llr,fzr,bgy,jhy,dw FROM main INTO CURSOR TEMP if empt() or empt()DO CASE CASE =1 whe=where 0 +bzu CASE =2 whe= where allt()=39。鋼材39。 and 0+bzu CASE =3 whe= where allt()=39。管件39。 and 0+bzu CASE =4 whe= where allt()=39。配件39。 and 0+bzu CASE =5 whe= where allt()=39。工器具39。 and 0+bzu CASE =6 whe= where allt()=39。量具39。 and 0+bzu CASE =7 whe= where allt()=39。雜品39。 and 0+bzu CASE =8 whe= where allt()=39。消耗品39。 and 0+bzu CASE =9 whe= where allt()=39。油料39。 and 0+bzu CASE =10 whe= where allt()=39。勞保39。 and 0+bzu CASE =11 whe= where allt()=39。閥門39。 and 0+bzuendcase =sel+whe =4elseDO CASE CASE =1 whe=where =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =2 whe= where allt()=39。鋼材39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =3 whe= where allt()=39。管件39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =4 whe= where allt()=39。配件39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =5 whe= where allt()=39。工器具39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =6 whe= where allt()=39。量具39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =7 whe= where allt()=39。雜品39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =8 whe= where allt()=39。消耗品39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =9 whe= where allt()=39。油料39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =10 whe= where allt()=39。勞保39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzu CASE =11 whe= where allt()=39。閥門39。 AND =ctod(rq1) AND =ctod(rq2) and 0+bzuendcase =sel+whe