home *** CD-ROM | disk | FTP | other *** search
- ************ Deposits COMMAND FILE ***********
- * This file records any money coming in in a file called Deposits. If the
- * the money is in payment of an invoice, the amount and date of payment are
- * entered against that invoice in the Invoice file.
- * The checkbook balance is kept current for each entry.
- * At the end of the sesssion, deposits are printed out individually, then
- * the total of deposits plus the new checkbook balance are printed.
- ****************************************************************************
- *
- RESTORE FROM Konstant
- *
- CLEAR
- @ 3,20 SAY ' ENTERING INCOME'
- @ 7, 5 SAY 'The Starting Balance is '+STR(MBalance,9,2)
- @ 9,10 SAY 'If this does not match the checkbook,'
- @ 10,10 SAY '<ENTER> to exit to the deposit menu.'
- @ 12,10 SAY ' Any key to proceed'
- WAIT ' ' TO Continue
- IF LEN(Continue) = 0
- RETURN
- ENDIF
- RELEASE Continue
- *
- T_Date = DATE()
- *
- *Selecting transaction file DEPTEMP.DBF
- SELECT 1
- T_Deposit = 'Y'
- DO WHILE LEN(T_Deposit) <> 0
- APPEND BLANK
- REPLACE Dep_Date WITH T_Date
- *
- CLEAR
- * Next loop is used when there has been an error in the entry
- * (defined as no client or no rate). The operator is shown the
- * previous entries and can make any changes required.
- Incorrect = 'T'
- DO WHILE UPPER(Incorrect) <> 'F'
- @ 1,20 SAY 'CHECK DEPOSIT '
- @ 3,0 SAY ' If a check covers more than one agency invoice,'
- @ 4,0 SAY ' enter each invoice and amount separately.'
- @ 6,0 SAY ' Entry '+STR(RECNO(),5)
- @ 8,0 SAY ' HOW MUCH' GET Deposit
- @ 9,0 SAY 'OUR INVOICE NO' GET Inv_Nmbr
- @ 10,0 SAY ' CHECK FROM' GET Payer PICTURE '!!!!!!!!!!!!!!!!!!!!'
- @ 11,0 SAY 'THEIR CHECK NO' GET Pay_Nmbr PICTURE '!!!!!!!'
- @ 12,0 SAY ' Comments' GET Comments PICTURE '!!!!!!!!!!!!!!!!!!!!'
- READ
- *
- IF Payer <> ' ' .AND. Deposit > 0
- @ 17,5 SAY 'Type any key to CHANGE,'
- WAIT 'press <ENTER> to continue.' TO T_Deposit
- IF LEN(T_Deposit) <> 0
- Incorrect = 'T'
- ELSE
- MBalance = (MBalance + Deposit)
- Incorrect = 'F'
- ENDIF
- ELSE
- @ 15,5 SAY 'CHECK WRITER or AMOUNT missing.'
- @ 17,5 SAY 'Type any key to correct record,'
- WAIT 'press <ENTER> to exit. ' TO T_Deposit
- IF LEN(T_Deposit) = 0
- DELETE
- Incorrect = 'F'
- ELSE
- CLEAR
- Incorrect = 'T'
- ENDIF
- ENDIF
- ENDDO Incorrect
- @ 15,0
- @ 17,5 SAY 'Type any key for another deposit,'
- WAIT 'press <ENTER> to exit. ' TO T_Deposit
- ENDDO T_Deposit
- @ 15,0 CLEAR
- *
- RELEASE Change,T_Date,NoDate,T_Deposit,Update,New,Incorrect
- SAVE TO Konstant
- *
- COUNT FOR .NOT. DELETED() TO Any
-
- IF Any = 0
- ? 'No deposits to add to the file.'
- WAIT 'Press any key to continue.'
- ELSE
- WAIT 'Do you want to print the deposits (Y or N)? ' TO Go
- IF UPPER(Go) = 'Y'
- DO Depprint
- ENDIF
- *
- * Deptrans uses two work areas (Select 1, Select 2) to check payments
- * against invoices in the Invoices file. If the payment is for one of our
- * invoices, the amount is transferred to the Amt_Rcd field in Invoices.
- *
- DO Deptrans
- *
- SELECT 1
- GO TOP
- DO WHILE .NOT. EOF()
- IF .NOT. DELETED()
- SELECT 8
- APPEND BLANK
- REPLACE Dep_Date WITH A->Dep_Date,Payer WITH A->Payer,Pay_Nmbr WITH;
- A->Pay_Nmbr,Deposit WITH A->Deposit,Inv_Nmbr WITH A->Inv_nmbr,;
- Comments WITH A->Comments
- SELECT 1
- ENDIF
- SKIP
- ENDDO
- ENDIF there are deposits to add to the file
- *
- SELECT 1
- ZAP
- RETURN