function printing_choose_pos($from_bill_print = false)
{
    global $tpl;
    if (!takeaway_is_set($_SESSION['sourceid'])) {
        $tmp = '<font color="Red">' . ucfirst(phr('SET_TAKEAWAY_SURNAME_FIRST')) . '</font>';
        $tpl->append('messages', $tmp);
        orders_list();
        return 0;
    }
    $user = new user($_SESSION['userid']);
    if (table_is_closed($_SESSION['sourceid']) && (!$user->level[USER_BIT_CASHIER] || $from_bill_print)) {
        table_closed_interface_pos();
        return 0;
    }
    $tpl->set_waiter_template_file('printing');
    $tmp = printing_commands_pos();
    $tpl->append('commands', $tmp);
    $tmp = navbar_empty_pos();
    $tpl->assign('navbar', $tmp);
}
Exemplo n.º 2
0
function table_ask_close_pos()
{
    global $tpl;
    if (!takeaway_is_set($_SESSION['sourceid'])) {
        $tmp = '<font color="Red">' . ucfirst(phr('SET_TAKEAWAY_SURNAME_FIRST')) . '</font>';
        $tpl->append('messages', $tmp);
        orders_list_pos();
        return 0;
    }
    if (table_is_closed($_SESSION['sourceid'])) {
        table_closed_interface_pos();
        return 0;
    }
    $tpl->set_waiter_template_file('question');
    $tmp = '
	<FORM ACTION="orders.php" METHOD=POST name="form1">
	<INPUT TYPE="HIDDEN" NAME="command" VALUE="close">
	' . ucfirst(phr('CLOSE_TABLE_ASK')) . '
	</FORM>
	';
    $tpl->assign('question', $tmp);
    $tmp = navbar_form_pos('form1', 'orders.php?command=list');
    $tpl->assign('navbar', $tmp);
    return 0;
}