Library to generate PDF invoice.
Project description
================
InvoiceGenerator
================
.. image:: https://travis-ci.org/creckx/InvoiceGenerator.svg
:target: https://travis-ci.org/creckx/InvoiceGenerator
This is library to generate a simple PDF invoice. It's based on ReportLab.
Installation
============
Run this command as root::
pip install InvoiceGenerator
If you want upgrade to new version, add --upgrade flag.::
pip install InvoiceGenerator --upgrade
You can use setup.py from GitHub repository too.::
python setup.py install
Example
=======
Usage::
from tempfile import NamedTemporaryFile
from InvoiceGenerator.api import Invoice, Item, Client, Provider, Creator
from InvoiceGenerator.pdf import SimpleInvoice
# choose en as language
os.environ["INVOICE_LANG"] = "en"
client = Client('Client company')
provider = Provider('My company', bank_account='2600420569/2010')
creator = Creator('John Doe')
invoice = Invoice(client, provider, creator)
invoice.currency_locale = 'en_US.UTF-8'
invoice.add_item(Item(32, 600, description="Item 1"))
invoice.add_item(Item(60, 50, description="Item 2", tax=10))
invoice.add_item(Item(50, 60, description="Item 3", tax=5))
invoice.add_item(Item(5, 600, description="Item 4", tax=50))
tmp_file = NamedTemporaryFile(delete=False)
pdf = SimpleInvoice(invoice)
pdf.gen(tmp_file.name, generate_qr_code=True)
Hacking
=======
Fork the `repository on github <https://github.com/creckx/InvoiceGenerator>`_ and
write code. Make sure to add tests covering your code under `/tests/`. You can
run tests using::
python setup.py test
Then propose your patch via a pull request.
Documentation is generated from `doc/source/` using `Sphinx
<http://sphinx-doc.org/>`_::
python setup.py build_sphinx
Then head to `doc/build/html/index.html`.
History
=======
0.5.3 - 2017-01-09
-----------------
- Use Babel for currency formating; fix and improve tests
0.5.2 - 2014-12-04
------------------
- Stop mentionning python2.6 support
- Make invoice.variable_symbol optional
0.5.1 - 2014-10-28
------------------
- Fix conf relative import
- Use python native function splitlines for notes
0.5.0 - 2014-09-21
------------------
- Add property number to object Invoice
- Replaced variable symbol for invoice number in invoice header
- Update Czech translations
0.4.9 - 2014-07-3
-----------------
- Bug fix previous commit
0.4.8 - 2014-07-3
-----------------
- Create proforma invoice
0.4.7 - 2014-07-1
-----------------
- Change date format for qr code generator
- Disable converting datetime to string on Invoice
- Disable rendering empty values
0.4.6 - 2014-05-14
------------------
- The displayed number of pages only when there is more than one
- Rename Date to Date of exposure
- Use pillow instead of PIL
0.4.5 - 2014-04-21
------------------
- Support for multipage items printout
- Support for multiline item description
- Use locale to print currency strings and values
- Adding logo to provider header
No notes on earlier releases.
Contributors
============
- Adam Strauch (@creckx)
- Martin Voldrich (@rbas)
- Petr Dlouhy (@PetrDlouhy)
- Antoine Musso (@hashar)
InvoiceGenerator
================
.. image:: https://travis-ci.org/creckx/InvoiceGenerator.svg
:target: https://travis-ci.org/creckx/InvoiceGenerator
This is library to generate a simple PDF invoice. It's based on ReportLab.
Installation
============
Run this command as root::
pip install InvoiceGenerator
If you want upgrade to new version, add --upgrade flag.::
pip install InvoiceGenerator --upgrade
You can use setup.py from GitHub repository too.::
python setup.py install
Example
=======
Usage::
from tempfile import NamedTemporaryFile
from InvoiceGenerator.api import Invoice, Item, Client, Provider, Creator
from InvoiceGenerator.pdf import SimpleInvoice
# choose en as language
os.environ["INVOICE_LANG"] = "en"
client = Client('Client company')
provider = Provider('My company', bank_account='2600420569/2010')
creator = Creator('John Doe')
invoice = Invoice(client, provider, creator)
invoice.currency_locale = 'en_US.UTF-8'
invoice.add_item(Item(32, 600, description="Item 1"))
invoice.add_item(Item(60, 50, description="Item 2", tax=10))
invoice.add_item(Item(50, 60, description="Item 3", tax=5))
invoice.add_item(Item(5, 600, description="Item 4", tax=50))
tmp_file = NamedTemporaryFile(delete=False)
pdf = SimpleInvoice(invoice)
pdf.gen(tmp_file.name, generate_qr_code=True)
Hacking
=======
Fork the `repository on github <https://github.com/creckx/InvoiceGenerator>`_ and
write code. Make sure to add tests covering your code under `/tests/`. You can
run tests using::
python setup.py test
Then propose your patch via a pull request.
Documentation is generated from `doc/source/` using `Sphinx
<http://sphinx-doc.org/>`_::
python setup.py build_sphinx
Then head to `doc/build/html/index.html`.
History
=======
0.5.3 - 2017-01-09
-----------------
- Use Babel for currency formating; fix and improve tests
0.5.2 - 2014-12-04
------------------
- Stop mentionning python2.6 support
- Make invoice.variable_symbol optional
0.5.1 - 2014-10-28
------------------
- Fix conf relative import
- Use python native function splitlines for notes
0.5.0 - 2014-09-21
------------------
- Add property number to object Invoice
- Replaced variable symbol for invoice number in invoice header
- Update Czech translations
0.4.9 - 2014-07-3
-----------------
- Bug fix previous commit
0.4.8 - 2014-07-3
-----------------
- Create proforma invoice
0.4.7 - 2014-07-1
-----------------
- Change date format for qr code generator
- Disable converting datetime to string on Invoice
- Disable rendering empty values
0.4.6 - 2014-05-14
------------------
- The displayed number of pages only when there is more than one
- Rename Date to Date of exposure
- Use pillow instead of PIL
0.4.5 - 2014-04-21
------------------
- Support for multipage items printout
- Support for multiline item description
- Use locale to print currency strings and values
- Adding logo to provider header
No notes on earlier releases.
Contributors
============
- Adam Strauch (@creckx)
- Martin Voldrich (@rbas)
- Petr Dlouhy (@PetrDlouhy)
- Antoine Musso (@hashar)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file InvoiceGenerator-0.5.3.tar.gz.
File metadata
- Download URL: InvoiceGenerator-0.5.3.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5dd073d6aed333b34bd307eeb4529aa71fd6cff678f2019e6f42972ef2a598c
|
|
| MD5 |
af0a642bf54aa6a6ab97db2294124d01
|
|
| BLAKE2b-256 |
5a5d542860435d33a1b2081b421cf4138c00b955006e7dff5bd4c1ed2fa8798b
|