Giter Club home page Giter Club logo

pyinvoice's Introduction

PyInvoice

https://api.travis-ci.org/CiCiApp/PyInvoice.svg?branch=master

Invoice/Receipt Generator.

Screenshot

https://ciciapp.github.io/PyInvoice/dist/invoice.png

Dependency

  • Reportlab
  • Python 2.6+/3.3+
  Python 2.6 Python 2.7 Python 3.3 Python 3.4
Reportlab 2.6    
Reportlab 2.7    
Reportlab 3.0  
Reportlab 3.1.44  
Reportlab 3.2  

Install

pip install pyinvoice

Usage

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='[email protected]')

# 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: [email protected]<br />Don't hesitate to contact us for any questions.")

doc.finish()

License

MIT

pyinvoice's People

Contributors

zhangshine avatar

Watchers

Kaleb Pomeroy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.