dfxml-invoice(1)

dfxml-invoice1

Parse a qsf xml file and prepare a simple invoice

Usage

dfxml-invoice FILENAME

dfxml-invoice {-h | --help | --version}

Datafreedom

These scripts developed from the 'pilot-qof' package but now include support for other packages and formats and will continue to be extended along the lines of http://www.data-freedom.org/ - liberating user data from the application. Therefore, the datafreedom scripts use a 'df' prefix.

The scripts continue to be developed within the pilot-qof CVS until such time as the scripts are sufficiently cohesive to form a new source package.

Please feel free to contribute any of your own scripts, under the provisions of the GNU General Public Licence v3 or later, via the QOF-devel mailing list. http://lists.sourceforge.net/lists/listinfo/qof-devel

Version

Version 0.0.1

Overview

dfxml-invoice parses a QSF XML file output by pilot-qof and prepares a simple invoice based on rates specified in ~/.datafreedom/currency which will be created for you.

Specify '-' as the filename to parse STDIN.

e.g.
pilot-qof -x data.xml --invoice-city -t 2006-11-09 | dfxml-invoice -

A more complex example using 'zenity' - a Gnome dialog generator.

 $ pilot-qof -x data.xml --invoice-city -t 2006-11-08 | dfxml-invoice - > /tmp/zenity
  zenity --text-info --title="2006-11-08" --filename=/tmp/zenity --width=500 --height=300

dfxml-invoice, like pilot-qof, is designed to be used in pipes like this. It is intended to provide support for your own scripts where details like the date can be set as an option:

 #!/bin/bash
 DATE=$1
 
 if [ ! $DATE ]; then
        echo "$0: please specify the date of the invoice you want to view."
        exit
 fi
 pilot-qof -x data.xml --invoice-city -t $DATE | dfxml-invoice - | \
  zenity --text-info --title="$DATE" --width=500 --height=300

Note that if the currency uses a UTF-8 symbol, zenity may fail to display the symbol correctly unless the above code is adapted to write to a temporary file and zenity then loads that file using the '--filename' option. See Debian Bug# 410728. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410728

Or, a full zenity version which allows the date to be selected in a calendar widget:

 #!/bin/bash
 set -e
 MSG="Select the date of the invoice to view"
 DATE=`zenity --calendar --text="$MSG" --date-format="%Y-%m-%d"`
 TIME=`date -d"$DATE" +"%A, %B %e %Y"`
 
 if [ ! $DATE ]; then
        echo "$0: please specify the date of the invoice you want to view."
        exit
 fi
 
 pilot-qof -x /opt/data/pilot-qof/offline.xml --invoice-city -t $DATE \
  | dfxml-invoice - | zenity --text-info --title="$TIME" --width=500 --height=400

Objects

pilot_expenses is part of pilot-qof. Can also be used with gpe-expenses - compatibility with the default SQLite gpe-expenses backend is pending.

<http://qof.sourceforge.net/>

<http://pilot-qof.sourceforge.net/>

<http://gpe-expenses.sourceforge.net/>

Releases

2 releases since Debian 5.0 (Lenny); the text changed 1 time.

  1. 5.0
  2. 6.0

Author

Neil Williams, "<codehelp at debian.org>"

Bugs

Please report bugs via the pilot-qof package, either in the Debian BTS or via SourceForge trackers.

From datafreedom-perl 0.2.2-1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.