Thanks, actully I came across a website named fetchflow.com. They are also providing a very nice tool for invoice system. It is linked to paypal and generate invoice in many format. Many more features..
Was considering recommending freshbooks also, but got the impression the OP was looking for an in house script. If something like that works, I highly recommend them (Freshbooks). I switched from quickbooks to Freshbooks for my "real" business (small - medium business networking, service, sales, etc). Works great, have it integrated with authorize.net, it does automatic late notices, all my monthy billing is now automated (web hosting, service agreements, etc). Has saved me many hours of work each month.