diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2020-08-08 17:07:22 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2020-08-08 17:07:22 +0200 |
commit | 54e01779769bea931047c391070a985224107236 (patch) | |
tree | fa5da4613d08b358f56a200fe8be12d688f8ec5c /fracture/__main__.py | |
parent | 2ccbf8b690c4ea052ec3388bfabeb4b6943a74db (diff) |
Simplify summary, needs review
Diffstat (limited to 'fracture/__main__.py')
-rw-r--r-- | fracture/__main__.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fracture/__main__.py b/fracture/__main__.py index c99b0e9..44f2518 100644 --- a/fracture/__main__.py +++ b/fracture/__main__.py @@ -122,17 +122,11 @@ def summarize(xlsx=False, year=None, quarter=None): key=lambda x: x["type"]) keys = list(rows[0].keys()) + # FIXME all rows don't match and I'm putting them together in weird orders for r in rows: for k in r.keys(): if k not in keys: - # TODO: - # Inserts all the taxes at the end, but this is not cool - # because it needs information about how is the invoice - # arranged - # Maybe move this to a static function in invoices and call it - # summary and make it work with some logic like: create the - # keys first and then go setting them in order - keys.insert(-1, k) + keys.append(k) import sys wrtr = DictWriter(sys.stdout, keys) wrtr.writeheader() |