[gnucash-de] Deutsche Rechnungsvorlage

Jan Ulrich Hasecke juhasecke at googlemail.com
Di Dez 4 02:42:58 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 03.12.12 22:39, schrieb Roman Bertle:

> Hallo,
> 
> eine Alternative ist mein http://www.smoerz.org/gcinvoice/

Jaaa! Python! :-)

Allein schon der Satz im README, dass diverse Tests gegen das Skript
laufen, schafft Vertrauen.

Sehr schön ist auch, dass die Tabelle mit den Zahlen im LaTeX-Template
mit der Hand aufgebaut wird, sodass man vieles anpassen kann.

Nun kriege ich aber diesen Fehler beim Testen (Python 2.7):

python test.py
.......F.F....WARNING:gcinvoice:The invoice contains POSTTAX
discounts, which are calculated differenty in gcinvoice and Gnucash
WARNING:gcinvoice:The invoice contains POSTTAX discounts, which are
calculated differenty in gcinvoice and Gnucash
WARNING:gcinvoice:The invoice contains POSTTAX discounts, which are
calculated differenty in gcinvoice and Gnucash
..WARNING:gcinvoice:The invoice contains POSTTAX discounts, which are
calculated differenty in gcinvoice and Gnucash
.WARNING:gcinvoice:The invoice contains POSTTAX discounts, which are
calculated differenty in gcinvoice and Gnucash
.
======================================================================
FAIL: testConfigParse (__main__.TestFuncs)
Test parsing of configuration files.
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 74, in testConfigParse
    'gcfile': 'gcdata.xml'})
AssertionError: {'templates': {'default':
'/Users/juh/Desktop/gcinvoice-0.1.5/invoice_template.t [truncated]...
!= {'templates': {'default': 'invoice_template.tex'}, 'outfiles': {},
'gcfile': 'gc [truncated]...
  {'gcfile': 'gcdata.xml',
   'outfiles': {},
- -  'templates': {'default':
'/Users/juh/Desktop/gcinvoice-0.1.5/invoice_template.tex'}}
+  'templates': {'default': 'invoice_template.tex'}}

======================================================================
FAIL: testQuantityformatting (__main__.TestFuncs)
Test formatting of quantity values.
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 151, in testQuantityformatting
    Decimal("8912.34567"), uselocale=True), u'8.912,34567')
AssertionError: u'8912,34567' != u'8.912,34567'
- - 8912,34567+ 8.912,34567?  +


- ----------------------------------------------------------------------
Ran 18 tests in 0.354s

FAILED (failures=2)


Ich habe das Skript mit install_skripts installiert und es läuft
teilweise.

Allerdings kriege ich diesen Fehler:

WARNING:gcinvoice:Problem parsing GncEntry [<ns0:GncEntry
xmlns:ns0="http://www.gnucash.org/XML/gnc"
xmlns:ns1="http://www.gnucash.org/XML/entry"
xmlns:ns2="http://www.gnucash.org/XML/ts" version="2.0.0">
  <ns1:guid type="guid">2d423b6a481b5d61495427e824c48d8b</ns1:guid>
  <ns1:date>
    <ns2:date>2012-12-03 12:00:00 +0100</ns2:date>
  </ns1:date>
  <ns1:entered>
    <ns2:date>2012-12-03 15:55:50 +0100</ns2:date>
  </ns1:entered>
  <ns1:description>test</ns1:description>
  <ns1:action>Material</ns1:action>
  <ns1:i-acct type="guid">5162b48ead6e9cabfdd46d997b161e60</ns1:i-acct>
  <ns1:invoice type="guid">8404ead15a2e75acb3e862599e10d3f1</ns1:invoice>
  <ns1:i-disc-type>PERCENT</ns1:i-disc-type>
  <ns1:i-disc-how>PRETAX</ns1:i-disc-how>
  <ns1:i-taxable>1</ns1:i-taxable>
  <ns1:i-taxincluded>1</ns1:i-taxincluded>
  <ns1:i-taxtable
type="guid">d230845b8a5d6e986f054809b2608bb7</ns1:i-taxtable>
</ns0:GncEntry>
]
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/gcinvoice.py",
line 324, in parse
    ns('entry:qty')))
  File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/gcinvoice.py",
line 721, in _readnumber
    n,d = [Decimal(x) for x in val.split('/', 1)]
AttributeError: 'NoneType' object has no attribute 'split'

Danach folgt die Ausgabe des LaTeX-Codes. Liegt das an meiner
Testrechnung in GnuCash? Fehlt da ein Wert wie letztens im Perl-Skript?

Du hast nicht zufällig noch irgendwo ein Template für eine deutsche
Rechnung rumfliegen, die du auf deine Website packen könntest?

Vielen Dank für diesen Tipp.
Das sieht schon sehr nach einer Lösung aus, mit der ich arbeiten kann.

juh

Kennen wir uns eigentlich vom PySV her?

- -- 
Python Software Verband e.V.
Forsterstraße 29
06112 Halle (Saale)
http://python-verband.org
https://plus.google.com/103204866602196073810
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC9qX0ACgkQPUzUEFbILMRI3gCfavedYl0b0a7YmHD7d4KwGhXm
VWcAnRQmRZ+Y1t2vsEKRNoROGjeTXfxe
=wtee
-----END PGP SIGNATURE-----


Mehr Informationen über die Mailingliste gnucash-de