home *** CD-ROM | disk | FTP | other *** search
-
-
- * COSTBILLS.CMD
- * This file accepts inputs for supplier bills.
- * A temporary file called GetBills is used for data entry because the operator
- * can decide to quit on an incomplete entry, which is marked for deletion.
- * When the data is APPENDed to the PostFile, these entries are eliminated )the
- * APPEND command does not transfer records marked for deletion). An entry must
- * included at least the name of a supplier and the amount of the bill. If these
-
- ERASE
- @ 5,20 SAY 'SUPPLIER BILLS'
- USE PostFile
- COPY STRUCTURE TO GetBills
-
- USE GetBills
- STORE 'Y' TO Bills
- DO WHILE !(Bills) <> 'F'
- APPEND BLANK
- STORE STR(#,5) TO Number
-
- STORE T TO Entering
- DO WHILE Entering
- ERASE
- @ 1,0 SAY ' RECORD NUMBER: '-Number
- @ 3,0 SAY ' CLIENT' GET Client
- @ 4,0 SAY ' JOB NUMBER' GET Job:Nmbr
- @ 5,0 SAY ' AMOUNT' GET Amount
- @ 6,0 SAY ' BILL NUMBER' GET Bill:Nmbr
- @ 7,0 SAY ' BILL DATE' GET Bill:Date
- @ 8,0 SAY ' SUPPLIER NAME' GET Name
- @ 9,0 SAY ' DESCRIPTION' GET Descrip
- READ
- REPLACE Client WITH !(Client), Name WITH !(Name),Descrip;
- WITH !(Descrip), Bill:Nmbr WITH !(Bill:Nmbr)
- @ 3,20 SAY Client
- @ 8,20 SAY Name
- @ 9,20 SAY Descrip
-
- STORE ' ' TO Getting
- IF $(Client,1,1) = ' ' .OR. $(Client,2,1) = ' ' .OR. $(Client,3,1);
- = ' ' .OR. Job:Nmbr <= 0
- @ 12,0
- ? ' CLIENT or JOB NUMBER wrong.'
- ? ' F if FINISHED,'
- ACCEPT ' <Return> to change.' TO Getting
- ELSE
- IF Amount = 0 .OR. Name <= ' '
- ?
- ?
- ? ' AMOUNT or NAME missing.'
- ?
- ? ' F if FINISHED,'
- ACCEPT ' <Return> to change.' TO Getting
- ELSE
- @ 12,5 SAY ' C to CHANGE.'
- @ 13,5 SAY ' F if FINISHED,'
- ACCEPT ' <Return> to continue.' TO Bills
-
- IF !(Bills) = 'C'
- STORE T TO Entering
- ELSE
- STORE F TO Entering
- ENDIF
- ENDIF amount or name
- ENDIF client or job number
-
- IF !(Getting) = 'F'
- DELETE RECORD &Number
- STORE F TO Entering
- STORE 'F' TO Bills
- ENDIF
- ENDDO Entering
- ENDDO Bills
-
- COUNT FOR .NOT. * TO Any
- IF Any = 0
- ? 'No entries to add to the Cost Base.'
- ? '<Return> to the menu.'
- USE
- WAIT
- ELSE
-
- RESTORE FROM Constant
- STORE 'Bill:Date' TO Date
- DO DateTest
-
- * Checks names against a list of suppliers to catch spelling and
- * abbreviation inconsistencies.
- DO NameTest
-
- ERASE
- @ 3,25 SAY ' *** DO NOT INTERRUPT ***'
- @ 5,25 SAY ' UPDATING THE POSTING FILE'
- USE POSTFILE
- APPEND FROM GetBills
- ENDIF
-
- USE
- DELETE FILE GetBills
- RELEASE All
- RETURN
-