2015-05-30 15:41:06 +00:00
|
|
|
from datetime import datetime
|
|
|
|
from pyinvoice.models import InvoiceInfo, ServiceProviderInfo, ClientInfo
|
2015-05-27 17:09:44 +00:00
|
|
|
from pyinvoice.templates import SimpleInvoice
|
|
|
|
|
|
|
|
doc = SimpleInvoice('test.pdf')
|
2015-05-30 15:41:06 +00:00
|
|
|
doc.invoice_info = InvoiceInfo('1024', datetime.now(), datetime.now())
|
|
|
|
doc.service_provider_info = ServiceProviderInfo(
|
|
|
|
name='PyInvoice',
|
|
|
|
street='My Street',
|
|
|
|
city='My City',
|
|
|
|
state='My State',
|
|
|
|
country='My Country',
|
|
|
|
post_code='My Post code'
|
|
|
|
)
|
|
|
|
|
|
|
|
doc.client_info = ClientInfo(
|
|
|
|
email='My Email',
|
|
|
|
client_id='My Client Id',
|
|
|
|
name='Client Name',
|
|
|
|
street='Client Street',
|
|
|
|
city='Client City',
|
|
|
|
state='Client State',
|
|
|
|
country='Client country',
|
|
|
|
post_code='Client Post code'
|
|
|
|
)
|
2015-05-27 17:09:44 +00:00
|
|
|
|
2015-05-30 15:41:06 +00:00
|
|
|
# doc.build(story, onFirstPage=PaidStamp(7*inch, 5.8*inch))
|
|
|
|
doc.finish()
|