views:

8

answers:

1

My question is about generating invoices and receipts. The said bills use rates, names and values from a database. If the sources for generating the receipt stay unchanged, one can generate the same receipt dynamically each time. However, since names, rates and values may be changed or removed, the receipt also changes with time, i.e dyamically created receipts can only be good for the first time. After creation the receipts, are then stored, currently as PDFs. And the relative path to the pdf stored in a DB table. In this way, one can be reasonably sure about the validity of the receipt. Is this the best way to go about it. Or should I save data in a db or xml or some other format. How do you people do it?

+1  A: 

You could store the PDF in the database in a BLOB column, if that helps. Your way seems good enough to me, unless the number of files is growing unmanageably large.

Brian Hooper
Managing the pdf files in addition to the db was standing out as a future problem to me, the pdf is around 5kb so yes blob could be the way to go. Then I will only have a db to manage. Posted the question, because I wanted to know what method did programmers use to manage and save financial data.
abel