Archive for May 30, 2016

Giving away Raptor Invoice, with source

May 30, 2016 2 comments

Like most developers I have a ton of projects. Some are not used, others are sold and yet more are in the making.

In the spirit of teaching Delphi I am now giving away one of my best products of all time, Torro Invoice (also sold as Raptor Invoice in Norway) for free. With source. It is a 100% fully working, fast and well organized invoicing system!


Raptor is perfect for small to medium sized companies that ship less than 20.000 invoices a year. This was first coded 14 years ago, but it has been updated as laws and tax regulations have changed

Just not enough time

Raptor, as it was initially named, was created around 14 years ago. It is not poorly written side project – but a commercial class invoicing system. I sold around 2000 copies of this and there are quite a few using it around the contry.

I have also updated the program over the years, especially with new tax laws (Norwegian), but like most invoicing systems – the math is universal. So it doesnt matter if you are living in India or France, calculating taxes, overdue fees and inkasso percentages are pretty much identical world-wide.


Creating new databases is easy, and you can copy over customers etc. to the new DB from an existing database – including the running id-numbers

I am giving it away because I quite frankly dont have the time to tinker with it anymore. So instead of this great program that I have used myself (and continue to use) should just collect dust – or suffer poor customer support… well, It’s now in the hands of the Object Pascal community!

Norwegian to English

Since it’s a Norwegian product all text is in Norwegian. But it’s really simple stuff and anyone should be able to port it over to English in 2-3 work days with little more than google translate.

To get you started, here are a few “key” words:

  • Faktura = Invoice
  • Fakturer = Finalize invoice, once finalized you are not allowed to edit the invoice. You can copy it or create a credit-note. This is standard accounting laws everywhere I think.
  • Skriv ut faktura = Print invoice (skriv = write, ut = out).
    Note: Remember to check-off the print option when you finalize an invoice, or it will print X copies for you (defaults to 3 copies. One for the customer, one for accounting and one for archive).
  • Mva = Vat (Ex mva = before vat, Ink mva = with vat)
  • Leverandør = Supplier
  • Produkt = Product (mhm).
  • Faktura register = invoice database
    In Raptor you can create as many registers (databases) as you want. When you create a new register you can also choose to copy over customers, suppliers, products and the invoice-id. This happens automatically when the year is over (you are informed in january if you try to use the register from last december).
  • Åpne = Open
  • Lukk = Close
  • Kreditnota = Credit note (also called “credit memorandum”):
    A “credit note must be created to adjust for a wrong invoice already in the ledger. It is also used on product returns or if a customer has payed to much”. To simplify: It creates an invoice in minus to make up for an invoice in plus. When you create a credit note, it is directly connected to the initial invoice.
    In most contries you print 3 duplicates of both invoice and memorandums, one for the customer, one for accounting, and one for the IRS (or similar institution).
  • Kunde gruppe = Customer group. Organize your customers and give good customers a fixed “percent-off”
  • Purre gebyr = reminder fee, if you keep having to re-send a bill to a customer that doesnt pay, you are allowed to add a fee for each payment (regulated, so the percentage you should use here depends on where you live).
    After 2 reminders of payment due, you are allowed send an inkasso warning.
  • Inkasso varsel = Inkasso warning
    After having sent 2 or 3 payment due notices, you can start sending inkasso warnings. This has higher percentages connected to it (again, check with your accountant what the norm is where you live).In Norway companies usually operate with 2 strikes, and if the bill remains unpaied, you typically send the whole case to an inkasso company (payment collector) that buys the debt from you.
  • Inn pris = In price (what you pay for the product)
  • Ut pris = Selling price
  • Avanse = Sales factor, how much you sell the product for (typically x2 or x3 the price you pay your supplier). This is variable and can be overriden.
  • Journal = Ledger
  • Antall = Quanta (number of items)
    Post nummer = Zip code
  • Telefon = Phone number
  • Rediger = edit

Auto zipcode to location name function

One thing you probably want to change straight away is that Raptor has a DB table with all the zipcodes and location names in Norway. So when you fill out an invoice and populate the zip-code, it will do a lookup in the zipcode table and fill out the shire (location) name.

The database engine

Fast, binary, pure object pascal

Fast, binary, pure object pascal

Back when I wrote this there existed a nice little DB engine called Volga. Super simple yet powerful. It cost like $15 or something like that. It has SQL support but for this project I quite frankly didnt need it. Either way, the Volga DB engine was released as public-domain a few years later. If you look in the “Volga Stuff” folder you will find both the delphi source and DB editor for that old DB engine.

So you probably want to install that, or at least copy over the table structure to another database. Although you really dont have to. Volga is written in vanilla object pascal, requires almost no memory and Raptor doesnt use SQL (!) Its all primary keys, Delphi’s filter functions and inter-linked tables.

This should make porting it very easy. Also, all access to the data in the source-code goes through objects. You create a datastore, open it with a folder location, and all the calculation etc. takes place in that datastore object (which is a datamodule).


There are two commercial dependencies that I naturally cant deliver (and wont). I urge you to buy Raized components for pure Windows desktop applications. Its an awesome component set.

  • Developer Express DB grid version 1.2 (best they ever made, before all the super duper thousands of options grids)
  • Raize Components (one of the best component packages of all time)

Since the DB grid relies heavily on that extra comments field, you may want to just use VirtualListView and code a flat one. Im not sure the latest DevEx grid can be made to look like this old and lightweight ancestor.

Use the source luke

Well, hope you like this product. It has served me well for over a decade, works great, is fast and very easy to use. The code should be tidy enough for everyone to read and play with.

Copyright etc.

I release it “as is” with what I consider to be flexible: The Apache 2.0 license. I dont expect you to pay me a dime, nor are you obligated to stick to the framework. You are however obligated to not miss-represent the origin of the software.

LibJL and SysEssentials codebase

LibJL was my own personal “tools” library ages ago, and before that I also had Sysessentials. There are a few gold nuggets in LibJL, like the DIB graphics code, the image editor, the thumbnail viewer and so on.

Again, take what you wish and polish it as needed.

The GIF codec is pretty sweet!.You also have color reduction code in there and palette management. Quite rare these days but important non-the-less.

Well, thats pretty much it — enjoy!

Visit Github Here: