I need to make receipts for people every month so I wanted to have an easy way to generate them, print them and only keep an electronic copy.

I thought about using something like the PDF format, but I really wanted something even more accessible like plain text. The only problem for me with plain text is that I wanted it to look a little more professional so I decided HTML was a good compromise of accessible and well formatted.

Basically the script just allows me to give a name, date and amount paid and it generates a receipt with a balance due. Each person who receives receipts has their own directory. In that directory are two simple text files named address and rent_amount. In the same directory as the script there is a file called Default_Receipt.html. This file is the body of the receipt with special tags for each of the variable fields. The special tags look like this

	$AMOUNT_DUE
	$AMOUNT_PAID
	$AMOUNT_PAST_DUE
The script reads the variables from the address and rent_amount files in the given person's directory, does any needed calculations, replaces the special tags with the correct information and saves a dated receipt in that person's directory. Now I can just print a copy and mail it to the person and I'll have a digital copy that I can reprint any time I need to.

This is a very simple example of this type of mechanism and I'm sure there are tons of ways/programs to do this, but it's pretty nice to have complete control of your process/formats and to have a very simple script to maintain. Looking at the script source, you can easily see how to extend this to suit your needs. If anyone extends or improves upon this script, please send me a copy so that I can share it with everyone else.