Revised the coding style according to PEP8.

This commit is contained in:
依瑪貓 2020-08-02 00:08:53 +08:00
parent 9d988f17ca
commit da80816b37
3 changed files with 144 additions and 144 deletions

View File

@ -124,8 +124,9 @@ def cash(request, account, period):
balance = balance + sign * record.amount balance = balance + sign * record.amount
record.balance = balance record.balance = balance
record_sum = Record( record_sum = Record(
transaction=Transaction(date=records[-1].transaction.date) transaction=(Transaction(date=records[-1].transaction.date)
if len(records)>0 else Transaction(date=timezone.localdate()), if len(records) > 0
else Transaction(date=timezone.localdate())),
account=account, account=account,
summary=pgettext("Accounting|", "Total"), summary=pgettext("Accounting|", "Total"),
balance=balance balance=balance
@ -466,8 +467,7 @@ def journal(request, period):
is_credit=True, is_credit=True,
amount=sum_debits - sum_credits amount=sum_debits - sum_credits
)) ))
records = list(debit_records) + list(credit_records) \ records = list(debit_records) + list(credit_records) + list(records)
+ list(records)
pagination = Pagination(request, records, True) pagination = Pagination(request, records, True)
return render(request, "accounting/journal.html", { return render(request, "accounting/journal.html", {
"item_list": pagination.items, "item_list": pagination.items,