home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
manage1.zip
/
CHECKS.PRG
< prev
next >
Wrap
Text File
|
1986-05-29
|
8KB
|
293 lines
** Last revision: April 6, 1986 at 15:54
* check entry screen
CLEA
SET INTENSITY ON
SET DELIMITER OFF
STOR ' ' TO blnks
STOR SUBSTR(blnks,1,2) TO mprop
STOR SUBSTR(blnks,1,4) TO mbank
STOR SUBSTR(blnks,1,8) TO mdate1
STOR .t. TO more
STOR .t. TO first
STOR "When done, leave first amount and check no. blank and enter Control 'Q' or 'W'" TO prompt
DO WHIL more
STOR SUBSTR(blnks,1,4) TO mchk1
STOR SUBSTR(blnks,1,20) TO mpay1
STOR SUBSTR(blnks,1,20) TO mpay1a
STOR SUBSTR(blnks,1,4) TO macc1
STOR 0.00 TO mamt1
STOR SUBSTR(blnks,1,4) TO mchk2
STOR SUBSTR(blnks,1,20) TO mpay2
STOR SUBSTR(blnks,1,20) TO mpay2a
STOR SUBSTR(blnks,1,4) TO macc2
STOR 0.00 TO mamt2
STOR SUBSTR(blnks,1,4) TO mchk3
STOR SUBSTR(blnks,1,20) TO mpay3
STOR SUBSTR(blnks,1,20) TO mpay3a
STOR SUBSTR(blnks,1,4) TO macc3
STOR 0.00 TO mamt3
STOR SUBSTR(blnks,1,4) TO mchk4
STOR SUBSTR(blnks,1,20) TO mpay4
STOR SUBSTR(blnks,1,20) TO mpay4a
STOR SUBSTR(blnks,1,4) TO macc4
STOR 0.00 TO mamt4
STOR SUBSTR(blnks,1,4) TO mchk5
STOR SUBSTR(blnks,1,20) TO mpay5
STOR SUBSTR(blnks,1,20) TO mpay5a
STOR SUBSTR(blnks,1,4) TO macc5
STOR 0.00 TO mamt5
STOR 'N' TO verify
IF first
@ 1,12 SAY "Cash Disbursements Entry Screen - Posted"
@ 1,55 SAY DTOC(date())
@ 3, 4 SAY "Property:"
@ 3,37 SAY "Date:"
@ 4, 0 SAY "Bank Acct No:"
@ 6, 0 SAY "Check Number:"
@ 6,36 SAY "Payee:"
@ 7, 1 SAY "Description:"
@ 7,35 SAY "Acct #:"
@ 7,50 SAY "Amount:"
@ 9, 0 SAY "Check Number:"
@ 9,36 SAY "Payee:"
@ 10, 1 SAY "Description:"
@ 10,35 SAY "Acct #:"
@ 10,50 SAY "Amount:"
@ 12, 0 SAY "Check Number:"
@ 12,36 SAY "Payee:"
@ 13, 1 SAY "description:"
@ 13,35 SAY "Acct #:"
@ 13,50 SAY "Amount:"
@ 15, 0 SAY "Check Number:"
@ 15,36 SAY "Payee:"
@ 16, 1 SAY "Description:"
@ 16,35 SAY "Acct #:"
@ 16,50 SAY "Amount:"
@ 18, 0 SAY "Check Number:"
@ 18,36 SAY "Payee:"
@ 19, 1 SAY "Description:"
@ 19,35 SAY "Acct #:"
@ 19,50 SAY "Amount:"
@ 22,00 SAY prompt
ENDI first
STOR .f. TO first
@ 3,14 GET mprop PICTURE '99'
@ 3,44 GET mdate1 PICTURE '99/99/99'
@ 4,14 GET mbank PICTURE '9999'
@ 6,14 GET mchk1 PICTURE '9999'
@ 6,43 GET mpay1
@ 7,14 GET mpay1a
@ 7,43 GET macc1 PICTURE '9999'
@ 7,60 GET mamt1
@ 9,14 GET mchk2 PICTURE '9999'
@ 9,43 GET mpay2
@ 10,14 GET mpay2a
@ 10,43 GET macc2 PICTURE '9999'
@ 10,60 GET mamt2
@ 12,14 GET mchk3 PICTURE '9999'
@ 12,43 GET mpay3
@ 13,14 GET mpay3a
@ 13,43 GET macc3 PICTURE '9999'
@ 13,60 GET mamt3
@ 15,14 GET mchk4 PICTURE '9999'
@ 15,43 GET mpay4
@ 16,14 GET mpay4a
@ 16,43 GET macc4 PICTURE '9999'
@ 16,60 GET mamt4
@ 18,14 GET mchk5 PICTURE '9999'
@ 18,43 GET mpay5
@ 19,14 GET mpay5a
@ 19,43 GET macc5 PICTURE '9999'
@ 19,60 GET mamt5
@ 20,00
READ
CLEA GETS
@ 22,00
@ 22,20 SAY "DO YOU WANT TO MAKE ANY CHANGES ? [ ]"
@ 22,55 GET verify PICTURE '!'
READ
CLEA GETS
IF verify = 'Y'
STOR .f. TO first
@ 3,14 GET mprop PICTURE '99'
@ 3,44 GET mdate1 PICTURE '99/99/99'
@ 4,14 GET mbank PICTURE '9999'
@ 6,14 GET mchk1 PICTURE '9999'
@ 6,43 GET mpay1
@ 7,14 GET mpay1a
@ 7,43 GET macc1 PICTURE '9999'
@ 7,60 GET mamt1
@ 9,14 GET mchk2 PICTURE '9999'
@ 9,43 GET mpay2
@ 10,14 GET mpay2a
@ 10,43 GET macc2 PICTURE '9999'
@ 10,60 GET mamt2
@ 12,14 GET mchk3 PICTURE '9999'
@ 12,43 GET mpay3
@ 13,14 GET mpay3a
@ 13,43 GET macc3 PICTURE '9999'
@ 13,60 GET mamt3
@ 15,14 GET mchk4 PICTURE '9999'
@ 15,43 GET mpay4
@ 16,14 GET mpay4a
@ 16,43 GET macc4 PICTURE '9999'
@ 16,60 GET mamt4
@ 18,14 GET mchk5 PICTURE '9999'
@ 18,43 GET mpay5
@ 19,14 GET mpay5a
@ 19,43 GET macc5 PICTURE '9999'
@ 19,60 GET mamt5
@ 20,00
@ 21,00
@ 22,00
READ
CLEA GETS
ENDI verify
* error checking routine
* put in all of the other routines you may require
STOR .t. TO validate
DO WHIL VALIDATE
DO CASE
CASE mamt1 <> 0 .AND.(SUBSTR(mprop,2) = ' ')
STOR .t. TO error
CASE mamt1 <> 0 .AND.(mdate1 = ' ')
STOR .t. TO error
CASE mamt1 <> 0 .AND. (SUBSTR(mbank,4) = ' ')
STOR .t. TO error
CASE mamt1 <> 0 .AND.(SUBSTR(macc1,4) = ' ')
STOR .t. TO error
CASE mamt2 <> 0 .AND.(SUBSTR(macc2,4) = ' ')
STOR .t. TO error
CASE mamt3 <> 0 .AND.(SUBSTR(macc3,4) = ' ')
STOR .t. TO error
CASE mamt4 <> 0 .AND.(SUBSTR(macc4,4) = ' ')
STOR .t. TO error
CASE mamt5 <> 0 .AND.(SUBSTR(macc5,4) = ' ')
STOR .t. TO error
OTHE
STOR .f. TO validate
STOR .f. TO error
ENDC
IF error
@ 20,00
@ 21,00
@ 22,00
@ 21,14 SAY "PLEASE CORRECT THE INDICATED DATA"
* keep looping till all fields are fixed
STOR .t. TO an_error
DO WHIL an_error
* fix bad ones one at a time
DO CASE
CASE mamt1 <> 0 .AND.(SUBSTR(mprop,2) = ' ')
@ 22,00
@ 22,10 SAY "You must have a two number property account or '00'"
@ 3,14 GET mprop PICTURE '99'
READ
CASE mamt1 <> 0 .AND.(mdate1 = ' ')
@ 22,00
@ 22,10 SAY "You must have a transaction date"
@ 3,44 GET mdate1 PICTURE '99/99/99'
READ
CASE mamt1 <> 0 .AND.(SUBSTR(mbank,4) = ' ')
@ 22,00
@ 22,10 SAY "You must have a bank account"
@ 4,14 GET mbank PICTURE '9999'
READ
CASE mamt1 <> 0 .AND. (SUBSTR(macc1,4) = ' ')
@ 22,00
@ 22,10 SAY "Account Number must be four numbers"
@ 7,43 GET macc1 PICTURE '9999'
READ
CASE mamt2 <> 0 .AND. (SUBSTR(macc2,4) = ' ')
@ 22,00
@ 22,10 SAY "Account Number must be four numbers "
@ 10,43 GET macc2 PICTURE '9999'
READ
CASE mamt3 <> 0 .AND. (SUBSTR(macc3,4) = ' ')
@ 22,00
@ 22,10 SAY "Account Number must be four numbers"
@ 13,43 GET macc3 PICTURE '9999'
READ
CASE mamt4 <> 0 .AND. (SUBSTR(macc4,4) = ' ')
@ 22,00
@ 22,10 SAY "Account Number must be four numbers "
@ 16,43 GET macc4 PICTURE '9999'
READ
CASE mamt5 <> 0 .AND.(SUBSTR(macc5,4) = ' ')
@ 22,00
@ 22,10 SAY "Account Number must be four numbers"
@ 19,43 GET macc5 PICTURE '9999'
READ
OTHE
@ 20,00
@ 21,00
@ 22,00
@ 22,00 SAY prompt
STOR .F. TO validate
STOR .f. TO an_error
ENDC
ENDD WHILE an:error
ENDI error
ENDD validate
RELE error, an_error, validate
STOR SUBSTR(mdate1,7,2) + SUBSTR(mdate1,1,2) + SUBSTR(mdate1,4,2) TO mdate2
IF mamt1 > 0 .OR.(mamt1 = 0 .AND. mchk1 <> ' ')
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk1+mprop+macc1+'D'+mpay1+DTOC(date())+'D'
REPL amount WITH mamt1
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk1+mprop+mbank+'C'+mpay1a+DTOC(date())+'D'
REPL amount WITH (mamt1*-1)
IF mamt2 > 0
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk2+mprop+macc2+'D'+mpay2+DTOC(date())+'D'
REPL amount WITH mamt2
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk2+mprop+mbank+'C'+mpay2a+DTOC(date())+'D'
REPL amount WITH (mamt2*-1)
ENDI mamt2
IF mamt3 > 0
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk3+mprop+macc3+'D'+mpay3+DTOC(date())+'D'
REPL amount WITH mamt3
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk3+mprop+mbank+'C'+mpay3a+DTOC(date())+'D'
REPL amount WITH (mamt3*-1)
ENDI mamt3
IF mamt4 > 0
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk4+mprop+macc4+'D'+mpay4+DTOC(date())+'D'
REPL amount WITH mamt4
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk4+mprop+mbank+'C'+mpay4a+DTOC(date())+'D'
REPL amount WITH (mamt4*-1)
ENDI mamt4
IF mamt5 > 0
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk5+mprop+macc5+'D'+mpay5+DTOC(date())+'D'
REPL amount WITH mamt5
APPE BLANK
REPL date WITH mdate2
REPL data WITH mchk5+mprop+mbank+'C'+mpay5a+DTOC(date())+'D'
REPL amount WITH (mamt5*-1)
ENDI mamt5
STOR .t. TO more
ELSE
STOR .f. TO more
ENDI mamt1 > 0
STOR .t. TO first
ENDD WHILE more
SET INTENSITY OFF
SET DELIMITER ON
STOR .t. TO account
STOR ' ' TO command