* DEPOSIT.CMD
* M. Lynn
* Version 1.6
ERASE
IF file = '2'
SET INDEX TO INDBUSNO, BUSINESS
STORE busbal TO curbal
ELSE
SET INDEX TO INDPERNO, PERSONAL
STORE perbal TO curbal
ENDIF

STORE 'D' TO mtype
STORE 0 TO recnum
STORE 0 TO c:amt
STORE date() TO c:dat
SET INTENSITY ON
@ 1,0  SAY 'SYSTEM DATE: '+date()+'     ACCOUNT: '+maccount+'          RECORD #:'
@ 2, 0 SAY 'ACCOUNT NUMBER: '+ac:no+'   CURRENT BALANCE'
@ 1,65 SAY recnum
@ 2, 65 SAY curbal
DO WHILE T
@ 2, 65 SAY curbal
STORE '                              ' TO mcomment
STORE 0.00 TO c:amt
SET INTENSITY ON
@ 4, 0 SAY 'ENTER AMOUNT OF 0 TO EXIT'
SET INTENSITY OFF
@ 6, 0 SAY 'ENTER AMOUNT OF TRANSACTION $' GET c:amt
READ

	IF c:amt = 0
	SET INDEX TO
	RELEASE recnum, c:amt, c:dat, mtype, mcomment
		IF file = '2'
		STORE curbal TO busbal
		ELSE	
		STORE curbal TO perbal
		ENDIF
	RETURN
	ENDIF

APPEND BLANK
STORE # TO recnum
@ 1,65 SAY recnum
@ 7, 0 SAY 'DATE OF TRANSACTION:' GET c:dat PICTURE '99/99/99'
@ 9, 0 SAY 'D - Deposit, I - Interest, S - Service Charge: ' GET mtype PICTURE '!'
@ 11, 0 SAY 'Enter Comments: ' GET mcomment
READ

DO CASE

	CASE mtype = 'D'
	REPLACE to WITH 'DEPOSIT', number WITH 0
	STORE c:amt + curbal TO curbal

	CASE mtype = 'I'
	REPLACE to WITH 'INTEREST PAYMENT', number WITH 0
	STORE c:amt + curbal TO curbal
	
	CASE mtype = 'S'
	REPLACE to WITH 'SERVICE CHARGE', number WITH 1
	STORE curbal - c:amt TO curbal

	OTHERWISE
	REPLACE to WITH '?????'

ENDCASE

REPLACE amount WITH c:amt, date WITH c:dat, canceled WITH F, comment WITH mcomment, memo WITH '-'

ENDDO
???'

ENDCASE

REPLACE amount 