* REPORT.CMD
* M. Lynn
* Version 1.6
ERASE
STORE $(date(),7,2) TO year
STORE $(date(),1,2) TO mmonth

IF file = '1'
SET INDEX TO PERSONAL
ELSE
SET INDEX TO BUSINESS
ENDIF

DO WHILE T
ERASE
SET INTENSITY OFF
@ 1, 0 SAY '-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'
@ 3, 0 SAY '        ***CHECKING ACCOUNT REPORTS (for current year)***'
@ 5, 0 SAY ' 1  REPORT ARRANGED BY CATEGORY' 
@ 7, 0 SAY ' 2  COMPLETE ACCOUNT LISTING (no deposits, includes other years)'
@ 9, 0 SAY ' 3  REPORT FOR A PARTICULAR CATEGORY'
@ 11, 0 SAY ' 4  REPORT BY CHECK NUMBER'
@ 13, 0 SAY ' 5  REPORT FOR PARTICULAR MONTH'
@ 15, 0 SAY ' 6  REPORT FOR DEPOSIT & INTEREST PAYMENT'
@ 17, 0 SAY ' 7  REPORT OF UNCANCELED CHECKS AND UNVERIFIED DEPOSITS'
@ 19, 0 SAY ' 8  EXIT TO MAIN MENU'
@ 21, 0 SAY '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
@ 22, 0

SET INTENSITY ON

SET CONSOLE OFF
WAIT TO go
SET CONSOLE ON
ERASE

IF go < '8'
@ 21, 4 SAY 'ENTER A Y TO GET A PRINTED COPY'
SET CONSOLE OFF
WAIT TO print
SET CONSOLE ON
ERASE
SET EJECT OFF
ENDIF

DO CASE

CASE go ='1'
	IF !(print) ='Y'
        SET PRINT ON
        ENDIF
ERASE
SET HEAD TO REPORT FOR CHECKING ACCOUNT :19&year
REPORT FORM B:CHREPORT FOR number # 0 .and. $(date,7,2) = year
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
EJECT
SET PRINT OFF
SET CONSOLE OFF
WAIT 
SET CONSOLE ON
ERASE

CASE go ='2'
	IF !(print) ='Y'
        SET PRINT ON
        ENDIF
SET HEAD TO COMPLETE CHECKING ACCOUNT LISTING
REPORT FORM B:CHREPORT FOR number # 0
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
EJECT
SET PRINT OFF
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE

CASE go ='3'
	
@ 4, 3 SAY 'ENTER SPECIFIC CATEGORY FOR REPORT - ? FOR HELP: '
SET CONSOLE OFF
WAIT TO mcata
SET CONSOLE ON

	IF !(print) ='Y'
        SET PRINT ON
        ENDIF

	IF mcata = '?'
	SET INTENSITY OFF
	SET FORMAT TO MEMO
	READ
	SET FORMAT TO SCREEN
	@ 21,0 SAY 'ENTER CATEGORY LETTER' GET mcata PICTURE '!'
	READ
	SET INTENSITY ON
	ENDIF
LOCATE FOR $(date,7,2) = year .AND. memo = mcata

IF EOF
SET PRINT OFF
ERASE
@ 10, 5 SAY 'There are no checks for category: '+mcata
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ELSE
SET HEAD TO REPORT FOR CATEGORY &mcata
ERASE
REPORT FORM B:CHREPORT FOR memo = !(mcata) .AND. $(date,7,2) = year
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
EJECT
SET PRINT OFF
SET CONSOLE OFF
WAIT 
SET CONSOLE ON
ENDIF

ERASE

CASE go ='4'
	IF !(print) ='Y'
        SET PRINT ON
        ENDIF       
	
	IF file = '2'           
	SET INDEX TO INDBUSNO
        ELSE
        SET INDEX TO INDPERNO
	ENDIF

SET HEAD TO LISTING FOR 19&year
REPORT FORM B:CHECKNO FOR $(date,7,2) = year .AND. number # 0
EJECT
SET PRINT OFF
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
SET CONSOLE OFF
WAIT 
SET CONSOLE ON 
SET HEAD TO
ERASE

	IF file = '2'
	SET INDEX TO BUSINESS
	ELSE
	SET INDEX TO PERSONAL
	ENDIF


CASE go ='5'
        
@ 4, 1 SAY 'ENTER THE MONTH FOR REPORT AS A 2 DIGIT NUMBER'
@ 5, 1 SAY 'REPORT WILL BE FOR 19&year ONLY' GET mmonth PICTURE '99'
READ
	IF !(print) ='Y'
        SET PRINT ON
        ENDIF
ERASE
LOCATE FOR $(date,1,2) = mmonth .AND. $(date,7,2) = year .AND. number # 0

IF EOF
ERASE
SET PRINT OFF
@ 10, 5 SAY 'There are no checks for month: '+mmonth
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ELSE
SET HEAD TO REPORT FOR MONTH: *&mmonth* ONLY
REPORT FORM B:CHREPORT FOR $(date,1,2) = mmonth .and. $(date,7,2) = year;
 .AND. number # 0
EJECT
SET PRINT OFF
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
SET CONSOLE OFF
WAIT 
SET CONSOLE ON
ENDIF

ERASE

CASE go = '6'

	IF !(print) ='Y'
        SET PRINT ON
        ENDIF       
	
SET INDEX TO
SET HEAD TO ACCOUNT: &maccount - YEAR 19&year
REPORT FORM B:DEPO FOR $(date,7,2) = year .AND. number = 0 .AND. ;
to # 'SERVICE CHARGE'
EJECT
SET PRINT OFF
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET CONSOLE OFF
WAIT 
SET CONSOLE ON 
SET HEAD TO
ERASE

	IF file = '2'
	SET INDEX TO BUSINESS
	ELSE
	SET INDEX TO PERSONAL
	ENDIF

CASE go = '7'
	IF !(print) ='Y'
        SET PRINT ON
        ENDIF       
	
	IF file = '2'           
	SET INDEX TO INDBUSNO
        ELSE
        SET INDEX TO INDPERNO
	ENDIF

LOCATE FOR $(date,7,2) = year .AND. number # 1 .AND. .NOT. canceled

IF EOF
ERASE
SET PRINT OFF
@ 10, 5 SAY 'All checks have been canceled'
@ 22, 0 SAY 'PRESS ANY KEY TO CONTINUE'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ELSE
SET HEAD TO LISTING OF UNCANCELED CHECKS AND UNVERIFIED DEPOSITS FOR 19&year
REPORT FORM B:CHECKNO FOR $(date,7,2) = year .AND. number # 1 .AND.;
 .NOT. canceled
EJECT
SET PRINT OFF
@ 22, 5 SAY 'PRESS ANY KEY TO CONTINUE'
SET HEAD TO
SET CONSOLE OFF
WAIT 
SET CONSOLE ON 
SET HEAD TO
ENDIF
ERASE

	IF file = '2'
	SET INDEX TO BUSINESS
	ELSE
	SET INDEX TO PERSONAL
	ENDIF

CASE go ='8'
SET INDEX TO
RELEASE mmonth, go, print, mcata
RETURN

ENDCASE

ENDDO
E
	SET INDEX TO PERSONAL
	ENDIF

CASE go ='8'
SET INDEX TO
RELEASE mmonth, go, print, mcat