Renamed the variable in the account_sample command in the accounting application.

This commit is contained in:
依瑪貓 2020-08-19 14:31:06 +08:00
parent 68964c5ed5
commit 007fd7d73f

View File

@ -74,8 +74,8 @@ class Command(BaseCommand):
user.set_digest_password("admin", "12345")
user.save()
self.p: Populator = Populator(user)
self.p.add_accounts([
self._populator: Populator = Populator(user)
self._populator.add_accounts([
(1, "資產", "assets", "资产"),
(2, "負債", "liabilities", "负债"),
(3, "業主權益", "owners equity", "业主权益"),
@ -141,43 +141,43 @@ class Command(BaseCommand):
self.add_payrolls(5)
self.p.add_income_transaction(
self._populator.add_income_transaction(
-15,
[(1113, "ATM withdrawal", 2000)])
self.p.add_transfer_transaction(
self._populator.add_transfer_transaction(
-14,
[(6254, "HSR—New Land→South Lake City", 1490)],
[(2141, "HSR—New Land→South Lake City", 1490)])
self.p.add_transfer_transaction(
self._populator.add_transfer_transaction(
-14,
[(6273, "Movies—The Avengers", 80)],
[(2141, "Movies—The Avengers", 80)])
self.p.add_transfer_transaction(
self._populator.add_transfer_transaction(
-13,
[(6273, "Movies—2001: A Space Odyssey", 80)],
[(2141, "Movies—2001: A Space Odyssey", 80)])
self.p.add_transfer_transaction(
self._populator.add_transfer_transaction(
-11,
[(2141, "Movies—The Avengers", 80)],
[(1113, "Movies—The Avengers", 80)])
self.p.add_expense_transaction(
self._populator.add_expense_transaction(
-13,
[(6273, "Bus—2623—Uptown→City Park", 30)])
self.p.add_expense_transaction(
self._populator.add_expense_transaction(
-2,
[(6272, "Lunch—Spaghetti", random.randint(40, 200)),
(6272, "Drink—Tea", random.randint(40, 200))])
self.p.add_expense_transaction(
self._populator.add_expense_transaction(
-1,
([(6272, "Lunch—Pizza", random.randint(40, 200)),
(6272, "Drink—Tea", random.randint(40, 200))]))
self.p.add_expense_transaction(
self._populator.add_expense_transaction(
-1,
[(6272, "Lunch—Spaghetti", random.randint(40, 200)),
(6272, "Drink—Soda", random.randint(40, 200))])
self.p.add_expense_transaction(
self._populator.add_expense_transaction(
0,
[(6272, "Lunch—Salad", random.randint(40, 200)),
(6272, "Drink—Coffee", random.randint(40, 200))])
@ -238,7 +238,7 @@ class Command(BaseCommand):
if month < 1:
month = 12
month_text = months[month - 1]
self.p.add_transfer_transaction(
self._populator.add_transfer_transaction(
payday,
[(1113, "Payroll Transfer", savings),
(1314, F"Pension for {month_text}", pension),