Переглянути джерело

Plan updating banking rules

Eren Yilmaz 5 роки тому
батько
коміт
550dc3220b
3 змінених файлів з 6 додано та 1 видалено
  1. 4 1
      client_controller.py
  2. 1 0
      db_setup/seeds/__init__.py
  3. 1 0
      game.py

+ 4 - 1
client_controller.py

@@ -311,7 +311,7 @@ def buy_banking_license():
             print('Banking license application access failed.')
 
 
-def summarize_bank_rules():
+def summarize_bank_rules():  # TODO rework this stuff, does not work like this in real life
     variables = _global_variables()
     banking_license_price = variables['banking_license_price']
     marginal_lending_facility = variables['marginal_lending_facility']
@@ -376,8 +376,11 @@ def loans():
     response = client_request('loans', {"session_id": connection.session_id})
     success = 'data' in response
     if success:
+        for row in response['data']:
+            row[-1] = f'{row[-1] * 100:.2f}%'
         print(my_tabulate(response['data'],
                           headers=['Loan ID', 'Total amount', 'Remaining', 'Interest p.a.', ],
+                          floatfmt='.2f',
                           tablefmt="pipe"))
     else:
         if 'error' in response:

+ 1 - 0
db_setup/seeds/__init__.py

@@ -46,4 +46,5 @@ def seed(cursor: Cursor):
           ('marginal_lending_facility', 0.0025),  # ECB 2020
           ('cash_reserve_ratio', 0.01),  # Eurozone 2020
           ('cash_reserve_free_amount', 1e5),  # Eurozone 2020
+          ('main_refinancing_operations', 0.0000),  # ECB 2020
           ])

+ 1 - 0
game.py

@@ -1,6 +1,7 @@
 from lib.db_log import DBLog
 
 CURRENCY_NAME = "₭ollar"
+CURRENCY_Symbol = "₭"
 MINIMUM_ORDER_AMOUNT = 1
 DEFAULT_ORDER_EXPIRY = 43200
 DB_NAME = 'orderer'