Using SQL-Ledger for Your Business

May 1st, 2004 by David A. Bandel in

If you're keeping a proprietary OS around just to run the accounting software, you're missing a chance to step up to the flexible, better-supported alternative.
Your rating: None Average: 4.8 (4 votes)

Back in the late 1990s, I started looking for a good accounting software package for Linux. I was disappointed by all the offerings I found; none was up to snuff or even looked like it might ever be. Then, about three and a half years ago, I stumbled on SQL-Ledger (SL) written by Dieter Simader (see the “Making Open Source Work” sidebar).

To be honest, at first glance I thought SQL-Ledger wasn't yet an offering for a serious business. It lacked point of sale (POS), payroll and a number of other features. But, based on its ease of installation, its flexibility and a number of other factors, not the least of which was the author's rather ambitious to-do list, I tried it out.

I used SQL-Ledger for my IT consulting business, Pananix, SA, and it proved to be more than adequate. I could input customers and vendors, create invoices and orders, and print basic reports, including trial balance, income statement and balance sheet. SL even had rudimentary support for goods and services reports covering product inventory and services.

Because I currently live in a Spanish-speaking country, I anticipated problems. I'm not familiar with Spanish accounting terms, but the laws of this country require that the program interface and all statements and reports be in Spanish for the natives and tax auditors. Fortunately, SL is written in such a way that users can choose the language they require. That means I can see everything in English, while my accountant and the local tax authorities see Spanish—perfectly legal. If a language doesn't exist, it can be added easily. This feature was not well supported in any other accounting package I looked at and was a major factor for me in choosing SL.

Installation

Installation was a breeze back when I first looked at SL, but it's even easier now. The biggest stumbling block for most people involves the few requisite Perl modules for database support. A second stumbling block comes with the configuration of PostgreSQL itself, but all these are covered in the instructions and FAQ. As long as they are followed to the letter, even newbies shouldn't have any difficulty. The problems seem to arise when folks wander off on their own and deliberately or accidentally make changes affecting permissions, occasionally permissions on the database itself.

Once Perl and whatever supported database you want to use are set up, the rest is easy. MySQL is not supported and will be only when it provides certain parts of the SQL-92 standard it is now missing. PostgreSQL is the database used for design and testing, but Oracle and DB2 also work.

You also need to configure your Web server of choice to access SL, but that involves only copying a few lines to httpd.conf and restarting it. If you install SL under your DocumentRoot, even this step can be omitted, as long as you can run CGI scripts from below your DocumentRoot. If you want to print reports to disk as PDF files, you need to make sure you have LaTeX installed.

The currently recommended installation practice for SL itself is to use the author's supplied setup.pl file to handle everything for you. This makes it difficult to go wrong, and the script also is used to upgrade SL. The author recently included code to test the database itself during upgrades to ensure you don't have version mismatches between the database and the code. If you do, it automatically upgrades it (nice touch, that).

Configuration and Security

Those of you who follow my writings know that I consider security to be job number one. Accountants out there should be pleased to know that security in SL can be implemented on a user-by-user basis. Therefore, one user can see only Accounts Payable while another can see only Accounts Receivable.

SL also can be configured to comply with generally accepted accounting principles (GAAP). Most countries have their own version of GAAP, but these practices are similar. You therefore can configure SL so users can't go back and delete transactions but must post reversing entries instead. You also can close periods so nothing can be edited in prior periods.

All this is accomplished in the administration section where you add users and basically tell the system how you want it to act. After that, it's up to you. The FAQ contains information to assist you in tightening security on your system. Basically, you decide how secure or open your system will be.

Running SQL-Ledger

SL is easy to use and fairly simple to customize in any way you need. Everything in SL revolves around its Chart of Accounts. When you set up SL, you choose one to load. But making changes to that one or even creating a new one is not difficult. In fact, many businesses probably will want to sit down and make some modifications.

The way SL's tax system is set up, almost any tax system can be configured easily, simply by linking from one table to another using the tax percentage. The ease with which this can be done makes it ideal for locations where the tax structure might require two or three separate taxes be applied to a sale. The Default Chart of Accounts is set up with three tax accounts just to show how it is done. Tax tables contain multiple links to customers, vendors, parts and services, and a match determines whether tax is applied or not. AR and AP are independent from one another, and in combination with tax settings for customers, vendors' parts and service, you have a very flexible model to calculate tax. You even can set up negative taxes to calculate tax withholdings at source or tax on tax. The tax system here requires that I charge taxes on services tied to the sale of a taxable item; otherwise, I don't charge tax on purely a service offering. So I had to create a service call that was nontaxable and one that was taxable.

So that customers don't notice that I sometimes charge tax on a service but other times I don't, and because the taxable service always was tied to a hardware sale, I simply created an installation package that included the hardware and taxable service with the entire bundle being taxed. I haven't seen a single other accounting package for Linux that offers me this kind of flexibility.

SL can be accessed from any system with a Web browser, text or graphical, from anywhere you can reach the SL server by HTTP or HTTPS. If, like most people, you're using a graphical browser, after login you see two frames. The one on the left contains a menu broken down into several sections with items below them, and the one on the right contains a main screen where you can enter data.

One of the first things I do after each upgrade is cd into the bin/mozilla directory and edit menu.pl to widen the menubar. For me, it's a little too narrow, and making it about 35 pixels wider makes it more pleasing to my eyes. For those of you who use a text browser, like Lynx, that doesn't render frames, the menu headings are at the bottom of the page.

The major headings that show up depend on the user's configuration from the admin page. Entire menu headings can be removed or only specific items. So any given user's menubar may look a bit sparser than that shown in the screen captures, depending on setup and version in use. The screenshot in Figure 1 clearly shows this is Version 2.3.1, a development version. It is slightly more feature-rich than the stable version, but its designation as unstable warns you it hasn't been as thoroughly tested as the stable version. Major menu headings include AR, POS, AP, Cash, HR, Order Entry, Shipping, Quotations, General Ledger, Goods & Services, Projects and Reports.

Figure 1. SQL-Ledger Start Page

You also can see some menu items followed by ellipses. Those bring up even more detailed submenu items. In the case of System..., a long list is brought up in later versions.

Taking a quick look at AR Reports, selecting Reports expands the menu list. Then selecting Transactions provides a screen to define the transactions we want to see and the information we want presented; see Figure 2.

Figure 2. AR Transactions Query Screen

Notice the Customer window at the top of the browser window in Figure 2. In a number of screens, this can be either a drop-down list or a pick list in a separate window. Better yet, this presentation is configurable by each user. So users who like drop-down lists and don't mind that the list scrolls 16 pages off the bottom of the screen can put a large number in their pick-list preference. Those that want a smaller, more sane list, can get a drop-down list unless the number of available items for the drop-down list exceeds the limit. Then, they simply can put in a few letters of the name for which they're searching, refresh the screen and get a small pick list, as shown in Figure 3. This particular pick list came up from an invoice screen after entering maint in the part number window and selecting Update.

Figure 3. Sample Pick-List Screen

For those of you interested in playing with SL without going to the trouble of setting it up, I suggest you head over to www.sql-ledger.com. A few demo systems are available, so folks can try before they install the software.

Using SQL-Ledger in Your Business

I'm not an accountant, and I barely get by with my accounting duties as it is. As with most powerful accounting software, you should know something about it before using it. But if it's an accounting question, I probably don't have the answer.

Fortunately, except for the few times I may have to wade into general ledger, the system takes care of itself. I've found the customer list to be quite friendly. It serves as both a customer list and a way to keep e-mail addresses straight. I e-mail monthly bills, and this program has made that particularly easy. In fact, after posting, you can call up a bill and e-mail it with a single click. The program handles it all for you, including sending a cover letter.

Purchase orders are as easy to do, and they also can be e-mailed directly from the interface. When orders come in it's a few more clicks to enter inventory and create the payable. A quick trip to Cash→Payments and we're done.

If you have several businesses, you can run as many ledgers as you want using different database names. You also have to use different user names, one for each, but I've found the easy way to do this is to make the user name a combined user/company name. You may think of something more convenient.

Now that the latest SL includes POS, you can connect a bar-code reader and use that to enter items on the screen. SL was designed deliberately with the UPDATE button first, so scanning a bar code fills in a product number then updates that to fill in the rest of the line.

Coming Attractions?

SL is now fairly feature-rich these days, especially compared to several years ago, but the author maintains an ambitious to-do list. By the time you read this, in fact, SL even may contain payroll. Most of the tables and links are in place; it appears to be a matter of coding and testing. I fully expect a payroll system to rival any available, based on what's come before in SL.

The SL to-do list includes such items as:

  • Budgets: comparisons to actual ones and also to enforce budget (expense) constraints.

  • Manufacturing: finished goods and goods-in-process inventory; material and human resources planning.

  • Lot allocation: repackaging bulk goods into smaller portions; memorized transactions and custom reports.

  • Batch form generation: invoices, orders and other forms for batch printing.

  • Financial reports: more comparison options, such as month-to-month.

Those interested can take a look at SL's What's Ahead page.

Support

SL offers a range of support for the software. From the SL home page you can find several users lists in a variety of languages. Currently six user lists exist. The author lurks on the English list. He occasionally posts to clear up misunderstandings.

Paid support also is available at extremely reasonable rates. A wide variety of support options are available, and most come with a copy of the SQL-Ledger users manual. If you want to use this software without support, that's fine. But as with all GPL software, if you break it, you get to keep both pieces. Paid support is your assurance it doesn't break. A support option is available to import old data from accounting packages that can export tab-delimited text files.

Conclusion

Although changing accounting packages always is an ordeal, SL is one package worth investigating. The price can't be beat, and this software competes against and beats many proprietary offerings. And if you don't see it but need it, you always can request a feature.

David A. Bandel (david@pananix.com) is a Linux/UNIX/Network (both wired and wireless) consultant in Panama who dabbles in almost all aspects of telecommunications. He's authored or coauthored three Linux books, runs two HF radio Sailmail stations and does volunteer work for the Linux Professional Institute. When not working, he can be found relaxing on his farm near the Costa Rican border.

__________________________


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sreejith's picture

SQL-Cheque

On November 14th, 2007 Sreejith (not verified) says:

If we can send cheque's through SQL-Ledger directly will be great and also uploading a file option to upload checks and all necessary statement would be great.

Brian Clark's picture

Don't Think About Using SQL-Ledger - Just Do It !

On November 25th, 2005 Brian Clark (not verified) says:

After using Quickbooks for a year I was really annoyed to find it stops working when the year is up and you are expected to buy the 'latest' version.

Even if you don't need the latest features you have to buy it in order to get to you last years data! Needless to say I exported the lot and transferred it software that isn't run by a money hungry company wanting to keep its shareholders happy - no I switched to SQL-Ledger and haven't looked back.

Installation was straight forward, but I must say I was new to Ubuntu Linux so its probably a complete doddle for anyone who knows what they're doing!

Everything is there you need from a standard accounting base. It does force you to work with the accounts without any of the pretty screens I was used to in Quickbooks but considering how much I'm saving (plus I'm learning how accounting actually works), its well worth it.

Backing up your data is a necessity for any accounting system and SL has a brilliant feature for emailing a copy of the file to yourself. Considering my 2 years of data occupies about 100kb zipped its never a problem regarding size. This way even if your complete system dies, there will be a copy on your mail server (when "Leave on server" is enabled in your mail client).

Adjusting the templates for your own use is fairly easy. The HTML ones are fine and the PDF ones just need a bit of thought before you plough in... Backing these up is also very handy as I've been known to install a new version and forget that templates are not part of the routine backup plan.

There is a manual available which is worth getting but not essential from day one. It gives very in depth details on how the system works and how to modify it for your needs. I'd try the system out first then buy the manual when you are ready. Either way its worth it!

Updates are regular and bug fixes - when there are any - appear quite promptly.

Being web based makes deployment much easier when you have lots of machines and printing isn't a problem. Just remember to turn off header and footer information in the browser so it doesn't stick a horrible "Page 1 of 1" and URL on everything!

Sending emails of invoices is quite useful but not all customers are geared up for e-commerce yet. Its sometimes easier to post an invoice as they can cope with a paper copy! For those that have the inclination however, it does mean you get paid a little quicker...

Any way thats my two penny worth (or two cents for our kind friends in the US!)

Brian Clark

Anonymous's picture

Re: Using SQL-Ledger for Your Business

On July 3rd, 2004 Anonymous says:

I have been using this great program under mandrake linux for a multisite consulting business, because it works. The constant improvements and ability to modify it, should convert any quickbooks power user. The latest round of improvements leave out really only CRM and Payroll functions to round out a near mature product.

Anonymous's picture

Re: Using SQL-Ledger for Your Business

On June 13th, 2004 Anonymous says:

We use it for a small multnational company, and the login being available via the internet (and adequate security of course!!) makes it a breeze to use. A truly excellent function system - and with the blessing that it is flexible enough to be altered in those "little ways" by someone with a modest amount of knowledge to make it a truly useful system for small businesses.

Anonymous's picture

Re: Using SQL-Ledger for Your Business

On September 22nd, 2004 Anonymous says:

How many concurrent users can SL support?

A SQL-Ledger User's picture

SQL-Ledger stores it's data i

On November 10th, 2004 A SQL-Ledger User (not verified) says:

SQL-Ledger stores it's data in a database and runs through a webserver app of your choice (apache is common)
The easiest database to use is PostgresQL, but Oracle and others have been supported in the past.
MySql is not currently supported since Mysql lacks features that SQL-Ledger requires.

That said.... the number of concurrent users is really dependent on the speed of your webserver and database server, not on a limitation of the SQL-Ledger software.
Many people run it on older hardware and have a lot of users accessing it with no speed problems.

There is a lot of good info available from users on the SQL-ledger mailing list.

You can access it via www.sql-ledger.org

Anonymous's picture

Re: Using SQL-Ledger for Your Business

On June 13th, 2004 Anonymous says:

Thanks David for such an informative article.

hakem's picture

SQL-Ledger country specifics

On November 3rd, 2004 hakem (not verified) says:

Hello,
I am browsing software to find an open source accounting solution for our small company. My question is wether sql-ledger supports accountancy rules specific to Belgium?

Anonymous's picture

Hello Hakem. It depends on

On November 10th, 2004 Anonymous (not verified) says:

Hello Hakem.

It depends on what you mean specifically.
Go to www.sql-ledger.org and join the mailing list.
That way you can ask any Belgian users how they are implementing it.

Anonymous's picture

I am looking for something ju

On December 18th, 2004 Anonymous (not verified) says:

I am looking for something just like this to help run my business but at the moment I use Quick Books Pro 2003 for all my fincancials. Is it possible to integrate the two?

Anonymous's picture

Using SQL-LEDGER for your business

On January 5th, 2005 Anonymous (not verified) says:

I am considering the question of "integrating": QuickBooks and SQL-Ledger but only because my CPA uses QuickBooks, and I have 5 years records in MySQL If the question were one of "porting" data between QB and SQL, if INTUIT are still using an XML format for their ledger dumps
it might not be hard to do. But I don't know yet whether Intuit still
use QBXML and how different their parser is from the standard ones.
But I do not really understand why one would wish to integrate the two systems. If it's a question only of retraining personnel used to QB to use SQL-L, then perhaps it makes sense to have the two sysems
intercommunicate. As long as Intuit still uses XML to describe the
semantics of the numbers and phrases in a dump of the ledger, it
seems to me perhaps that one would need to only to write an XML
schema of their dump, and another for the way you want your chart of accounts to be in SQL-L, and then use XMLT to translate from one to the other.
But I haven't actually tried anything, so readers should take what I say with a grain (if not at least a tespoon) of salt).

John Gabriel

PS I'm at present busy putting 5 years of data in SQL into QuickBooks (If it turns out that I can) so that I can give all of our accounting to somebody who is trained to do it. So, I'm unlikely
to answer any E-mail until I have found my way through that problem.
It also seems possible by judicious use of XML to make a simple
minded SQL General Ledger, or other accounting procedure have the
"look and feel" of QuickBooks. Many years ago I helped convert
a G/L A/P A/R written in BASIC for a WANG? microprocessor running
what I think was an INTEL 8008 to CP/M BASIC for an 8080, and until
DBASE appeared on the scene It was quite fairly popular among the brave folks who did their accounting on an ALTAIR instead of an IBM 7090 or 360/20

Anonymous's picture

Thanks for the answer John. I

On January 28th, 2005 Anonymous (not verified) says:

Thanks for the answer John. I currently use the payroll service amongst other things and I am not 100% ready to cut the cord and leave QB. Let us know how your latest project went.

Thanks again for taking the time. It is appreciated.

Anonymous's picture

A few of my clients using SQL

On February 5th, 2005 Anonymous (not verified) says:

A few of my clients using SQL-Ledger have out source pay roll. I can't remember the name of the company they are using but it's costing them less to have a third party do pay roll, plus they get direct deposit. I hate QB, it has cost most of my client $1000's over the years to maintain everything and since it runs on Windows it's cost money to keep updating the OS. The only reason they run is because their CPA wants it.

My $0.02

Anonymous's picture

In Canada the payroll company

On May 4th, 2005 Anonymous (not verified) says:

In Canada the payroll company is called Ceridian.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

December 2009, #188

If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.


Read this issue