Virtual Spring Cleaning (part 10 of X) wherein I tackle finances
One of my tasks when I'm not working or writing Perl code is to keep the finances of the Frankfurt Perlmongers e.V. club in order. Part of this is doing the taxes but a more important part is to pay the incoming invoices in time and to keep all the receipts for this in order. As we do most transfers electronically, it was a long-term goal for me to provide the board with an automated monthly account statement.
Another yearly task is correlating the registrations in Act and the payments to our bank account for the German Perl Workshop. This task stil is mostly manual but if I can get the data into Perl, I can start automatically matching the incoming payments wherever possible, and this will roughly cover 80% of the cases.
I've decided on using Hibiscus for managing the bank account of the club. This program automatically retrieves the data from our bank account and stores it in a local database. It also exposes access to that database through an XMLRPC interface. Instead of reading directly from the database file or reconfiguring Hibiscus to use a more central MySQL server, I opted for accessing the data throgh the XMLRPC interface, as my main objective is to retrieve all incoming payments and to sent a report to the board every month.
Talking to the XMLRPC server was trivial by reusing parts of XMLRPC::PurePerl with Future::HTTP, giving me a convenient client that returns me the list of transactions on the bank account.
I still have not decided on the kind of reporting framework I would like to have on the data. Querylet lets me specify somewhat acceptable reports using SQL but it doesn't really lend itself to producing a spreadsheet with a bar chart or whatever. But keeping in the spirit of this series, I don't want to sit on a module for longer than necessary and thus I've released Hibiscus::XMLRPC.
my $client = Hibiscus::XMLRPC->new(
url => 'https://127.0.0.1:8080/xmlrpc/',
user => $hbciuser,
password => $hbcipass,
);
my $tr = $client->transactions()->get;
for my $transaction (@$tr) {
...
}
The module currently only does what I need, retrieve all transactions from all accounts, according some filter criteria. It does not yet allow creating new transactions, but as we have far fewer transactions initiated by us than we have incoming transactions, that's something I don't mind keeping manual.
Leave a comment