Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : PARTSDB3.ZIP
Filename : PARTS2.PRG

 
Output of file : PARTS2.PRG contained in archive : PARTSDB3.ZIP

* PROGRAM : PARTS
* AUTHOR..: BRADLEY E. MITCHELL
* DATE....: APRIL 10, 1988
SET DEVICE TO SCREEN
USE PARTS INDEX PARTS
CLEAR
set talk off
SET BELL OFF
set status off
SET SAFETY OFF
PAGE=1
FINISH=.T.
ITEMS=0
FTOT=0
STARTINV=INUM+1
TAX=0
QTY=0
CUSTOMER=SPACE(32)
STREET=SPACE(32)
TOT=0
CITY=SPACE(32)
CITY2=SPACE(32)
TEMP=SPACE(8)
CONTACT=SPACE(15)
@ 2,20 SAY " M I T C H E L L "
@ 4,20 SAY " E L E C T R O N I C S"
@ 6,20 SAY "I N V O I C E S Y S T E M"
@15,20 SAY "THE FIRST INVOICE WILL BE:"
@17,20 SAY " " GET STARTINV
READ
WAIT
CLEAR
@ 2,0 TO 8,78 DOUBLE
@ 3,2 SAY "INVOICE DATE:"
@ 3,16 GET INVDATE
READ
@ 5,2 SAY "INVOICE #:"
@ 5,13 GET STARTINV
READ
@ 3,30 SAY "COMPANY/NAME:"
@ 3,45 GET CUSTOMER
READ
@ 4,45 GET STREET
READ
@ 5,45 GET CITY
READ
@ 6,45 GET CITY2
READ
SET DEVICE TO PRINT
@ 4,0 SAY REPLICATE ("=",79)
@ 5,0 SAY "MITCHELL ELECTRONICS"
@ 6,0 SAY "8619 RIGGS MANOR DRIVE"
@ 7,0 SAY "SUITE #101"
@ 8,0 SAY "HYATTSVILLE, MD 20783"
@ 8,50 SAY "INVOICE DATE :"
@ 8,65 SAY DATE()
@ 9,0 SAY "(301)422-0560"
@ 9,50 SAY "INVOICE #"
@ 9,PCOL()+1 SAY STARTINV
@ 11,0 SAY REPLICATE ("=",79)
@ 12,0 SAY "CUSTOMER: "
@ 12,27 SAY CUSTOMER
@ 13,27 SAY STREET
@ 14,27 SAY CITY
@ 15,27 SAY CITY2
@ 18,68 SAY "PAGE:"
@ 18,74 SAY PAGE
@ 19,0 SAY REPLICATE ("=",79)
*PRINT HEADINGS
@ 20,0 SAY "PART #"
@ 20,10 SAY "DESCRIPTION"
@ 20,46 SAY "PRICE"
@ 20,55 SAY "QUANTITY"
@ 20,72 SAY "TOTAL"
@ 21,0 SAY REPLICATE ("=",79)
SET DEVICE TO SCREEN
@ 1,20 SAY "MITCHELL ELECTRONICS INVOICE SYSTEM"
@ 9,0 SAY "PART# DESCRIPTION PRICE QUANTITY 
AMOUNT"
@ 10,0 TO 10,78 DOUBLE
@ 20,0 TO 24,78 DOUBLE
LINE=11
DO WHILE FINISH
@ LINE,0 SAY " "
@ LINE,0 GET TEMP
READ
DO WHILE PART_NUM<>TEMP
LOCATE FOR PART_NUM=TEMP
@ LINE,0 GET TEMP
READ
ENDDO
@ LINE,12 SAY DESC
@ LINE,40 SAY UNIT_PRICE PICTURE "9,999.00"
@ LINE,54 GET QTY
READ
TOT=QTY*UNIT_PRICE
@ LINE,64 SAY TOT PICTURE "99,999.99"
FTOT=FTOT+TOT
ITEMS= ITEMS+1
SET DEVICE TO PRINT
@ PROW()+1,0 SAY TEMP
@ PROW(),10 SAY DESC
@ PROW(),44 SAY UNIT_PRICE
@ PROW(),50 SAY QTY
@ PROW(),64 SAY TOT
IF PROW()>55
@ PROW()+1,0 SAY REPLICATE ("=",79)
@ PROW()+3,40 SAY "TOTAL FOR THIS PAGE: "
@ PROW(),63 SAY FTOT
@ PROW()+4,0 SAY REPLICATE ("=",79)
EJECT
PAGE=PAGE+1
@ 4,0 SAY REPLICATE ("=",79)
@ 5,0 SAY "MITCHELL ELECTRONICS"
@ 6,0 SAY "8619 RIGGS MANOR DRIVE"
@ 7,0 SAY "SUITE #101"
@ 8,0 SAY "HYATTSVILLE, MD 20783"
@ 8,50 SAY "INVOICE DATE :"
@ 8,65 SAY DATE()
@ 9,0 SAY "(301)422-0560"
@ 9,50 SAY "INVOICE # :"
@ 9,PCOL()+1 SAY STARTINV
@ 11,0 SAY REPLICATE ("=",79)
@ 12,0 SAY "BILL TO:"
@ 1******
@ 14,0 SAY CUSTOMER
@ 15,0 SAY STREET
@ 16,0 SAY CITY
@ 17,0 SAY CITY2
@ 18,68 SAY "PAGE:"
@ 18,74 SAY PAGE PICTURE "99"
@ 19,0 SAY REPLICATE ("=",79)
*PRINT HEADINGS
@ 20,0 SAY "PART #"
@ 20,10 SAY "DESCRIPTION"
@ 20,46 SAY "PRICE"
@ 20,55 SAY "QUANTITY"
@ 20,72 SAY "TOTAL"
@ 21,0 SAY REPLICATE ("=",79)
ENDIF
SET DEVICE TO SCREEN
@ 7,2 SAY "ITEMS: "
@ 7,9 SAY ITEMS PICTURE "99"
@ LINE+1,1 SAY "ENTER ANOTHER INVOICE: (Y/N)"
@ LINE+1,30 GET FINISH PICTURE "Y"
READ
QTY=0
IF LINE>17
CLEAR
@ 2,0 TO 8,78 DOUBLE
@ 3,2 SAY "INVOICE DATE:"
@ 3,16 SAY INVDATE
@ 5,2 SAY "INVOICE #:"
@ 5,13 SAY STARTINV
@ 3,30 SAY "COMPANY/NAME:"
@ 3,45 SAY CUSTOMER
@ 4,45 SAY STREET
@ 5,45 SAY CITY
@ 6,45 SAY CITY2
@ 20,0 TO 24,78 DOUBLE
LINE=8
ENDIF
TAX=.06*FTOT
@ 21,2 SAY "TAX: "
@ 22,2 SAY TAX PICTURE "999.99"
@ 21,30 SAY "NET CHARGE: "
@ 22,30 SAY FTOT PICTURE "99,999.99"
@ 21,60 SAY "TOTAL CHARGE: "
@ 22,60 SAY (TAX+FTOT) PICTURE "99,999.99"
IF FINISH
LINE=LINE+1
TEMP=SPACE(8)
ENDIF
ENDDO
SET DEVICE TO PRINT
@ 56,0 SAY REPLICATE ("=",79)
@ PROW()+2,0 SAY "TOTAL ITEMS :"
@ PROW(),13 SAY ITEMS PICTURE "999"
@ PROW()+2,0 SAY "NET CHARGE ="
@ PROW(),13 SAY FTOT PICTURE "99,999.99"
@ PROW(),30 SAY "TAX ="
@ PROW(),36 SAY TAX PICTURE "999.99"
@ PROW(),50 SAY "TOTAL CHARGE ="
@ PROW(),64 SAY (FTOT+TAX) PICTURE "99,999.99"
@ 64,0 SAY REPLICATE ("=",79)
EJECT
SET DEVICE TO SCREEN