CBJS.PRG
资源名称:jq_caiwu.ARJ [点击查看]
上传用户:hbmaozhan
上传日期:2013-01-31
资源大小:1007k
文件大小:2k
源码类别:
企业管理
开发平台:
VFP
- USE pzk
- DELE ALL FOR zy='结转费用' .OR. zy='结转成本'
- PACK
- GOTO BOTTOM
- pzh = 5
- pz = pzh
- pz = pz+1
- rq1 = DATE()
- USE mxk
- x1 = 0
- y1 = 0
- LOCA ALL FOR '1350001'=SUBSTR(kmdm, 1, 7) .AND. zy='期末及累计'
- DO WHILE .NOT. EOF()
- x1 = x1+ysl
- y1 = y1+ye
- CONT
- ENDD
- x2 = 0
- y2 = 0
- LOCA ALL FOR '1350002'=SUBSTR(kmdm, 1, 7) .AND. zy='期末及累计'
- DO WHILE .NOT. EOF()
- x2 = x2+ysl
- y2 = y2+ye
- CONT
- ENDD
- x3 = 0
- y3 = 0
- LOCA ALL FOR '1350003'=SUBSTR(kmdm, 1, 7) .AND. zy='期末及累计'
- DO WHILE .NOT. EOF()
- x3 = x3+ysl
- y3 = y3+ye
- CONT
- ENDD
- z1 = 0
- IF (x1+x2+x3)<>0
- z1 = (y1+y2+y3)/(x1+x2+x3)
- z1 = ROUND(z1+0, 2)
- ENDI
- RUN copy cwpzk-1.dbf mxk%%.dbf>nul
- USE mxk%%
- APPE FROM mxk FOR SUBSTR(kmdm, 1, 3)='501' .AND. zy='本月合计'
- PACK
- REPL kmdm WITH '135'+SUBSTR(kmdm, 4, 6) ALL
- REPL fsl WITH (fsl-ssl) ALL
- REPL dje WITH (fsl*z1) ALL
- REPL zzkm WITH '库存商品' ALL
- REPL jhd WITH '+' ALL
- APPE BLANK
- SUM ALL jje TO a1
- SUM ALL dje TO a2
- GOTO BOTTOM
- REPL dje WITH a1
- REPL jje WITH a2
- REPL kmdm WITH '5110001'
- REPL zzkm WITH '商品销售成本'
- REPL mxkm WITH '商品销售成本'
- REPL jhd WITH '+'
- REPL zy WITH '结转成本', shy WITH '系统生成', lry WITH '系统生成' ALL
- REPL pzh WITH pz, rq WITH rq1 ALL
- DELE ALL FOR jje=0 .AND. dje=0
- PACK
- USE pzk
- APPE FROM mxk%%
- USE mxk%%
- DELE ALL FOR zzkm<>'商品销售成本'
- PACK
- pz = pz+1
- x1 = jje
- x2 = dje
- REPL jje WITH x2, dje WITH x1, pzh WITH pz
- APPE BLANK
- GOTO BOTTOM
- REPL pzh WITH pz, jhd WITH '-', rq WITH rq1
- REPL jje WITH x1, dje WITH x2
- REPL zzkm WITH '本年利润', mxkm WITH '本年利润'
- REPL kmdm WITH '3210001', zy WITH '结转成本'
- REPL shy WITH '系统生成', lry WITH '系统生成'
- DELE ALL FOR jje=0 .AND. dje=0
- PACK
- USE pzk
- APPE FROM mxk%%
- ERAS mxk%%.dbf
- CLOS ALL
- RETU
- *