home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG102.ARC
/
PRICE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
1KB
|
63 lines
*PRICE.PRG
*PRICELIST GENERATOR
ERASE
SET TALK OFF
RELEASE ALL
RESTORE FROM A:NAME
STORE ' ' TO DEC
STORE 0 TO DIS
@ 2,0 SAY 'PRICE LIST TO PRINT (P) DISK FOR EDIT (D) OR SCREEN' GET;
DEC PICT'!'
@ 3,0 SAY 'WHAT IS THE RATE OF DISCOUNT FOR THE PRICELIST' GET DIS PICT '99'
READ
USE PRICELIS INDEX PRICECOD
DO CASE
CASE DEC='P'
SET PRINT ON
CASE DEC='D'
STORE 'PRICE'+ STR(DIS,2) TO FILENAME
SET ALTERNATE TO &FILENAME
SET ALTER ON
ENDCASE
IF DIS =50 .OR. DIS=45
STORE 'WHOLESALE' TO TYPE
ENDIF
IF DIS =40 .OR. DIS = 35
STORE 'TRADE' TO TYPE
ENDIF
IF DIS =30 .OR. DIS=25
STORE 'AGENT' TO TYPE
ENDIF
IF DIS <25 .AND. DIS <>50 .AND. DIS <>45 .AND. DIS<>40 .AND. DIS <>35 .AND.;
DIS <>25
STORE 'RETAIL' TO TYPE
ENDIF
STORE ((100-DIS)/50) TO FACTOR
SET HEADING TO TRIM(&LINE1) &TYPE PRICELIST
REPORT FORM RPRICE FOR ITEM <> ' ' .AND. COST <>0
EJECT
SET PRINT OFF
RETURN