QHACC_ROOT is the only environment variable that cannot be overridden from the command line. This is because by the time the command line is parsed, QHacc already has to know about its plugins. The QHacc executable is run from a script, which can accommodate a changed QHACC_ROOT variable.
Option | Arguments | Description |
---|---|---|
-f or --home | QHACC_HOME1 | Using this switch will override whatever value is currently stored in the QHACC_HOME environment variable, if any. This options allows multiple QHACC_HOMEs to be used for different purposes. |
-w or --warranty | none | show warranty information |
-l | QHACC_LANGDIR | Using this switch will point to a non-default language file for i18n support. |
--debug | debug level (0-6) | Set runtime debugging information level. If passed as the first argument, the debugging will be turned on during the QHACC_HOME load. Otherwise, it will be turned on after the initial data load. |
--archive | a date string2, or account identifier3, and dump location | see Archiving below |
--restore | archive dump location | see Archiving below |
--report | Report Plugin | generate a report. seeReporting below |
--import | QHACC_HOME1 | import data from the given QHACC_HOME into the current QHACC_HOME |
--export | QHACC_HOME1 | export the current data to the given QHACC_HOME location |
--create | QHACC_HOME1 | display commands for creating a functional QHACC_HOME from scratch |
--reconcile | QHACC_HOME1 | reconcile all transactions that are duplicated in the given QHACC_HOME |
--verifydb | none | verify that QHacc's database is in a consistent state |
--fixdb | none | make QHacc's database consistent |
--plugins | none | display the information about the available plugins |
--help | none | show these options |
qhacc
--archive 29-02-2000:/tmp
would archive all transactions before 1
March, 2000 to the /tmp directory.
If you are not using a mouse, the Account Chooser is navigable with the up and down arrows. Pressing the spacebar will open the account.
In both cases, the selected account will be printed in bold font and a colored highlight bar will illuminate the account in the Chooser.
The popup menu available in the Account Chooser allows you to reconcile, edit, add, or delete an account. It is not necessary to open an account in order to use these functions. (i.e., You can be viewing your checking account, and open your savings account for reconciling.) Please be careful when using this liberty to make sure you don't delete the wrong account. The popup also allows you to toggle the Account Chooser's view, to show or hide categories. If you are not using a mouse, these functions are available from the Account or Preferences menubar.
The Account Viewer window has a popup menu to work on the transactions in the viewer. There are standard functions like add, reconcile, and memorize. Please see the section below for more details on memorizing transactions.
The Viewer and Chooser can be sorted on any column. Clicking on a column header sorts the data on that field. Clicking on the same field resorts the column in reverse order. Unlike previous versions of QHacc, these preferences are saved for future use.
Key | Scope | Function |
---|---|---|
CTRL-S | Global | Save files. |
CTRL-H | Global | Change QHacc Home |
CTRL-T | Global | Save files and exit QHacc. |
CTRL-Q | Global | Quit QHacc without saving files. |
CTRL-V | Global | Toggle category view of account chooser. |
CTRL-B | Global | Open a subset of transactions for the highlighted account. |
CTRL-R | Global | Open a reconcile window for the highlighted account. |
CTRL-L | Global | Toggle the reconcile balance display in status bar. |
CTRL-N | Global | Create a new account. |
CTRL-E | Global | Open the Account Editor dialog. |
CTRL-SHIFT-X | Global | Delete the highlighted account. |
CTRL-G | Global | Open the Graphing dialog. |
CTRL-Y | Global | Open the Reporting dialog. |
CTRL-F | Global | Open the Preferences dialog. |
spacebar | Chooser | Open the hilighted account in the Viewer. |
del | Chooser | Delete the account hilighted in bold. |
del | Viewer | Delete the transaction hilighted in bold. |
CTRL-C | Viewer | Copy the hilighted transaction. |
CTRL-P | Viewer | Paste the previously-copied transaction. |
CTRL-X | Global | Cut the highlighted transaction. |
i | Viewer | Insert a transaction. This new transaction will have the same date as the previously-hilighted transaction. |
e | Viewer | Edit the hilighted transaction. |
spacebar | Viewer | Open the Transaction Editor for the hilighted transaction. |
spacebar | Reconcile Window | Mark the hilighted transaction as reconciled. |
ASSET |
LIABILITY |
EQUITY |
EXPENSE |
REVENUE |
You can get more information about how to use these accounts in the Accounting Primer.
Accounts can also be made into categories. A category is an account in every sense of the word, but just a little different. Categories are not included when computing a personalities' total equity. There is also a preference item to exclude Categories from the Account Chooser. This preference is available through the Preferences Dialog or the Chooser's popup. This feature allows a user to maintain a eyeball on those accounts that are most important to him/her, while hiding the ones that are less important.
Other interface support for market transactions is mostly non-existant at this time. There is a shares report available from the report dialog, but that merely shows the number of shares bought and sold, and the current number of shares held. The future is ripe for expansion at this point.
It should also be noted that for QHacc at the moment, the term "market transaction" really just means buying and selling shares of stock. There is no support for put-options, for example, or anything like that. If you are intersted in such features, feel free to contact me. I'll need your help.
Double-Entry transactions are just like single-entry transactions, except that each transaction must be part of two accounts. Double-Entry transactions are generally split between an income and expense account, though this rule is not a requirement. In any event, when you specify double entry bookkeeping, the Transaction Editor will get one more field--the double entry account field.
Split Transactions are a special type of transaction where one transaction has many different double-entry pairs. The most common use of this type of transaction is probably for entering your paycheck, I think. Your employer generally pays you one sum, but also pays taxes on your behalf, or splits your paycheck between several different accounts, like a checking and savings account. All these splits can be entered into a different account, but still only take up one transaction in your "job" account, for example. Is that clear?
In order to change a regular double-entry transaction into a good old-fashioned split transaction, one just needs to push the "split" button in the Transaction Editor. This will open the Split Editor, and you can go merrily on your way. If, on the other hand, you have a split transaction that you would like to make into a double-entry transaction, set its sum to "0" or just leave the appropriate sum field blank. When the transaction is saved, splits with 0 balance will be removed.
When using the Split Editor, it is important to remember that transactions are not modified until the Enter key or the "Enter" button is pressed. When the "Okay" button is pressed in the Split Editor, the transaction editor will display updated values, but the transaction is not modified. Opening the Split Editor again will display only the updated values. To get back to the original values of the transaction, hit "Cancel" in the Split Editor. This will reset all the splits to the transaction's original values.
Suppose you get a paycheck every week, and the total amount changes slightly from week to week, but the percentage of tax withheld doesn't. A named transaction allows you to setup the transaction giving just the account names and percentages (or determinate values) for some fields, and a "remainder" account name for any remaining money to keep the transaction balanced. You can then select the named transaction from the Account Viewer popup, enter the total amount, and the percentages get calculated before the transaction is inserted.
When setting up a named transaction, there are some special characters to keep in mind:
Memorized transactions are a special subset of named transactions where no sum resolution is necessary. Other than that, the two are totally synonymous.
Everytime you enter a named transaction, the new one will be identical to the old one, except for the date. The date of the new transaction will be the same as the hilighted transaction at the time of insertion. This feature works for normal, double-entry, and split transactions, so use it 'til your heart's content. And as an added feature, if you are adding a memorized transaction to your checking account (or any account with an incremental number in the NUM field), and the memorized transaction has a number in the NUM field, the added transaction will automatically have the next incremental number. This allows for memorizing checks without constantly having to change the check number after insertion.
So that's what named transactions are, but how are they created? Easily. There are two main ways of creating named transactions: from the Viewer, select the "memorize" menu option from the content popup; or open the "Memorized Editor" from the "Transaction" part of the main menu. The popup method is easier if you want to duplicate an existing transaction, while creating them from scratch is probably easier from the Editor. In either case, you can also specify a keyboard shortcut which will activate the memorized transaction entry into the Viewer. This feature is especially handy if you are not using a mouse.
QHacc supports cutting, copying, and pasting transactions as well. The mechanism is the same for all operations. When pasting a copied transaction, the transaction date will follow the same behavior as memorized transactions. When pasting a cut transaction, the date will not be reset.
Note that all the functionality of the (old) --cron
plugin
is duplicated in "named transactions," above.
The loan feature is accessible during transaction entry when using double entry bookkeepping. It is not possible to make loan calculations in single entry mode. When entering a transaction, select the split button. In the split dialog, select the loan account as the double entry account as you normally would, but enter "p" (for payment) in the credit or withdrawal field. Likewise, enter the account you want to use for interest in another field, and enter "i" (for--you guessed it--interest) in that credit or withdrawal field. Other splits can also be added as in any other transaction, and will affect the end sum of the transaction.
There are three caveats to loan processing in QHacc:
Drag... | From | To | Does... |
---|---|---|---|
Transaction | Viewer | Viewer | Changes the date of the transaction to the drop location's date |
Transaction | Viewer | Journal Chooser | Changes the transaction's journal |
Transaction | Viewer | Chooser | Changes the transaction's account from the currently-displayed one to the drop location's |
Account | Chooser | Viewer | Changes the dropped-on transaction's split account to the dropped account |
Account | Chooser | Chooser | Reparents the account to the drop location |
Account | Chooser | Custom Chooser1 | Adds the account to the custom chooser |
Account | Custom Chooser1 | Custom Chooser1 | Reorders the dropped account but does not reparent it. |
The reconcile window is a fully-capable Account Viewer. That is, transactions can be added, removed, or edited just as they can be in the main Account Viewer. Both displays will remain synchronized while the reconcile window is open. Any transactions added while the reconcile window is open will automatically be marked as reconciled, regardless of which display is used to enter it. The reconcile window is modeless, so several accounts be reconciled at once.
Reconciling from the command line is also supported. Running qhacc with
the --reconcile
argument will compare the given QHACC_HOME's
data with the already-loaded data and reconcile any duplicate
transactions. A transaction is determined to be duplicated if the date
and sum are identical. Also see the plugins
section, below.
--archive
on the command line. The --archive
argument must be
followed by an account identifier or the date of the last transaction to
prune, a colon, and the dump destination. Account names are matched
first, so if your account name happens to be the same as a valid
datestring, the account will get archived. Why you would ever be
in this situation is beyond me. In any event, the archived transactions
are put in the target directory. If an account is archived, it is
removed from the Chooser display. In this mode errors are written to
standard error, but nothing else is written to the screen.
The opposite of --archive
is --restore
. It
must be followed by a dump location from which to read the archived
data.
In reality, the archive and restore arguments are silently transformed
to --export ARC:
and --import ARC:
arguments. That is, they are just regular old export and import
filters. Either format is acceptable when calling the functions.
Once nice feature of the ARC plugin is that the QHACC_HOME given as its second or first argument (depending on the function) can itself reference a plugin. The recursion doesn't go on forever--just one level--but the functionality is important. It means that archived data can be written to any sort of QHACC_HOME. Likewise, restored data can come from just about anywhere.
Archiving and restoring files usually alters the accounts so that the current balance is consistent before and after archiving or restoring, but this behavior is customizable.
--export
and --import
command line
options. Both options take a QHACC_HOME argument to operate. When
exporting, the entire contents of the current QHACC_HOME are dumped into
the given QHACC_HOME. When importing, the entire contents of the given
QHACC_HOME are merged with the current QHACC_HOME. This merge tries to
avoid duplicate transactions, and is quite a bit more stringent in
finding duplicates than --reconcile
(above). For example, for two transactions to be
determined to be duplicates, they must have the same date, payee, sum,
and parent account. Accounts are merged by name. Any unique data is
merged with the old data. See the plugins section,
below, for more functionality.
As a side note, if you should decide to move your QHACC_HOME from one location to another, you have two options:
qhacc --home <current QHACC_HOME> --export
<new QHACC_HOME>
qhacc --home <new QHACC_HOME> --import
<current QHACC_HOME>
--import
operations. If the new QHACC_HOME already has data
in it, however, only the second option can be used.
The scheme is simple: every plugin has an identifier that tells the
QHacc engine what data it expects to see. To use a plugin, just give
QHacc the identifier as part of the QHACC_HOME. For example, if I want
to have QHacc export its data in XML instead of its native format, I
just run qhacc --export XML:<QHACC_HOME>
. If I then
want to import it into an empty MySQL database structure, I run
qhacc --home MYSQL:<QHACC_HOME> --import
XML:<export file>
. This same scenario plays out with
graphing and reporting. For example, the "transactions" report can be
accessed from the command line using qhacc --report
TRANS:<account identifier>
.
There is even one plugin, which I like to call "The Cliimp," which allows a user to enter transactions interactively (or non-interactively) from the command line, thus making the GUI unnecessary. In the future, there will likely be more additions to this type of functionality.
For the memory conscious, it should be noted that plugins are not actually loaded until they are used. When QHacc first starts, it cycles through the plugin directories to figure out what plugins are available, but then doesn't load any until they are specifically called for. The goal for plugins was to have as much functionality as possible without increasing the memory requirements of the project.
For a complete list of plugins, their identifiers, and their uses, see the plugin page.
The solution is a plugin that can provide the same functionality. It avoids the shell script problems because if QHacc can be compiled, so can the plugin. The plugin can be a bit more straightforward than the shell scripts as well, because they can utilize the QHacc engine instead of just trying to decode the datafiles. It also brings the upgrade procedure into line with other QHacc-related processes, because it operates as an argument to the QHacc executable instead of a totally separate procedure.
So now that you know why the upgrade plugin exists, how do you use it? It's not very difficult, but there are a couple steps:
qhacc --export /tmp
). The upgrade
plugin only works against QHacc's native file format, so if you use
some other database, you must create a native export.
qhacc --home
UPG:/tmp
). This will upgrade your old data and start a new
instance of QHacc. Save and close the application.
qhacc --create
PSQL:qhacc
). This is a good practice for all upgrades because
the upgrade process may change the structure of the data. If you use a
database backend, for example, the table structures may change, and
these changes must be accounted for.
qhacc --import
/tmp
). This completes the upgrade.
--report
option
followed by the report plugin of choice. See the
plugins page for more details.
Some graphs allow expanded viewing via "click-throughs." Clicking on a section of the graph will open a subset view of the given account for the appropriate month. The subset view also reports several attributes of the transaction set, if the appropriate report plugin is installed.
When using the GUI for graphs and reports, multiple accounts can be selected at once. Select an account, and then hold the shift- or ctrl-key to select either a range of accounts, or individual accounts, respectively.
When switching bookkeeping styles, QHacc performs what I will call "lazy" updating. That is, if you used to use double-entry bookkeeping and you switched to single-entry, none of the links will break. The links between transactions remain intact until the transaction is opened and then resaved. Likewise, single-entry transactions will remain pairless until they are opened as double-entry transactions. This is true even across saves.