diff --git a/app/handlers/balance/main.py b/app/handlers/balance/main.py index f2616b96..9c641d26 100644 --- a/app/handlers/balance/main.py +++ b/app/handlers/balance/main.py @@ -266,9 +266,10 @@ async def get_quick_amount_buttons(language: str, user: User) -> list: period_label = f'{period} дней' # Скидка считается от полной базовой стоимости (период + аддоны без скидок) - total_base = base_price_kopeks + ( - devices_price_per_month + sum(servers_per_month_prices) + traffic_price_per_month - ) * months + total_base = ( + base_price_kopeks + + (devices_price_per_month + sum(servers_per_month_prices) + traffic_price_per_month) * months + ) has_discount = total_base > total_price and total_base > 0 if has_discount: diff --git a/app/handlers/promocode.py b/app/handlers/promocode.py index 30132006..ce2d4621 100644 --- a/app/handlers/promocode.py +++ b/app/handlers/promocode.py @@ -30,9 +30,7 @@ async def show_promocode_menu(callback: types.CallbackQuery, db_user: User, stat except TelegramBadRequest as error: error_message = str(error).lower() if 'there is no text in the message to edit' in error_message: - await callback.message.answer( - texts.PROMOCODE_ENTER, reply_markup=get_back_keyboard(db_user.language) - ) + await callback.message.answer(texts.PROMOCODE_ENTER, reply_markup=get_back_keyboard(db_user.language)) else: raise