home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBASEACC.ARC
/
USETAX.PRG
< prev
Wrap
Text File
|
1979-12-31
|
4KB
|
134 lines
* USETAX.CMD
* This file accepts inputs for supplier bills when the agency has bought
* an item without paying a use tax on it.
* The item or items are added to the Invoices file(not Billings),
* then are used by the SalesTax program so that the Quarterly Sales Tax
* report can be prepared by the computer.
*
* 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
* include at least the name of a supplier and the amount of the bill. If these
* are not both supplied, the entry is flagged for correction or deletion.
ERASE
@ 5,20 SAY 'AGENCY USE TAX PROCEDURE'
?
USE PostFile
COPY STRUCTURE TO GetBills
USE GetBills
STORE 'Y' TO Bills
DO WHILE !(Bills) <> 'F'
APPEND BLANK
STORE STR(#,5) To Number
REPLACE Client WITH 'OFC'
STORE T TO Entering
DO WHILE Entering
ERASE
@ 1,0 SAY 'ENTER ONLY UNTAXED ITEMS NOT USED FOR CLIENT JOBS.'
@ 3,0 SAY ' RECORD NUMBER:' + Number
@ 4,0 SAY ' CLIENT:' + Client + ':'
@ 5,0 SAY ' JOB NUMBER' GET Job:Nmbr
@ 6,0 SAY ' AMOUNT' GET Amount
@ 7,0 SAY ' BILL NUMBER' GET Bill:Nmbr
@ 8,0 SAY ' BILL DATE' GET Bill:Date
@ 9,0 SAY ' SUPPLIER NAME' GET Name
READ
REPLACE Name WITH !(Name),Descrip WITH 'USE TAX ENTRY';
Bill:Nmbr WITH !(Bill:Nmbr)
@ 7,17 SAY Bill:Nmbr
@ 9,17 SAY Name
@ 10,17 SAY Descrip
STORE ' ' TO Getting
IF Job:Nmbr <= 0 .OR. Job:Nmbr > 99
@ 12,0
? ' The JOB NUMBER entry is wrong.'
? ' Agency jobs are from 1 through 99.'
? ' 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 valid entries to add to the files.'
? ' <Return> to the menu.'
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
* The following loop transfers the bills just entered into the Invoices
* file. The amount of the bill is entered in the "Taxable" column. The
* job number is entered into the Invoice Number column. Since invoices
* have 5 digits, while job numbers are under 1000, we use this to sepa-
* rate the two types of entries later in the SalesTax.CMD file.
* PRIMARY and SECONDARY work areas are used to step through the GetBills
* file one entry at a time.
USE GetBills
SELECT SECONDARY
USE Invoices
SELECT PRIMARY
DO WHILE .NOT. EOF
IF *
SKIP
ELSE
SELECT SECONDARY
APPEND BLANK
REPLACE Inv:Nmbr WITH STR(Job:Nmbr,3), Inv:Date WITH Bill:Date,;
Taxable WITH P.Amount, Date:Rcd WITH 'USE TAX'
SELECT PRIMARY
SKIP
ENDIF
ENDDO
ENDIF
USE
DELETE FILE GetBills
RELEASE All
RETURN