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
/
RFCREDIT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
2KB
|
86 lines
*RFCREDIT.PRG
* RETURN FOR CREDIT PROGRAM
*THIS PROGRAM GENERATES DATA FOR TWO FILES .DBF ,THE FIRST IS DATA FOR THE
*LEDGERS THE SECOND IS A RECORD OF THE RETURN IN IT'S OWN FILE RFC.DBF
ERASE
USE
SELE PRIM
USE
SELE SECO
USE
STORE ' ' TO DEC
REMARK********************INITIALIZE THE VARIABLES
RESTORE FROM A:CREDIT
STORE CREDIT:NUM +1 TO CREDIT:NUM
************************FIND CUSTOMER ROUTINE******
ERASE
DO WHILE T
USE NAMELIST INDEX NAME
STORE ' ' TO CUST
@ 1,0 SAY 'NAME OF CUSTOMER TO CREDIT ZERO (0) TO QUIT' GET CUST;
PICT '!!!!!!!!!!!!!!!'
READ
IF CUST='0'
SAVE TO A:CREDIT ALL LIKE CREDIT:NUM
RETURN
ENDIF
STORE TRIM(CUST) TO CUST
FIND &CUST
IF #=0
?? CHR(07)
@ 2,0 SAY 'NOT FOUND'
LOOP
ENDIF
STORE ACCNUM TO ACCNUMA
STORE NAME TO NAMEA
STORE ' ' TO DEC
? NAME,ACCNUM
@ 5,0 SAY 'IS THIS CORRECT, IF NOT PRESS "N"' GET DEC PICT'!'
READ
IF DEC='N'
LOOP
ENDIF
ERASE
@ 1,0 SAY 'NAME'
@ 1,40 GET NAMEA
@ 2,0 SAY 'ACCOUNT NUMBER'
@ 2,40 GET ACCNUMA
STORE ' ' TO REASON
STORE 0 TO QTY:RFC
STORE ' ' TO CHECK
@ 13,0 SAY 'WHAT IS THE REASON FOR THE RETURN' GET REASON PICT'!!!!!!!!;
!!!!!!!!!!!!!!!!!!!!!!!!!'
READ
USE RFC
APPEND BLANK
ERASE
STORE .00 TO VALU:RFC
STORE .00 TO TAXA
STORE .00 TO S:TAXA
@ 2,0 SAY 'ACTUAL AMOUNT TO BE CREDITED ' GET VALU:RFC
@ 3,0 SAY 'AMOUNT OF CREDIT SALES TAXABLE ' GET TAXA
@ 4,0 SAY 'AMOUNT OF TAX INCLUDED ' GET S:TAXA
@ 5,0 SAY 'CREDIT NUMBER ' GET CREDIT:NUM
READ
REMARK ********************WRITING TO LEDGER
STORE VALU:RFC TO VALU:REC
STORE TAXA TO SALESTAX
REPLACE TAXABLE WITH TAXA
REPLACE S:TAX WITH S:TAXA
REPLACE ACCNUM WITH ACCNUMA,DATE:RFC WITH DATE();
,REASON:RFC WITH REASON,CRED:NUMB WITH CREDIT:NUM,
REMARK ************************WRITING TO CREDIT FILE
USE LEDGER
APPEND BLANK
REPLACE ACCNUM WITH ACCNUMA,NUM WITH CREDIT:NUM,CREDIT WITH VALU:REC,;
TYPE:TRAN WITH 'RFC',DATE WITH DATE()
ERASE
USE
ENDDO
@ 14,0
@ 16,0
@ 17,0
@ 18,0
@