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

 
Output of file : INV.PRG contained in archive : DB3AR.ZIP
SET HEADING OFF
******************** (INV.PRG)
CLEAR
SET BELL OFF
STORE ' ' TO MNAME
STORE 0.00 TO MAMT,MTOT,MOLD,MOLDY
STORE 0 TO T
STORE 0 TO REC
USE B:INV
GO BOTT
STORE RECNO() TO REC
STORE REC-1 TO REC
CLEAR
DO WHILE .T.
USE B:CUST INDEX B:ACCT
SET CONFIRM ON
STORE ' ' TO MINV
STORE ' ' TO MPO
STORE ' ' TO MACCT
STORE ' ' TO MSALES
SET EXACT ON
@ 2,0 CLEAR
TYPE B:LINE.TXT
@ 6,23 SAY 'Do you want to enter an invoice?'
@ 13,32 SAY 'Last entered:'
IF T<>0
@ 14,T SAY MNAME
ENDIF
@ 15,27 SAY MAMT
TYPE B:LINE.TXT
?
?
STORE ' ' TO OPTION
WAIT ' Press Y or N 'TO OPTION
IF OPTION='N'
CLEA
@ 10,15 SAY 'The first invoice was entered previously'
TYPE B:LINE.TXT
USE B:INV
DISP ALL OFF FOR RECNO()>REC 'Account # '+ACCT,'Invoice # 
'+INVNO,' Price $',+NET,' Date of invoice',NEWDATE
TYPE B:LINE.TXT
WAIT '.............................Press 
anything..................................'
CLEA
@ 15,20 SAY 'Press F9 to return to menu'
RETURN
ENDIF
IF OPTION='Y'
STORE ' ' TO MNAME
@ 2,0 CLEAR
@ 6,25 SAY 'Enter account number ' GET MACCT PICTURE 'XXXX'
READ
IF MACCT=' '
CLEA
@ 15,30 SAY 'NO ACCOUNT NUMBER !! '
? CHR(7)
LOOP
ENDIF
FIND &MACCT
STORE SALES TO MSALES
STORE LOWER(TRIM(NAME)) TO MNAME
STORE LEN(TRIM(MNAME)) TO A
STORE ALLPAY TO MTOT
IF (EOF() .OR. BOF())
SET TALK ON
@ 2,0 CLEAR
? CHR(007)
@ 6,20 SAY " I can't find an account for # &MACCT "
SET TALK OFF
STORE ' ' TO MNAME
STORE 1 TO XX
DO WHILE XX<70
STORE XX+1 TO XX
ENDDO WHILE XX<70
LOOP
ENDIF BOF()
USE B:CUST INDEX B:ACCT
FIND &MACCT
@ 2,0 CLEAR
TYPE B:CUST.TXT
@ 5,2 SAY NAME
@ 5,58 SAY ACCT
@ 7,2 SAY ADDRESS
@ 7,58 SAY DISC
@ 9,2 SAY TRIM(CITY)+' ,'+STATE+' '+ZIP
@ 9,62 SAY MTOT
IF OLD_45 > 0.01
STORE OLD_45 TO MOLD
@ 12,1 SAY 'This account is 45 days past due by'
@ 12,36 SAY MOLD
ENDIF
IF DISC='HOLD*COD'
? CHR(7)
SET COLOR TO /W
@ 10,25 SAY DISC
SET COLOR TO W
ENDIF
IF OLD_60 > 25.00
STORE OLD_60 TO MOLDY
@ 12,56 SAY 'Over 60'
SET COLOR TO /W
@ 12,64 SAY MOLDY
SET COLOR TO W
ENDIF
ENDIF
@ 15,25 SAY 'Is this the correct account?'
?
?
WAIT ' ? ' TO OPTION
IF OPTION='N'
LOOP
ENDIF
@ 2,0 CLEAR
USE B:INV INDEX B:ACCTS
SET TALK OFF
APPEND BLANK
STORE 0 TO T
STORE LEN(MNAME) TO T
S=T/2
STORE (80-T)/2 TO T
@ 4,T SAY MNAME
TYPE B:INV.TXT
@ 8,44 GET INVNO
@ 10,44 GET PONO
@ 12,44 GET NEWDATE PICTURE '99/99/99'
@ 14,44 GET PRICE
READ
STORE PRICE TO MAMT
STORE RECNO() TO RECNO
REPLACE NET WITH PRICE
REPLACE PAID WITH .F.
REPLACE ACCT WITH MACCT
REPLACE SALES WITH MSALES
@ 2,(T+S-6) SAY 'Acct #'
@ 2,(T+S+2) SAY MACCT
@ 19,32 SAY 'Is this correct?'
@ 20,0 SAY ' '
WAIT ' ? 'TO OPTION
IF OPTION='N'
EDIT RECNO()
REPLACE NET WITH PRICE
CLEAR
ENDIF
SET CONFIRM OFF
@ 2,0 CLEAR
STORE UPPER(MNAME) TO MNAME
ENDDO
SET EXACT OFF
RETURN


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DB3AR.ZIP
Filename : INV.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/