Package: generateur-facture
This is library to generate a simple invoices.
Currently supported formats are PDF and XML for Pohoda accounting system.
PDF invoice is based on ReportLab.InstallationRun this command as root:pip install InvoiceGeneratorIf you want upgrade to new version, add--upgradeflag:pip install InvoiceGenerator --upgradeYou can use setup.py from GitHub repository too:python setup.py installDocumentationComplete documentation is available onRead The Docs.ExampleBasic APIDefine invoice data first:import os

from tempfile import NamedTemporaryFile

from InvoiceGenerator.api import Invoice, Item, Client, Provider, Creator

# choose english as language
os.environ["INVOICE_LANG"] = "en"

client = Client('Client company')
provider = Provider('My company', bank_account='2600420569', bank_code='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=21))
invoice.add_item(Item(50, 60, description="Item 3", tax=0))
invoice.add_item(Item(5, 600, description="Item 4", tax=15))Note: Due to Python’s representational error, write numbers as integertax=10,
Decimaltax=Decimal('10.1')or stringtax='1.2'to avoid getting results with
lot of decimal places.PDFGenerate PDF invoice file:from InvoiceGenerator.pdf import SimpleInvoice

pdf = SimpleInvoice(invoice)
pdf.gen("invoice.pdf", generate_qr_code=True)Pohoda XMLGenerate XML invoice file:from InvoiceGenerator.pohoda import SimpleInvoice

pdf = SimpleInvoice(invoice)
pdf.gen("invoice.xml")Note: Pohoda uses three tax rates: none: 0%, low: 15%, high: 21%.
If any item doesn’t meet those percentage, the rateVat parameter will
not be set for those items resulting in 0% tax rate.Only SimpleInvoice is currently supported for Pohoda XML format.HackingFork therepository on githuband
write code. Make sure to add tests covering your code under/tests/. You can
run tests using:python setup.py testThen propose your patch via a pull request.Documentation is generated fromdoc/source/usingSphinx:python setup.py build_sphinxThen head todoc/build/html/index.html.History1.1.0 - 2020-04-24Fix QR code on invoiceDrop Python 2 supportAdd pt_BR translationAdd support for transparent PNGs1.0.0 - 2018-05-17Add support for Pohoda XML formatAdded much more complex documentationParameterAddress.zipwas renamed toAddress.zip_codeAdd parametersdivisionandcountryto theAddressAdded parameterAddress.bank_codeIf present, the bank code will be written after dash to
the account number, otherwise wholeAddress.bank_accountwill be usedAddress are rendered to fit the area on the PDF invoiceCode style fixesFixes for rounding: usage ofdecimal.Decimaland
added parameterInvoice.rounding_strategyFix for QR codeAllow to set line width inSimpleInvoice0.5.4 - 2017-03-22Fix locale in build package0.5.3 - 2017-01-09Use Babel for currency formating; fix and improve tests0.5.2 - 2014-12-04Stop mentionning python2.6 supportMake invoice.variable_symbol optional0.5.1 - 2014-10-28Fix conf relative importUse python native function splitlines for notes0.5.0 - 2014-09-21Add property number to object InvoiceReplaced variable symbol for invoice number in invoice headerUpdate Czech translations0.4.9 - 2014-07-3Bug fix previous commit0.4.8 - 2014-07-3Create proforma invoice0.4.7 - 2014-07-1Change date format for qr code generatorDisable converting datetime to string on InvoiceDisable rendering empty values0.4.6 - 2014-05-14The displayed number of pages only when there is more than oneRename Date to  Date of exposureUse pillow instead of PIL0.4.5 - 2014-04-21Support for multipage items printoutSupport for multiline item descriptionUse locale to print currency strings and valuesAdding logo to provider headerNo notes on earlier releases.ContributorsAdam Strauch (@creckx)Martin Voldrich (@rbas)Petr Dlouhy (@PetrDlouhy)Antoine Musso (@hashar)