Foxpro Programs

Simple Ledger creation & Posting Program

Submitted by Karthikeyan on

clear
clea all
set talk off
use jour1
store space(15) to acname
store 0 to r,p, ds, cs, br, bl, mamt
@10,10 say "Account Name" get acname
read
clear
set devi to scre
set print on
set print to ledger.out
@2,2 say replicate("-",75)
@3,3 say "Date"
@3,13 say "Particulars"
@3,28 say "Amount"
@3,41 say "Date"
@3,52 say "Particulars"
@3,67 say "Amount"
@4,2 say replicate("-",75)
@5,28 say [Ledger for ] + alltrim(acname)
@6,28 say "-------------------"
r = 7
p = 7
do while .not. eof()
scan for upper(part1) = upper(alltrim(acname))
@r,2 say date
@r,11 say "To " + part2

Simple Journal Entry program

Submitted by Karthikeyan on

CLEA
clea all
set talk off
use jour1
reply = "y"
GO BOTTOM
	DO WHILE UPPER(REPLY) = "Y"
	STORE 0 TO CRE, DEB
	STORE SPACE(10) TO P1, P2
	STORE SPACE(15) TO NR
	STORE CTOD("  / /  ") TO DATE1
	@4,10 SAY [DATE :] GET DATE1
	@6,10 SAY [PARTICULAR1 :] GET P1
	@6,45 SAY [DEBIT :] GET DEB
	@8,10 SAY [PARTICULAR2 :] GET P2
	@8,45 SAY [CREDIT :] GET CRE
	@12,10 SAY [NARRATION :] GET NR
	READ
	APPEND BLANK
	@18,10 SAY [DO U CONTINUE(Y/N)?] GET REPLY
	READ
	REPL DATE WITH DATE1
	REPL PART1 WITH P1
	REPL PART2 WITH P2
	REPL NAR WITH NR
	REPL DEBIT WITH DEB
	REPL CREDIT WIT