summaryrefslogtreecommitdiff
path: root/fracture/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'fracture/__main__.py')
-rw-r--r--fracture/__main__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/fracture/__main__.py b/fracture/__main__.py
index 4805306..822cf96 100644
--- a/fracture/__main__.py
+++ b/fracture/__main__.py
@@ -109,8 +109,10 @@ def new_invoice():
# edit(Invoice.load(num).to_config())
@command
-def summarize(xlsx=False, quarter=None, year=None):
- print(xlsx)
+def summarize(xlsx=False, year=None, quarter=None):
+ invoices = Invoice.load_by_date(year, quarter)
+ rows = map(lambda x: x.to_row(), invoices)
+
if __name__ == "__main__":
load_config()
@@ -135,9 +137,9 @@ if __name__ == "__main__":
help="Display summary for tax declarations")
summary_parser.add_argument("--xlsx", action="store_true",
help="Output as xlsx")
- summary_parser.add_argument("--quarter", type=int, nargs=1,
+ summary_parser.add_argument("--quarter", type=int,
help="Obtain the summary of the quarter")
- summary_parser.add_argument("--year", type=int, nargs=1,
+ summary_parser.add_argument("--year", type=int,
help="Obtain the summary of the year")
summary_parser.set_defaults(func=summarize)