Redmine plugin to manage clients, providers, invoices and payments. Imports and exports invoices in PDF, UBL or facturae.
XSLT HTML Ruby JavaScript CSS

README.adoc

Haltr - Hackers don’t do books

Haltr is a simple invoicing solution. Manages clients, providers, invoices, templates and payments. Imports and exports invoices. Supported formats include PDF, UBL and facturae.

These are some of its features:

  • Create invoices

  • Manage recurring invoices

  • Send PDF invoices

  • Talk to Bank accounts

  • Understand UBL and Facturae

  • Keep track of received invoices

Currently it is used in https://www.b2brouter.net/

Install

Redmine 3.x

Not compatible yet. Please contribute.

Redmine 2.x

In your Redmine root path:

# Use Ruby < 2.2 (since Rails 3.2 and thus Redmine 2.x is not compatible with later versions)
git clone git://github.com/descala/haltr.git plugins/haltr
bundle install
bundle exec rake redmine:plugins:migrate

Older versions of Redmine

Download Haltr plugin using git:

cd <Redmine root dir>/vendor/plugins
git clone git://github.com/descala/haltr.git

Install necessary gems:

# if Redmine <= 1.3
cd haltr
bundle install
cd <Redmine root dir>
rake gems:install
# if Redmine >= 1.4
cd <Redmine root dir>
bundle install

Apply the database changes:

cd <Redmine root dir>
rake db:migrate:plugins RAILS_ENV='production'

poppler-utils package and chronic gem are required to receive PDF invoices by mail.

imagemagick library is required to resize automatically uploaded images (for company logos).

gem zip is required to download multiple invoices

Generating PDFs

Haltr uses wkhtmltopdf to generate PDF files.

In order to run wkhtmltopdf in a headless server you can use xvfb.

In Debian:

apt-get install wkhtmltopdf xvfb

then, put this script in /usr/local/bin/wkhtmltopdf

#!/bin/sh
xvfb-run -a -s "-screen 0 640x480x16" /usr/bin/wkhtmltopdf $*

do not forget to give it execution permisions

chmod +x /usr/local/bin/wkhtmltopdf

Sending invoices by email

Haltr is designed for use with an external mailing system, to allow to manipulate invoice file before sending it. In Spain we must digitally sign invoices before sending them.

In settings, "Path of export folders" is where Haltr leaves invoices, and expects another process scheduled to take them, do whatever transformation is needed, send them and report the status change to Haltr.

To report invoice status changes, Haltr provides a RESTful access to an Event model, which has a particular name and invoice ID.

For example:

Event.new(:invoice_id => 1, :name => "success_sending")

would change the status of the invoice with id 1, from "Sending" to "Sent".

Access to the REST service is restricted by source IP, so that events can only be created from the IP that has been set in "B2brouter IP"

Finally, "B2brouter URL" is the URL where Haltr retrieves the invoices already signed, so that they can be downloaded.

The call looks like this:

"#{b2brouter_url}/b2b_messages/get_legal_invoice?md5=#{md5}"

Redmine’s plugin installation instructions: http://www.redmine.org/projects/redmine/wiki/Plugins

Uninstall

bundle exec rake redmine:plugins:migrate NAME=haltr VERSION=0