home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
A
/
DBASE2.ARC
/
EXPENSES.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-12-05
|
3KB
|
137 lines
@ 18,0
@ 16,0
SET intensity off
@ 3,52 say chr(27)+chr(94)
@ 3,52 say 'EXPENSE ACCOUNT SUBSYSTEM'
@ 3,77 say chr(27)+chr(113)
SET intensity on
@ 5,48 say 'A - Add/update an expense record'
@ 6,48 say 'B - Edit/browse expense database'
@ 7,48 say 'C - Expenses report per a period'
@ 8,48 say 'D - Summary of expenses for year'
@ 9,48 say 'E - Enter an auto mileage record'
@ 10,48 say 'F - Edit/browse mileage database'
@ 11,48 say 'G - Mileage expenses by a period'
@ 12,48 say 'H - Auto mileage expense summary'
@ 14,48 say 'R - Exit to the main system menu'
SET intensity off
@ 16,52 say "Option (0-9; A-G or R)? "
SET console off
WAIT to option
SET console on
IF val(option)>0 .or. option='0'
DO changeop
RETU
ENDI
ERAS
DO CASE
CASE !(option)='A'
USE expenses index expenses
ERAS
@ 2,0 say 'Existing expense record (Y/N)? '
SET console off
WAIT to response
SET console on
IF !(response)='Y'
STOR ' ' to date
@ 2,0
@ 2,0 say 'Please enter date of expense record (MM/DD/YY) ';
get date picture 'XX/XX/XX'
READ
FIND &date
IF .not. eof
EDIT #
ELSE
@ 2,0
@ 2,0 say 'Record not found - press RETURN to return to menu...'
?
WAIT to return
ENDI
ELSE
append
ENDI
CASE !(option)='B'
USE expenses index expenses
SET intensity on
BROW
PACK
CASE !(option)='C' .or. !(option)='G'
ERAS
IF !(option)='C'
USE expenses index expenses
ELSE
USE mileages index mileages
ENDI
STOR ' ' to startdate
STOR ' ' to enddate
STOR ' ' to device
@ 2,0 say 'Beggining expense record date (MM/DD/YY) ===> ';
get startdate picture 'XX/XX/XX'
@ 4,0 say 'Ending expense record date (MM/DD/YY) ===> ';
get enddate picture 'XX/XX/XX'
@ 6,0 say 'Output report to screen or printer (S/P) ===> ';
get device picture 'X'
READ
IF !(device)='P'
ERAS
@ 2,0 say 'Ready printer and press RETURN...'
?
WAIT to return
IF !(option)='C'
REPO form expenses for date>startdate .and. date<enddate to print
ELSE
REPO form mileages for date>startdate .and. date<enddate to print
ENDI
ELSE
ERAS
IF !(option)='C'
REPO form expenses for date>startdate .and. date<enddate
ELSE
REPO form mileages for date>startdate .and. date<enddate
ENDI
?
? 'Press RETURN to return to menu...'
?
WAIT to return
ENDI
CASE !(option)='D' .or. !(option)='H'
ERAS
IF !(option)='D'
USE expenses index expenses
ELSE
USE mileages index mileages
ENDI
@ 2,0 say 'Output report to screen or printer (S/P)? '
SET console off
WAIT to device
SET console on
IF !(device)='P'
IF !(option)='D'
REPO form expenses to print
ELSE
REPO form mileages to print
ENDI
ELSE
ERAS
IF !(option)='D'
REPO form expenses
ELSE
REPO form mileages
ENDI
?
? 'Press RETURN to return to menu...'
?
WAIT to return
ENDI
CASE !(option)='E'
USE mileages index mileages
append
CASE !(option)='F'
USE mileages index mileages
SET intensity on
BROW
CASE !(option)='R'
RETU
ENDC
RETU