Exemple #1
0
def run_program():
    while True:
        desicion = input('Do you want to start program? Input Yes or No ')
        if desicion.lower() == 'yes':
            print(f'Today is {datetime.now()}')
            employees_dict = get_employees()
            with open('application//db//employees.json', 'w',
                      encoding='utf-8') as file:
                json.dump(employees_dict, file, ensure_ascii=False, indent=2)
            calculate_salary(employees_dict)
        else:
            break
Exemple #2
0
def menu():
    startup_text = '''\n"Бухгалтерия 1.0"
    1 - запросить список активных сотрудников
    2 - рассчитать объём выплат за текущий период
    3 - Завершить работу программы
    Выберите действие: '''

    while True:
        command = input(startup_text)
        if command == '1':
            print(f'\nТекущая дата: {datetime.now().year}.{datetime.now().month}.{datetime.now().day}')
            get_employees()
        elif command == '2':
            print(f'\nТекущая дата: {datetime.now().year}.{datetime.now().month}.{datetime.now().day}')
            calculate_salary()
        elif command == '3':
            print('\nЗавершение работы...')
            break
        else:
            print('Команда не распознана. Пожалуйста, повторите ввод.')
        input('Для продолжения нажмите Enter...')
        print("\n" * 50)
Exemple #3
0
from application import people, salary

if __name__ == '__main__':
    name1, salary1 = people.get_employees()
    salary.calculate_salary(name1, salary1)
Exemple #4
0
from application.people import get_employees
from application.salary import get_salary
from datetime import datetime
from dirty_main import *

if __name__ == '__main__':
    print(datetime.now())
    get_employees()
Exemple #5
0
def run_app():
    print(datetime.now())
    calculate_salary()
    get_employees()
Exemple #6
0
import datetime

# 2 разных способа импорта
import application.salary
from application.people import get_employees

if __name__ == '__main__':
    print("Current date = ", datetime.date.today().strftime("%d-%m-%Y"))
    print(application.salary.calculate_salary())
    print()
    print(get_employees())
def main():
    calculate_salary()
    get_employees()
Exemple #8
0
def main():
    msg = calculate_salary()
    print(msg)
    msg1 = people.get_employees()
    print(msg1)
Exemple #9
0
import datetime
from application import salary, people

if __name__ == '__main__':
    print(datetime.datetime.now())
    salary.calculate_salary()
    print(datetime.datetime.now())
    people.get_employees()
Exemple #10
0
# main.py

from application import people
from datetime import datetime
from application import salary

if __name__ == '__main__':
    print(datetime.date(datetime.now()))
    print(people.get_employees())
    print(salary.calculate_salary())
Exemple #11
0
from datetime import *
from application.salary import calculate_salary
from application.people import get_employees

if __name__ == '__main__':
    calculate_salary(2, 5)
    get_employees("Виктор")
    today = datetime.today()
    print("{}".format(today.strftime("%Y/%m/%d %H:%M")))
Exemple #12
0
from application.salary import calculate_salary
from application.people import get_employees
from datetime import datetime

if __name__ == '__main__':
    calculate_salary(10)
    get_employees('employees')
    print(datetime.now())