From af0515ac909db46ec1fedc8f3cf9d884ff21ce31 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 7 Aug 2020 23:21:19 +0200 Subject: Better output with Customers --- fracture/invoice.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fracture') diff --git a/fracture/invoice.py b/fracture/invoice.py index c03b597..e23d257 100644 --- a/fracture/invoice.py +++ b/fracture/invoice.py @@ -366,9 +366,11 @@ class Invoice: "type": self.type, "id": self.format_id(), "date": self.date.strftime("%Y-%m-%d"), - "customer_id": self.customer.id, - "customer_name": self.customer.name, - "customer_address": self.customer.address, + "customer": { + "id": self.customer.id, + "name": self.customer.name, + "address": self.customer.address, + }, "notes": self.notes, } def to_json(self): -- cgit v1.2.3