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
/
SUMMARY.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
4KB
|
143 lines
*SUMMARY.PRG
ERASE
store ' ' to invert
ERASE
@ 12,0 SAY '*********************CALCULATING***************************'
USE LEDGER
STORE 'LEDGER' TO DATABASE
DO WHILE T
STORE DATE TO REMARK
SUM ALL DEBIT TO TOTAL
IF TOTAL=0 .OR. DATABASE='LEDARCH'
RELEASE ALL
USE LEDARCH
SUM ALL DEBIT TO TOTAL
STORE 'LEDARCH' TO DATABASE
GO TOP
STORE DATE TO REMARK
ENDIF
GO BOTTOM
STORE DATE TO LASTDATE
SUM ALL CREDIT TO TOT FOR TYPE:TRAN='REC'
SUM ALL CREDIT TO CASH FOR ACCNUM='C/S'
SUM ALL DEBIT TO CASHSALE FOR ACCNUM='C/S'
IF DATABASE='LEDARCH'
STORE VAL($(REMARK,4,2))-1 TO M
STORE VAL($(LASTDATE,4,2)) TO M1
IF M1<M
STORE M+M1 TO PERIOD
ELSE
STORE M1-M TO PERIOD
ENDIF
IF period=0
STORE 12 TO PERIOD
ENDIF
ENDIF
ERASE
@ 9,0 SAY '*******************************************************************;
**********'
@ 11,0 SAY 'ENTRIES FROM THE 'GET REMARK
@ 12,0 SAY 'TOTAL DEBITS 'GET TOTAL
IF DATABASE='LEDARCH'
@ 11,50 SAY 'MONTHLY AVERAGES'
@ 12,50 SAY 'AVERAGE TRADING'
@ 12,65 SAY TOTAL/PERIOD
ENDIF
@ 13,0 SAY 'TOTAL CASH SALES ENTERED' GET CASHSALE
IF DATABASE='LEDARCH'
@ 13,50 SAY 'AVERAGE'
@ 13,65 SAY CASHSALE/PERIOD
ENDIF
@ 14,0 SAY 'TOTAL CREDITS TO DATE' GET TOT
IF DATABASE='LEDARCH'
@ 14,50 SAY 'AVERAGE'
@ 14,65 SAY TOT/PERIOD
ENDIF
@ 15,0 SAY 'TOTAL CREDIT DUE TO CASH SALES ' GET CASH
IF DATABASE='LEDARCH'
@ 15,50 SAY 'AVERAGE'
@ 15,65 SAY CASH/PERIOD
@ 17,0 SAY 'FORECASTED YEARLY SALES BASED ON AVERAGE'
@ 17,50 SAY (TOTAL/PERIOD)*12
@ 18,0 SAY 'FORECASTED YEARLY RECEIPTS BASED ON AVERAGE'
@ 18,50 SAY (TOT/PERIOD)*12
@ 19,0 SAY 'FORECASTED YEARLY CASH SALES AT WHOLESALE VALUE'
@ 19,50 SAY (CASHSALE/PERIOD)*12
@ 20,0 SAY 'FORECASTED RECEIPTS DUE TO CASH SALES BASED ON AVERAGE'
@ 20,50 SAY (CASH/PERIOD)*12
ENDIF
@ 21,0 SAY '****************************************************************;
************'
? 'PRESS ANY KEY TO CONTINUE'
WAIT
ERASE
STORE ' ' TO DEC
if database= 'LEDARCH'
@ 1,0 SAY 'IF A PRINTED COPY OF THE ABOVE REPORT IS REQUIRED PRESS "P"'
@ 2,0 SAY 'ELSE ANY OTHER KEY TO RETURN TO MENU' GET DEC
READ
ENDIF
IF DEC='P' .OR. DEC='p' .AND. DATABASE ='LEDARCH'
SET FORMAT TO PRINT
SET PRINT ON
@ 5,0 say '****************************************************************;
**********'
@ 6,0 SAY 'DATE OF REPORT'
STORE DATE() TO D
@ 6,35 SAY D
@ 11,0 SAY'ENTRIES FROM THE '
@ 11,20 SAY REMARK
IF DATABASE='LEDARCH'
@ 11,50 SAY 'MONTHLY AVERAGES'
@ 12,0 SAY 'TOTAL DEBITS '
@ 12,35 SAY TOTAL
@ 12,50 SAY 'AVERAGE TRADING'
@ 12,65 SAY TOTAL/PERIOD
ENDIF
@ 13,0 SAY 'TOTAL CASH SALES ENTERED'
@ 13,35 SAY CASHSALE
IF DATABASE='LEDARCH'
@ 13,50 SAY 'AVERAGE'
@ 13,65 SAY CASHSALE/PERIOD
ENDIF
@ 14,0 SAY 'TOTAL CREDITS TO DATE'
@ 14,35 SAY TOT
IF DATABASE='LEDARCH'
@ 14,50 SAY 'AVERAGE'
@ 14,65 SAY TOT/PERIOD
ENDIF
@ 15,0 SAY 'TOTAL CREDIT DUE TO CASH SALES '
@ 15,35 SAY CASH
IF DATABASE='LEDARCH'
@ 15,50 SAY 'AVERAGE'
@ 15,65 SAY CASH/PERIOD
@ 17,0 SAY 'FORECASTED YEARLY SALES BASED ON AVERAGE'
@ 17,50 SAY (TOTAL/PERIOD)*12
@ 18,0 SAY 'FORECASTED YEARLY RECEIPTS BASED ON AVERAGE'
@ 18,50 SAY (TOT/PERIOD)*12
@ 19,0 SAY 'FORECASTED YEARLY CASH SALES AT WHOLESALE VALUE'
@ 19,50 SAY (CASHSALE/PERIOD)*12
@ 20,0 SAY 'FORECASTED RECEIPTS DUE TO CASH SALES '
@ 20,50 SAY (CASH/PERIOD)*12
ENDIF
@ 21,0 SAY '****************************************************************;
************'
@ 22,0 SAY ' '
SET FORMAT TO SCREEN
endif
set print off
ERASE
ERASE
@ 12,0 SAY'***************************RECALCULATING************************'
RELEASE ALL EXCEPT DATABASE
IF DATABASE='LEDARCH'
RETURN
ENDIF
STORE 'LEDARCH' TO DATABASE
WAIT
LOOP
RETURN
ENDDO
RETURN