本文整理匯總了Python中InvoiceGenerator.api.Invoice.setCreator方法的典型用法代碼示例。如果您正苦於以下問題:Python Invoice.setCreator方法的具體用法?Python Invoice.setCreator怎麽用?Python Invoice.setCreator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InvoiceGenerator.api.Invoice
的用法示例。
在下文中一共展示了Invoice.setCreator方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Item
# 需要導入模塊: from InvoiceGenerator.api import Invoice [as 別名]
# 或者: from InvoiceGenerator.api.Invoice import setCreator [as 別名]
client.address = "Houští 474"
client.city = "Lanškroun"
client.zip = "563 01"
client.phone = "+420777636388"
client.email = "[email protected]"
client.bank_name = "GE Money Bank"
client.bank_account = "181553009/0600"
client.note = "Blablabla"
item1 = Item()
item1.name = "Položka 1"
item1.count = 5
item1.price = 100
item2 = Item()
item2.name = "Položka 2"
item2.count = 10
item2.price = 750
invoice = Invoice()
invoice.setClient(client)
invoice.setProvider(provider)
invoice.setTitle("Faktura")
invoice.setVS("00001")
invoice.setCreator("Adam Štrauch")
invoice.addItem(item1)
invoice.addItem(item2)
f = open("test.pdf", "w")
f.write(invoice.getContent())
f.close()