PZRZ.PRG
资源名称:jq_caiwu.ARJ [点击查看]
上传用户:hbmaozhan
上传日期:2013-01-31
资源大小:1007k
文件大小:9k
源码类别:
企业管理
开发平台:
VFP
- HIDE POPUP pop2
- HIDE MENU mainmenu
- DEAC WINDOW win
- SET SYSMENU OFF
- SET CLOCK TO 0, 69
- ON KEY
- SET COLOR TO W/N
- CLOS DATABASES
- CLEA
- SET PATH TO C:
- IF .NOT. FILE('pzk.dbf') .OR. .NOT. FILE('mxk.dbf') .OR. .NOT. FILE('zzk.dbf')
- ?? CHR(7)
- IF .NOT. FILE('pzk.dbf')
- @ 7, 30 SAY '尚未输入本月凭证!'
- ELSE
- @ 7, 30 SAY '上月尚未结帐,本月不能记帐!'
- ENDI
- i = INKEY(0)
- SET PATH TO cw
- CLOS DATABASES
- SET COLOR TO W+/B
- @ 0, 0, 23, 79 BOX '北北北北'
- SET COLOR TO W+/N
- @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
- @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG
- @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5) 黄朝生研制 版权所有 南宁市建政路51号 邮编:530023 ' COLOR R/W
- ON KEY LABEL Escape do Rquit
- SET CLOCK TO 23, 69
- RETU
- ELSE
- SET PATH TO cw
- USE pzk
- IF jzbz='1'
- ?? CHR(7)
- CLOS DATABASES
- SET COLOR TO W+/B
- @ 0, 0, 23, 79 BOX '北北北北'
- SET COLOR TO W+/N
- @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
- @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG
- @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5) 黄朝生研制 版权所有 南宁市建政路51号 邮编:530023 ' COLOR R/W
- SET CLOCK TO 23, 69
- ON KEY LABEL Escape do Rquit
- RETU
- ENDI
- SET COLOR TO N/G
- CLEA
- SET COLOR TO N/W
- @ 1, 2 CLEAR TO 23, 77
- SET COLOR TO W/N
- @ 11, 14 CLEAR TO 15, 69
- SET COLOR TO N/B
- @ 9, 10 CLEAR TO 13, 65
- SET COLOR TO R+/B
- @ 5, 27 SAY ' 凭 证 入 帐 '
- SET COLOR TO W+/B
- ?? CHR(7)
- @ 9, 30 SAY '注 意'
- @ 11, 17 SAY '1. 凭证入帐期间,请勿中断计算机;请勿关机!'
- @ 12, 17 SAY '2. 建议您使用不间断电源(UPS).'
- @ 17, 30 SAY ' 请等候......'
- SET COLOR TO
- SELE 1
- USE zzk
- rq2 = rq
- @ 19, 31 SAY '整理数据 ......'
- DELE ALL FOR zy<>'期初余额'
- PACK
- USE mxk
- GOTO TOP
- DO WHILE .T.
- pd = zy
- IF pd<>'期初余额'
- pd = RECNO()
- EXIT
- ENDI
- IF .NOT. EOF()
- SKIP
- ELSE
- EXIT
- ENDI
- ENDD
- @ 19, 31 SAY '记帐前准备......'
- GOTO BOTTOM
- pd1 = RECNO()
- IF pd1<>pd-1
- pd1 = pd1-pd+1
- GOTO pd
- DELE NEXT pd1
- PACK
- ENDI
- USE pzk
- a1 = 0
- a2 = 0
- SUM ALL jje TO a1
- SUM ALL dje TO a2
- IF a1<>a2
- @ 17, 3 CLEAR TO 23, 77
- @ 9, 10 CLEAR TO 13, 65
- @ 11, 23 SAY '凭证库不平,不能记帐!'
- ss = INKEY(0)
- RETU
- ENDI
- SORT ON kmdm, pzh, rq TO pzk%.dbf
- USE pzk%
- DELE ALL FOR zy='结转利润'
- REPL dje WITH dje-jje, jje WITH 0 ALL FOR '501'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '507'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '517'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '521'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '551'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '555'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '575'=SUBSTR(kmdm, 1, 3)
- REPL dje WITH dje-jje, jje WITH 0 ALL FOR '571'=SUBSTR(kmdm, 1, 3)
- REPL jje WITH jje-dje, dje WITH 0 ALL FOR '3220006'=SUBSTR(kmdm, 1, 6)
- RECA ALL
- COPY FILE mxk.dbf TO mxk%.dbf
- USE mxk
- APPE FROM pzk%.dbf
- @ 19, 31 SAY '计算发生额......'
- USE pzk%
- TOTA ON kmdm TO pzkk%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- USE pzkk%
- REPL pzh WITH 0 ALL
- REPL rq WITH rq2 ALL
- ERAS pzk%.dbf
- SELE 2
- @ 19, 31 SAY '计算本月合计....'
- SELE 2
- USE
- SELE 1
- REPL zy WITH '本月合计' ALL
- USE mxk
- APPE FROM pzkk%.dbf
- USE pzkk%.dbf
- REPL ye WITH jje-dje ALL FOR jhd='+'
- REPL ye WITH dje-jje ALL FOR jhd='-'
- REPL ysl WITH ssl-fsl ALL FOR slbz='2'
- SELE 2
- USE
- SELE 1
- USE mxk%.dbf
- APPE FROM pzkk%.dbf
- USE mxk%.dbf
- @ 19, 31 SAY '计算累计数......'
- TOTA ON kmdm TO mx%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- USE mx%.dbf
- ERAS mxk%.dbf
- SORT ON kmdm TO mxk%.dbf
- USE mxk%.dbf
- ERAS mx%.dbf
- TOTA ON kmdm TO mx%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- USE
- ERAS mxk%.dbf
- RENA mx%.dbf TO mxk%.dbf
- USE mxk%
- @ 19, 31 SAY '计算期末余额....'
- REPL zy WITH '期末及累计' ALL
- a1 = 0
- a2 = 0
- SUM ALL FOR jhd='+' ye TO a1
- SUM ALL FOR jhd='-' ye TO a2
- IF a1<>a2
- SET COLOR TO N/W
- @ 17, 3 CLEAR TO 23, 77
- SET COLOR TO W+/B
- @ 9, 10 CLEAR TO 13, 65
- @ 11, 30 SAY ' 明细帐余额不平!'
- @ 11, 48 SAY a1-a2
- ENDI
- SELE 2
- USE
- SELE 1
- USE mxk
- APPE FROM mxk%.dbf
- USE
- COPY FILE pzKK%.dbf TO mx%.dbf
- USE mx%.dbf
- REPL kmdm WITH SUBSTR(LTRIM(TRIM(kmdm)), 1, 3) ALL
- TOTA ON kmdm TO mx%%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- @ 19, 31 SAY '登记总帐 ......'
- USE
- COPY FILE pzkk%.dbf TO mx%.dbf
- USE mx%.dbf
- DELE ALL FOR LEN(LTRIM(TRIM(kmdm)))<>9
- PACK
- REPL kmdm WITH SUBSTR(LTRIM(TRIM(kmdm)), 1, 7) ALL
- TOTA ON kmdm TO M%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- USE
- ERAS MX%.dbf
- USE Mx%%.dbf
- APPE FROM m%.dbf
- REPL zy WITH '本月合计' ALL
- ERAS m%.dbf
- USE MX%%.dbf
- SORT ON kmdm TO Mx%.dbf
- USE
- ERAS MX%%.dbf
- USE zzk
- APPE FROM mx%.dbf
- ERAS mx%.dbf
- USE
- COPY FILE mxk%.dbf TO mx%.dbf
- USE mxk%
- REPL kmdm WITH SUBSTR(LTRIM(TRIM(kmdm)), 1, 3) ALL
- @ 19, 31 SAY '总帐余额 ......'
- USE mx%
- REPL kmdm WITH SUBSTR(LTRIM(TRIM(kmdm)), 1, 7) ALL
- USE mxk%
- APPE FROM mx%
- ERAS mx%.dbf
- USE
- USE mxk%
- SORT ON kmdm TO mx%.dbf
- USE mx%
- ERAS mxk%.dbf
- TOTA ON kmdm TO mxkk%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- USE mxkk%
- ERAS mx%.dbf
- REPL zy WITH '期末及累计' ALL
- SORT ON kmdm TO mxk%.dbf
- USE
- @ 19, 31 SAY '整理数据 ......'
- ERAS mxkk%.dbf
- SELE 2
- USE
- SELE 1
- COPY FILE zzk.dbf TO zzk%%.dbf
- USE zzk
- DELE ALL
- PACK
- APPE FROM mxk%
- SELE 1
- RECA ALL
- DELE ALL FOR zy<>'期初余额'
- REPL jje WITH 0, dje WITH 0, ye WITH 0, njye WITH 0, ndye WITH 0 ALL
- REPL ssl WITH 0, sdj WITH 0, fsl WITH 0, fdj WITH 0, ysl WITH 0, ydj WITH 0, yysl WITH 0 ALL
- RECA ALL
- SET INDEX TO zzk
- REIN
- DELE ALL FOR LEN(LTRIM(TRIM(kmdm)))=7
- TOTA ON kmdm TO zzkk%.dbf ALL FIELDS jje, dje, ye, ssl, fsl, ysl, njye, ndye, yysl
- REIN
- USE zzkk%
- REPL zy WITH '期末及累计' ALL
- SELE 2
- USE
- ERAS zzk.dbf
- ERAS mxk%.dbf
- SELE 1
- a3 = 0
- a4 = 0
- SUM ALL FOR jhd='+' .AND. LEN(LTRIM(TRIM(kmdm)))=3 ye TO a3
- SUM ALL FOR jhd='-' .AND. LEN(LTRIM(TRIM(kmdm)))=3 ye TO a4
- IF a1<>a2
- SET COLOR TO N/W
- @ 17, 3 CLEAR TO 23, 77
- SET COLOR TO W+/B
- @ 9, 10 CLEAR TO 13, 65
- @ 11, 30 SAY '总帐余额不平!'
- @ 12, 48 SAY a3-a4
- ENDI
- IF a3<>a1 .OR. a2<>a4
- SET COLOR TO N/W
- @ 17, 3 CLEAR TO 23, 77
- SET COLOR TO W+/B
- @ 9, 10 CLEAR TO 13, 65
- @ 11, 30 SAY '总帐与明细帐不平!'
- @ 13, 48 SAY a3-a1
- @ 13, 64 SAY a4-a2
- ENDI
- USE zzk%%
- APPE FROM zzkk%.dbf
- USE
- RENA zzk%%.dbf TO zzk.dbf
- SELE 2
- USE
- SELE 1
- USE
- ERAS pzkk%.dbf
- ERAS zzkk%.dbf
- ERAS mxkk%%.dbf
- SET COLOR TO BG+/RB
- ?? CHR(7)
- @ 22, 30 SAY '记帐完毕,按任意键返回......'
- ss = INKEY(0)
- ENDI
- CLOS DATABASES
- SET COLOR TO W+/B
- @ 0, 0, 23, 79 BOX '北北北北'
- SET COLOR TO W+/N
- @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
- @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG
- @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5) 黄朝生研制 版权所有 南宁市建政路51号 邮编:530023 ' COLOR R/W
- ON KEY LABEL Escape do Rquit
- SET CLOCK TO 23, 69
- RETU
- *