PBooks Development Documentation

I'm starting the process of documenting the PBooks code so that when other developers review it, they won't have to work so hard. :-) There are a few comments I'll post here in advance of releasing the code.

The user-interface of PBooks is generated from XSL. While XSL is an open standard, it still isn't a cakewalk. It also allows developers to create spaghetti templates which manipulate and process data in a disorganized manner. I have to admit I'm guilty of this, so here's a little explanation:

General Journal Interface

PBooks Journal with transactions not posted to ledger

In this image, we see that there are plus signs ("+") next to the PLACEHOLDER account. The placeholder account is just that, a placeholder, but lets just ignore that for now. The plus sign is more important. The plus sign will make an ajax (ie the page doesn't have to reload) call to post the entry amount to the ledger. Here's the comment explanation in the xsl template:

Based upon this logic, if the general journal is in balance, but the accounting equation or balance sheet is not in balance, then not all transactions have been posted to the ledger. This explains the necessity to automatically post all journal entries to the ledger with the click of a button. For the time being, it must be done manually.

Journal Entry Form

Journal Entry Form

The current journal entry form is a bit of a monster. It does a lot of things though. It supports the ability to have multiple credits or debits, can flip the entry (meaning that all the credit transactions become debits, and vice versa). Because of this, the xsl code is admittedly messy. Here's the comments I've included in the template:

By on May 30, 2007 11:53 AM