home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
decus
/
RB123
/
finrpt.prg
< prev
next >
Wrap
Text File
|
1995-05-28
|
4KB
|
189 lines
* Program : FINRPT.PRG
* Version : V4.2
* Author(s) : Joe Tomas
* Date : 07/30/86
* Notice :
* Called by : REPORTS.PRG
* Call(s) :
* Notes : REPORT MENU FOR PRINTING FINANCIAL REPORTS &
* : PHYSICAL INVENTORY WORKSHEET
*
PARAMETERS ANS,TITLE
@ 05,00 CLEAR
STORE 000 TO TOTNET
STORE 000 TO TOTQTY
STORE 000 TO TOTALLOW
STORE 000 TO TOTGROSS
RESTORE FROM DATES ADDITIVE
USE MASTER INDEX MASTER
GOTO TOP
SET COLOR TO +
@ 05,38-(INT(.5*LEN(TITLE))) SAY '&TITLE'
SET COLOR TO
@ 09,09 SAY "NOTE: The results of this report will not be accurate unless"
@ 10,09 SAY " the CONSOLIDATE PRODUCT DATA FILES function has been"
@ 11,09 SAY " performed."
STORE ' ' TO ANSW
@ 20,30 SAY 'CONTINUE ? < Y/N > ' GET ANSW PICTURE "!"
READ
IF ANSW <> 'Y'
CLEAR
USE
RETURN
ENDIF
* CHECK FOR "OK-RPTS.MEM" FLAG FILE - IF IT EXISTS, OK TO CONTINUE
IF .NOT. FILE("OK-RPTS.MEM")
@ 05,00 CLEAR
@ 10,15
SET COLOR TO +I
?? VBELL3+ ' DATA FILES HAVE NOT BEEN CONSOLIDATED - CANNOT CONTINUE '
SET COLOR TO
STORE 1 TO COUNT
DO WHILE COUNT < 40
STORE COUNT+1 TO COUNT
ENDDO
USE
CLEAR
RETURN
ENDIF
@ 05,00 CLEAR
?? VBELL1
DO WHILE INKEY() = 0
SET COLOR TO I
@ 10,15 SAY ' PLACE PLAIN PAPER IN PRINTER...PRESS RETURN TO START '
SET COLOR TO +I
@ 10,15 SAY ' PLACE PLAIN PAPER IN PRINTER...PRESS RETURN TO START '
ENDDO
SET COLOR TO
SET PRINT ON
* ==== SET PRINTER TO 132 COLUMN MODE
? CHR(27)+CHR(91)+CHR(52)+CHR(119)
SET PRINT OFF
@ 05,00 CLEAR '
SET COLOR TO +*I
@ 10,23 SAY ' PRINTING REPORT...DO NOT INTERRUPT '
STORE 10 TO LINE
STORE .T. TO TOP
DO WHILE .NOT. EOF()
SET CONSOLE OFF
SET DEVICE TO PRINT
IF TOP
@ 03,052 SAY 'DECUS - '+SDATE+' TO '+EDATE
@ 04,040 SAY '&TITLE'
@ 06,000 SAY REPLICATE("-",130)
@ 07,001 SAY 'DECUS'
@ 07,079 SAY 'QTY'
@ 07,088 SAY 'GROSS'
@ 07,111 SAY 'NET'
@ 08,001 SAY 'CODE'
@ 08,010 SAY 'DEC PART #'
@ 08,035 SAY 'ITEM DESCRIPTION'
@ 08,060 SAY 'MLP'
@ 08,079 SAY 'SOLD'
@ 08,089 SAY 'MLP'
@ 08,099 SAY 'ALLOW'
@ 08,109 SAY 'REVENUE'
@ 09,000 SAY REPLICATE("=",130)
ENDIF
STORE .F. TO TOP
IF ANS = '3'
STORE CATQTY TO QTYSLD
STORE CATNET TO NET
ENDIF
IF ANS = '4'
STORE CATEQTY TO QTYSLD
STORE CATENET TO NET
ENDIF
IF ANS = '5'
STORE CCTQTY TO QTYSLD
STORE CCTNET TO NET
ENDIF
IF ANS = '6'
STORE CCTEQTY TO QTYSLD
STORE CCTENET TO NET
ENDIF
IF ANS = '7'
STORE POTQTY TO QTYSLD
STORE POTNET TO NET
ENDIF
IF ANS = '8'
STORE POTEQTY TO QTYSLD
STORE POTENET TO NET
ENDIF
SET DEVICE TO SCREEN
SET COLOR TO +I
@ 20,25 SAY ' WORKING ON PRODUCT CODE... '+PROCOD
SET COLOR TO
SET DEVICE TO PRINT
IF QTYSLD = 0 .AND. NET = 0
SKIP
ELSE
@ LINE,002 SAY PROCOD
@ LINE,010 SAY PARTNO
@ LINE,024 SAY DESCRI
@ LINE,056 SAY MLP PICTURE '#####.##'
@ LINE,078 SAY QTYSLD PICTURE '###'
@ LINE,085 SAY MLP*QTYSLD PICTURE '#####.##'
@ LINE,097 SAY (MLP*QTYSLD)-NET PICTURE '#####.##'
@ LINE,109 SAY NET PICTURE '#####.##'
STORE TOTQTY + QTYSLD TO TOTQTY
STORE TOTGROSS+(MLP*QTYSLD) TO TOTGROSS
STORE TOTALLOW+(MLP*QTYSLD)-NET TO TOTALLOW
STORE TOTNET + NET TO TOTNET
STORE LINE+1 TO LINE
SKIP 1
ENDIF
IF EOF()
@ LINE+1,000 SAY REPLICATE("=",130)
@ LINE+2,000 SAY '*** GRAND TOTALS ***'
@ LINE+2,077 SAY TOTQTY PICTURE '####'
@ LINE+2,084 SAY TOTGROSS PICTURE '######.##'
@ LINE+2,097 SAY TOTALLOW PICTURE '#####.##'
@ LINE+2,108 SAY TOTNET PICTURE '######.##'
USE
SET DEVICE TO SCREEN
SET CONSOLE ON
CLEAR
RETURN
ENDIF
IF LINE > 61
STORE 10 TO LINE
? ' '
? ' '
? ' '
STORE .T. TO TOP
LOOP
ENDIF
ENDDO
SET CONSOLE ON
CLEAR
USE
RETURN