Revised the coding style according to PEP8.
This commit is contained in:
parent
9d988f17ca
commit
da80816b37
@ -37,8 +37,8 @@ register_converter(converters.DateConverter, "date")
|
||||
app_name = "accounting"
|
||||
urlpatterns = [
|
||||
path("", require_GET(login_required(RedirectView.as_view(
|
||||
query_string = True,
|
||||
pattern_name = "accounting:cash.home",
|
||||
query_string=True,
|
||||
pattern_name="accounting:cash.home",
|
||||
))), name="home"),
|
||||
path("cash",
|
||||
views.CashDefaultView.as_view(), name="cash.home"),
|
||||
|
@ -124,8 +124,9 @@ def cash(request, account, period):
|
||||
balance = balance + sign * record.amount
|
||||
record.balance = balance
|
||||
record_sum = Record(
|
||||
transaction=Transaction(date=records[-1].transaction.date)
|
||||
if len(records)>0 else Transaction(date=timezone.localdate()),
|
||||
transaction=(Transaction(date=records[-1].transaction.date)
|
||||
if len(records) > 0
|
||||
else Transaction(date=timezone.localdate())),
|
||||
account=account,
|
||||
summary=pgettext("Accounting|", "Total"),
|
||||
balance=balance
|
||||
@ -466,8 +467,7 @@ def journal(request, period):
|
||||
is_credit=True,
|
||||
amount=sum_debits - sum_credits
|
||||
))
|
||||
records = list(debit_records) + list(credit_records) \
|
||||
+ list(records)
|
||||
records = list(debit_records) + list(credit_records) + list(records)
|
||||
pagination = Pagination(request, records, True)
|
||||
return render(request, "accounting/journal.html", {
|
||||
"item_list": pagination.items,
|
||||
|
Loading…
Reference in New Issue
Block a user