COMCAL v 1.0 Source Code (QBASIC)
Commission Calculator for Salespeople
written by Matt Gilbert © 1999


10 REM do not remove this line
CLEAR
SCREEN 0
COLOR 0, 15
CLS
PRINT "                       COMMISSION CALCULATOR version 1.0"
PRINT "                            (c) 1999 Matt Gilbert"
INPUT " enter commission percentage"; pct
PRINT
DO UNTIL fin$ = "n"
n = n + 1
PRINT
INPUT "enter customer name or job description"; Job$(n)
INPUT "enter sale amount"; gsl(n)
INPUT "enter another commission y / n"; fin$
LOOP
CLS
PRINT "                       COMMISSION CALCULATOR version 1.0"
PRINT "                            (c) 1999 Matt Gilbert"
PRINT
PRINT "you entered the following ";
COLOR 16, 15
PRINT n;
COLOR 0, 15
PRINT " sales at "; pct; " % commission"
PRINT
PRINT "No.   Job Description         Gross Sale          Commission Amt"
PRINT
nf = n
n = 0
FOR x = 1 TO nf
n = n + 1

PRINT n; "  "; USING " \                  \ "; Job$(n);
PRINT "   "; USING "$####.##"; gsl(n);
PRINT "           "; USING "$####.##"; gsl(n) * (pct / 100)




NEXT x
PRINT
REM next section calculates the totals

nf = n
n = 0
FOR x = 1 TO nf
n = n + 1
ctl = ctl + gsl(n)
NEXT x
REM PRINT ctl
PRINT
PRINT "____________________________________________________________________"
PRINT
PRINT "TOTALS                        "; USING "$####.##"; ctl;
PRINT "           "; USING "$####.##"; ctl * (pct / 100)
PRINT
PRINT

PRINT "Do you wish to print results y / n"
DO UNTIL a$ <> ""
a$ = INKEY$
IF a$ = "n" THEN GOTO 600
IF a$ = "y" THEN GOTO 500
LOOP
STOP
500 REM do not remove this line
REM THIS SECTION FOR PRINT OUT ******************************

LPRINT "                       COMMISSION CALCULATOR version 1.0"
LPRINT "                            (c) 1999 Matt Gilbert"
LPRINT
LPRINT "you entered the following ";
REM COLOR 16, 15
LPRINT n;
REM COLOR 0, 15
LPRINT " sales at "; pct; " % commission"
LPRINT
LPRINT "No.   Job Description         Gross Sale          Commission Amt"
LPRINT
nf = n
n = 0
FOR x = 1 TO nf
n = n + 1

LPRINT n; "  "; USING " \                  \ "; Job$(n);
LPRINT "   "; USING "$####.##"; gsl(n);
LPRINT "           "; USING "$####.##"; gsl(n) * (pct / 100)

NEXT x
PRINT
REM next section calculates the totals
ctl = 0
nf = n
n = 0
FOR x = 1 TO nf
n = n + 1
ctl = ctl + gsl(n)
NEXT x
REM PRINT ctl
LPRINT
LPRINT "____________________________________________________________________"
LPRINT
LPRINT "TOTALS                        "; USING "$####.##"; ctl;
LPRINT "           "; USING "$####.##"; ctl * (pct / 100)
LPRINT
LPRINT



REM STOP
600 REM do not remove this line
PRINT "Do you wish to calculate more sales? y / n"
DO
a$ = INKEY$
IF a$ = "y" THEN GOTO 10
IF a$ = "n" THEN GOTO 1000
LOOP UNTIL a$ <> ""


1000 REM THIS IS THE CLOSING CREDITS
COLOR 3, 0
CLS
PRINT "S A L E S   C O M M I S S I O N   C A L C U L A T O R  V 1.00"
PRINT "THIS PROGRAM COPYRIGHT 1999 by Matt Gilbert"
PRINT "feel free to use this program as you see fit"
PRINT "please let me know of any improvements you make"
PRINT "if you find this program useful"
PRINT "donations are graciously accepted"
PRINT "comments,critique, and suggestions always welcome!"
PRINT
PRINT "Matt Gilbert"
PRINT "5822 Cartagena"
PRINT "Houston, TX 77035 U.S.A."
PRINT
PRINT
COLOR 15, 0
PRINT "visit me on the web at"
PRINT "www.mattgilbert.iscool.net"
PRINT "email address telemarketer@juno.com"
SLEEP 4
COLOR 14, 0
END







H O M E   |   DOWNLOADS