home *** CD-ROM | disk | FTP | other *** search
-
-
- * COSTUPDA.CMD
- * Records from the COSTFILE 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
-
- @ 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) <> 'H'
- @ 12,12 SAY ' UNAUTORIZED ACCESS ATTEMPTED.'
- @ 14,12 SAY ' YOU HAVE 6 SECONDS BEFORE THE EXPLOSION.'
- STORE 1 TO X
- DO WHILE X < 150
- STORE X + 1 TO X
- ENDDO
- RELEASE Lock
- RETURN
- ELSE
- ERASE
- @ 5,20 SAY 'Checking bills in the POSTING File:'
- USE PostFile
- COUNT FOR .NOT. * TO None
- IF None = 0
- @ 6,20 SAY 'No new entries in the POSTING file.'
- @ 7,20 SAY '<Return> to continue.'
- WAIT
- ELSE
- GO TOP
- RESTORE FROM Constant
- STORE 'Bill:Date' TO Date
- DO DateTest
- DO NameTest
- DO TimeCalc
- ERASE
- @ 5,20 SAY ' *** DO NOT INTERRUPT ***'
- @ 6,20 SAY 'Posting COSTS to the Costbase.'
- USE CostBase
- GO BOTTOM
- STORE # TO LastReco
-
- USE Costbase INDEX $Supp
- APPEND FROM PostFile
-
- USE PostFile
- DELETE ALL
- ENDIF
- ENDIF
-
- RELEASE All
- RETURN
-
-