home *** CD-ROM | disk | FTP | other *** search
- ********** Costupda COMMAND FILE **********
- * Records from the Postfile are added to the Costbase.
- * This step is so critical to data integrity that we: use a password
- * to prevent accidental access; verify dates; check the names of suppliers;
- * and compute time charges if necessary. Notice that these are done by
- * simply calling the utility command files.
- * The PostFile has all its records marked for deletion after they
- * have been posted (can still be recovered).
- *******************************************************************
- *
- SET TALK OFF
- *
- * The following commands have been turned into comments by putting asterisks
- * in front of them. If you remove the asterisks, you will have rudimentary
- * password protection. The code word is 'Hal', but can be changed below.
-
- * @ 4,12 SAY '**************************************************'
- * @ 6,12 SAY 'MAKE CERTAIN EVERYTHING IN THE Postfile IS CORRECT'
- * @ 8,12 SAY ' BEFORE ENTERING THE CODE TO CONTINUE'
- * @ 10,12 SAY '**************************************************'
- * SET CONSOLE OFF
- * ACCEPT TO Lock
- * SET CONSOLE ON
- *
- * IF Lock <> 'Hal'
- * @ 12,15 SAY ' UNAUTHORIZED ACCESS ATTEMPTED.'
- *
- * * Delay built by the following 4 lines
- * X = 1
- * DO WHILE X < 100
- * X = X + 1
- * ENDDO
- *
- * RETURN
- * ELSE
- * The matching ENDIF is at the end of the file
- *
- CLEAR
- @ 5,20 SAY 'Checking bills in the Posting File:'
- SELECT 2
- PACK
- GO TOP
- IF RECNO() = 0
- @ 6,20 SAY 'No new entries in the Posting file.'
- @ 7,20 SAY '<ENTER> to continue.'
- WAIT
- ELSE
- DO Nametest WITH "2"
- DO Timecalc
- CLEAR
- @ 5,20 SAY ' *** DO NOT INTERRUPT ***'
- @ 6,20 SAY 'Posting COSTS to the Costbase.'
- *
- GO TOP
- DO WHILE .NOT. EOF()
- IF .NOT. DELETED()
- SELECT 3
- APPEND BLANK
- REPLACE Check_date WITH A->Check_date,Check_nmbr WITH;
- A->Check_nmbr,Client WITH A->Client,Job_nmbr;
- WITH A->Job_nmbr,Amount WITH A->Amount
- REPLACE Name WITH A->Name,Descrip WITH A->Descrip,;
- Bill_date WITH A->Bill_date,Bill_nmbr WITH A->Bill_nmbr,;
- Hours WITH A->Hours,Emp_nmbr WITH A->Emp_nmbr
- SELECT 2
- ENDIF
- SKIP
- ENDDO
- *
- DELETE ALL
- SELECT 3
- USE
- ENDIF
- * ENDIF
- RETURN