summaryrefslogtreecommitdiff
path: root/fracture
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2020-08-07 23:21:19 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2020-08-07 23:21:19 +0200
commitaf0515ac909db46ec1fedc8f3cf9d884ff21ce31 (patch)
treeceda54973b96be372d4f72996ead52146e6bb3a5 /fracture
parentbb072aeeaa15f2db1b8e23fdafc06e5c66b90030 (diff)
Better output with Customers
Diffstat (limited to 'fracture')
-rw-r--r--fracture/invoice.py8
1 files changed, 5 insertions, 3 deletions
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):