home *** CD-ROM | disk | FTP | other *** search
- ********** Paymenu COMMAND FILE **********
- * This is a sub-module of the Accounts.prg file and provides choices
- * as to which checks are to be prepared for posting and printing.
- * Paying salaries has another menu level to allow partial payments
- * to selected employees (e.g., leave of absence, when an employee does not
- * work a full two week stretch, etc.)
- ********************************************************************
- *
- SELECT 2
- USE Postfile
- SELECT 3
- USE Costbase Index Costname,Costjobs
- SELECT 4
- USE Supplier INDEX Supplier
- SELECT 5
- USE Personne
- SELECT 6
- USE Checkfil
- DO WHILE .T.
- CLEAR
- @ 3, 0 SAY '* * * * * P A Y B I L L S & S A L A R I E S * * * * *'
- @ 5,20 SAY ' 1> PAY SALARIES'
- @ 7,20 SAY ' 2> PAY BILLS'
- @ 9, 0 SAY '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'
- @ 11,20 SAY 'Choose a number or press <ENTER>'
- @ 12, 0
- *
- WAIT ' ' TO Paying
- *
- DO CASE
- CASE Paying = '1'
- @ ROW(),0 SAY 'Preparing to Pay Salaries'
- SELECT 2
- USE
- SELECT 7
- USE WAGES
- DO Payemps
- SELECT 2
- USE Postfile
- CASE Paying = '2'
- @ ROW(),0 SAY 'Preparing to Pay Bills'
- * Count to see if there are any undeleted records in the
- * Postfile. If not, do the Paybills command file. If
- * there are some, ask if user still wants to pay bills.
- SELECT 2
- COUNT FOR .NOT. DELETED() TO Any
- IF Any = 0
- DO PayBills
- ELSE
- ?
- ? 'The Posting file contains '+STR(Any,5)+' bills'
- ? 'that have not been posted to the Costbase yet.'
- WAIT 'Do you still want to pay bills now (Y or N)?' To Continue
- IF UPPER(Continue) = 'Y'
- DO Paybills
- ENDIF
- ENDIF
- CASE LEN(Paying) = 0
- @ ROW(),0 SAY 'Returning to Main Menu'
- CLOSE DATABASE
- RETURN
- *
- OTHERWISE
- *
- ENDCASE Paying
- ENDDO