From 2ae1e825f605f8b2468655b66551b5653903fad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 2 Aug 2020 18:26:01 +0800 Subject: [PATCH] Revised the accounting_sample command to supply the account code as numbers instead of strings in the accounting application. --- .../management/commands/accounting_sample.py | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/accounting/management/commands/accounting_sample.py b/accounting/management/commands/accounting_sample.py index 7d4da3e..a882f62 100644 --- a/accounting/management/commands/accounting_sample.py +++ b/accounting/management/commands/accounting_sample.py @@ -138,41 +138,41 @@ class Command(BaseCommand): month = (date.replace(day=1) - timezone.timedelta(days=1)).month p.add_transfer_transaction( date, - (("1113", "薪資轉帳", savings), - ("1314", F"勞保{month}月", pension), - ("6262", F"健保{month}月", insurance), - ("1255", "代扣所得稅", tax)), - (("4611", F"{month}月份薪水", income),)) + ((1113, "薪資轉帳", savings), + (1314, F"勞保{month}月", pension), + (6262, F"健保{month}月", insurance), + (1255, "代扣所得稅", tax)), + ((4611, F"{month}月份薪水", income),)) p.add_income_transaction( -15, - (("1113", "ATM提款", 2000),)) + ((1113, "ATM提款", 2000),)) p.add_transfer_transaction( -14, - (("6254", "高鐵—台北→左營", 1490),), - (("2141", "高鐵—台北→左營", 1490),)) + ((6254, "高鐵—台北→左營", 1490),), + ((2141, "高鐵—台北→左營", 1490),)) p.add_transfer_transaction( -14, - (("6273", "電影—復仇者聯盟", 80),), - (("2141", "電影—復仇者聯盟", 80),)) + ((6273, "電影—復仇者聯盟", 80),), + ((2141, "電影—復仇者聯盟", 80),)) p.add_transfer_transaction( -11, - (("2141", "電影—復仇者聯盟", 80),), - (("1113", "電影—復仇者聯盟", 80),)) + ((2141, "電影—復仇者聯盟", 80),), + ((1113, "電影—復仇者聯盟", 80),)) p.add_expense_transaction( -2, - (("6272", "午餐—排骨飯", random.randint(40, 200)), - ("6272", "飲料—紅茶", random.randint(40, 200)))) + ((6272, "午餐—排骨飯", random.randint(40, 200)), + (6272, "飲料—紅茶", random.randint(40, 200)))) p.add_expense_transaction( -1, - (("6272", "午餐—牛肉麵", random.randint(40, 200)), - ("6272", "飲料—紅茶", random.randint(40, 200)))) + ((6272, "午餐—牛肉麵", random.randint(40, 200)), + (6272, "飲料—紅茶", random.randint(40, 200)))) p.add_expense_transaction( -1, - (("6272", "午餐—排骨飯", random.randint(40, 200)), - ("6272", "飲料—冬瓜茶", random.randint(40, 200)))) + ((6272, "午餐—排骨飯", random.randint(40, 200)), + (6272, "飲料—冬瓜茶", random.randint(40, 200)))) p.add_expense_transaction( 0, - (("6272", "午餐—雞腿飯", random.randint(40, 200)), - ("6272", "飲料—咖啡", random.randint(40, 200)))) + ((6272, "午餐—雞腿飯", random.randint(40, 200)), + (6272, "飲料—咖啡", random.randint(40, 200))))