Exemplo n.º 1
0
def location(bot, update):
    urld = 'http://api.citysdk.waag.org/layers/parking.garage/objects?per_page=25'
    user = User.objects.get(chat_id=update.message.chat_id)
    User.objects.filter(chat_id=update.message.chat_id).update(
        lastCommand="parking")
    cronologyHandler.createCronology(bot, update, user)
    r = urllib.request.urlopen(urld)
    data = json.loads(r.read().decode(r.info().get_param('charset')
                                      or 'utf-8'))
    closestParkings, closestDistance = calculate_parkings_distance(
        bot, update, data['features'])
    print(closestDistance)
    url, keyboard = utility.getDecoratedMap(bot, update, closestParkings,
                                            data['features'], closestDistance)
    reply_markup = InlineKeyboardMarkup(keyboard,
                                        one_time_keyboard=True,
                                        resize_keyboard=True)
    #bot.sendPhoto(chat_id = update.message.chat_id, photo=url)
    bot.sendMessage(chat_id=update.message.chat_id,
                    text="Choose for more details: ",
                    reply_markup=reply_markup)
    reply_markup = telegram.ReplyKeyboardRemove()
    #bot.sendMessage(chat_id = update.message.chat_id, text="Type /parking to start another search.", reply_markup=reply_markup)
    #sendMessageForParkings(closestParkings, data['features'], bot, update)
    userHandler.setUserBotActived(update.message.chat_id, True)
Exemplo n.º 2
0
 def get_share_items_admin_keyboard(bill_id, trans):
     keyboard = []
     items = trans.get_bill_items(bill_id)
     for item_id, item_name, __ in items:
         item_btn = InlineKeyboardButton(
             text=item_name,
             callback_data=utils.get_action_callback_data(
                 MODULE_ACTION_TYPE, ACTION_SHARE_BILL_ITEM, {
                     const.JSON_BILL_ID: bill_id,
                     const.JSON_ITEM_ID: item_id
                 }))
         keyboard.append([item_btn])
     share_all_btn = InlineKeyboardButton(
         text='Share all items',
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_SHARE_ALL_ITEMS,
             {const.JSON_BILL_ID: bill_id}))
     keyboard.append([share_all_btn])
     back_btn = InlineKeyboardButton(
         text='Back',
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MANAGE_BILL_KB,
             {const.JSON_BILL_ID: bill_id}))
     keyboard.append([back_btn])
     return InlineKeyboardMarkup(keyboard)
Exemplo n.º 3
0
    def execute(self, bot, update, trans, subaction_id, data=None):
        if subaction_id == self.ACTION_SHARE_ALL:
            print("3. Parsing: " + str(datetime.datetime.now().time()))
            cbq = update.callback_query
            bill_id = data.get(const.JSON_BILL_ID)

            __, __, __, is_closed = trans.get_bill_gen_info(bill_id)
            if is_closed is not None:
                debts, unique_users = utils.calculate_remaining_debt(
                    bill_id, trans)
                text, pm = utils.format_debts_bill_text(
                    bill_id, debts, unique_users, trans)
                btns = DisplayPayItemsKB.get_payment_buttons(bill_id,
                                                             cbq.from_user.id,
                                                             trans,
                                                             debts=debts)
                kb = InlineKeyboardMarkup(btns)
                cbq.answer()
                return cbq.edit_message_text(text=text,
                                             parse_mode=pm,
                                             reply_markup=kb)

            user_id = data.get(const.JSON_USER_ID)
            if user_id is None:
                raise Exception('Missing user_id')
            self.share_all_items(bot, cbq, bill_id, user_id, trans)
            print("7. Sent: " + str(datetime.datetime.now().time()))
            counter.Counter.remove_count()
Exemplo n.º 4
0
 def get_manage_bill_keyboard(bill_id, trans):
     bill_name, __, __, __ = trans.get_bill_gen_info(bill_id)
     share_btn = InlineKeyboardButton(text="📮 Share Bill for Collaboration",
                                      switch_inline_query=bill_name)
     refresh_btn = InlineKeyboardButton(
         text="🔄 Refresh Bill",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     share_items = InlineKeyboardButton(
         text="🙋 Add yourself to Item(s)",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_SHARE_ITEMS_KB,
             {const.JSON_BILL_ID: bill_id}))
     share_else_items = InlineKeyboardButton(
         text="💁 Add someone to Item(s)",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_ADD_SOMEONE,
             {const.JSON_BILL_ID: bill_id}))
     calc_bill_btn = InlineKeyboardButton(
         text="⚖ Calculate Split",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_CALCULATE_SPLIT,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[share_btn], [refresh_btn], [share_items],
                                  [share_else_items], [calc_bill_btn]])
Exemplo n.º 5
0
    def get_confirm_payments_keyboard(bill_id, creditor_id, trans):
        pending = trans.get_pending_payments(bill_id, creditor_id)

        kb = []
        for payment in pending:
            btn = InlineKeyboardButton(
                text='{}  {}{:.4f}'.format(
                    utils.format_name(payment[4], payment[2], payment[3]),
                    const.EMOJI_MONEY_BAG,
                    payment[1],
                ),
                callback_data=utils.get_action_callback_data(
                    MODULE_ACTION_TYPE, ACTION_CONFIRM_BILL_PAYMENT, {
                        const.JSON_BILL_ID: bill_id,
                        const.JSON_PAYMENT_ID: payment[0]
                    }))
            kb.append([btn])

        back_btn = InlineKeyboardButton(
            text="Back",
            callback_data=utils.get_action_callback_data(
                MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
                {const.JSON_BILL_ID: bill_id}))
        kb.append([back_btn])
        return InlineKeyboardMarkup(kb)
Exemplo n.º 6
0
    def get_force_confirm_payments_keyboard(bill_id, creditor_id, trans):
        unpaid = trans.get_unpaid_payments(bill_id, creditor_id)

        kb = []
        for payment in unpaid:
            btn = InlineKeyboardButton(
                text='✅ {}  {}{:.2f}'.format(
                    utils.format_name(payment[5], payment[3], payment[4]),
                    const.EMOJI_MONEY_BAG,
                    payment[1],
                ),
                callback_data=utils.get_action_callback_data(
                    MODULE_ACTION_TYPE, ACTION_FORCE_CONFIRM_PAYMENT, {
                        const.JSON_BILL_ID: bill_id,
                        const.JSON_PAYMENT_ID: payment[0]
                    }))
            kb.append([btn])

        back_btn = InlineKeyboardButton(
            text="🔙 Back",
            callback_data=utils.get_action_callback_data(
                MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
                {const.JSON_BILL_ID: bill_id}))
        kb.append([back_btn])
        return InlineKeyboardMarkup(kb)
Exemplo n.º 7
0
 def get_delete_taxes_keyboard(bill_id, trans):
     kb = get_tax_buttons(bill_id, ACTION_DELETE_SPECIFIC_TAX, trans)
     back_btn = InlineKeyboardButton(
         text="Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MODIFY_TAXES_KB,
             {const.JSON_BILL_ID: bill_id}))
     kb.append([back_btn])
     return InlineKeyboardMarkup(kb)
Exemplo n.º 8
0
 def get_edit_items_keyboard(bill_id, trans):
     kb = get_item_buttons(bill_id, ACTION_GET_EDIT_SPECIFIC_ITEM_KB, trans)
     back_btn = InlineKeyboardButton(
         text="Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MODIFY_ITEMS_KB,
             {const.JSON_BILL_ID: bill_id}))
     kb.append([back_btn])
     return InlineKeyboardMarkup(kb)
Exemplo n.º 9
0
 def get_debts_bill_msg(bill_id, user_id, trans):
     __, owner_id, __, __ = trans.get_bill_gen_info(bill_id)
     if user_id == owner_id:
         return SendDebtsBillAdmin.get_debts_bill_msg(bill_id, trans)
     debts, unique_users = utils.calculate_remaining_debt(bill_id, trans)
     text, pm = utils.format_debts_bill_text(bill_id, debts, unique_users,
                                             trans)
     kb = DisplayPayItemsKB.get_payment_buttons(bill_id, trans, debts=debts)
     return text, pm, InlineKeyboardMarkup(kb)
Exemplo n.º 10
0
def get_redirect_pay_keyboard(bill_id):
    refresh_btn = InlineKeyboardButton(
        text='Refresh',
        callback_data=utils.get_action_callback_data(
            MODULE_ACTION_TYPE, ACTION_REFRESH_SHARE_BILL,
            {const.JSON_BILL_ID: bill_id}))
    inspect_btn = InlineKeyboardButton(
        text='Pay Debts', url='https://telegram.me/WhoPayBot?start=' + bill_id)

    return InlineKeyboardMarkup([[refresh_btn], [inspect_btn]])
Exemplo n.º 11
0
 def get_pay_items_keyboard(self, bill_id, trans):
     keyboard = []
     keyboard.extend(DisplayPayItemsKB.get_payment_buttons(bill_id, trans))
     refresh_btn = InlineKeyboardButton(
         text='Refresh',
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     keyboard.append([refresh_btn])
     return InlineKeyboardMarkup(keyboard)
Exemplo n.º 12
0
 def get_pay_items_admin_keyboard(bill_id, trans):
     keyboard = []
     keyboard.extend(DisplayPayItemsKB.get_payment_buttons(bill_id, trans))
     back_btn = InlineKeyboardButton(
         text='Back',
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MANAGE_BILL_KB,
             {const.JSON_BILL_ID: bill_id}))
     keyboard.append([back_btn])
     return InlineKeyboardMarkup(keyboard)
Exemplo n.º 13
0
def sendMessageForChargePoints(closestChargePoints, data, bot, update):
    emoticons = [utility.ONE_KEYCAP, utility.TWO_KEYCAP, utility.THREE_KEYCAP]
    i=0
    for p in closestChargePoints:
        message = emoticons[i] + " The charge point is: " + data[p]['properties']['title'] + "\n"
        bot.sendLocation(update.message.chat_id, data[p]['geometry']['coordinates'][1], data[p]['geometry']['coordinates'][0])
        keyboard = [[InlineKeyboardButton("Show Details", callback_data= str(p))]]         
        reply_markup = InlineKeyboardMarkup(keyboard)
        update.message.reply_text(text=message, reply_markup=reply_markup) 
        i += 1
    bot.sendMessage(chat_id=update.message.chat_id, text = "Click on show details to get more informations or start a new search typing /charge point")  
Exemplo n.º 14
0
def location(bot, update):
    urld = 'https://kaart.amsterdam.nl/datasets/datasets-item/t/parkeerlocaties-1/export/json'
    user = User.objects.get(chat_id=update.message.chat_id)
    User.objects.filter(chat_id=update.message.chat_id).update(lastCommand="chargePoint")
    cronologyHandler.createCronology(bot, update, user)
    r = urllib.request.urlopen(urld)
    data = json.loads(r.read().decode(r.info().get_param('charset') or 'utf-8'))
    closestChargePoints, closestDistance = calculate_charge_point_distance(bot, update, data['features']);    
    url, keyboard = utility.getDecoratedMap(bot, update, closestChargePoints, data['features'], closestDistance)
    reply_markup = InlineKeyboardMarkup(keyboard, one_time_keyboard=True, resize_keyboard=True)
    bot.sendMessage(chat_id = update.message.chat_id, text="Choose for more details: ", reply_markup=reply_markup)
    reply_markup = telegram.ReplyKeyboardRemove()
    userHandler.setUserBotActived(update.message.chat_id, True)
Exemplo n.º 15
0
 def get_debts_bill_msg(bill_id, trans):
     bill_name, __, __, __ = trans.get_bill_gen_info(bill_id)
     share_btn = InlineKeyboardButton(text="Share Bill",
                                      switch_inline_query=bill_name)
     refresh_btn = InlineKeyboardButton(
         text="Refresh Bill",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     confirm_btn = InlineKeyboardButton(
         text="Confirm Payments",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_CONFIRM_PAYMENTS_KB,
             {const.JSON_BILL_ID: bill_id}))
     kb = InlineKeyboardMarkup([[share_btn], [refresh_btn], [confirm_btn]])
     text, pm = utils.get_debts_bill_text(bill_id, trans)
     return text, pm, kb
Exemplo n.º 16
0
 def get_new_bill_keyboard(bill_id):
     modify_items_btn = InlineKeyboardButton(
         text="📝 Add/Edit Items",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MODIFY_ITEMS_KB,
             {const.JSON_BILL_ID: bill_id}))
     modify_taxes_btn = InlineKeyboardButton(
         text="💸 Add/Edit Taxes",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_MODIFY_TAXES_KB,
             {const.JSON_BILL_ID: bill_id}))
     done_btn = InlineKeyboardButton(
         text="👍 Done",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_CREATE_BILL_DONE,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[modify_items_btn], [modify_taxes_btn],
                                  [done_btn]])
Exemplo n.º 17
0
 def get_inspect_bill_keyboard(bill_id):
     kb = []
     by_user_btn = InlineKeyboardButton(
         text="Inspect Bill by Person",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     by_item_btn = InlineKeyboardButton(
         text="Inspect Bill by Item",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     back_btn = InlineKeyboardButton(
         text="Inspect Bill by Item",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
             {const.JSON_BILL_ID: bill_id}))
     kb = [[by_user_btn], [by_item_btn], [back_btn]]
     return InlineKeyboardMarkup(kb)
Exemplo n.º 18
0
def language(bot, update):
    lang_de_button = InlineKeyboardButton(text="Deutsch \U0001F1E9\U0001F1EA", callback_data="ch_lang_de")
    lang_en_button = InlineKeyboardButton(text="Englisch \U0001F1FA\U0001F1F8", callback_data="ch_lang_en")
    lang_nl_button = InlineKeyboardButton(text="Nederlands \U0001F1F3\U0001F1F1", callback_data="ch_lang_nl")
    lang_eo_button = InlineKeyboardButton(text="Esperanto \U0001F30D", callback_data="ch_lang_eo")
    lang_br_button = InlineKeyboardButton(text="Português \U0001F1E7\U0001F1F7", callback_data="ch_lang_br")
    lang_es_button = InlineKeyboardButton(text="Español \U0001F1EA\U0001F1F8", callback_data="ch_lang_es")
    lang_ru_button = InlineKeyboardButton(text="Русский \U0001F1F7\U0001F1FA", callback_data="ch_lang_ru")
    lang_fa_button = InlineKeyboardButton(text="فارسی \U0001F1EE\U0001F1F7", callback_data="ch_lang_fa")

    lang_keyboard = InlineKeyboardMarkup([[lang_de_button, lang_en_button], [lang_br_button, lang_ru_button, lang_nl_button], [lang_es_button, lang_eo_button, lang_fa_button]])
    db = DBwrapper.get_instance()

    if update.callback_query:
        # TODO maybe text user in private instead of group!
        lang_id = db.get_lang_id(update.callback_query.from_user.id)
        bot.editMessageText(chat_id=update.callback_query.message.chat_id, text=translate("langSelect", lang_id), reply_markup=lang_keyboard, message_id=update.callback_query.message.message_id)
    else:
        lang_id = db.get_lang_id(update.message.from_user.id)
        bot.sendMessage(chat_id=update.message.chat_id, text=translate("langSelect", lang_id), reply_markup=lang_keyboard, message_id=update.message.message_id)
Exemplo n.º 19
0
def get_redirect_pay_keyboard(bill_id):
    refresh_btn = InlineKeyboardButton(
        text='🔄 Refresh',
        callback_data=utils.get_action_callback_data(
            MODULE_ACTION_TYPE,
            ACTION_REFRESH_SHARE_BILL,
            {const.JSON_BILL_ID: bill_id}
        )
    )
    inspect_btn = InlineKeyboardButton(
        text='💸 Pay Debts',
        url='https://telegram.me/{}?start={}'.format(
            EnvSettings.APP_NAME, bill_id
        )
    )

    return InlineKeyboardMarkup([
        [refresh_btn],
        [inspect_btn]
    ])
Exemplo n.º 20
0
    def get_share_items_keyboard(bill_id, trans, user_id):
        keyboard = []
        items = trans.get_bill_items(bill_id)
        refresh_btn = InlineKeyboardButton(
            text='🔄 Refresh',
            callback_data=utils.get_action_callback_data(
                MODULE_ACTION_TYPE, ACTION_REFRESH_BILL,
                {const.JSON_BILL_ID: bill_id}))
        keyboard.append([refresh_btn])
        for item_id, item_name, __ in items:
            if trans.has_bill_share(bill_id, item_id, user_id):
                text = "👋 Unshare " + item_name
            else:
                text = '☝️ Share ' + item_name
            item_btn = InlineKeyboardButton(
                text=text,
                callback_data=utils.get_action_callback_data(
                    MODULE_ACTION_TYPE, ACTION_SHARE_BILL_ITEM, {
                        const.JSON_ITEM_ID: item_id,
                        const.JSON_USER_ID: user_id
                    }))
            keyboard.append([item_btn])

        text = "🙅 Unshare all items"
        for item_id, item_name, __ in items:
            if not trans.has_bill_share(bill_id, item_id, user_id):
                text = '🙌 Share all items'
                break

        share_all_btn = InlineKeyboardButton(
            text=text,
            callback_data=utils.get_action_callback_data(
                MODULE_ACTION_TYPE, ACTION_SHARE_ALL_ITEMS, {
                    const.JSON_BILL_ID: bill_id,
                    const.JSON_USER_ID: user_id
                }))
        keyboard.append([share_all_btn])

        return InlineKeyboardMarkup(keyboard)
Exemplo n.º 21
0
 def get_modify_items_keyboard(bill_id):
     add_item_btn = InlineKeyboardButton(
         text="➕ Add item(s)",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_ADD_ITEMS,
             {const.JSON_BILL_ID: bill_id}))
     edit_item_btn = InlineKeyboardButton(
         text="🔃 Edit item",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_EDIT_ITEM_KB,
             {const.JSON_BILL_ID: bill_id}))
     del_item_btn = InlineKeyboardButton(
         text="➖ Delete item",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_DELETE_ITEM_KB,
             {const.JSON_BILL_ID: bill_id}))
     back_btn = InlineKeyboardButton(
         text="🔙 Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_NEW_BILL_KB,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[add_item_btn], [edit_item_btn],
                                  [del_item_btn], [back_btn]])
Exemplo n.º 22
0
 def get_modify_taxes_keyboard(bill_id):
     add_tax_btn = InlineKeyboardButton(
         text="➕ Add tax",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_ADD_TAX,
             {const.JSON_BILL_ID: bill_id}))
     edit_tax_btn = InlineKeyboardButton(
         text="🔃 Edit tax",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_EDIT_TAX_KB,
             {const.JSON_BILL_ID: bill_id}))
     del_tax_btn = InlineKeyboardButton(
         text="➖ Delete tax",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_DELETE_TAX_KB,
             {const.JSON_BILL_ID: bill_id}))
     back_btn = InlineKeyboardButton(
         text="🔙 Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_NEW_BILL_KB,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[add_tax_btn], [edit_tax_btn],
                                  [del_tax_btn], [back_btn]])
Exemplo n.º 23
0
 def get_edit_item_keyboard(bill_id, item_id, trans):
     name, price = trans.get_item(item_id)
     edit_name_btn = InlineKeyboardButton(
         text="Edit Name: '{}'".format(name),
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_EDIT_SPECIFIC_ITEM_NAME, {
                 const.JSON_BILL_ID: bill_id,
                 const.JSON_ITEM_ID: item_id
             }))
     edit_price_btn = InlineKeyboardButton(
         text="Edit Price: '{:.2f}'".format(price),
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_EDIT_SPECIFIC_ITEM_PRICE, {
                 const.JSON_BILL_ID: bill_id,
                 const.JSON_ITEM_ID: item_id
             }))
     back_btn = InlineKeyboardButton(
         text="Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_EDIT_ITEM_KB,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[edit_name_btn], [edit_price_btn],
                                  [back_btn]])
Exemplo n.º 24
0
 def get_edit_tax_keyboard(bill_id, tax_id, trans):
     name, amt = trans.get_tax(tax_id)
     edit_name_btn = InlineKeyboardButton(
         text="Edit Name: '{}'".format(name),
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_EDIT_SPECIFIC_TAX_NAME, {
                 const.JSON_BILL_ID: bill_id,
                 const.JSON_TAX_ID: tax_id
             }))
     edit_amt_btn = InlineKeyboardButton(
         text="Edit Amount: '{:.2f}'".format(amt),
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_EDIT_SPECIFIC_TAX_AMT, {
                 const.JSON_BILL_ID: bill_id,
                 const.JSON_TAX_ID: tax_id
             }))
     back_btn = InlineKeyboardButton(
         text="Back",
         callback_data=utils.get_action_callback_data(
             MODULE_ACTION_TYPE, ACTION_GET_EDIT_TAX_KB,
             {const.JSON_BILL_ID: bill_id}))
     return InlineKeyboardMarkup([[edit_name_btn], [edit_amt_btn],
                                  [back_btn]])