* SETUP.CMD
* M. LYNN
* Version 1.6
* Configuration file for CHECKBOOK SYSTEM
SET TALK OFF
SET DEFAULT TO B:
SET INTENSITY OFF
RELEASE ALL
ERASE
STORE 'Michael Lynn (313)-484-4297' TO help
STORE '                            ' TO mname
STORE '                       ' TO bus:no
STORE '                       ' TO per:no
STORE '                                      ' TO mbank
STORE '000-0000' TO mphone

IF FILE ("B:SIGN.CMD")

	IF .NOT. FILE ("B:OSSIGN.CMD")
	STORE 'os' TO machine
	@ 8, 0 SAY 'System is currently installed as an Osborne I'
	@ 9, 0 SAY 'Do you wish to re-install as non-Osborne I (Y/N)'
	ELSE
	STORE 'non' TO machine
	@ 8, 0 SAY 'System is currently installed as non-Osborne I'
	@ 9, 0 SAY 'Do you wish to re-install as an Osborne I (Y/N)'
	ENDIF

SET CONSOLE OFF
WAIT TO proceed
SET CONSOLE ON

 	IF !(proceed) = 'Y'

		IF machine = 'os'
		@ 12, 0 SAY 'Re-installing for non-Osborne I'
		RENAME B:SIGN.CMD TO B:OSSIGN.CMD
		RENAME B:REGSIGN.CMD TO B:SIGN.CMD
		ELSE
		@ 12, 0 SAY 'Re-installing for Osborne I'
		RENAME B:SIGN.CMD TO B:REGSIGN.CMD
		RENAME B:OSSIGN.CMD TO B:SIGN.CMD 
		ENDIF

	ENDIF

ELSE

		IF .NOT. FILE ("B:REGSIGN.CMD") .OR. .NOT. FILE ("B:OSSIGN.CMD")
		@ 8, 0 SAY 'THE NECESSARY FILES - REGSIGN.CMD AND OSSIGN.CMD ARE NOT ON'
		@ 9, 0 SAY 'THE B: DRIVE - RUN THIS PROGRAM AGAIN WHEN THEY ARE THERE'
		CANCEL
		ENDIF
ERASE
@ 3, 0 SAY 'Are you running this program on an Osborne I computer ?'
@ 4, 0 SAY 'If so, please enter a Y -- enter any other character if'
@ 5, 0 SAY 'you are not using an Osborne I.'
SET CONSOLE OFF
WAIT TO osborne
SET CONSOLE ON

	IF !(osborne) = 'Y'
	RENAME B:OSSIGN.CMD TO B:SIGN.CMD
	ELSE
	RENAME B:REGSIGN.CMD TO B:SIGN.CMD
	ENDIF

ENDIF
	

RELEASE osborne, proceed, machine
ERASE
IF FILE ("B:INFO.MEM")
RESTORE FROM B:INFO
@ 8, 0 SAY 'Do you wish to re-install your account information? (Y/N): '
SET CONSOLE OFF
WAIT TO go
SET CONSOLE ON
	IF !(go) = 'Y'
	ERASE
	@ 3, 0 SAY 'This checking account system will keep records for two different'
	@ 4, 0 SAY 'accounts - they are assigned the names BUSINESS and PERSONAL.'
	@ 5, 0 SAY 'Please enter the following information.'
	@ 7, 0 SAY 'Your name' GET mname
	@ 8, 0 SAY 'The account number of your BUSINESS account' GET bus:no
	@ 9, 0 SAY ' The account number of your PERSONAL account' GET per:no
	@ 10, 0 SAY 'The name of your bank' GET mbank
	@ 11, 0 SAY 'The bank phone number' GET mphone PICTURE '999-9999'
	@ 12, 0 SAY 'If you change the values below, your current balance'
	@ 13, 0 SAY 'also change!'
	@ 14, 0 SAY 'Enter the begining balance of the PERSONAL account '
	@ 14, 52 GET startper
	@ 15, 0 SAY 'Enter the begining balance of the BUSINESS account ' 
	@ 15, 52 GET startbus
	READ
	STORE startper TO perbal
	STORE startbus TO busbal
	ENDIF
ELSE
ERASE
STORE 00.00 TO startper
STORE 00.00 TO startbus
@ 3, 0 SAY 'This checking account system will keep records for two different'
@ 4, 0 SAY 'accounts - they are assigned the names BUSINESS and PERSONAL.'
@ 5, 0 SAY 'Please enter the following information.'
@ 7, 0 SAY 'Your name' GET mname
@ 8, 0 SAY 'The account number of your BUSINESS account' GET bus:no
@ 9, 0 SAY ' The account number of your PERSONAL account' GET per:no
@ 10, 0 SAY 'The name of your bank' GET mbank
@ 11, 0 SAY 'The bank phone number' GET mphone PICTURE '999-9999'
@ 12, 0 SAY 'Enter the begining balance of the PERSONAL account ' 
@ 12, 52 GET startper
@ 13, 0 SAY 'Enter the begining balance of the BUSINESS account ' 
@ 13, 52 GET startbus
READ
STORE startper TO perbal
STORE startbus TO busbal

ENDIF

USE PERSONAL 
STORE startper TO startbal

GO TOP
DO WHILE .NOT. EOF

	IF number = 0 .AND. to = 'DEPOSIT' .OR. to = 'INTEREST PAYMENT'
	STORE startbal + amount TO startbal
	ELSE
	STORE startbal - amount TO startbal
	ENDIF

SKIP

ENDDO
STORE startbal to perbal

USE BUSINESS
STORE 0 TO startbal
STORE startbus TO startbal

GO TOP
DO WHILE .NOT. EOF

	IF number = 0 .AND. to = 'DEPOSIT' .OR. to = 'INTEREST PAYMENT'
	STORE startbal + amount TO startbal
	ELSE
	STORE startbal - amount TO startbal
	ENDIF

SKIP

ENDDO
STORE startbal TO busbal
RELEASE go, startbal
SAVE TO INFO
RELEASE mname, bus:no, per:no, mbank, mphone, help, startper, startbus, ;
perbal, busbal

ERASE
IF FILE ("B:MEMO.FMT")
@ 8, 0 SAY 'Do you wish to re-install your MEMO categories? (Y/N): '
SET CONSOLE OFF
WAIT TO go
SET CONSOLE ON
	IF !(go) = 'Y'
	DO B:CATA
	ELSE
	SET CONSOLE OFF
	QUIT TO 'A:DB B:MENU'
	ENDIF
ELSE
DO B:CATA
ENDIF

SET CONSOLE ON
	IF !(go) = 'Y'
	DO B:CATA
	ELSE
	SET CONSOLE OFF
	QUIT TO 'A:DB B:MENU'
	ENDIF