home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
busi
/
chkmstr.zip
/
CHECK.PRG
< prev
next >
Wrap
Text File
|
1990-03-15
|
54KB
|
2,455 lines
PROCEDURE CHEXMENU
ON ESCAPE DO CHEXMENU
SET TALK OFF
SET SAFETY OFF
SET ECHO OFF
SET MENU OFF
SET DELETED ON
PRTC= "0"
ARC= "0"
MDATE=DATE()
IF ACCTKT= "0"
ACCTNUM=0
CLEAR
IF ISCOLOR()
SET COLOR TO W/R,X/B,W
ELSE
SET COLOR TO W/B+,W/B,W
ENDIF
CLEAR
@2,1 TO 22,78 DOUBLE
@4,20 SAY "ENTER ACCOUNT NUMBER ** " GET ACCTNUM
@4,55 SAY " **"
@6,14 SAY "*****************************************************"
@8,14 SAY " WARNING !!!!!!!!!!!!!!!!"
@10,14 SAY "*****************************************************"
@12,14 SAY " UNDER NO CIRCUMSTANCES REPLY { C OR CANCEL }"
@13,14 SAY " TO ANY MESSAGE YOU MAY SEE ON SCREEN !!!!!!"
@14,14 SAY "REPLY ONLY { S OR SUSPEND } AND THEN PRESS { F9 }."
@15,14 SAY "TO DO OTHERWISE WILL DESTROY ALL ACCOUNT DATA !!!!"
@17,14 SAY "*****************************************************"
@19,14 SAY "YOU MAY CANCEL ANY DATA ENTRY AND RETURN TO THE"
@20,14 SAY " MAIN MENU BY PRESSING THE { ESCAPE } KEY !!"
READ
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
IF ACCTNUM-ACCTN<>0
@22,20 SAY "SORRY---ACCOUNT NUMBER NOT VALID !!!!!!!"
WAIT
QUIT
ENDIF
ENDIF
ACCTKT= "1"
MYEAR=YEAR(MDATE)
IF ARCYEAR <> MYEAR
CLEAR
@2,1 TO 20,78 DOUBLE
@4,20 SAY "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@6,20 SAY "NOTE - NOTE - NOTE - NOTE - NOTE - NOTE"
@8,20 SAY "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@10,20 SAY " HAPPY NEW YEAR !!!!!!!!!"
@12,20 SAY " IT IS TIME TO RUN AN ACCOUNT SUMMARY"
@13,20 SAY " AND TRANSFER LAST YEARS CHECK AND"
@14,20 SAY " DEPOSIT REGISTERS TO A BACK-UP FILE."
@16,20 SAY " IF YOU WISH TO DO IT AT THIS TIME,"
@17,20 SAY " REPLY { Y }.IF YOU PREFER TO DO IT"
@18,20 SAY " AT A LATER TIME, REPLY { N }."
ANS=" "
DO WHILE .NOT. (UPPER(ANS) $ 'YN')
WAIT "TYPE { Y/N }" TO ANS
ENDDO
IF UPPER(ANS) = "Y"
DO PRTSUM
ENDIF
ENDIF
CLEAR
DO WHILE .T.
CHOICE= " "
@1,15 TO 5,63 DOUBLE
@3,25 SAY 'CHECKING ACCOUNT CONTROL MENU'
@5,6 TO 22,73 DOUBLE
@7,20 SAY '1 } UPDATE CHECK REGISTER'
@9,20 SAY '2 } UPDATE DEPOSIT REGISTER'
@11,20 SAY '3 } PRINT CHECKS, REPORTS, SUMMARIES'
@13,20 SAY '4 } RECONCILE ACCOUNT TO BANK'
@15,20 SAY '5 } TRANSFER FUNDS BETWEEN ACCOUNTS {*P*}'
@17,20 SAY '6 } EXIT TO DBASE III'
@19,20 SAY '7 } EXIT TO DOS'
@ 21,20 SAY 'ENTER YOUR CHOICE' GET CHOICE
READ
CHOICEB=CHOICE
DO CASE
CASE CHOICE="1"
DO CHEXMANG
CASE CHOICE="2"
DO DEPMANG
CASE CHOICE="3"
DO PRTMENU
CASE CHOICE="4"
DO REXCHEX
CASE CHOICE="5"
DO TRANACCT
CASE CHOICE="6"
CLEAR
@5,15 SAY "YOU HAVE SELECTED TO EXIT THE CHEXMENU TO DBASE III."
@7,15 SAY "IS THAT WHAT YOU WANT TO DO ?? ANSWER {Y} OR {N}."
@11,15 SAY "IF YOU ANSWER {Y}, PRESS THE {F10} KEY WHEN YOU WISH"
@13,15 SAY "TO RETURN TO THE CHECK MANAGMENT PROGRAM MENU !!!!"
EMENU=" "
DO WHILE .NOT. (UPPER(EMENU) $ 'YN')
WAIT " " TO EMENU
ENDDO
IF UPPER(EMENU) = "N"
DO CHEXMENU
ENDIF
SET FUNCTION 10 TO "DO START;"
ACCTKT= "0"
CLEAR
@10,10 SAY "GOODBYE, PROGRAM TERMINATED !!"
@12,20 SAY "SAVING DATA FILES ------------------------------"
@14,10 SAY "PRESS THE { F10 } KEY TO RETURN TO CHEXMENU."
RELEASE LP,ACCTNUM,VALU,BC,AC,CC,DC,EC,FC,GC,HC,REXCT,REXCA,STATS,;
REXCF,REXDT,REXDF,ERROR,REXSEQ,REXDA,REXA,B11T,BT,CTP,STATS2,SELC,SELD
RELEASE ACTDB,ACTEB,ACTFB,ACTGB,ACTHB,ACB,BCB,DEPSUM,C05S,ACTAB,ACTBB,;
CCB,DCB,ECB,CTB,GTB,MYEAR,ASUM,BSUM,CSUM,DSUM,ESUM,FSUM,A00S,CMPBAL,
RELEASE A01S,A02S,A03S,A04S,A05S,A06S,A07S,A08S,A09S,A10S,A11S,A12S,;
B00S,B01S,B02S,B03S,B04S,B05S,B06S,B07S,B08S,B09S,B10S,B11S,B12S,C00S
RELEASE C01S,C02S,C03S,C04S,D00S,D01S,D02S,E00S,E01S,E02S,F00S,F01S,F02S,;
ATS,BTS,CTS,DTS,ETS,FTS,GTS,HTS,CKARCV,DPARCV,RETYEAR,RTYV,PRT_TOT,DPS
RELEASE C00P,C01P,C02P,C03P,C04P,C05P,CD,ACTCB,CTN,CTR,CHKCT,VALUE,;
AMOUNTM,RECD,ITS,ISUM,B13T,B14T,B13S,B14S,TSTC,IC,RETN,B03ST,REXBAL
DO CASE
CASE CONFIG="A"
SAVE TO A:CHEXMANG
CASE CONFIG="B"
SAVE TO B:CHEXMANG
CASE CONFIG="C"
SAVE TO C:\CHEXMANG\CHEXMANG
CASE CONFIG="D"
SAVE TO D:\CHEXMANG\CHEXMANG
ENDCASE
ON ESCAPE
SET TALK ON
SET SAFETY ON
SET MENU ON
CLOSE DATABASE
CANCEL
CASE CHOICE="7"
CLEAR
@10,15 SAY "YOU HAVE SELECTED TO EXIT THE CHEXMENU TO { DOS }."
@14,15 SAY "IS THAT WHAT YOU WANT TO DO ?? ANSWER {Y} OR {N}."
EMENU=" "
DO WHILE .NOT.(UPPER(EMENU) $ 'YN')
WAIT " " TO EMENU
ENDDO
IF UPPER(EMENU) = "N"
DO CHEXMENU
ENDIF
ACCTKT= "0"
CLEAR
@10,20 SAY "SAVING DATA FILES ----------------------------------"
RELEASE LP,ACCTNUM,VALU,BC,AC,CC,DC,EC,FC,GC,HC,REXCT,REXCA,STATS,;
REXCF,REXDT,REXDF,ERROR,REXSEQ,REXDA,REXA,B11T,BT,CTP,STATS2,SELC,SELD
RELEASE ACTDB,ACTEB,ACTFB,ACTGB,ACTHB,ACB,BCB,DEPSUM,C05S,ACTAB,ACTBB,;
CCB,DCB,ECB,CTB,GTB,MYEAR,ASUM,BSUM,CSUM,DSUM,ESUM,FSUM,A00S,CMPBAL,
RELEASE A01S,A02S,A03S,A04S,A05S,A06S,A07S,A08S,A09S,A10S,A11S,A12S,;
B00S,B01S,B02S,B03S,B04S,B05S,B06S,B07S,B08S,B09S,B10S,B11S,B12S,C00S
RELEASE C01S,C02S,C03S,C04S,D00S,D01S,D02S,E00S,E01S,E02S,F00S,F01S,F02S,;
ATS,BTS,CTS,DTS,ETS,FTS,GTS,HTS,CKARCV,DPARCV,RETYEAR,RTYV,PRT_TOT,DPS
RELEASE C00P,C01P,C02P,C03P,C04P,C05P,CD,ACTCB,CTN,CTR,CHKCT,VALUE,;
AMOUNTM,RECD,ITS,ISUM,B13T,B14T,B13S,B14S,TSTC,IC,RETN,B03ST,REXBAL
DO CASE
CASE CONFIG="A"
SAVE TO A:CHEXMANG
CASE CONFIG="B"
SAVE TO B:CHEXMANG
CASE CONFIG="C"
SAVE TO C:\CHEXMANG\CHEXMANG
CASE CONFIG="D"
SAVE TO D:\CHEXMANG\CHEXMANG
ENDCASE
CLOSE DATABASE
QUIT
OTHERWISE
@23,11 SAY "**** ENTER A NUMBER FROM 1 TO 7. YOU ENTERED { ";
+CHOICEB+" } ! ****"
ENDCASE
ENDDO
RETURN
PROCEDURE CHEXSTAT
EDISP= " "
CLEAR
DAY=CDOW(DATE())
@1,25 SAY "CHECKING ACCOUNT STATISTICS :"
@0,0 SAY "NEXT SEQ#" GET SEQ
@3,8 SAY "FOR ACCOUNT NUMBER" GET ACCTN
@3,41 SAY "DATE" GET MDATE
@3,59 SAY "DAY" GET DAY
@5,15 SAY "############ ACCOUNT DISTRIBUTION : #############"
@7,22 SAY A+" $$" GET ACCTA
@8,22 SAY B+" $$" GET ACCTB
@9,1 SAY "PRESS { C } {*B*}"
@9,22 SAY C+" $$" GET ACCTC
@10,1 SAY "PRESS { D }"
@10,22 SAY D+" $$" GET ACCTD
@11,22 SAY E+" $$" GET ACCTE
@12,1 SAY "REGISTRATION"
@12,22 SAY F+" $$" GET ACCTF
@13,1 SAY "# " + STR(RNUM,4)
@13,22 SAY G+" $$" GET ACCTG
@14,22 SAY H+" $$" GET ACCTH
@15,15 SAY "TOTAL OF CHECKS JUST WRITTEN $$" GET WKCHEX_TOT
@16,15 SAY "TOTAL OF DEPOSITS JUST MADE $$" GET ADDDEP_TOT
@18,13 SAY BANK1 + " BALANCE $$" GET GRAND_TOTL
@19,1 SAY "PRESS { I }"
@19,13 SAY BANK2 + " BALANCE $$" GET BANK2V
@20,15 SAY "COMBINED BALANCE $$" GET COMBINE
@22,1 SAY DB10 GET STAT2
@22,30 SAY "*********************"
@22,53 SAY DA02 GET STAT
WAIT "PRESS { E } TO EXIT" TO EDISP
IF UPPER(EDISP)= "I"
CLEAR GETS
ATS=0.00
@19,1 SAY "ENTER INTREST AMOUNT" GET ATS
READ
BANK2V=BANK2V+ATS
ACCTA=ACCTA+ATS
COMBINE=COMBINE+ATS
@7,22 SAY A+" $$" GET ACCTA
@19,0
@19,13 SAY BANK2 + " BALANCE $$" GET BANK2V
@20,15 SAY "COMBINED BALANCE $$" GET COMBINE
@23,0
WAIT
ENDIF
IF UPPER(EDISP)= "C"
DO CSTATS
ENDIF
IF UPPER(EDISP)= "D"
PRT=" "
CLEAR
@1,1 TO 8,78
@3,12 SAY "ENTER INTREST PERCENTAGE AS A *WHOLE* NUMBER" GET TRAND
READ
@5,25 SAY "TO PRINT TO SCREEN, ENTER { S }"
@6,25 SAY "TO PRINT TO PRINTER, ENTER { P }"
DO WHILE .NOT. (UPPER(PRT) $ 'SP')
WAIT " " TO PRT
ENDDO
IF TRAND >1
TRAND=TRAND*.00083
TRAND=VAL(STR(TRAND,7,5))
ENDIF
USE KIMACT
IF UPPER(PRT)= "S"
DISPLAY ALL
WAIT
ELSE
SET PRINT ON
CLEAR
@10,10 SAY "PRINTING DETAIL RECORDS ----------------"
SET CONSOLE OFF
LIST
SET CONSOLE ON
SET PRINT OFF
ENDIF
ENDIF
IF CHOICE= "2"
DO CHEXMENU
ENDIF
IF CHOICE= "5"
DO CHEXMENU
ENDIF
DO PRTMENU
RETURN
PROCEDURE PRTMENU
CLEAR
DO WHILE .T.
CHOICE= " "
@1,15 TO 5,63 DOUBLE
@3,30 SAY 'PRINT CONTROL MENU'
@5,6 TO 22,73 DOUBLE
@7,25 SAY '1 } PRINT CHECKS'
@9,25 SAY '2 } PRINT REGISTER FUNCTION'
@11,25 SAY '3 } SEARCH ON CHECK OR DEPOSIT {*P*}'
@13,25 SAY '4 } PRINT ACCOUNT SUMMERIES {*P*}'
@15,25 SAY '5 } DISPLAY ACCOUNT STATISTICS'
@17,25 SAY '6 } BACKUP FILES TO FLOPPY DISK'
@19,25 SAY '7 } EXIT BACK TO MAIN MENU'
@21,25 SAY 'ENTER YOUR CHOICE' GET CHOICE
READ
CHOICEB=CHOICE
DO CASE
CASE CHOICE="1"
DO PRINTCHEX
CASE CHOICE="2"
DO CHEXDISP
CASE CHOICE="3"
DO CHKSRCH
CASE CHOICE="4"
DO PRTSUM
CASE CHOICE="5"
DO CHEXSTAT
CASE CHOICE="6"
DO CASE
CASE CONFIG= "A".AND. XCPY= "C"
SAVE TO A:CHEXMANG
RUN \CHEXMANG\SAVEA.BAT
CASE CONFIG= "B".AND. XCPY= "C"
SAVE TO B:CHEXMANG
RUN \CHEXMANG\SAVEB.BAT
CASE CONFIG= "C".AND. XCPY= "C"
SAVE TO \CHEXMANG\CHEXMANG
RUN \CHEXMANG\SAVEC.BAT
CASE CONFIG= "D".AND. XCPY= "C"
SAVE TO \CHEXMANG\CHEXMANG
RUN \CHEXMANG\SAVED.BAT
CASE CONFIG= "A".AND. XCPY= "X"
SAVE TO A:CHEXMANG
RUN \CHEXMANG\XSAVEA.BAT
CASE CONFIG= "B".AND. XCPY= "X"
SAVE TO B:CHEXMANG
RUN \CHEXMANG\XSAVEB.BAT
CASE CONFIG= "C".AND. XCPY= "X"
SAVE TO \CHEXMANG\CHEXMANG
RUN \CHEXMANG\XSAVEC.BAT
CASE CONFIG= "D".AND. XCPY= "X"
SAVE TO \CHEXMANG\CHEXMANG
RUN \CHEXMANG\XSAVED.BAT
ENDCASE
CLEAR
CASE CHOICE="7"
DO CHEXMENU
OTHERWISE
@23,11 SAY "**** ENTER A NUMBER FROM 1 TO 7. YOU ENTERED { ";
+CHOICEB+ " } ! ****"
ENDCASE
ENDDO
RETURN
PROCEDURE CHEXMANG
ATS=0
CLEAR
IF SEQ < 5000
@10,15 SAY "##################################################"
@12,20 SAY "SEQUENCE NUMBER IS LESS THAN {{ 5,000 }} !"
@13,15 SAY "DO YOU WISH IT TO BE SET TO A VALUE OF {{ 5,001 }} ?"
@15,15 SAY "##################################################"
SEQCK=" "
DO WHILE .NOT. (UPPER(SEQCK) $ 'YN')
WAIT "TYPE { Y/N }" TO SEQCK
ENDDO
IF UPPER(SEQCK) = "N"
ACCTKT= "1"
DO CHEXMENU
ENDIF
SEQ=5001
@20,10 SAY "CHECK SEQUENCE NUMBER HAS BEEN SET TO A VALUE OF {{ 5,001 }} !!"
WAIT
ENDIF
CLEAR
IF GRAND_TOTL < ACTMIN
@2,15 SAY "**************************************************"
@4,35 SAY "WARNING"
@6,15 SAY "**************************************************"
@8,27 SAY "YOU HAVE A { GRAND TOTAL }"
@10,27 SAY "OF LESS THAN $$ "+STR(ACTMIN,4)+ " !!!"
@12,27 SAY "TOTAL IS CURRENTLY $$ " GET GRAND_TOTL
@14,27 SAY "DO YOU WISH TO CONTINUE ???"
WARN=" "
DO WHILE .NOT. (UPPER(WARN) $ 'Y/N')
WAIT "TYPE { Y/N }" TO WARN
ENDDO
IF UPPER(WARN)= "N"
DO CHEXMENU
ENDIF
ENDIF
LP=0
TSTC=0
USE WORKCHEX INDEX WORKCHEX
ZAP
PERM=" "
CLEAR
@6,15 SAY "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
@10,23 SAY "DO YOU WANT TO ADD THE CHECKS FROM"
@12,23 SAY "THE PERMENANT CHECK REGISTER ???"
@16,15 SAY "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
DO WHILE .NOT. (UPPER(PERM) $ 'YN')
WAIT "TYPE 'Y/N'" TO PERM
ENDDO
IF UPPER(PERM)= "Y"
APPEND FROM PERMCHEX
ENDIF
DO WHILE .T.
DO WHILE .T.
CLEAR
ACMV=" "
COUNTER=0
@10,25 SAY "ADDITIONAL CHECKS TO PRINT ???"
@12,25 SAY " IF { Y }, REPLY { N } TO"
@14,25 SAY " { MORE ENTRIES ? } TO EXIT."
DO WHILE .NOT. (UPPER(ACMV) $ 'YN')
WAIT "TYPE 'Y/N'" TO ACMV
ENDDO
IF UPPER(ACMV)= "Y"
ACODE=" "
CLEAR
DO ACCTEXT
DO WHILE .T.
DONE= " "
IF LP=0
INSERT BLANK
ENDIF
REPLACE V WITH "P"
@1,25 SAY "PAY TO" GET PAY_TO ;
PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@2,8 SAY "AMOUNT" GET AMOUNT
@2,23 SAY "ACCOUNT CODE " GET ACCT_CODE PICTURE "!99"
@2,41 SAY "NOTE " GET NOTE
@3,30 SAY "NUMBER + STREET " GET ADDRESS
@4,30 SAY "CITY " GET CITY
@4,52 SAY "STATE " GET STATE
@4,62 SAY "ZIP " GET ZIP PICTURE "99999-9999"
DO WHILE .NOT. (UPPER(DONE) $ 'YN')
@4,0 SAY "MORE ENTRIES ?? { Y/N }" GET DONE
READ
ENDDO
STORE LEFT(ACCT_CODE,1) TO ACODE
IF .NOT. (ACODE $ 'ABCDEFGHI')
SET COLOR TO R*/W
@0,0 SAY "INVALID ACCOUNT CODE ENTERED."
@1,0 SAY "RE-ENTER!!!!"
LP=1
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
IF ACCT_CODE= "C99"
TSTC=0
AMOUNTM=AMOUNT
RETN=RECNO()
CHOICE= "B"
DO ACTC99
USE WORKCHEX INDEX WORKCHEX
GO RETN
ENDIF
IF ACCT_CODE= "C" .OR. ACCT_CODE= "D"
TSTC=1
ENDIF
LP=0
@0,0
@1,0
IF UPPER(DONE)= "N"
EXIT
ENDIF
ENDDO
ENDIF
CLEAR
MCMV=" "
@8,25 SAY "ADDITIONAL CHECKS FROM MANUAL"
@10,25 SAY " REGISTER TO ADD ???"
@12,25 SAY " IF { Y }, REPLY { N } TO"
@14,25 SAY "{ MORE ENTRIES ? } TO EXIT."
DO WHILE .NOT. (UPPER(MCMV) $ 'YN')
WAIT "TYPE 'Y/N'" TO MCMV
ENDDO
IF UPPER(MCMV)= 'Y'
CLEAR
DO ACCTEXT
GO BOTTOM
DO WHILE .T.
DONE= " "
IF LP=0
INSERT BLANK
ENDIF
REPLACE V WITH "M"
@1,19 SAY "CHECK NUMBER" GET SEQ_NO RANGE 1,4999
@1,37 SAY "DATE" GET DATE
@1,51 SAY "ACCOUNT CODE" GET ACCT_CODE PICTURE "!99"
@2,15 SAY "PAY TO" GET PAY_TO ;
PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@2,53 SAY "AMOUNT" GET AMOUNT
@3,38 SAY "NOTE" GET NOTE
DO WHILE .NOT. (UPPER(DONE) $ 'YN')
@4,1 SAY "MORE ENTRIES ?? TYPE { Y/N }." GET DONE
READ
ENDDO
STORE LEFT(ACCT_CODE,1) TO ACODE
IF .NOT. (ACODE $ 'ABCDEFGHI')
SET COLOR TO R*/W
@0,0 SAY "INVALID ACCOUNT CODE ENTERED."
@1,0 SAY "RE-ENTER!!!!"
LP=1
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
IF ACCT_CODE= "C99"
TSTC=0
AMOUNTM=AMOUNT
RETN=RECNO()
CHOICE= "B"
DO ACTC99
USE WORKCHEX INDEX WORKCHEX
GO RETN
ENDIF
IF ACCT_CODE= "C" .OR. ACCT_CODE= "D"
TSTC=1
ENDIF
LP=0
@0,0
@1,0
IF UPPER(DONE)= "N"
EXIT
ENDIF
ENDDO
ENDIF
IF UPPER(PERM)= "Y"
CLEAR
SUM AMOUNT FOR ACCT_CODE= 'B' TO BC
BC=ACCTB-BC
BT=B111A+B112A+B113A
BC=BC-BT
@5,18 SAY " DO YOU WANT TO CHANGE { AMOUNT } IN"
@6,18 SAY "ENTRIES FROM { PERMENANT CHECK REGISTER } ??"
@8,18 SAY " IF { Y },PRESS { PAGE-DOWN } TO"
@9,18 SAY " SKIP OVER CORRECT ENTRIES !!"
@13,30 SAY B+ " $$" +STR(BC)
@14,30 SAY B111+ " $$" +STR(B111A)
@15,30 SAY B112+ " $$" +STR(B112A)
@16,30 SAY B113+ " $$" +STR(B113A)
B11T=0
WCMV=" "
DO WHILE .NOT. (UPPER(WCMV) $ 'YN')
WAIT "TYPE 'Y/N'" TO WCMV
ENDDO
IF UPPER(WCMV)= "Y"
GO TOP
CLEAR
DO WHILE .NOT. EOF()
IF V <> "X"
SKIP
LOOP
ENDIF
@3,10 SAY "PAY TO: " + PAY_TO
@5,40 SAY "ACCOUNT CODE " + ACCT_CODE
IF ACCT_CODE <> "B"
@8,0
ENDIF
@10,0
@11,0
@12,0
IF ACCT_CODE= 'B'
BC=BC+AMOUNT
IF ACCT_CODE= "B11"
BC=BC+BT
@8,30 SAY B+ " $$" +STR(BC)
@10,30 SAY B111 GET B111A
@11,30 SAY B112 GET B112A
@12,30 SAY B113 GET B113A
READ
BT=B111A+B112A+B113A
REPLACE AMOUNT WITH BT
ELSE
@5,10 SAY "AMOUNT " GET AMOUNT
@8,30 SAY B+ " $$" +STR(BC)
READ
BC=BC-AMOUNT
ENDIF
ELSE
@5,10 SAY "AMOUNT " GET AMOUNT
READ
ENDIF
IF ACCT_CODE= "C" .OR. ACCT_CODE= "D"
TSTC=1
ENDIF
IF ACCT_CODE= "C99".AND. AMOUNT <>0
TSTC=0
AMOUNTM=AMOUNT
RETN=RECNO()
DO ACTC99
USE WORKCHEX INDEX WORKCHEX
GO RETN
ENDIF
SKIP
ENDDO
ENDIF
ENDIF
CLEAR
ANS= " "
@10,27 SAY "IF YOU LEFT OUT AN ENTRY"
@11,27 SAY "AND NEED TO ADD A RECORD,"
@12,27 SAY "TYPE { A } NOW !! OTHERWISE,"
@14,27 SAY "TYPE { C } TO CONTINUE."
DO WHILE .NOT. (UPPER(ANS) $ 'AC')
WAIT " " TO ANS
ENDDO
IF UPPER(ANS)= "A"
PERM= "N"
LOOP
ENDIF
EXIT
ENDDO
CLEAR
@10,30 SAY "DO YOU WANT TO VERIFY"
@12,30 SAY " CHECK ENTRIES ????"
DVCE=" "
DO WHILE .NOT. (UPPER(DVCE) $ 'YN')
WAIT "TYPE 'Y/N'" TO DVCE
ENDDO
IF UPPER(DVCE)= "Y"
SET ORDER TO 0
IF UPPER(MESG) <> "Y"
CLEAR
@2,20 SAY "CHECK CONTENTS OF EACH FIELD"
@4,20 SAY "FOR CORRECTNESS. IF OK, PRESS"
@6,20 SAY "{ PAGE DOWN } KEY TO GO TO NEXT ENTRY."
@10,20 SAY "IF THERE IS AN ERROR, PRESS { ENTER } KEY"
@12,20 SAY "TO SKIP OVER CORRECT FIELDS UNTIL"
@14,20 SAY "YOU GET TO THE FIELD WITH THE ERROR."
@16,20 SAY "CORRECT ERROR, THEN PRESS THE"
@18,20 SAY "{ PAGE DOWN } KEY TO NEXT ENTRY."
WAIT
ENDIF
CLEAR
DO ACCTEXT
DELETE FOR AMOUNT=0
GO TOP
DO WHILE .NOT. EOF()
DO CASE
CASE V= "P"
@1,25 SAY "PAY TO" GET PAY_TO ;
PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@2,0
@2,10 SAY "AMOUNT" GET AMOUNT
@2,25 SAY "ACCOUNT CODE " GET ACCT_CODE PICTURE "!99"
@2,43 SAY "NOTE " GET NOTE
@3,0
@3,20 SAY "NUMBER + STREET " GET ADDRESS
@4,20 SAY "CITY " GET CITY
@4,42 SAY "STATE " GET STATE
@4,52 SAY "ZIP " GET ZIP PICTURE "99999-9999"
CASE V= "M"
@1,14 SAY "CHECK NUMBER" GET SEQ_NO RANGE 1,4999
@1,32 SAY "DATE" GET DATE
@1,47 SAY "ACCOUNT CODE" GET ACCT_CODE PICTURE "!99"
@2,0
@2,14 SAY "PAY TO" GET PAY_TO ;
PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@2,52 SAY "AMOUNT" GET AMOUNT
@3,0
@3,14 SAY "NOTE " GET NOTE
@4,0
CASE V= "X"
@1,20 SAY "PAY TO" GET PAY_TO ;
PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@2,20 SAY "AMOUNT" GET AMOUNT
@2,35 SAY "ACCOUNT CODE " GET ACCT_CODE PICTURE "!99"
ENDCASE
READ
STORE LEFT(ACCT_CODE,1) TO ACODE
IF .NOT. (ACODE $ 'ABCDEFGHI')
SET COLOR TO R*/W
@0,0 SAY "INVALID ACCOUNT CODE ENTERED."
@1,0 SAY "RE-ENTER!!!!"
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
IF ACCT_CODE= "C" .OR. ACCT_CODE= "D"
TSTC=1
ENDIF
@0,0
@1,0
SKIP
ENDDO
DONE=" "
CLEAR
@10,14 SAY "IF ALL ENTRIES ARE CORRECT, PRESS { C } TO CONTINUE."
@12,14 SAY "IF YOU LEFT OUT AN ENTRY, PRESS { A } TO ** ADD ** !"
DO WHILE .NOT. (UPPER(DONE) $ 'AC')
WAIT "ENTER A/C" TO DONE
ENDDO
IF UPPER(DONE)= "A"
PERM= "N"
SET ORDER TO 1
LOOP
ELSE
EXIT
ENDIF
SET ORDER TO 1
ENDIF
EXIT
ENDDO
CLEAR
@10,20 SAY "COMPUTING ------------------------------------"
GO TOP
DO WHILE .NOT.EOF()
IF SEQ_NO <> 0
SKIP
LOOP
ENDIF
REPLACE DATE WITH MDATE
COUNTER=COUNTER+1
REPLACE SEQ_NO WITH SEQ
SKIP
SEQ=SEQ+1
ENDDO
WCSN=SEQ - COUNTER
SUM AMOUNT TO WKCHEX_TOT
SUM AMOUNT FOR ACCT_CODE = 'A' TO AC
SUM AMOUNT FOR ACCT_CODE = 'B' TO BC
SUM AMOUNT FOR ACCT_CODE = 'C' TO CC
SUM AMOUNT FOR ACCT_CODE = 'D' TO DC
SUM AMOUNT FOR ACCT_CODE = 'E' TO EC
SUM AMOUNT FOR ACCT_CODE = 'F' TO FC
SUM AMOUNT FOR ACCT_CODE = 'G' TO GC
SUM AMOUNT FOR ACCT_CODE = 'H' TO HC
SUM AMOUNT FOR ACCT_CODE = 'I' TO ATS
SUM AMOUNT FOR ACCT_CODE = 'A02' TO STATS
SUM AMOUNT FOR ACCT_CODE = 'B10' TO STATS2
SUM AMOUNT FOR ACCT_CODE = 'A06' TO A06S
SUM AMOUNT FOR ACCT_CODE = 'A11' TO A11S
A06SUM=A06SUM+A06S
A11SUM=A11SUM+A11S
ACTAB=ACCTA-AC
ACTBB=ACCTB-BC
ACTCB=ACCTC-CC
ACTDB=ACCTD-DC
ACTEB=ACCTE-EC
ACTFB=ACCTF-FC
ACTGB=ACCTG-GC
ACTHB=ACCTH-HC
BTS=BANK2V+ATS
ECB=ACTAB+ACTBB+ACTCB+ACTDB+ACTEB+ACTFB+ACTGB+ACTHB
CTB=CHEX_TOTAL+WKCHEX_TOT
GTB=DEP_TOTAL-CTB
HTS=GTB+BTS-ECB
IF HTS <>0
SET COLOR TO W/R,W/R,W
CLEAR
@4,30 SAY "ERROR !!!!!!!!!"
@8,25 SAY "GRAND TOTAL WRONG !!!!!!!!!!!!!"
@12,20 SAY "{ DEPOSIT TOTAL } - { CHECK REGISTER TOTAL }"
@13,20 SAY "DOES NOT BALANCE AGAINST { ACCOUNTS TOTAL }."
@15,20 SAY "** FIND AND CORRECT ERROR AND RE-ENTER DATA **"
@16,20 SAY "CHECK REGISTER { HAS NOT } BEEN UPDATED !!!"
WAIT
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
DO PRTMENU
ENDIF
STAT2 = STAT2-STATS2
STAT = STAT-STATS
ACCTA=ACCTA-AC
ACCTB=ACCTB-BC
ACCTC=ACCTC-CC
ACCTD=ACCTD-DC
ACCTE=ACCTE-EC
ACCTF=ACCTF-FC
ACCTG=ACCTG-GC
ACCTH=ACCTH-HC
BANK2V=BANK2V+ATS
CGEXP=CGEXP+CC
CNTOT=CGIN-CGEXP
RCFBU=RCFBU+WKCHEX_TOT
IF TSTC=1
GO TOP
SELC=0
SELD=0
DO WHILE .NOT. EOF()
IF ACCT_CODE= "C" .AND. ACCT_CODE <> "C99"
C01S=ACCT_CODE
C02S=PAY_TO
C03S=AMOUNT
C04S=DATE
IF SELC=0
SELECT B
USE ACCTC INDEX ACCTC
SELC=1
ENDIF
SELECT ACCTC
APPEND BLANK
REPLACE DATE WITH C04S
REPLACE AMOUNT WITH C03S
REPLACE DESCRPT WITH C02S
REPLACE ACCT_CODE WITH C01S
SELECT WORKCHEX
ENDIF
IF ACCT_CODE= "D"
ASUM=PAY_TO
CSUM=AMOUNT
DSUM=DATE
IF SELD=0
SELECT C
USE KIMACT
SELD=1
ENDIF
SELECT KIMACT
APPEND BLANK
REPLACE DATE WITH DSUM
REPLACE PAY_TO WITH ASUM
REPLACE AMOUNT WITH CSUM
REPLACE BALANCE WITH ACCTD
SELECT WORKCHEX
ENDIF
SKIP
ENDDO
ENDIF
USE CKTOT
C01S=0
C02S=0
APPEND BLANK
REPLACE ACCT_A WITH AC,ACCT_B WITH BC,ACCT_C WITH CC,ACCT_D WITH DC,;
ACCT_E WITH EC,ACCT_F WITH FC,ACCT_G WITH GC,ACCT_H WITH HC,;
DATE WITH MDATE,CK_TOT WITH WKCHEX_TOT,ACCT_I WITH ATS
C04S=RECNO()
AVERAGE CK_TOT TO C03S
GO C04S
REPLACE YR_AVG WITH C03S
USE CHEXREG INDEX CKSEQ,CKATNM,CHEXPT
APPEND FROM WORKCHEX FOR AMOUNT >0
CHEX_TOTAL=CHEX_TOTAL+WKCHEX_TOT
GRAND_TOTL=DEP_TOTAL-CHEX_TOTAL
COMBINE=BANK2V+GRAND_TOTL
IF GRAND_TOTL < ACTMIN
CLEAR
@2,15 SAY "**************************************************"
@4,35 SAY "WARNING"
@6,15 SAY "**************************************************"
@8,27 SAY "YOU HAVE A { GRAND TOTAL }"
@10,27 SAY "OF LESS THAN $$ "+STR(ACTMIN,4) + " !!!"
@12,27 SAY "TOTAL IS CURRENTLY $$ " GET GRAND_TOTL
WAIT
ENDIF
CLOSE DATABASE
DO CHEXSTAT
RETURN
PROCEDURE DEPMANG
IF MONTH(DATE()) <> TRANDATE
A01S=TRAND*.083*.01
ATS=ROUND(ACCTD*A01S,2)
ATS=VAL(STR(ATS,7,2))
ACCTG=ACCTG+TRANG
ACCTE=ACCTE+TRANE
ACCTF=ACCTF+TRANF
ACCTD=ACCTD+ATS
HTS=ATS+TRANG+TRANE+TRANF
ACCTA=ACCTA-HTS
TRANDATE=TRANDATE+1
IF TRANDATE=13
TRANDATE=1
ENDIF
USE KIMACT
APPEND BLANK
REPLACE DATE WITH MDATE
REPLACE AMOUNT WITH ATS
REPLACE DEP WITH "INT"
REPLACE BALANCE WITH ACCTD
CLEAR
@5,1 TO 19,78
@7,10 SAY "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
@9,10 SAY "THESE ACCOUNTS HAVE BEEN UPDATED BY THE SPECIFIED AMOUNTS !!"
@11,10 SAY "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
@13,20 SAY A + "MINUS $$ " GET HTS
@14,20 SAY D + "PLUS $$ " GET ATS
@15,20 SAY E + "PLUS $$ " GET TRANE
@16,20 SAY F + "PLUS $$ " GET TRANF
@17,20 SAY G + "PLUS $$ " GET TRANG
@20,0
WAIT
ENDIF
USE ADDDEP INDEX ADDDEP
ZAP
TSTC=0
HC=0
DO WHILE .T.
IF HC=0
LP=0
NXDEP= " "
DONE= " "
CLEAR
@10,33 SAY "ACCOUNT CODES :"
@12,26 SAY "A = "+A
@13,26 SAY "B = "+B
@14,26 SAY "C = "+C
@15,26 SAY "D = "+D
@16,26 SAY "E = "+E
@17,26 SAY "F = "+F
@18,26 SAY "G = "+G
@19,26 SAY "H = "+H
@20,26 SAY "I = "+I
DO WHILE .NOT. (UPPER(DONE) $ 'N')
DONE=" "
ANS= " "
INSERT BLANK
DO WHILE .NOT. (UPPER(ANS) $ 'YN')
@2,1 SAY "USE TODAY'S DATE ?? "
WAIT "TYPE Y/N" TO ANS
ENDDO
@2,0
@3,0
IF UPPER(ANS)='Y'
REPLACE DATE WITH MDATE
ELSE
@2,27 SAY "DATE OF DEPOSIT" GET DATE
ENDIF
VALU=0.00
@3,25 SAY "ENTER TOTAL $$ TO BE DEPOSITED"
@4,25 SAY "AT THIS TIME !!" GET VALU
DO WHILE .NOT. (UPPER(DONE) $ 'YN')
@5,25 SAY "MORE ENTRIES ?? TYPE { Y/N }." GET DONE
READ
ENDDO
VALUS=STR(VALU,7,2)
@22,45 SAY "REMAINING $$-----{ "+VALUS+" }"
REPLACE ACCT_CODE WITH "T"
REPLACE AMOUNT WITH VALU
DO WHILE VALU <> 0
ACODE= " "
IF LP=0
INSERT BLANK
ENDIF
@2,0
@3,0
@4,0
@5,0
@3,22 SAY "** ENTRIES TO BUDGET CATAGORIES **"
@6,26 SAY "ACCOUNT CODE" GET ACCT_CODE PICTURE "!"
@7,26 SAY "AMOUNT OF DEPOSIT" GET AMOUNT
READ
IF ACCT_CODE= "C" .OR. ACCT_CODE= "D"
TSTC=1
ENDIF
STORE LEFT(ACCT_CODE,1) TO ACODE
IF .NOT. (ACODE $ 'ABCDEFGHI')
NXDEP=" "
SET COLOR TO R*/W
@0,0 SAY "INVALID ACCOUNT CODE ENTERED."
@1,0 SAY "RE-ENTER!!!!"
LP=1
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
VALU=VALU-AMOUNT
VALUS=STR(VALU,7,2)
@22,45 SAY "REMAINING $$ ----- { "+VALUS+" }"
LP=0
@0,0
@1,0
ENDDO
@3,0
@6,0
@7,0
ENDDO
DELETE FOR AMOUNT =0
ENDIF
IF UPPER(MESG) <> "Y"
CLEAR
@8,25 SAY " REVIEW THE FOLLOWING"
@9,25 SAY " ENTRIES FOR CORRECTNESS."
@11,25 SAY " NOTE THE { RECORD NUMBER }"
@12,25 SAY " OF ANY INCORRECT ENTRIES."
@14,25 SAY "YOU WILL HAVE AN OPPORTUNITY"
@15,25 SAY " TO CORRECT THEM !!!"
WAIT
ENDIF
GO TOP
HC=0
CLEAR
@1,1 SAY "ACCOUNT CODES :"
@1,28 SAY "C= " + C
@1,55 SAY "F= " + F
@2,1 SAY "A= " + A
@2,28 SAY "D= " + D
@2,55 SAY "G= " + G
@3,1 SAY "B= " + B
@3,28 SAY "E= " + E
@3,55 SAY "H= " + H
@4,0
@4,55 SAY "I= " + I
BC=0
@6,0
DO WHILE .NOT.EOF()
@ROW()+1,BC SAY "AMT " + STR(AMOUNT,7,2) + " DATE " + DTOC(DATE) + ;
" AC " + ACCT_CODE + " R# " + STR(RECNO(),2)
SKIP
IF ROW()=22 .AND. BC=40
BC=0
@23,0
WAIT
CLEAR
@6,0
LOOP
ENDIF
IF ROW()=22
BC=BC+40
@6,0
LOOP
ENDIF
ENDDO
@23,0
WAIT
GTS= " "
CLEAR
@10,13 SAY " ARE ALL ENTRIES CORRECT ????"
@12,15 SAY "TYPE { A } TO ADD, { C } TO CHANGE, { E } TO EXIT."
DO WHILE .NOT. (UPPER(GTS) $ 'CEA')
WAIT " " TO GTS
ENDDO
GTS=UPPER(GTS)
DO CASE
CASE GTS= "C"
CLOSE INDEX
CLEAR
GO TOP
@1,1 SAY "ACCOUNT CODES :"
@1,28 SAY "C= " + C
@1,55 SAY "F= " + F
@2,1 SAY "A= " + A
@2,28 SAY "D= " + D
@2,55 SAY "G= " + G
@3,1 SAY "B= " + B
@3,28 SAY "E= " + E
@3,55 SAY "H= " + H
@4,0
@4,55 SAY "I= " + I
@6,21 SAY "ENTER THE RECORD NUMBER { RCD } OF THE"
@7,21 SAY " RECORD IN ERROR AND MAKE CORRECTIONS."
@9,21 SAY " LEAVE { RCD } BLANK AND PRESS"
@10,21 SAY " { ENTER } WHEN FINISHED !!"
DO WHILE .T.
DC=0
@12,21 SAY "RECORD NUMBER { RCD } " GET DC
READ
@13,0
IF DC=0
HC=1
GTS= "A"
EXIT
ENDIF
GO BOTTOM
EC=RECNO()
IF DC>EC
@13,19 SAY "** INVALID RECORD NUMBER ! ** REENTER."
LOOP
ENDIF
GOTO DC
@14,19 SAY "RECORD NUMBER { RCD } " + STR(RECNO(),2)
@14,46 SAY "ACCOUNT CODE { " + ACCT_CODE + " }"
@15,19 SAY "DEPOSIT DATE " GET DATE
@15,46 SAY "AMOUNT " GET AMOUNT
READ
@14,0
@15,0
ENDDO
REINDEX
CASE GTS= "A"
LOOP
CASE GTS= "E"
EXIT
ENDCASE
ENDDO
CLEAR
@10,20 SAY "COMPUTING---------------------------------------"
SUM AMOUNT FOR ACCT_CODE = 'A' TO AC
SUM AMOUNT FOR ACCT_CODE = 'B' TO BC
SUM AMOUNT FOR ACCT_CODE = 'C' TO CD
SUM AMOUNT FOR ACCT_CODE = 'D' TO DC
SUM AMOUNT FOR ACCT_CODE = 'E' TO EC
SUM AMOUNT FOR ACCT_CODE = 'F' TO FC
SUM AMOUNT FOR ACCT_CODE = 'G' TO GC
SUM AMOUNT FOR ACCT_CODE = 'H' TO HC
SUM AMOUNT FOR ACCT_CODE = 'I' TO CTS
SUM AMOUNT TO ADDDEP_TOT FOR ACCT_CODE= 'T'
ACTAB=ACCTA+AC
ACTBB=ACCTB+BC
ACTCB=ACCTC+CD
ACTDB=ACCTD+DC
ACTEB=ACCTE+EC
ACTFB=ACCTF+FC
ACTGB=ACCTG+GC
ACTHB=ACCTH+HC
ECB=ACTAB+ACTBB+ACTCB+ACTDB+ACTEB+ACTFB+ACTGB+ACTHB
CTB=DEP_TOTAL+ADDDEP_TOT
GTB=CTB-CHEX_TOTAL
ATS=BANK2V-CTS
HTS=GTB+ATS-ECB
IF HTS <>0
SET COLOR TO W/R,W/R,W
CLEAR
@4,30 SAY "ERROR !!!!!!!!!"
@8,25 SAY "GRAND TOTAL WRONG !!!!!!!!!!!!!"
@12,20 SAY "{ DEPOSIT TOTAL } - { CHECK REGISTER TOTAL }"
@13,20 SAY "DOES NOT BALANCE AGAINST { ACCOUNTS TOTAL }."
@15,20 SAY "** FIND AND CORRECT ERROR AND RE-ENTER DATA **"
@16,20 SAY "DEPOSIT REGISTER { HAS NOT } BEEN UPDATED !!!"
WAIT
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
DO PRTMENU
ENDIF
ACCTA=ACCTA+AC
ACCTB=ACCTB+BC
ACCTC=ACCTC+CD
ACCTD=ACCTD+DC
ACCTE=ACCTE+EC
ACCTF=ACCTF+FC
ACCTG=ACCTG+GC
ACCTH=ACCTH+HC
BANK2V=BANK2V-CTS
CGIN=CGIN+CD
CNTOT=CGIN-CGEXP
IF TSTC=1
GO TOP
SELC=0
SELD=0
DO WHILE .NOT. EOF()
IF ACCT_CODE= "C"
C03S=AMOUNT
IF SELC=0
SELECT B
USE ACCTC INDEX ACCTC
SELC=1
ENDIF
SELECT ACCTC
APPEND BLANK
REPLACE DATE WITH MDATE
REPLACE AMOUNT WITH C03S
REPLACE DESCRPT WITH "DEPOSIT"
REPLACE ACCT_CODE WITH "DEP"
ENDIF
IF ACCT_CODE= "D"
CSUM=AMOUNT
IF SELD=0
SELECT C
USE KIMACT
SELD=1
ENDIF
SELECT KIMACT
APPEND BLANK
REPLACE DATE WITH MDATE
REPLACE DEP WITH "DEP"
REPLACE AMOUNT WITH CSUM
REPLACE BALANCE WITH ACCTD
ENDIF
SELECT ADDDEP
SKIP
ENDDO
ENDIF
USE DEPREG INDEX DEPAMT
APPEND FROM ADDDEP FOR ACCT_CODE = "T"
DEP_TOTAL=DEP_TOTAL+ADDDEP_TOT
GRAND_TOTL=DEP_TOTAL-CHEX_TOTAL
COMBINE=BANK2V+GRAND_TOTL
RDFBU=RDFBU+ADDDEP_TOT
CLOSE DATABASE
DO CHEXSTAT
RETURN
PROCEDURE PRINTCHEX
USE WORKCHEX INDEX WORKCHEX
SELECT B
USE NUMBTEXT INDEX NUMBTEXT ALIAS WORDS
CLEAR
@3,1 TO 18,78
@5,25 SAY "VERIFY THAT THIS NUMBER " GET WCSN
@6,25 SAY "IS THE SEQUENCE NUMBER "
@7,25 SAY "OF THE FIRST CHECK THAT"
@8,25 SAY "YOU ARE ABOUT TO PRINT !!!!"
@10,25 SAY "IF CORRECT, TYPE { Y } TO CONTINUE."
@11,25 SAY "YOU WILL BE PRINTING " GET COUNTER
@11,59 SAY "CHECKS"
@13,25 SAY "IF NUMBERS {{ DO NOT }} MATCH,"
@14,25 SAY "YOU HAVE AN ERROR !!!!!!!!!!"
@15,25 SAY "TYPE { N } TO CANCEL PRINTING."
@16,25 SAY "CORRECT ERROR AND RESTART PRINT."
TEST=" "
CHKCT=0
DO WHILE .NOT. (UPPER(TEST) $ 'YN')
WAIT "TYPE Y/N" TO TEST
ENDDO
IF UPPER(TEST) ='N'
CLOSE DATABASE
DO CHEXMENU
ENDIF
SELECT WORKCHEX
DELETE FOR SEQ_NO < 5000
GO TOP
SET PRINT ON
? CHR(27) + "C" + CHR(0) + CHR(7)
SET PRINT OFF
DO WHILE .NOT. EOF()
EJECT
IF CHKCT=0
CLEAR
@10,25 SAY "PLACE CHECKS IN PRINTER AND"
@12,25 SAY "ALIGN TO PRINT POSITION NOW !!!"
WAIT
CHKCT=1
@15,40 SAY "PRINTING -----------"
ENDIF
SET DEVICE TO PRINT
VALUE=AMOUNT
DO CONV
IF ACCT_CODE = "B11"
@7,10 SAY B111 + " $$"+STR(B111A)
@8,10 SAY B1111
@10,10 SAY B112 + " $$"+STR(B112A)
@11,10 SAY B1121
@13,10 SAY B113 + " $$"+STR(B113A)
@14,10 SAY B1131
ENDIF
@26,0 SAY FULLTEXT
@29,5 SAY "NOTE -- " + NOTE
@30,45 SAY CMONTH(DATE)
@PROW(),PCOL()+1 SAY DAY(DATE)
@PROW(),PCOL()+2 SAY STR(YEAR(DATE)-1900,2)
@30,65 SAY "$$"
@30,67 SAY AMOUNT PICTURE "****.**"
@32,7 SAY PAY_TO
@33,7 SAY ADDRESS
@34,7 SAY CITY
@35,7 SAY STATE+" "+ZIP
SKIP
ENDDO
SET PRINT ON
? CHR(27)+ "@"
SET PRINT OFF
EJECT
SET DEVICE TO SCREEN
CLEAR
@10,30 SAY "FINISHED PRINT !!!!"
RETURN
PROCEDURE CONV
SELECT WORDS
DOLLAR=""
IF INT(VALUE)=VALUE
CENTTEXT="00"
ELSE
CENTS=(VALUE-INT(VALUE))*100
IF CENTS>10
CENTTEXT=STR(CENTS,2)
ELSE
CENTTEXT="0"+STR(CENTS,1)
ENDIF
ENDIF
VALUE=INT(VALUE)
IF VALUE>999
THOUSANDS=INT(VALUE/1000)
VALUE=VALUE-THOUSANDS*1000
IF THOUSANDS>19
TENS=SUBSTR(STR(THOUSANDS,2),1,1)+"0"
ONES=SUBSTR(STR(THOUSANDS,2),2,1)
SEEK TENS
DOLLAR=TRIM(WORD)
SEEK ONES
DOLLAR=DOLLAR+" "+TRIM(WORD)+" THOUSAND "
ELSE
IF THOUSANDS>9
SEEK STR(THOUSANDS,2)
DOLLAR=TRIM(WORD)+" THOUSAND "
ELSE
SEEK STR(THOUSANDS,1)
DOLLAR=TRIM(WORD)+" THOUSAND "
ENDIF
ENDIF
ENDIF
IF VALUE>99
HUNDREDS=INT(VALUE/100)
VALUE=VALUE-HUNDREDS*100
SEEK STR(HUNDREDS,1)
DOLLAR=DOLLAR+TRIM(WORD)+" HUNDRED "
ENDIF
IF VALUE>0
IF VALUE>19
TENS=SUBSTR(STR(VALUE,2),1,1)+"0"
ONES=SUBSTR(STR(VALUE,2),2,1)
SEEK TENS
DOLLAR=DOLLAR+" "+TRIM(WORD)
SEEK ONES
DOLLAR=DOLLAR+" "+TRIM(WORD)+" DOLLARS "
ELSE
IF VALUE>9
SEEK STR(VALUE,2)
DOLLAR=DOLLAR+TRIM(WORD)+" DOLLARS "
ELSE
SEEK STR(VALUE,1)
DOLLAR=DOLLAR+TRIM(WORD)+" DOLLARS "
ENDIF
ENDIF
ENDIF
FULLTEXT=DOLLAR+" AND "+CENTTEXT+"/100 CENTS"
PAD=REPLICATE("*",69-LEN(FULLTEXT))
FULLTEXT=PAD+FULLTEXT
SELECT WORKCHEX
RETURN
PROCEDURE REXCHEX
CLEAR
@10,26 SAY "IF YOU WISH TO ENTER NEW"
@11,26 SAY "DATA; PRESS THE { N } KEY !"
@13,26 SAY "IF YOU WISH TO USE OLD"
@14,26 SAY "DATA; PRESS THE { O } KEY !"
CHOICE= " "
DO WHILE .NOT.(UPPER(CHOICE) $ 'NO')
WAIT "TYPE N/O" TO CHOICE
ENDDO
STORE 0 TO ERROR,REXSEQ,REXDA,REXCA,REXCF,REXCT,REXDT,REXDF,A01S,A02S
REXBAL=0.00
SELECT A
USE CHEXREG INDEX CKSEQ,CKATNM,CHEXPT
SELECT B
USE REXCHEX
SELECT C
USE CHKBKUP INDEX CBATNM,CHBKPT,CKBKSQ
SELECT D
USE REXDEP
IF UPPER(CHOICE)= "N"
SELECT REXCHEX
ZAP
CLEAR
@8,19 SAY "ENTER CURRENT ACCOUNT BALANCE"
@9,19 SAY "FROM YOUR { BANK STATMENT } !! ----- $$ " GET REXBAL
@11,19 SAY "ENTER NUMBER OF DEPOSITS AND OTHER CREDITS"
@12,19 SAY "TO RECONCILE ----------------------- $$ " GET A01S
@14,19 SAY "ENTER NUMBER OF CHECKS AND OTHER DEBITS"
@15,19 SAY "TO RECONCILE ----------------------- $$ " GET A02S
READ
IF UPPER(MESG)<> "Y"
CLEAR
@10,23 SAY "ENTER {{ CHECK SEQUENCE NUMBERS }}"
@11,23 SAY " THAT HAVE CLEARED BANK FROM"
@12,23 SAY " CURRENT STATMENT ."
@14,23 SAY " LEAVE { AMOUNT } BLANK WHEN DONE !"
WAIT
ENDIF
CLEAR
DO WHILE A02S<>0
APPEND BLANK
@4,25 SAY "RECORD NUMBER " + STR(RECNO(),2)
@6,25 SAY "SEQUENCE NUMBER" GET SEQ_NO
READ
A02S=A02S-1
ENDDO
DELETE FOR SEQ_NO=0
SELECT REXDEP
ZAP
IF UPPER(MESG)<> "Y"
CLEAR
@8,25 SAY "ENTER DEPOSITS TO BE RECONCILED"
@9,25 SAY " THAT HAVE CLEARED BANK"
@10,25 SAY " FROM YOUR CURRENT STATEMENT."
IF AUTO= "A"
@12,15 SAY "YOU HAVE SELECTED TO USE THE { AUTO-YEAR } OPTION "
ELSE
@12,15 SAY "YOU HAVE SELECTED TO USE THE { MANUAL-YEAR } OPTION"
ENDIF
ENDIF
CLEAR
CC= "/"
DO WHILE A01S<>0
APPEND BLANK
A01S=A01S-1
@4,25 SAY "RECORD NUMBER " + STR(RECNO(),2)
@6,25 SAY "AMOUNT" GET AMOUNT
IF AUTO= "A"
AC= " "
BC= " "
@6,41 SAY "DATE" GET AC
@6,48 SAY "/" GET BC
READ
DC=STR(YEAR(DATE()),4)
DC=SUBSTR(DC,3,2)
EC=CTOD(AC+CC+BC+CC+DC)
REPLACE DATE WITH EC
ELSE
@6,41 SAY "DATE" GET DATE
READ
ENDIF
ENDDO
DELETE FOR AMOUNT=0
IF UPPER(MESG) <> "Y"
CLEAR
@8,25 SAY " REVIEW THE FOLLOWING"
@9,25 SAY " ENTRIES FOR CORRECTNESS."
@11,25 SAY " NOTE THE { RECORD NUMBER }"
@12,25 SAY " OF ANY INCORRECT ENTRIES."
@14,25 SAY "YOU WILL HAVE AN OPPORTUNITY"
@15,25 SAY " TO CORRECT THEM !!!"
WAIT
ENDIF
CTS=0
DO WHILE CTS <2
HC=0
DO WHILE .T.
IF CTS=0
SELECT REXCHEX
CLEAR
GO TOP
BC=2
@1,0
DO WHILE .NOT.EOF()
@ROW()+1,BC SAY "SEQ # " +STR(SEQ_NO,4) +;
" RCD # " + STR(RECNO(),2)
SKIP
IF ROW()=22 .AND. BC=52
BC=2
@23,0
WAIT
CLEAR
@1,0
LOOP
ENDIF
IF ROW()=22
BC=BC+25
@1,0
LOOP
ENDIF
ENDDO
@23,0
WAIT
ELSE
SELECT REXDEP
CLEAR
GO TOP
BC=0
@1,0
DO WHILE .NOT.EOF()
@ROW()+1,BC SAY "AMOUNT " + STR(AMOUNT,7,2) + " DATE " + DTOC(DATE) +;
" RCD # " + STR(RECNO(),2)
SKIP
IF ROW()=22 .AND. BC=40
BC=0
@23,0
WAIT
CLEAR
@1,0
LOOP
ENDIF
IF ROW()=22
BC=BC+40
@1,0
LOOP
ENDIF
ENDDO
@23,0
WAIT
ENDIF
CLEAR
GTS= " "
@10,13 SAY " ARE ALL ENTRIES CORRECT ????"
@12,15 SAY "TYPE { A } TO ADD, { C } TO CHANGE, { E } TO EXIT."
@14,10 SAY "*** FOR THE { ADD } OPTION, PRESS { Ctrl-End } WHEN DONE ! ***"
DO WHILE .NOT. (UPPER(GTS) $ 'CEA')
WAIT " " TO GTS
ENDDO
GTS=UPPER(GTS)
DO CASE
CASE GTS= "C"
CLEAR
@8,21 SAY "ENTER THE RECORD NUMBER { RCD } OF THE"
@9,21 SAY " RECORD IN ERROR AND MAKE CORRECTIONS."
@11,21 SAY " LEAVE { RCD } BLANK AND PRESS"
@12,21 SAY " { ENTER } WHEN FINISHED !!"
DO WHILE .T.
DC=0
@14,21 SAY "RECORD NUMBER { RCD } " GET DC
READ
@15,0
IF DC=0
HC=1
EXIT
ENDIF
GO BOTTOM
EC=RECNO()
IF DC>EC
@15,19 SAY "** INVALID RECORD NUMBER ! ** REENTER."
LOOP
ENDIF
GOTO DC
@14,0
@14,21 SAY "RECORD NUMBER { RCD } " + STR(RECNO(),2)
IF CTS=0
@15,21 SAY "CHECK SEQUENCE NUMBER " GET SEQ_NO
ELSE
@15,21 SAY "DEPOSIT DATE " GET DATE
@15,46 SAY "AMOUNT " GET AMOUNT
ENDIF
READ
@15,0
ENDDO
IF HC=1
HC=0
LOOP
ENDIF
CASE GTS= "A"
APPEND
IF CTS=0
DELETE FOR SEQ_NO=0
ELSE
DELETE FOR AMOUNT=0
ENDIF
LOOP
CASE GTS= "E"
CTS=CTS+1
EXIT
ENDCASE
ENDDO
ENDDO
CLEAR
@10,27 SAY " VERIFY BANK BALANCE VALUE !"
@12,22 SAY "BANK STATMENT BALANCE $$" GET REXBAL
READ
ENDIF
CLEAR
@10,20 SAY "COMPUTING CHECKS ------------------------"
SELECT CHEXREG
SET DELETED OFF
RECALL ALL
SET DELETED ON
REPLACE ALL DEL WITH 0
SELECT REXCHEX
GO TOP
DO WHILE .NOT. EOF()
REXSEQ=SEQ_NO
SELECT CHEXREG
SEEK REXSEQ
IF EOF()
SET COLOR TO W/R,W/R,W
CLEAR
@7,21 SAY " ERROR !!!!"
@9,21 SAY " CHECK NUMBER " GET REXSEQ
@10,21 SAY " WAS ** NOT ** FOUND"
@12,21 SAY " THERE MAY BE OTHERS ----"
@14,21 SAY " DISPLAY UNCLEARED CHECKS AND"
@15,21 SAY " COMPARE AGAINST BANK STATMENT."
@17,21 SAY "FIND ERROR AND RERUN RECONCILE OPTION."
WAIT
DO PRTMENU
ENDIF
REXCA=REXCA+AMOUNT
REPLACE DEL WITH 1
DELETE
SELECT REXCHEX
SKIP
ENDDO
SELECT CHEXREG
SUM AMOUNT FOR DEL <>1 TO REXCF
CLEAR
@10,20 SAY "COMPUTING DEPOSITS --------------------"
SELECT A
USE DEPREG INDEX DEPAMT
SELECT B
USE REXREG
SELECT C
USE DEPBKUP INDEX DBKAMT
SELECT DEPREG
SET DELETED OFF
RECALL ALL
SET DELETED ON
REPLACE ALL DEL WITH 0
SELECT REXDEP
LP=0
GO TOP
DO WHILE .NOT. EOF()
REXD=DATE
REXA=AMOUNT
REXDBU=REXD
SELECT DEPREG
SEEK REXA
DO WHILE .T.
IF DATE=REXD
REXDA=REXDA+AMOUNT
REPLACE DEL WITH 1
DELETE
RECALL FOR DEL=2
EXIT
ENDIF
IF LP=7
LP=0
REPLACE DEL WITH 2
DELETE
SEEK REXA
LOOP
ENDIF
IF DATE<>REXD
REXD=REXD-1
LP=LP+1
LOOP
ENDIF
IF EOF()
SET COLOR TO W/R,W/R,W
CLEAR
@6,21 SAY " ERROR !!!!"
@8,21 SAY " DEPOSIT AMOUNT" GET REXA
@9,21 SAY " FOR DATE " GET REXDBU
@10,21 SAY " WAS ** NOT ** FOUND !!"
@12,21 SAY " THERE MAY BE OTHERS ------"
@14,21 SAY " DISPLAY UNCLEARED DEPOSITS AND"
@15,21 SAY " COMPARE AGAINST BANK STATMENT."
@17,21 SAY "FIND ERROR AND RERUN RECONCILE OPTION."
WAIT
DO PRTMENU
ENDIF
ENDDO
SELECT REXDEP
SKIP
ENDDO
SELECT DEPREG
SUM AMOUNT FOR DEL <>1 TO REXDF
CMPBAL=REXBAL-REXCF+REXDF
IF CMPBAL<>GRAND_TOTL
CLEAR
@8,20 SAY " ERROR IN ACCOUNT BALANCING PROCESS !!!!"
@10,20 SAY " RECONCILIATION OF OUTSTANDING CHECKS"
@11,20 SAY " AND DEPOSITS DOES NOT BALANCE AGAINST"
@12,20 SAY " YOUR BANK STATMENT FIGURE !!!!!"
@13,20 SAY "FIND AND CORRECT ERROR BEFORE CONTINUING."
@15,20 SAY " {{ NO }} FILES HAVE BEEN UPDATED !!!"
WAIT
CLEAR
@6,10 TO 18,69
@8,20 SAY "COPY DOWN THE FOLLOWING VALUES !!!!"
@10,20 SAY "YOU WILL NEED THEM TO FIND THE ERROR."
@12,15 SAY "TOTAL OF CLEARED CHECKS $$ " GET REXCA
@13,15 SAY "TOTAL OF CLEARED DEPOSITS $$ " GET REXDA
@14,15 SAY "TOTAL OF { UN } CLEARED CHECKS $$ " GET REXCF
@15,15 SAY "TOTAL OF { UN } CLEARED DEPOSITS $$ " GET REXDF
@16,15 SAY "COMPUTED BANK BALANCE VALUE $$ " GET CMPBAL
@19,0
WAIT
DO PRTMENU
ENDIF
CLEAR
@10,20 SAY "TRANSFERRING FILES --------------------------"
SET COLOR TO W/R,W/R,W
SELECT DEPREG
SET DELETED OFF
RECALL ALL
SET DELETED ON
GO TOP
DO WHILE .NOT. EOF()
IF DEL=1
REXA=AMOUNT
REXD=DATE
DELETE
SELECT DEPBKUP
APPEND BLANK
REPLACE AMOUNT WITH REXA,DATE WITH REXD
SELECT DEPREG
SKIP
ELSE
SKIP
ENDIF
ENDDO
PACK
SELECT DEPBKUP
SUM AMOUNT TO REXDT
SELECT A
USE CHEXREG INDEX CKSEQ,CKATNM,CHEXPT
SELECT C
USE CHKBKUP INDEX CBATNM,CHBKPT,CKBKSQ
SELECT CHEXREG
SET DELETED OFF
RECALL ALL
SET DELETED ON
GO TOP
DO WHILE .NOT. EOF()
IF DEL=1
PAYM=PAY_TO
REXA=AMOUNT
REXD=DATE
NOTEM=NOTE
ACCTM=ACCT_CODE
REXSEQ=SEQ_NO
DELETE
SELECT CHKBKUP
APPEND BLANK
REPLACE PAY_TO WITH PAYM,AMOUNT WITH REXA,ACCT_CODE WITH ACCTM,;
DATE WITH REXD,SEQ_NO WITH REXSEQ,NOTE WITH NOTEM
SELECT CHEXREG
SKIP
ELSE
SKIP
ENDIF
ENDDO
PACK
SELECT CHKBKUP
SUM AMOUNT TO REXCT
IF REXDT+REXDF+DPARC <> DEP_TOTAL
CLEAR
ERROR=1
@8,20 SAY " ERROR IN BALANCE SUMMARY !!!!!"
@10,20 SAY " TOTAL OF RECONCILED VS UNRECONCILED"
@11,20 SAY " DEPOSITS DOES NOT BALANCE"
@12,20 SAY " AGAINST DEPOSIT REGISTER TOTAL !!!!!"
@13,20 SAY "FIND AND CORRECT ERROR BEFORE CONTINUING."
WAIT
ENDIF
IF REXCF+REXCT+CKARC <> CHEX_TOTAL
ERROR=1
CLEAR
@8,20 SAY " ERROR IN BALANCE SUMMARY !!!!!"
@10,20 SAY " TOTAL OF RECONCILED VS UNRECONCILED"
@11,20 SAY " CHECKS DOES NOT BALANCE AGAINST"
@12,20 SAY " CHECK REGISTER TOTAL !!!!!!!"
@13,20 SAY "FIND AND CORRECT ERROR BEFORE CONTINUING."
WAIT
ENDIF
IF RCFBU-REXCA<>REXCF
ERROR=1
CLEAR
@8,20 SAY "ERROR IN BALANCE SUMMARY !!!!!!"
@10,20 SAY "OLD UNCLEARED CHECK TOTAL MINUS"
@11,20 SAY "CHECKS JUST ENTERED DOES NOT EQUAL"
@12,20 SAY "CURRENT UNCLEARED CHECK TOTAL."
WAIT
ENDIF
IF RDFBU-REXDA<>REXDF
ERROR=1
CLEAR
@8,20 SAY "ERROR IN BALANCE SUMMARY !!!!!!"
@10,20 SAY "OLD UNCLEARED DEPOSIT TOTAL MINUS"
@11,20 SAY "DEPOSITS JUST ENTERED DOES NOT EQUAL"
@12,20 SAY "CURRENT UNCLEARED DEPOSIT TOTAL."
WAIT
ENDIF
RCFBU=REXCF
RDFBU=REXDF
SELECT REXREG
APPEND BLANK
REPLACE DATE WITH MDATE
REPLACE CLEAR_CKS WITH REXCA
REPLACE CLEAR_DEPS WITH REXDA
REPLACE UNCLER_CKS WITH REXCF
REPLACE UNCLR_DEPS WITH REXDF
REPLACE CMPT_BAL WITH CMPBAL
IF ERROR=1
SET COLOR TO W/R*,W/R,W
CLEAR
@2,15 SAY "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@4,15 SAY " CATASTROPHIC ERROR !!!!!!!!!!"
@6,15 SAY "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
SET COLOR TO W/R,W/R,W
@11,15 SAY "YOU WILL HAVE TO RELOAD YOUR DATA FILES FROM THE"
@12,15 SAY "LAST TIME THAT THE { RECONCILE OPTION } RAN WITH-"
@13,15 SAY "OUT ERROR, FIND AND CORRECT THE ERROR, AND RE-RUN."
@14,0
@15,0
DISPLAY
WAIT
DO PRTMENU
ENDIF
SET COLOR TO B/GR,W/R,BG
CLEAR
@9,20 SAY "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
@11,30 SAY "CONGRADULATIONS !!!!"
@12,25 SAY "YOUR ACCOUNT BALANCED - NO ERRORS"
@14,20 SAY "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
WAIT
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
DO CHEXMENU
RETURN
PROCEDURE CHEXDISP
CLOSE DATABASE
CLEAR
DO WHILE .T.
CHOICE= " "
PRT= " "
SET PRINT OFF
@1,15 TO 5,63 DOUBLE
@3,30 SAY "PRINT REGISTER MENU"
@5,6 TO 22,73 DOUBLE
@7,18 SAY "1 } SELECT CHECK REGISTER "
@9,18 SAY "2 } SELECT DEPOSIT REGISTER"
@11,18 SAY "3 } SELECT PERMENANT CHECK REGISTER"
@13,18 SAY "4 } SELECT CK. RECONCILE + SUMMARY REGISTERS"
@15,18 SAY "5 } DISPLAY UNCLEARED CHECKS AND DEPOSITS"
@17,18 SAY "6 } SELECT ARCHIVE REGISTERS"
@19,18 SAY "7 } EXIT TO PRINT MENU"
@21,25 SAY "ENTER YOUR CHOICE" GET CHOICE
READ
CHOICEB=CHOICE
IF CHOICE= "7"
DO PRTMENU
ENDIF
IF CHOICE $ "123456"
CLEAR
@2,20 SAY "TO DISPLAY TO SCREEN, ENTER { S }"
@3,20 SAY "TO PRINT TO PRINTER, ENTER { P }"
DO WHILE .NOT. (PRT $ 'SP')
WAIT " " TO PRT
PRT= UPPER(PRT)
ENDDO
ENDIF
DO CASE
CASE CHOICE="1"
DTS= " "
@8,20 SAY "ENTER { A } TO LIST BY ACCOUNT CODE."
@9,20 SAY "ENTER { S } TO LIST BY SEQUENCE NUMBER."
DO WHILE .NOT. (UPPER(DTS) $ 'AS')
WAIT " " TO DTS
ENDDO
DTS=UPPER(DTS)
RETYEAR= " "
DONE= " "
@14,20 SAY "ENTER { DATE } OF RECORDS YOU WISH"
@15,20 SAY "TO RETRIVE FROM THE CHECK FILE."
@17,20 SAY "LEAVE MONTH BLANK FOR FULL YEAR !"
@18,20 SAY " { MONTH } " GET DONE
@19,20 SAY " { YEAR } " GET RETYEAR
READ
CLEAR
@10,10 SAY "SEARCHING RECORDS FOR DATE { ";
+DONE+" "+RETYEAR+" } ---------"
DVCE=VAL("&DONE")
RTYV=VAL("&RETYEAR")
IF DTS= "S"
USE CHKBKUP INDEX CKBKSQ
ELSE
USE CHKBKUP INDEX CBATNM
ENDIF
DELETE FOR YEAR(DATE) <> RTYV
IF DVCE >0
DELETE FOR MONTH(DATE) <> DVCE
ENDIF
IF PRT = "P"
SET PRINT ON
@10,10 SAY " PRINTING"
SET CONSOLE OFF
LIST
SET CONSOLE ON
ELSE
DISPLAY OFF ALL ACCT_CODE,PAY_TO,AMOUNT,DATE,SEQ_NO
ENDIF
SET DELETED OFF
RECALL ALL
SET DELETED ON
CASE CHOICE="2"
RETYEAR= " "
DONE= " "
@8,20 SAY "ENTER { DATE } OF RECORDS YOU WISH"
@9,20 SAY "TO RETRIVE FROM THE DEPOSIT FILE."
@10,20 SAY "LEAVE MONTH BLANK FOR FULL YEAR !"
@11,20 SAY " { MONTH } " GET DONE
@12,20 SAY " { YEAR } " GET RETYEAR
READ
CLEAR
@10,10 SAY "SEARCHING RECORDS FOR DATE { ";
+DONE+" "+RETYEAR+" } ---------"
DVCE=VAL("&DONE")
RTYV=VAL("&RETYEAR")
USE DEPBKUP
DELETE FOR YEAR(DATE) <> RTYV
IF DVCE >0
DELETE FOR MONTH(DATE) <> DVCE
ENDIF
IF PRT = "P"
SET PRINT ON
@10,10 SAY " PRINTING"
SET CONSOLE OFF
LIST
SET CONSOLE ON
ELSE
DISPLAY ALL
ENDIF
SET DELETED OFF
RECALL ALL
SET DELETED ON
CASE CHOICE="3"
USE PERMCHEX
IF PRT = "P"
SET PRINT ON
CLEAR
@10,10 SAY "PRINTING PERMENANT CHECK FILE ----------------"
SET CONSOLE OFF
LIST OFF
SET CONSOLE ON
ELSE
DISPLAY OFF ALL ACCT_CODE,PAY_TO,AMOUNT,NOTE
ENDIF
CASE CHOICE="4"
IF PRT = "P"
SET PRINT ON
USE REXREG
CLEAR
@10,10 SAY "PRINTING FILES ----------------------------"
SET CONSOLE OFF
LIST
USE CKTOT
LIST
SET CONSOLE ON
ELSE
USE REXREG
DISPLAY OFF ALL
USE CKTOT
DISPLAY OFF ALL
ENDIF
CASE CHOICE="5"
IF PRT = "P"
SET PRINT ON
CLEAR
@10,10 SAY "PRINTING FILES --------------------------"
SET CONSOLE OFF
USE CHEXREG INDEX CKSEQ
LIST
USE DEPREG
LIST
SET CONSOLE ON
ELSE
USE CHEXREG INDEX CKSEQ
DISPLAY OFF ALL SEQ_NO,PAY_TO,ACCT_CODE,AMOUNT,DATE
USE DEPREG
DISPLAY ALL
ENDIF
CASE CHOICE="6"
DTS= " "
@8,20 SAY "ENTER { A } TO LIST BY ACCOUNT CODE."
@9,20 SAY "ENTER { S } TO LIST BY SEQUENCE NUMBER."
DO WHILE .NOT. (UPPER(DTS) $ 'AS')
WAIT " " TO DTS
ENDDO
DTS=UPPER(DTS)
RETYEAR= " "
DONE= " "
@14,20 SAY "ENTER { DATE } OF RECORDS YOU WISH"
@15,20 SAY "TO RETRIVE FROM THE ARCHIVE FILE."
@17,20 SAY "LEAVE MONTH BLANK FOR FULL YEAR !"
@18,20 SAY " { MONTH } " GET DONE
@19,20 SAY " { YEAR } " GET RETYEAR
READ
CLEAR
@10,10 SAY "SEARCHING RECORDS FOR DATE { ";
+DONE+" "+RETYEAR+" } --------"
DVCE=VAL("&DONE")
RTYV=VAL("&RETYEAR")
IF DTS= "S"
USE CHKARC INDEX CKARSQ
ELSE
USE CHKARC INDEX CKARNM
ENDIF
DELETE FOR YEAR(DATE) <> RTYV
IF DVCE >0
DELETE FOR MONTH(DATE) <> DVCE
ENDIF
IF PRT = "P"
SET PRINT ON
@10,10 SAY " PRINTING"
SET CONSOLE OFF
LIST
SET CONSOLE ON
ELSE
DISPLAY OFF ALL ACCT_CODE,PAY_TO,AMOUNT,DATE,SEQ_NO
ENDIF
SET DELETED OFF
RECALL ALL
SET DELETED ON
USE DEPARC
DELETE FOR YEAR(DATE) <> RTYV
IF DVCE >0
DELETE FOR MONTH(DATE) <> DVCE
ENDIF
IF PRT = "P"
SET PRINT ON
SET CONSOLE OFF
LIST
SET CONSOLE ON
ELSE
DISPLAY ALL
ENDIF
SET DELETED OFF
RECALL ALL
SET DELETED ON
USE CKTOAR
DELETE FOR YEAR(DATE) <> RTYV
IF DVCE >0
DELETE FOR MONTH(DATE) <> DVCE
ENDIF
IF PRT = "P"
SET PRINT ON
SET CONSOLE OFF
LIST
SET CONSOLE ON
ELSE
DISPLAY OFF ALL
ENDIF
SET DELETED OFF
RECALL ALL
SET DELETED ON
OTHERWISE
@23,11 SAY "**** ENTER A NUMBER FROM 1 TO 7. YOU ENTERED { ";
+CHOICEB+ " } ! ****"
ENDCASE
IF PRT= "P"
CLEAR
ENDIF
IF PRT= "S"
WAIT
CLEAR
ENDIF
ENDDO
RETURN
PROCEDURE ACCTEXT
@6,1 SAY A01
@7,1 SAY A02
@8,1 SAY A03
@9,1 SAY A04
@10,1 SAY A05
@11,1 SAY A06
@12,1 SAY A07
@13,1 SAY A08
@14,1 SAY A09
@15,1 SAY A10
@16,1 SAY A11
@17,1 SAY A12
@20,1 SAY D01
@21,1 SAY D02
@23,1 SAY E01
@24,1 SAY E02
@6,28 SAY B01
@7,28 SAY B02
@8,28 SAY B03
@9,28 SAY B04
@10,28 SAY B05
@11,28 SAY B06
@12,28 SAY B07
@13,28 SAY B08
@14,28 SAY B09
@15,28 SAY B10
@16,28 SAY B11
@17,28 SAY B12
@18,28 SAY B13
@19,28 SAY B14
@22,28 SAY F01
@23,28 SAY F02
@6,57 SAY C01
@7,57 SAY C02
@8,57 SAY C03
@9,57 SAY C04
@10,57 SAY C05
@11,57 SAY C06
@12,57 SAY C07
@13,57 SAY C08
@14,57 SAY C09
@15,57 SAY C10
@16,57 SAY C11
@17,57 SAY C12
@18,57 SAY C99
@20,57 SAY G
@22,57 SAY H
@24,57 SAY I
RETURN
PROCEDURE TRANACCT
STORE 0 TO CTP,CTN,CTR
STORE 0.00 TO ATS,BTS,CTS,DTS,AC,BC,DC,EC,FC,GC,HC,CC,;
REXCT,REXCA,REXCF,B03ST,REXDT,REXDF,REXDA,REXA
IF UPPER(MESG) <> "Y"
CLEAR
@1,1 TO 23,78
@3,20 SAY "THIS SCREEN WILL ALLOW YOU"
@4,20 SAY "TO TRANSFER FUNDS BETEEN ACCOUNTS."
@6,20 SAY "ENTER ADDITIONS TO AN ACCOUNT"
@7,20 SAY "IN THE { + } OR { ADD } COLUMN."
@9,20 SAY "ENTER SUBTRACTIONS FROM AN ACCOUNT"
@10,20 SAY "IN THE { - } OR { SUBTRACT } COLUMN."
@12,20 SAY "THE SUM OF ADDITIONS AND SUBTRACTIONS"
@13,20 SAY "MUST BE EQUAL TO EACH OTHER !!!!!"
@15,20 SAY "UPON LEAVING THE TRANSFER SCREEN,"
@16,20 SAY "AN ERROR CHECK WILL BE MADE."
@17,20 SAY "IF THE SUMS ARE NOT EQUAL, YOU WILL "
@18,20 SAY "BE RETURNED TO CORRECT THEM !!!!"
@20,20 SAY "TO MOVE TO NEXT ENTRY, PRESS { DOWN ARROW }."
@21,20 SAY "WHEN FINISHED, PRESS { CTRL-END }."
WAIT
ENDIF
DO WHILE .T.
CLEAR
@3,5 SAY "ACCOUNT"
@3,27 SAY "AMOUNT"
@3,45 SAY "{ + } ADD"
@3,60 SAY "{ - } SUBTRACT"
@6,0 SAY A
@6,24 SAY "$ "+STR(ACCTA,7,2)
@6,37 SAY "$ {+}" GET AC
@6,58 SAY "$ {-}" GET REXCT
@8,0 SAY B
@8,24 SAY "$ "+STR(ACCTB,7,2)
@8,37 SAY "$ {+}" GET BC
@8,58 SAY "$ {-}" GET REXCA
@10,0 SAY C
@10,24 SAY "$ "+STR(ACCTC,7,2)
@10,37 SAY "$ {+}" GET CC
@10,58 SAY "$ {-}" GET REXCF
@12,0 SAY D
@12,24 SAY "$ "+STR(ACCTD,7,2)
@12,37 SAY "$ {+}" GET DC
@12,58 SAY "$ {-}" GET B03ST
@14,0 SAY E
@14,24 SAY "$ "+STR(ACCTE,7,2)
@14,37 SAY "$ {+}" GET EC
@14,58 SAY "$ {-}" GET REXDT
@16,0 SAY F
@16,24 SAY "$ "+STR(ACCTF,7,2)
@16,37 SAY "$ {+}" GET FC
@16,58 SAY "$ {-}" GET REXDF
@18,0 SAY G
@18,24 SAY "$ "+STR(ACCTG,7,2)
@18,37 SAY "$ {+}" GET GC
@18,58 SAY "$ {-}" GET REXDA
@20,0 SAY H
@20,24 SAY "$ "+STR(ACCTH,7,2)
@20,37 SAY "$ {+}" GET HC
@20,58 SAY "$ {-}" GET REXA
READ
CLEAR
@10,10 SAY "UPDATING ACCOUNTS ---------------------"
CTP=AC+BC+CC+DC+EC+FC+GC+HC
CTN=REXCT+REXCA+REXCF+B03ST+REXDT+REXDF+REXDA+REXA
CTR=CTP-CTN
IF CTR=0
ACTAB=ACCTA+AC-REXCT
ACTBB=ACCTB+BC-REXCA
ACTCB=ACCTC+CC-REXCF
ACTDB=ACCTD+DC-B03ST
ACTEB=ACCTE+EC-REXDT
ACTFB=ACCTF+FC-REXDF
ACTGB=ACCTG+GC-REXDA
ACTHB=ACCTH+HC-REXA
ACB=ACTAB+ACTBB
BCB=ACTCB+ACTDB
CCB=ACTEB+ACTFB
DCB=ACTGB+ACTHB
ECB=ACB+BCB+CCB+DCB
IF GRAND_TOTL+BANK2V-ECB <> 0
SET COLOR TO W/R,W/R,W
CLEAR
@10,27 SAY " ERROR !!!!!!!!!!!!!!"
@12,27 SAY "THE SUM OF THE INDIVIDUAL"
@13,27 SAY " ACCOUNTS { DOES NOT }"
@14,27 SAY " EQUAL THE GRAND TOTAL."
WAIT
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
DO PRTMENU
ENDIF
IF DC<>0 .OR. B03ST<>0
USE KIMACT
APPEND BLANK
REPLACE DATE WITH MDATE
REPLACE BALANCE WITH ACCTD
IF B03ST<>0
REPLACE AMOUNT WITH B03ST
REPLACE PAY_TO WITH "TRANSFER"
ELSE
REPLACE AMOUNT WITH DC
REPLACE DEP WITH "TRN"
ENDIF
ENDIF
IF CC<>0 .OR. REXCF<>0
USE ACCTC INDEX ACCTC
APPEND BLANK
REPLACE DATE WITH MDATE
IF REXCF<>0
REPLACE AMOUNT WITH REXCF
REPLACE DESCRPT WITH "TRANSFER OUT"
REPLACE ACCT_CODE WITH "TRO"
CGEXP=CGEXP+REXCF
ELSE
REPLACE AMOUNT WITH CC
REPLACE ACCT_CODE WITH "TRI"
REPLACE DESCRPT WITH "TRANSFER IN"
CGIN=CGIN+CC
ENDIF
CNOT=CGIN-CGEXP
ENDIF
DO CHEXSTAT
ENDIF
SET COLOR TO W/R,W/R,W
CLEAR
@10,27 SAY " ERROR !!!!!!!!!!!!"
@12,27 SAY "THE TOTAL OF ADDITIONS"
@13,27 SAY " DOES { NOT } EQUAL"
@14,27 SAY "THE TOTAL OF SUBTRACTIONS."
IF CTR <0
@16,27 SAY "THE SUBTRACTION COLUMN IS LARGER"
ELSE
@16,27 SAY "THE ADDITION COLUMN IS LARGER"
ENDIF
@18,27 SAY "CHECK ENTRIES AND CORRECT !!!!"
WAIT
IF ISCOLOR()
SET COLOR TO W/B,W/R,BG
ELSE
SET COLOR TO
ENDIF
LOOP
ENDDO
RETURN
PROCEDURE CHKSRCH
CLOSE DATABASE
GC= " "
HC= " "
CLEAR
@6,15 SAY "DO YOU WISH TO SEARCH ON A CHECK OR A DEPOSIT ??"
@10,15 SAY " TYPE { C } FOR CHECK"
@12,15 SAY " OR"
@14,15 SAY " TYPE { D } FOR DEPOSIT"
SRCH= " "
DO WHILE .NOT. (UPPER(SRCH) $ 'CD')
WAIT " " TO SRCH
ENDDO
IF UPPER(SRCH)= "C"
CLEAR
CTR=0
REXA= " "
AC= " "
BC= " "
@10,17 SAY "ENTER CHECK { PAY_TO }" GET REXA
@12,17 SAY "ENTER DATE ------- MONTH " GET AC
@12,47 SAY "YEAR " GET BC
@14,17 SAY "LEAVE MONTH BLANK TO SEARCH FULL YEAR !"
READ
CC=VAL("&AC")
REXA=RTRIM(REXA)
REXA=UPPER(REXA)
DC=VAL("&BC")
LP=0
DO WHILE .T.
DO CASE
CASE MYEAR-DC=0
IF LP=0
CLEAR
@10,10 SAY "SEARCHING CHECK REGISTER -------------------"
USE CHEXREG INDEX CHEXPT
CTR=2
ELSE
CLEAR
@10,10 SAY "SEARCHING BACKUP CHECK REGISTER -------------"
USE CHKBKUP INDEX CHBKPT
CTR=1
DELETE FOR YEAR(DATE) <> DC
ENDIF
CASE MYEAR-DC=1
IF LP=0
USE CHKBKUP INDEX CHBKPT
CTR=1
CLEAR
@10,10 SAY "SEARCHING BACKUP CHECK REGISTER -------------"
DELETE FOR YEAR(DATE) <> DC
ELSE
USE CHKARC INDEX CHARPT
CTR=3
CLEAR
@10,10 SAY "SEARCHING CHECK ARCHIVE REGISTER --------------"
DELETE FOR YEAR(DATE) <> DC
ENDIF
CASE MYEAR-DC>1
USE CHKARC INDEX CHARPT
CTR=3
@10,10 SAY "SEARCHING CHECK ARCHIVE REGISTER ---------------"
DELETE FOR YEAR(DATE) <>DC
ENDCASE
IF CC >0
DELETE FOR MONTH(DATE) <> CC
ENDIF
GO TOP
DO WHILE .T.
SEEK "ZZZZ"
IF EOF()
EXIT
ENDIF
CLEAR
@5,10 SAY "PAY TO " GET PAY_TO
@6,10 SAY "AMOUNT " GET AMOUNT
@7,10 SAY "DATE " GET DATE
@8,10 SAY "NOTE " GET NOTE
@9,10 SAY "ACCT. CODE " GET ACCT_CODE
@10,10 SAY "SEQ. NO. " GET SEQ_NO
@12,10 SAY "IS THIS THE RECORD THAT YOU WANT ???"
DO CASE
CASE CTR=1
@14,10 SAY "THIS CHECK HAS { CLEARED } THE BANK."
CASE CTR=2
@14,10 SAY "THIS CHECK HAS { *NOT* CLEARED } THE BANK."
CASE CTR=3
@14,10 SAY "THIS CHECK IS IN THE { ARCHIVE } FILE."
ENDCASE
FC= " "
DO WHILE .NOT. (UPPER(FC) $ 'YN')
WAIT "TYPE { Y/N }" TO FC
ENDDO
IF UPPER(FC)= "Y"
CLEAR
@10,10 SAY "DO YOU WISH TO SEARCH FOR ANOTHER CHECK OR DEPOSIT ???"
DO WHILE .NOT. (UPPER(GC) $ 'YN')
WAIT "TYPE { Y/N }" TO GC
ENDDO
SET DELETED OFF
RECALL ALL
SET DELETED ON
IF UPPER(GC)= "Y"
DO CHKSRCH
ENDIF
DO PRTMENU
ENDIF
DELETE
LOOP
ENDDO
SET DELETED OFF
RECALL ALL
SET DELETED ON
IF MYEAR-DC <=1 .AND. LP=0
LP=1
LOOP
ENDIF
CLEAR
@10,10 SAY "SPECIFIED CHECK WAS NOT FOUND"
@12,10 SAY "DO YOU WISH TO ENTER ANOTHER CHECK OR DEPOSIT SEARCH ??"
DO WHILE .NOT. (UPPER(HC) $ 'YN')
WAIT "TYPE { Y/N }" TO HC
ENDDO
IF UPPER(HC) = "Y"
DO CHKSRCH
ENDIF
DO PRTMENU
ENDDO
ELSE
CLEAR
REXA=0.00
AC= " "
BC= " "
@10,17 SAY "ENTER DEPOSIT { AMOUNT } " GET REXA
@12,17 SAY "ENTER DATE ------- MONTH " GET AC
@12,47 SAY "YEAR " GET BC
@14,17 SAY "LEAVE MONTH BLANK TO SEARCH FULL YEAR !"
READ
CC=VAL("&AC")
DC=VAL("&BC")
LP=0
DO WHILE .T.
DO CASE
CASE MYEAR-DC=0
IF LP=0
CLEAR
@10,10 SAY "SEARCHING DEPOSIT REGISTER -------------------"
USE DEPREG INDEX DEPAMT
CTR=2
ELSE
CLEAR
@10,10 SAY "SEARCHING BACKUP DEPOSIT REGISTER -------------"
USE DEPBKUP INDEX DBKAMT
CTR=1
DELETE FOR YEAR(DATE) <> DC
ENDIF
CASE MYEAR-DC=1
IF LP=0
USE DEPBKUP INDEX DBKAMT
CTR=1
CLEAR
@10,10 SAY "SEARCHING BACKUP DEPOSIT REGISTER -------------"
DELETE FOR YEAR(DATE) <> DC
ELSE
USE DEPARC INDEX DARAMT
CTR=3
CLEAR
@10,10 SAY "SEARCHING DEPOSIT ARCHIVE REGISTER --------------"
DELETE FOR YEAR(DATE) <> DC
ENDIF
CASE MYEAR-DC>1
USE DEPARC INDEX DARAMT
CTR=3
@10,10 SAY "SEARCHING DEPOSIT ARCHIVE REGISTER ---------------"
DELETE FOR YEAR(DATE) <>DC
ENDCASE
IF CC<>0
DELETE FOR MONTH(DATE) <> CC
ENDIF
GO TOP
DO WHILE .T.
SEEK 0
IF EOF()
EXIT
ENDIF
CLEAR
@5,15 SAY "AMOUNT " GET AMOUNT
@7,15 SAY "DATE " GET DATE
@10,15 SAY "IS THIS THE RECORD THAT YOU WANT ???"
DO CASE
CASE CTR=1
@12,10 SAY "THIS DEPOSIT HAS { CLEARED } THE BANK."
CASE CTR=2
@12,10 SAY "THIS DEPOSIT HAS { *NOT* CLEARED } THE BANK."
CASE CTR=3
@12,10 SAY "THIS DEPOSIT IS IN THE ARCHIVE FILE."
ENDCASE
FC= " "
DO WHILE .NOT. (UPPER(FC) $ 'YN')
WAIT "TYPE { Y/N }" TO FC
ENDDO
IF UPPER(FC)= "Y"
CLEAR
@10,10 SAY "DO YOU WISH TO SEARCH FOR ANOTHER DEPOSIT OR CHECK ???"
DO WHILE .NOT. (UPPER(GC) $ 'YN')
WAIT "TYPE { Y/N }" TO GC
ENDDO
SET DELETED OFF
RECALL ALL
SET DELETED ON
IF UPPER(GC)= "Y"
DO CHKSRCH
ENDIF
DO PRTMENU
ENDIF
DELETE
LOOP
ENDDO
SET DELETED OFF
RECALL ALL
SET DELETED ON
IF MYEAR-DC <=1 .AND. LP=0
LP=1
LOOP
ENDIF
CLEAR
@10,10 SAY "SPECIFIED DEPOSIT WAS NOT FOUND"
@12,10 SAY "DO YOU WISH TO ENTER ANOTHER DEPOSIT OR CHECK SEARCH ???"
DO WHILE .NOT. (UPPER(HC) $ 'YN')
WAIT "TYPE { Y/N }" TO HC
ENDDO
IF UPPER(HC) = "Y"
DO CHKSRCH
ENDIF
DO PRTMENU
ENDDO
ENDIF
RETURN