Go to file
Kumi 2b818b78e8 Update README.rst 2021-04-19 05:03:33 +00:00
pyinvoice Implement logo display 2021-02-12 18:27:04 +00:00
tests Invouce amounts rounded to 2 decimals (#1) 2016-04-21 20:47:57 +08:00
.gitignore build for pypi 0.1.0 2015-06-14 22:14:14 +08:00
.travis.yml Exclude more 2015-06-10 01:25:24 +08:00
LICENSE Implement logo display 2021-02-12 18:27:04 +00:00
MANIFEST.in add manifest.in 2015-06-14 22:06:16 +08:00
README.rst Update README.rst 2021-04-19 05:03:33 +00:00
requirements-dev.txt setup.py 2015-06-08 23:15:36 +08:00
setup.py Implement logo display 2021-02-12 18:27:04 +00:00

README.rst

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=========
PyInvoice
=========

Invoice/Receipt Generator.

Dependency
----------
* Reportlab
* Only tested with Python >3.6  may work with any Python >2.6 with a corresponding Reportlab version, but no promises. Use Python3!

Install
-------

.. code-block:: bash

    pip install git+https://kumig.it/kumisystems/PyInvoice

Usage
-----

.. code-block:: python

    from datetime import datetime, date
    from pyinvoice.models import InvoiceInfo, ServiceProviderInfo, ClientInfo, Item, Transaction
    from pyinvoice.templates import SimpleInvoice
    
    doc = SimpleInvoice('invoice.pdf')
    
    # Paid stamp, optional
    doc.is_paid = True
    
    doc.invoice_info = InvoiceInfo(1023, datetime.now(), datetime.now())  # Invoice info, optional
    
    # Service Provider Info, optional
    doc.service_provider_info = ServiceProviderInfo(
        name='PyInvoice',
        street='My Street',
        city='My City',
        state='My State',
        country='My Country',
        post_code='222222',
        vat_tax_number='Vat/Tax number'
    )
    
    # Client info, optional
    doc.client_info = ClientInfo(email='client@example.com')
    
    # Add Item
    doc.add_item(Item('Item', 'Item desc', 1, '1.1'))
    doc.add_item(Item('Item', 'Item desc', 2, '2.2'))
    doc.add_item(Item('Item', 'Item desc', 3, '3.3'))
    
    # Tax rate, optional
    doc.set_item_tax_rate(20)  # 20%
    
    # Transactions detail, optional
    doc.add_transaction(Transaction('Paypal', 111, datetime.now(), 1))
    doc.add_transaction(Transaction('Stripe', 222, date.today(), 2))
    
    # Optional
    doc.set_bottom_tip("Email: example@example.com<br />Don't hesitate to contact us for any questions.")
    
    doc.finish()


License
-------
MIT