Exemple #1
0
	def GET(self, id):
		item = db.get_from_table('invoice', int(id))[0]
		client = db.get_from_table('client', item.client_id)[0]
		form = new.form()
		form.fill({
			'title': item.project_title,
			'description': item.description,
			'client': client.name,
			'date': item.date,
		})
		
		invoice_items = []
		if (db.get_invoice_items(id)[0]):
			invoice_items = db.get_invoice_items(id)
		return render.edit(form, item, self.title, self.type, invoice_items)
Exemple #2
0
	def GET(self, id):
		items = db.get_invoice_items(int(id))
		type = 'item'
		title = 'All Invoice Items (you probably shouldn\'t be looking at this)'
		return render.list(items)
Exemple #3
0
	def GET(self, id):
		invoice = db.get_from_table('invoice', int(id))[0]
		client = db.get_from_table('client', invoice.client_id)[0]
		items = db.get_invoice_items(int(id))
		return render_print.print_view(invoice, client, items)