home *** CD-ROM | disk | FTP | other *** search
- ********** Costmenu COMMAND FILE **********
- * This is one level down from the Accounts.prg control module.
- * Selections are refinements that relate to costs for client-related
- * jobs or agency overhead.
- * The main database is called Costbase.dbf.
- * Costs are not entered directly into the Costbase, however, because this leads
- * to data contamination and all sorts of problems fixing the errors. Instead,
- * supplier bills and agency time sheets are posted into an interim file called
- * Postfile.dbf. In here, they can be reviewed and edited as necessary.
- * When all the cost entries are confirmed as being correct, they are
- * transferred to the Costbase by using the update procedure (selection 3).
- ******************************************************************************
- *
- *** These file are SELECTed in all the listed menu items
- SELECT 1
- USE Gettemp
- SELECT 2
- USE Postfile
- SELECT 4
- USE Supplier INDEX Supplier
- SELECT 5
- USE Personne
- *
- DO WHILE .T.
- CLEAR
- @ 2, 0 SAY '* * * * * * B I L L S & T I M E S H E E T S * * * * * *'
- @ 4,15 SAY ' 1> ENTER EMPLOYEE TIME SHEETS'
- @ 6,15 SAY ' 2> ENTER SUPPLIER BILLS'
- @ 8,15 SAY ' 3> UPDATE the Costbase'
- @ 10,15 SAY ' 4> EDIT the Postfile'
- @ 12, 0 SAY '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'
- @ 14,15 SAY 'Choose a number or press <ENTER> to exit.'
- @ 15, 0
- *
- WAIT ' ' TO Costing
- *
- DO CASE
- CASE Costing = '1'
- @ ROW(),0 SAY 'Preparing Employee Time Sheets'
- DO Costtime
- CASE Costing = '2'
- @ ROW(),0 SAY 'Preparing Supplier Bills'
- SELECT 8
- USE Invoices
- DO Costbill
- CASE Costing = '3'
- @ ROW(),0 SAY 'Preparing to UPDATE Costbase'
- SELECT 3
- USE Costbase INDEX Costname,Costjobs
- DO Costupda
- CASE Costing = '4'
- @ ROW(),0 SAY 'Selecting Posting File'
- Changing = 'Y'
- DO WHILE LEN(Changing) <> 0
- SELECT 2
- GO TOP
- IF EOF()
- CLEAR
- ? ' There are no entries in the Posting file.'
- WAIT
- Changing = ''
- ELSE
- GO BOTTOM
- CLEAR
- @ 3,10 SAY 'Edit Postfile '
- @ 5,10 SAY 'There are '+STR(RECNO(),5)+' file entries.'
- WAIT 'Which entry do you want to EDIT?' TO Recno
- *
- * Next line converts the Character value of Which into a
- * Numeric value. This is necessary in the 'ELSE' part.
- * The EDIT command must be given a NUMERIC value to edit.
- IF &Recno <= 0 .OR. &Recno > RECNO()
- ?
- WAIT ' Out of range: do you want to continue (Y or N)?' ;
- TO Changing
- ELSE
- GOTO &Recno
- CLEAR
- @ 1, 0 SAY 'Postfile Edit'
- @ 3, 0 SAY ' Entry'+ STR(RECNO(),5)
- @ 5, 0 SAY ' Check Date' GET Check_Date
- @ 6, 0 SAY ' Check Number' GET Check_Nmbr
- @ 7, 0 SAY ' Client' GET Client PICTURE '!!!'
- @ 8, 0 SAY ' Job Number' GET Job_Nmbr
- @ 9, 0 SAY ' Amount' GET Amount
- @ 10, 0 SAY ' Name' GET Name PICTURE '!!!!!!!!!!!!!!!!!!!!'
- @ 11, 0 SAY ' Description' GET Descrip PICTURE '!!!!!!!!!!!!!!!!!!!!'
- @ 12, 0 SAY ' Bill Number' GET Bill_Nmbr PICTURE '!!!!!!!'
- @ 13, 0 SAY ' Bill Date' GET Bill_Date
- @ 14, 0 SAY ' Hours' GET HOURS
- @ 15, 0 SAY ' Employee Number' GET Emp_Nmbr
- @ 19,10 SAY '^W to save, ESC to cancel changes.'
- READ
- @ 19,0
- WAIT 'Press (ENTER) to exit, any key to continue';
- TO Changing
- ENDIF
- ENDIF
- ENDDO Changing
- CASE LEN(Costing) = 0
- @ ROW(),0 SAY 'Returning to Main Menu'
- CLOSE DATABASE
- RETURN
- *
- OTHERWISE
- *
- ENDCASE Costing
- ENDDO