Revised the parameters of Period.

This commit is contained in:
2020-07-14 07:43:47 +08:00
parent ea354ae101
commit 069cd9ca74
3 changed files with 11 additions and 10 deletions

View File

@ -34,7 +34,7 @@ class ReportUrl:
if "period" in kwargs:
self._period = kwargs["period"]
else:
self._period = Period(None, None, None, None)
self._period = Period()
if "cash" in kwargs:
self._cash_subject = kwargs["cash"]
else:

View File

@ -74,8 +74,7 @@ def cash(request, subject_code, period_spec):
last_txn = Transaction.objects.order_by("-date").first()
data_end = last_txn.date if last_txn is not None else None
period = Period(
get_language(), data_start, data_end,
period_spec)
period_spec, data_start, data_end, get_language())
# The SQL query
if subject_code == "0":
subject = Subject(code="0")