示例#1
0
    $db_extra_left_join = '';
    $db_extra_and = '';
}
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . $db_extra_left_join . '
                            WHERE 1 ' . $list->sqlSearch() . $db_extra_and . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$right_column .= $list->showHeader($total_row);
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $right_column .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" ondblclick="detailRecord()" onclick="active_record(' . $row[$id_field] . ')" data-record_id="' . $row[$id_field] . '"');
    /* code something */
    $right_column .= '<td class="center">' . format_codenumber($row['use_id'], 6, PREFIX_STAFF_CODE) . '</td>';
    $right_column .= '<td class="center">' . $row['use_code'] . '</td>';
    $right_column .= '<td class="center">' . $row['use_name'] . '</td>';
    $right_column .= '<td class="center">' . $row['use_address'] . '</td>';
    $right_column .= '<td class="center">' . $row['use_phone'] . '</td>';
    $right_column .= '<td class="center">' . $row['use_note'] . '</td>';
    $right_column .= $list->end_tr();
}
$right_column .= $list->showFooter();
if ($isAjaxRequest) {
    $action = getValue('action', 'str', 'POST', '');
    switch ($action) {
        case 'listRecord':
            echo $right_column;
            break;
    }
                            WHERE 1 ' . $list->sqlSearch() . $sql_search . '
                            ORDER BY ' . $list->sqlSort() . ' pro_id DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$listing_menu .= $list->showHeader($total_row);
/* tạo mảng đơn vị tính */
$array_unit = array();
$db_query = new db_query('SELECT * FROM units');
while ($row = mysqli_fetch_assoc($db_query->result)) {
    $array_unit[$row['uni_id']] = $row['uni_name'];
}
/* Hiện thị nội dung các bản ghi*/
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $listing_menu .= $list->start_tr($i, $row['pro_id'], 'class="menu-normal record-item" ondblclick="mindowScript.addProducts(' . $row['pro_id'] . ')" data-record_id="' . format_codenumber($row['pro_id'], 6, PREFIX_PRODUCT_CODE) . '" data-pro_name="' . $row['pro_name'] . '" data-pro_unit="' . $array_unit[$row['pro_unit_id']] . '"');
    /* code something */
    $listing_menu .= '<td class="center">' . $row['pro_name'] . '</td>';
    $listing_menu .= '<td class="center">' . $array_unit[$row['pro_unit_id']] . '</td>';
    $listing_menu .= $list->end_tr();
}
$listing_menu .= $list->showFooter();
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
    //catching ajax request
    $action = getValue('action', 'str', 'POST', '', 3);
    switch ($action) {
        case 'searchAjax':
        case 'pagingAjax':
            $container = getValue('container', 'str', 'POST', '', 3);
            if ($container == '#listing-menu') {
                echo $listing_menu;
 $db_location = new db_query('SELECT * FROM sections WHERE sec_id =' . $row_sec['des_sec_id'] . '');
 $row_location = mysqli_fetch_assoc($db_location->result);
 $location = $row_sec['des_name'] . ' - ' . $row_location['sec_name'];
 /* Số tiền tổng tiền*/
 $vat_value = $row['bii_vat'] / 100;
 $total_money_ext = $row['bii_true_money'] - $row['bii_true_money'] * $row['bii_discount'] / 100 + $row['bii_true_money'] * $row['bii_extra_fee'] / 100;
 $total_money_real = $total_money_ext * (1 + $vat_value);
 unset($db_location);
 unset($db_section);
 $money_real = round($total_money_real, -3) - $row['bii_money_debit'];
 $i++;
 $content_column .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" data-record_id="' . $row[$id_field] . '"');
 /* code something */
 $content_column .= '<td class="center">' . date('d/m/Y h:i', $row['bii_start_time']) . '</td>';
 $content_column .= '<td class="center">' . $location . '</td>';
 $content_column .= '<td class="center">' . format_codenumber($row['bii_id'], 6, PREFIX_BILL_CODE) . '</td>';
 $content_column .= '<td class="text-right">' . number_format($row['bii_true_money']) . '</td>';
 // Số tiền tổng chưa giảm
 $content_column .= '<td class="text-right">' . number_format($row['bii_true_money'] * $row['bii_discount'] / 100) . '</td>';
 $content_column .= '<td class="text-right">' . number_format($row['bii_true_money'] * $row['bii_extra_fee'] / 100) . '</td>';
 $content_column .= '<td class="text-right">' . number_format($total_money_ext * $row['bii_vat'] / 100) . '</td>';
 $content_column .= '<td class="text-right">' . number_format(round($total_money_real, -3)) . '</td>';
 $content_column .= '<td class="text-right">' . number_format($row['bii_type'] == 0 ? $money_real : 0) . '</td>';
 /* Tiền mặt*/
 $content_column .= '<td class="text-right">' . number_format($row['bii_type'] == 1 ? $money_real : 0) . '</td>';
 $content_column .= '<td class="text-right">' . number_format($row['bii_money_debit']) . '</td>';
 $content_column .= $list->end_tr();
 /* Tổng các số tiền dựa theo hóa đơn bán hàng*/
 $all_money_default += $row['bii_true_money'];
 $all_money_discount += $row['bii_true_money'] * $row['bii_discount'] / 100;
 $all_money_real += round($total_money_real, -3);
示例#4
0
}
// tạo mảng để hiện thị kho hàng
$store_array = array();
$db_store = new db_query('SELECT * FROM categories_multi WHERE cat_type = "stores" ');
while ($row_store = mysqli_fetch_assoc($db_store->result)) {
    $store_array[$row_store['cat_id']] = $row_store['cat_name'];
}
//Vì đây là module cần 2 table listing nên khai báo thêm table_extra id=table-listing-left
$right_column .= $list->showHeader($total_row, '', 'id="table-listing-right"');
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $right_column .= $list->start_tr($i, $row['sto_id'], 'class="menu-normal record-item" ondblclick="detail_stock_transfer(' . $row['sto_id'] . ')" onclick="active_record_r(' . $row['sto_id'] . ')" data-record_id="' . $row['sto_id'] . '"');
    /* code something */
    //Số phiếu - ID phiếu
    $right_column .= '<td class="center" width="">' . format_codenumber($row['sto_id'], 6) . '</td>';
    //Người trả
    $right_column .= '<td width="120" class="center">' . $staff_array[$row['sto_staff_id']] . '</td>';
    //Mô tả
    $right_column .= '<td class="center">' . date('d/m/Y H:i', $row['sto_time']) . '</td>';
    //số tiền
    $right_column .= '<td width="120" class="text-left">' . $store_array[$row['sto_from_storeid']] . '</td>';
    $right_column .= '<td width="120" class="text-left">' . $store_array[$row['sto_to_storeid']] . '</td>';
    $right_column .= $list->end_tr();
}
$right_column .= $list->showFooter();
//footer control
//Phần bộ lọc của phiếu thu
// lay ra list danh sách nhân viên kiểm kê
$list_staff = '';
$db_query_customer = new db_query('SELECT * FROM users');
示例#5
0
 /**
  * list các bản ghi trong thùng rác
  */
 function listRecordTrash()
 {
     $html = '';
     //lấy ra danh sách các bản ghi trong thùng rác của bảng financial
     $control = getValue('control', 'str', 'POST', '');
     $control = $control == 'in' ? 'in' : 'out';
     $control_text = $control == 'in' ? 'thu' : 'chi';
     $class_context_menu = 'menu-trash';
     //Bắt đầu modal
     $this->openModalNoForm();
     $this->add('<div class="h5 help-block">Danh sách phiếu ' . $control_text . ' trong thùng rác</div>');
     $this->list->add('', 'Ngày ' . $control_text);
     $this->list->add('', 'Số phiếu');
     $this->list->add('', 'Người nhận');
     $this->list->add('', 'Diễn giải');
     $this->list->add('', 'Số tiền');
     $db_count = new db_count('SELECT count(*) as count
                               FROM trash
                               WHERE tra_table = "' . $this->bg_table . '"
                                     AND tra_option_filter = "money_' . $control . '"');
     $total = $db_count->total;
     unset($db_count);
     $array_row = trash_list($this->bg_table, 10, 0, 'AND tra_option_filter = "money_' . $control . '"');
     $this->list->limit($total);
     $total_row = count($array_row);
     $html .= $this->list->showHeader($total_row);
     $i = 0;
     //Lấy ra list lý do thu chi
     $db_query = new db_query('SELECT * FROM ' . $this->cat_table . ' WHERE cat_type = "money_' . $control . '"');
     $list_cat = array();
     while ($row = mysqli_fetch_assoc($db_query->result)) {
         $list_cat[$row['cat_id']] = $row['cat_name'];
     }
     foreach ($array_row as $row) {
         $i++;
         $html .= $this->list->start_tr($i, $row[$this->id_field], 'class="' . $class_context_menu . ' record-item" onclick="active_record(' . $row[$this->id_field] . ')" data-record_id="' . $row[$this->id_field] . '"');
         //Ngày tạo
         $html .= '<td class="center">' . date('d/m/Y H:i', $row['fin_date']) . '</td>';
         //Số phiếu - ID phiếu
         $html .= '<td class="center">' . format_codenumber($row[$this->id_field], 6) . '</td>';
         //Người nộp
         $html .= '<td>' . $row['fin_username'] . '</td>';
         //Mô tả
         $html .= '<td>' . $list_cat[$row['fin_cat_id']] . '</td>';
         //số tiền
         $html .= '<td class="text-right">' . format_number($row['fin_money']) . '</td>';
         $html .= $this->list->end_tr();
     }
     $html .= $this->list->showFooter();
     $this->add($html);
     $this->closeModalNoForm();
 }
示例#6
0
$total_row = mysqli_num_rows($db_financies_bill_out->result);
$bottom_right_column = '<div class="bottom_conten_right_column">';
$bottom_conten_right_column = '';
$bottom_conten_right_column .= $list->showHeader($total_row, '', 'id="table-listing-bot-right"');
$i = 0;
$total_all_pay_bill_out = 0;
while ($data_financies_bill_out = mysqli_fetch_assoc($db_financies_bill_out->result)) {
    $i++;
    if ($data_financies_bill_out['fin_pay_type'] == PAY_TYPE_CASH) {
        $fin_pay_type = 'Tiền mặt';
    }
    if ($data_financies_bill_out['fin_pay_type'] == PAY_TYPE_CARD) {
        $fin_pay_type = 'Thẻ';
    }
    $bottom_conten_right_column .= $list->start_tr($i, $data_financies_bill_out['fin_id'], 'class="menu-normal record-item" ondblclick="detail_financies(' . $data_financies_bill_out['fin_id'] . ')" data-record_id="' . $data_financies_bill_out['fin_id'] . '"');
    $bottom_conten_right_column .= '<td class="center" width="100">' . format_codenumber($data_financies_bill_out['fin_id'], 6, '') . '</td>';
    $bottom_conten_right_column .= '<td class="center" width="100">' . date('d/m/Y', $data_financies_bill_out['fin_updated_time']) . '</td>';
    $bottom_conten_right_column .= '<td class="text-right" width="100">' . number_format($data_financies_bill_out['fin_money']) . '</td>';
    $bottom_conten_right_column .= '<td class="center" width="100">' . $fin_pay_type . '</td>';
    $bottom_conten_right_column .= '<td>' . $data_financies_bill_out['fin_note'] . '</td>';
    $bottom_conten_right_column .= $list->end_tr();
    $total_all_pay_bill_out += $data_financies_bill_out['fin_money'];
}
unset($db_financies_bill_out);
$bottom_conten_right_column .= $list->showFooter();
$bottom_conten_right_column .= '<div class="total-pos">
    <div class="col-xs-6-lft col-xs-6-lft-l">
        <span>Tổng Cộng:</span><input class="ttl-hd" value="" readonly="readonly"/>
    </div>
    <div class="col-xs-6-rgh col-xs-6-lft-r">
        <input class="ttl-hd" value="' . number_format($total_all_pay_bill_out) . ' ' . DEFAULT_MONEY_UNIT . '" readonly="readonly"/>
示例#7
0
 function fillerStockTransfer()
 {
     $right_column = '';
     //Hiển thị danh sách phiếu thu bên trái
     #Bắt đầu với datagird
     $list = new dataGrid('sto_id', 30);
     $list->add('', 'Số phiếu');
     $list->add('', 'Nhân viên chuyển');
     $list->add('', 'Ngày chuyển');
     $list->add('', 'Từ kho');
     $list->add('', 'Đến kho');
     // lấy biên từ form tìm kiếm theo ngày và nhân viên
     $start_date_in = getValue('start_date_in', 'str', 'POST', 0);
     $date_from = convertDateTime($start_date_in, '0:0:0');
     $end_date_in = getValue('end_date_in', 'str', 'POST', 0);
     $date_to = convertDateTime($end_date_in, '0:0:0');
     $staff_id = getValue('list_staff_id', 'int', 'POST', 0);
     if ($start_date_in && $end_date_in && $staff_id) {
         $search_sql = ' AND sto_time >=' . $date_from . ' AND sto_time <=' . $date_to . ' AND sto_staff_id = ' . $staff_id . ' ';
     } elseif ($staff_id) {
         $search_sql = ' AND sto_staff_id = ' . $staff_id . '';
     } elseif ($start_date_in && $end_date_in) {
         $search_sql = ' AND sto_time >=' . $date_from . ' AND sto_time <=' . $date_to . '';
     } else {
         $search_sql = '';
     }
     // slect list danh sách phiếu kiểm kê
     $db_count = new db_count('SELECT count(*) as count
                         FROM stock_transfer
                         WHERE 1 ' . $list->sqlSearch() . $search_sql . '
                         ');
     $total = $db_count->total;
     unset($db_count);
     $sql_query = 'SELECT *
                         FROM stock_transfer
                         WHERE 1 ' . $list->sqlSearch() . $search_sql . '
                         ORDER BY ' . $list->sqlSort() . ' sto_id DESC
                         ' . $list->limit($total);
     $db_listing = new db_query($sql_query);
     $total_row = mysqli_num_rows($db_listing->result);
     // tạo mảng để hiện thị tên nhân viên
     $staff_array = array();
     $db_staff = new db_query('SELECT * FROM users');
     while ($row_user = mysqli_fetch_assoc($db_staff->result)) {
         $staff_array[$row_user['use_id']] = $row_user['use_name'];
     }
     // tạo mảng để hiện thị kho hàng
     $store_array = array();
     $db_store = new db_query('SELECT * FROM categories_multi WHERE cat_type = "stores" ');
     while ($row_store = mysqli_fetch_assoc($db_store->result)) {
         $store_array[$row_store['cat_id']] = $row_store['cat_name'];
     }
     //Vì đây là module cần 2 table listing nên khai báo thêm table_extra id=table-listing-left
     $right_column .= $list->showHeader($total_row, '', 'id="table-listing-right"');
     $i = 0;
     while ($row = mysqli_fetch_assoc($db_listing->result)) {
         $i++;
         $right_column .= $list->start_tr($i, $row['sto_id'], 'class="menu-normal record-item" ondblclick="detail_stock_transfer(' . $row['sto_id'] . ')" dblclick="detail_record(' . $row['sto_id'] . ')" onclick="active_record(' . $row['sto_id'] . ')" data-record_id="' . $row['sto_id'] . '"');
         /* code something */
         //Số phiếu - ID phiếu
         $right_column .= '<td class="center" width="">' . format_codenumber($row['sto_id'], 6) . '</td>';
         //Người trả
         $right_column .= '<td width="120" class="center">' . $staff_array[$row['sto_staff_id']] . '</td>';
         //Mô tả
         $right_column .= '<td class="center">' . date('d/m/Y H:i', $row['sto_time']) . '</td>';
         //số tiền
         $right_column .= '<td width="120" class="text-left">' . $store_array[$row['sto_from_storeid']] . '</td>';
         $right_column .= '<td width="120" class="text-left">' . $store_array[$row['sto_to_storeid']] . '</td>';
         $right_column .= $list->end_tr();
     }
     $right_column .= $list->showFooter();
     $this->add($right_column);
 }
示例#8
0
 public function openDesk()
 {
     //Phần này sẽ trả về json - khai báo biến chứa array kết quả trả về
     $array_return = array();
     //Kiểm tra xem bàn hiện tại đã mở chưa
     $desk_id = getValue('desk_id', 'int', 'POST', 0);
     if (!$desk_id) {
         return;
     }
     check_desk_exist($desk_id);
     $db_query = new db_query('SELECT * FROM current_desk WHERE cud_desk_id = ' . $desk_id);
     $desk_data = mysqli_fetch_assoc($db_query->result);
     unset($db_query);
     if ($desk_data) {
         //Nếu bàn đang mở thì show ra
         $this->getCurrentDeskDetail();
         return;
     }
     //nếu không thì mở bàn
     //khai báo các giá trị default khi mở bàn
     $cud_start_time = time();
     $cud_note = '';
     $cud_desk_id = $desk_id;
     //id bàn
     $cud_customer_id = 0;
     //id khách hàng
     $cud_staff_id = 0;
     //id nhân viên phục vụ
     $cud_extra_fee = 0;
     //phụ phí tính theo %
     $cud_vat = 0;
     //thuế VAT tính theo %
     $cud_customer_discount = 0;
     //giảm giá áp dụng cho loại khách
     $cud_debit = 0;
     //ghi nợ hay ko?
     $cud_pay_type = PAY_TYPE_CASH;
     //loại thanh toán là tiền mặt hay qua thẻ
     $array_return['cud_start_time'] = $cud_start_time;
     $array_return['start_time_string'] = date('d/m/Y H:i', $cud_start_time);
     $array_return['cud_note'] = $cud_note;
     $array_return['cud_desk_id'] = $cud_desk_id;
     $array_return['cud_customer_id'] = $cud_customer_id;
     $array_return['cud_staff_id'] = $cud_staff_id;
     $array_return['cud_extra_fee'] = $cud_extra_fee;
     $array_return['cud_vat'] = $cud_vat;
     $array_return['cud_customer_discount'] = $cud_customer_discount;
     $array_return['cud_debit'] = $cud_debit;
     $array_return['cud_pay_type'] = $cud_pay_type;
     $myform = new generate_form();
     $myform->addTable('current_desk');
     $myform->add('cud_desk_id', 'cud_desk_id', 1, 1, $cud_desk_id);
     $myform->add('cud_customer_id', 'cud_customer_id', 1, 1, $cud_customer_id);
     $myform->add('cud_staff_id', 'cud_staff_id', 1, 1, $cud_staff_id);
     $myform->add('cud_note', 'cud_note', 0, 1, $cud_note);
     $myform->add('cud_start_time', 'cud_start_time', 1, 1, $cud_start_time);
     $myform->add('cud_extra_fee', 'cud_extra_fee', 3, 1, $cud_extra_fee);
     $myform->add('cud_vat', 'cud_vat', 3, 1, $cud_vat);
     $myform->add('cud_customer_discount', 'cud_customer_discount', 3, 1, $cud_customer_discount);
     $myform->add('cud_debit', 'cud_debit', 1, 1, $cud_debit);
     $myform->add('cud_pay_type', 'cud_pay_type', 1, 1, $cud_pay_type);
     //insert to current_desk
     $db_execute = new db_execute($myform->generate_insert_SQL());
     unset($db_execute);
     //lấy ra thông tin về menu mở bàn
     $list_menu = '';
     $this->list->add('', 'Tên thực đơn');
     $this->list->add('', 'ĐVT');
     $this->list->add('', 'SL');
     $this->list->add('', 'Đơn giá');
     $this->list->add('', 'Giảm');
     $this->list->add('', 'Thành tiền');
     $menu_start = array(0);
     if ($this->start_menu) {
         foreach ($this->start_menu as $men_id => $men_number) {
             $menu_start[] = $men_id;
         }
     }
     $menu_start = implode(',', $menu_start);
     $db_count = new db_count('SELECT count(*) AS count
                               FROM menus
                               WHERE men_id IN(' . $menu_start . ')');
     $total = $db_count->total;
     unset($db_count);
     $db_listing = new db_query('SELECT *
                                 FROM menus
                                 WHERE men_id IN(' . $menu_start . ')' . $this->list->limit($total));
     $total_row = mysqli_num_rows($db_listing->result);
     $list_menu .= $this->list->showHeader($total_row);
     $i = 0;
     $array_unit = array();
     $db_query = new db_query('SELECT * FROM units');
     while ($row = mysqli_fetch_assoc($db_query->result)) {
         $array_unit[$row['uni_id']] = $row['uni_name'];
     }
     while ($row = mysqli_fetch_assoc($db_listing->result)) {
         $i++;
         $list_menu .= $this->list->start_tr($i, $row['men_id'], 'onclick="selectMenuInDesk(' . $row['men_id'] . ')" class="menu-normal record-item" data-record_id="' . $row['men_id'] . '"');
         /* code something */
         //Thành tiền - công thức tính bằng giá * (100 - %giảm giá) * số lượng
         $menu_item_number = $this->start_menu[$row['men_id']];
         $menu_item_price = $row['men_price'];
         $menu_item_discount = 0;
         $menu_item_total = $menu_item_number * (100 - $menu_item_discount) / 100 * $menu_item_price;
         $list_menu .= '<td class="text-left" width="200px;">' . $row['men_name'] . '</td>';
         $list_menu .= '<td class="center">' . $array_unit[$row['men_unit_id']] . '</td>';
         $list_menu .= '<td class="center">' . $menu_item_number . '</td>';
         $list_menu .= '<td class="text-right">' . format_number($menu_item_price) . '</td>';
         //Giảm giá của menu - theo khuyến mại. hiện tại chưa có quản lý khuyến mại nên để 0 mặc định
         $list_menu .= '<td class="text-center">0</td>';
         $list_menu .= '<td class="text-right">' . format_number($menu_item_total) . '</td>';
         $list_menu .= $this->list->end_tr();
         //insert thông tin về menu mở bàn vào bảng current_desk_menu
         $sql = 'INSERT INTO current_desk_menu(cdm_desk_id, cdm_menu_id, cdm_number, cdm_price, cdm_price_type, cdm_create_time, cdm_updated_time)
                 VALUES (' . $desk_id . ',' . $row['men_id'] . ',' . $this->start_menu[$row['men_id']] . ',' . $row['men_price'] . ',"men_price", ' . time() . ', ' . time() . ')';
         $db_insert = new db_execute($sql);
         unset($db_insert);
     }
     $list_menu .= $this->list->showFooter();
     //log action
     log_action(ACTION_LOG_ADD, 'Tạo bàn ID: ' . $desk_id);
     $array_return['list_menu'] = $list_menu;
     $array_return['array_menu'] = $this->getArrayMenu($desk_id);
     $array_return['customer_code'] = format_codenumber($array_return['cud_customer_id'], 6, PREFIX_CUSTOMER_CODE);
     $array_return['customer_name'] = 'Khách lẻ';
     $array_return['staff_code'] = format_codenumber($array_return['cud_staff_id'], 6, PREFIX_STAFF_CODE);
     $array_return['staff_name'] = 'Không chọn nhân viên';
     $this->add($array_return);
 }
示例#9
0
                                  FROM inventory_products
                                  WHERE inv_id = ' . $record_id . '');
$total = $db_count->total;
unset($db_count);
// lấy ra số lượng các phiếu kiểm kê trong thùng rác
$db_listing = new db_query('SELECT * FROM inventory_products
                            WHERE inv_id = ' . $record_id . ' ORDER BY inv_product_id ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$i = 0;
$listing_product .= $list->showHeader($total_row);
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $listing_product .= $list->start_tr($i, $row['inv_id'], 'class="menu-trash record-item" id="record_' . $row['inv_product_id'] . '"  data-record_id="' . $row['inv_product_id'] . '"');
    /* code something */
    $listing_product .= '<td class="center">' . format_codenumber($row['inv_product_id'], 6) . '</td>';
    $listing_product .= '<td class="center">' . $list_product[$row['inv_product_id']] . '</td>';
    $listing_product .= '<td class="center">' . $row['inp_quantity_system'] . '</td>';
    $listing_product .= '<td class="center">' . $row['inp_quantity_real'] . '</td>';
    $listing_product .= $list->end_tr();
}
$listing_product .= $list->showFooter();
$content_column .= $listing_product;
$rainTpl = new RainTPL();
add_more_css('custom.css', $load_header);
$rainTpl->assign('load_header', $load_header);
$custom_script = file_get_contents('script_half.html');
$rainTpl->assign('custom_script', $custom_script);
$rainTpl->assign('content_column', $content_column);
$rainTpl->assign('footer_control', $footer_control);
$rainTpl->draw('mindow_iframe_1column');
示例#10
0
}
if (isset($_GET['user_id'])) {
    $user_id = getValue('user_id', 'int', 'GET', 0);
    $ten_ma = 'Mã NV';
    $ten_nhom = 'Nhóm nhân viên';
    $name_object = 'Tên nhà cung cấp';
    if ($user_id == 0) {
        $name = 'Không chọn nhân viên';
    }
    if ($user_id != 0) {
        $db_user = new db_query('SELECT * FROM users 
                                        INNER JOIN categories_multi ON use_group_id = cat_id
                                        WHERE use_id = ' . intval($user_id));
        $data_user = mysqli_fetch_assoc($db_user->result);
        unset($db_user);
        $id = format_codenumber($data_user['use_id'], 6, 'NV');
        $avata = $data_user['use_image'];
        $name = $data_user['use_name'];
        $address = $data_user['use_address'];
        $phone = $data_user['use_phone'];
        $note = $data_user['use_note'];
        $team_obj = $data_user['cat_name'];
    }
}
if ($avata == '') {
    $img = $avatar;
} else {
    $img = $avata;
}
$content_column .= '<div class="detail_content">';
$content_column .= '<form action="" method="">';
示例#11
0
        }
        unset($db_fin);
        // ngày cập nhật cuối
        $last_times = max($last_time);
        // người cập nhật
        $db_admin = new db_query('SELECT adm_name FROM admin_users WHERE adm_id = ' . $update_people);
        $data_admin = mysqli_fetch_assoc($db_admin->result);
        unset($db_admin);
        $update_people_last = $data_admin['adm_name'];
    }
}
$content_column .= '<div class="col-xs-12">
    <table class="col-xs-12 infor_bill_trash" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td>Thông tin về: </td>
            <td><strong>Số HĐ: ' . format_codenumber($data_record_id, 6, '') . '</strong></td>
        </tr>
        <tr>
            <td>Ngày tạo: </td>
            <td><strong>' . date("d/m/Y h:i", $bill_start_time) . '</strong></td>
        </tr>
        <tr>
            <td>Người tạo: </td>
            <td><strong>' . $creat_people . '</strong></td>
        </tr>
        <tr>
            <td>Cập nhật lần cuối: </td>
            <td><strong>' . date("d/m/Y h:i", $last_times) . '</strong></td>
        </tr>
        <tr>
            <td>Người cập nhật: </td>
示例#12
0
$res_address = $row_con['con_restaurant_address'];
$res_logo = get_picture_path($row_con['con_restaurant_image']);
$res_phone = $row_con['con_restaurant_phone'];
unset($db_query_res);
$rainTpl = new RainTPL();
add_more_css('css/custom.css', $load_header);
add_more_css('css/custom.css', $load_header, 'print');
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('res_name', $res_name);
$rainTpl->assign('res_address', $res_address);
$rainTpl->assign('res_logo', $res_logo);
$rainTpl->assign('res_phone', $res_phone);
$rainTpl->assign('list_menu', $list_menu);
$rainTpl->assign('start_time', $start_time);
$rainTpl->assign('location', $location);
$rainTpl->assign('admin_name', $admin_name);
$rainTpl->assign('customer_name', $customer_name);
$rainTpl->assign('total', number_format($total));
$rainTpl->assign('desk_discount', $desk_discount);
$rainTpl->assign('desk_vat', $desk_vat);
$rainTpl->assign('desk_extra', $desk_extra);
$rainTpl->assign('extra_fee', number_format($extra_fee));
$rainTpl->assign('discount_money', number_format($discount_money));
$rainTpl->assign('vat_money', number_format($vat_money));
$rainTpl->assign('bill_id', format_codenumber($bill_id, 6, PREFIX_BILL_CODE));
$rainTpl->assign('pay_money', number_format($pay_money));
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$custom_script = file_get_contents('script.html');
$rainTpl->assign('custom_script', $custom_script);
$rainTpl->draw('print');
示例#13
0
                            ORDER BY ' . $list->sqlSort() . ' pro_id ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$listing_product .= $list->showHeader($total_row);
$i = 0;
$array_unit = array();
$db_query = new db_query('SELECT * FROM units');
while ($row = mysqli_fetch_assoc($db_query->result)) {
    $array_unit[$row['uni_id']] = $row['uni_name'];
}
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    if (!$row['pro_unit_id'] || !isset($array_unit[$row['pro_unit_id']])) {
        $array_unit[$row['pro_unit_id']] = '';
    }
    $row['pro_code'] = format_codenumber($row['pro_id'], 6, PREFIX_PRODUCT_CODE);
    $row['pro_unit'] = $array_unit[$row['pro_unit_id']];
    $row['pro_image'] = get_picture_path($row['pro_image']);
    $listing_product .= $list->start_tr($i, $row['pro_id'], 'class="menu-normal record-item" onclick="ImportScript.activeProductListing(' . $row['pro_id'] . ')" ondblclick="ImportScript.addProduct(' . $row['pro_id'] . ')" data-record_id="' . $row['pro_id'] . '" data-pro_name="' . $row['pro_name'] . '" data-pro_code="' . $row['pro_code'] . '" data-pro_unit="' . $array_unit[$row['pro_unit_id']] . '" data-pro_image="' . $row['pro_image'] . '"');
    /* code something */
    $listing_product .= '<td class="text-left" style="width : 50%">' . $row['pro_name'] . '</td>';
    $listing_product .= '<td class="center">' . $row['pro_unit'] . '</td>';
    $listing_product .= '<td class="text-right"></td>';
    $listing_product .= $list->end_tr();
    $list_product_array[] = $row;
}
$listing_product .= $list->showFooter();
$listing_product .= '<script>var ImportScript = ImportScript || {};ImportScript.productListData = ' . json_encode($list_product_array) . ';</script>';
$left_column .= $listing_product;
$left_column .= '</div>';
if ($isAjaxRequest) {
示例#14
0
                            WHERE 1 ' . $list->sqlSearch() . $db_extra . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$right_column .= $list->showHeader($total_row);
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    if (!$row['cus_code']) {
        $customer_code = format_codenumber($row['cus_id'], 6, PREFIX_CUSTOMER_CODE);
    } else {
        $customer_code = $row['cus_code'];
    }
    $right_column .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" data-customer_code="' . $customer_code . '" data-customer_name="' . $row['cus_name'] . '" data-customer_discount="' . $row['cus_cat_discount'] . '" ondblclick="addToParentWindow(' . $row[$id_field] . ')" onclick="active_record(' . $row[$id_field] . ')" data-record_id="' . $row[$id_field] . '"');
    /* code something */
    $right_column .= '<td class="center">' . format_codenumber($row['cus_id'], 6, PREFIX_CUSTOMER_CODE) . '</td>';
    $right_column .= '<td class="center">' . $row['cus_code'] . '</td>';
    $right_column .= '<td class="center">' . $row['cus_name'] . '</td>';
    $right_column .= '<td class="center">' . $row['cus_address'] . '</td>';
    $right_column .= '<td class="center">' . $row['cus_phone'] . '</td>';
    $right_column .= $list->end_tr();
}
$right_column .= $list->showFooter();
//Phần option lựa chọn customer
$right_column .= '<div class="clearfix"></div>
<div class="col-xs-12">
    <span class="col-xs-4"></span>
    <span class="col-xs-8 text-right"><i>Bấm đúp chuột vào một nhân viên để chọn</i>&nbsp;&nbsp;&nbsp;&nbsp; <i class="fa fa-bell-o"></i> Chọn</span>
</div>';
if ($isAjaxRequest) {
    $action = getValue('action', 'str', 'POST', '');
示例#15
0
unset($db_count);
$db_list_bill = new db_query('SELECT *
                                    FROM ' . $tabel . ' INNER JOIN ' . $type_table . ' ON ' . $type_bill_id . ' = ' . $id_obj . '
                                    WHERE ' . $bill_status . ' = 0 ' . $And . '
                                    AND ' . $type_bill_id . ' = ' . $record_id . '
                                    ORDER BY ' . $list->sqlSort() . $bill_id . '
                                    ASC ' . $list->limit($total));
$total_row = mysqli_num_rows($db_list_bill->result);
$content_column .= '<div id="table_result">';
$table_result = '';
$table_result .= $list->showHeader($total_row);
$i = 0;
while ($data_bill = mysqli_fetch_assoc($db_list_bill->result)) {
    $i++;
    $table_result .= $list->start_tr($i, $data_bill[$bill_id], 'class="menu-normal record-item" onclick="active_record(' . $data_bill[$bill_id] . ')"');
    $table_result .= '<td class="center">' . format_codenumber($data_bill[$bill_id], 6, '') . '</td>';
    $table_result .= '<td class="center"  width="170">' . date("d-m-Y h:i", $data_bill[$date]) . '</td>';
    $table_result .= '<td class="text-right" width="100">' . number_format($data_bill[$debit]) . '</td>';
    $table_result .= '<td class="text-right"> </td>';
    $table_result .= '<td class="center">Chưa Thanh Toán</td>';
    $obj = $name_obj . ': <b>' . $data_bill[$name] . '</b>';
    $table_result .= $list->end_tr();
}
$table_result .= $list->showFooter();
$content_column .= $table_result;
$content_column .= '</div>';
$footer_control .= '<div class="name_obj">' . $obj . '</div>';
$footer_control .= '<span class="bill-close"><i class="fa fa-sign-out"></i> Đóng cửa sổ</span>';
if ($isAjaxRequest) {
    echo $table_result;
    die;
示例#16
0
$table_right_column .= $list_right->showHeader($total_row, '', 'id="table-listing-right"');
$i = 0;
$totalAll_ = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $backgrouds = '';
    if ($row['bio_status'] == BILL_STATUS_DEBIT && $row['bio_money_debit'] != 0) {
        $backgrouds = 'style="background:#B3F8FF;"';
    }
    $supplier = new db_query('SELECT sup_name
                                   FROM suppliers
                                   WHERE sup_id = ' . $row['bio_supplier_id']);
    $row_ = mysqli_fetch_assoc($supplier->result);
    unset($supplier);
    $i++;
    $table_right_column .= $list_right->start_tr($i, $row[$id_field_o], '' . $backgrouds . ' class="menu-normal record-item" onclick="active_record(' . $row[$id_field_o] . ',\'right\')" data-debit="' . $row['bio_money_debit'] . '" data-record_id="' . $row[$id_field_o] . '" ondblclick="showDetail(\'right\')"');
    $table_right_column .= '<td class="center" width="80">' . format_codenumber($row[$id_field_o], 6, PREFIX_BILL_CODE) . '</td>';
    $table_right_column .= '<td>' . $row_['sup_name'] . '</td>';
    $table_right_column .= '<td class="center" width="130">' . date('d-m-Y H:i:s', $row['bio_start_time']) . '</td>';
    $table_right_column .= '<td class="text-right" width="100">' . number_format($row['bio_total_money']) . ' ' . DEFAULT_MONEY_UNIT . '</td>';
    $table_right_column .= $list_right->end_tr();
    $totalAll_ += $row['bio_total_money'];
}
$table_right_column .= $list_right->showFooter();
// lấy ra tổng tiền và tổng số hóa đơn
$table_right_column .= '<div class="total-pos">
    <div class="col-xs-6-lft col-xs-6-lft-l">
        <span>Tổng HĐ:</span><input class="ttl-hd" value="' . $total_ . '" readonly="readonly"/>
    </div>
    <div class="col-xs-6-rgh col-xs-6-lft-r">
        <span>Tổng tiền:</span><input class="ttl-hd" value="' . number_format($totalAll_) . ' ' . DEFAULT_MONEY_UNIT . '" readonly="readonly"/>
    </div>
示例#17
0
                            LEFT JOIN categories_multi ON cat_id = fin_cat_id
                            WHERE 1 ' . $list->sqlSearch() . $sql_phieuchi . $sql_date_out . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
//Vì đây là module cần 2 table listing nên khai báo thêm table_extra id=table-listing-right
$right_column .= $list->showHeader($total_row, '', 'id="table-listing-right"');
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $right_column .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" onclick="active_record(' . $row[$id_field] . ')" data-record_id="' . $row[$id_field] . '"');
    /* code something */
    //Ngày tạo
    $right_column .= '<td class="center" width="">' . date('d/m/Y H:i', $row['fin_date']) . '</td>';
    //Số phiếu - ID phiếu
    $right_column .= '<td class="center" width="">' . format_codenumber($row[$id_field], 6) . '</td>';
    //Người nhận
    $right_column .= '<td width="120">' . $row['fin_username'] . '</td>';
    //Mô tả
    $right_column .= '<td>' . $row['cat_name'] . '</td>';
    //số tiền
    $right_column .= '<td class="text-right" width="80">' . format_number($row['fin_money']) . '</td>';
    $right_column .= $list->end_tr();
}
$right_column .= $list->showFooter();
//footer control
//Hiển thị phiếu thu - chi hệ thống
$footer_control .= '<div class="filter-system-ticket col-xs-12">
    <div class="col-xs-6">
        <label>
            <input type="checkbox" id="check_system_in" name="check_system_in" value="1"/>
示例#18
0
    } else {
        $staff_name = $list_users[$row['inv_staff_id']];
    }
    if (!$row['inv_store_id']) {
        $store_name = '';
    } else {
        $store_name = $list_store[$row['inv_store_id']];
    }
    if (!$row['inv_admin_id']) {
        $admin_name = '';
    } else {
        $admin_name = $list_admin[$row['inv_admin_id']];
    }
    $listing_menu .= $list->start_tr($i, $row['inv_id'], 'class="menu-trash record-item" id="record_' . $row['inv_id'] . '" onclick="active_record(' . $row['inv_id'] . ')" data-record_id="' . $row['inv_id'] . '"');
    /* code something */
    $listing_menu .= '<td class="center">' . format_codenumber($row['inv_id'], 6) . '</td>';
    $listing_menu .= '<td class="center">' . $staff_name . '</td>';
    $listing_menu .= '<td class="center">' . date('d/m/Y H:i', $row['inv_time']) . '</td>';
    $listing_menu .= '<td class="center">' . $store_name . '</td>';
    $listing_menu .= '<td class="center">' . $admin_name . '</td>';
    $listing_menu .= $list->end_tr();
}
$listing_menu .= $list->showFooter();
$content_column .= $listing_menu;
$content_column .= '</div>';
$rainTpl = new RainTPL();
add_more_css('custom.css', $load_header);
$rainTpl->assign('load_header', $load_header);
$custom_script = file_get_contents('custom_script_inventory.html');
$rainTpl->assign('custom_script', $custom_script);
$rainTpl->assign('content_column', $content_column);
示例#19
0
$array_bill = trash_list($table, $total, 0);
$i = 0;
$content_column .= '<div class="section-content">';
$content_column .= $list->showHeader($total, '', 'id="list_trash"');
foreach ($array_bill as $row) {
    $i++;
    if ($row[$id_object] == 0) {
        $name = $name_obj;
    } else {
        $db_list_bill = new db_query('SELECT ' . $name_object . ' FROM ' . $table_object . ' WHERE ' . $id . ' = ' . $row[$id_object]);
        $data_list_bill = mysqli_fetch_assoc($db_list_bill->result);
        unset($db_list_bill);
        $name = $data_list_bill[$name_object];
    }
    $content_column .= $list->start_tr($i, $row[$bill_id], 'class="menu-normal record-item" onclick="active_record(' . $row[$bill_id] . ')" data-table="' . $table . '" ondblclick="show_bill_detai()" data-record_id="' . $row[$bill_id] . '"');
    $content_column .= '<td>' . format_codenumber($row[$bill_id], 6, PREFIX_BILL_CODE) . '</td>';
    $content_column .= '<td>' . $name . '</td>';
    $content_column .= '<td class="center">' . date('d-m-Y', $row[$day_creat]) . '</td>';
    $content_column .= '<td class="text-right">' . number_format($row[$total_money]) . '</td>';
    $content_column .= '<td></td>';
    $content_column .= $list->end_tr();
}
$content_column .= $list->showFooter();
$content_column .= '</div>';
// footer
$footer_control .= '<div class="print-close">';
$footer_control .= '<span class="control-btn restore deactivate"><i class="fa fa-retweet"></i> Khôi phục</span>';
$footer_control .= '<span class="control-btn del_permanently deactivate"><i class="fa fa-file-excel-o"> Xóa vĩnh viễn</i></span> ';
$footer_control .= '<span class="control-btn deactivate view_detail"><i class="fa fa-list"></i> Xem chi tiết</span>';
$footer_control .= '<span class="control-btn deactivate information"><i class="fa fa-user"></i> Xem thông tin</span>';
$footer_control .= '<span class="bill-close"><i class="fa fa-sign-out"></i> Đóng cửa sổ</span>';
示例#20
0
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$listing_product .= $list->showHeader($total_row);
$i = 0;
$array_unit = array();
$db_query = new db_query('SELECT * FROM units');
while ($row = mysqli_fetch_assoc($db_query->result)) {
    $array_unit[$row['uni_id']] = $row['uni_name'];
}
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $listing_product .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" ondblclick="detailRecord()" onclick="active_record(' . $row[$id_field] . ')" data-record_id="' . $row[$id_field] . '"');
    /* code something */
    $pro_unit_id = $row['pro_unit_id'];
    $listing_product .= '<td class="center" width="100">' . format_codenumber($row['pro_id'], 6, PREFIX_PRODUCT_CODE) . '</td>';
    $listing_product .= '<td class="center" width="100">' . $row['pro_code'] . '</td>';
    $listing_product .= '<td>' . $row['pro_name'] . '</td>';
    $listing_product .= '<td class="center" width="100">' . $array_unit[$row['pro_unit_id']] . '</td>';
    $listing_product .= '<td class="center" width="100">' . $row['pro_instock'] . '</td>';
    $listing_product .= '<td class="center" width="100">' . $row['pro_quantity'] . '</td>';
    $listing_product .= $list->end_tr();
}
$listing_product .= $list->showFooter();
$right_column .= $listing_product;
$right_column .= '</div>';
// show tab footer
$footer_control .= '
    <div class="button_tab">
        <ul>
            <li><a href="../products/index.php" id="button_tab_active"><i class="fa fa-list"></i> DANH SÁCH MẶT HÀNG</a></li>
示例#21
0
         $pro_name = $row['pro_name'];
         $uni_name = $row['uni_name'];
     }
     if (trim($position) == 'bill_out') {
         $row = json_decode(base64_decode($row['tra_data']), 1);
         $db_pro_unit = new db_query('SELECT pro_name, uni_name FROM products 
                                         LEFT JOIN units ON pro_unit_id = uni_id
                                         WHERE pro_id = ' . $row['bid_pro_id']);
         $data_pro_unit = mysqli_fetch_assoc($db_pro_unit->result);
         unset($db_pro_unit);
         $pro_name = $data_pro_unit['pro_name'];
         $uni_name = $data_pro_unit['uni_name'];
     }
     $total = $row['bid_pro_price'] * $row['bid_pro_number'];
     $left_column .= $list->start_tr($i, $row['bid_pro_id'], 'class="menu-normal record-item" onclick="active_record(' . $row['bid_pro_id'] . ',\'left\')" data-record_id="' . $row['bid_pro_id'] . '"');
     $left_column .= '<td class="center">' . format_codenumber($row['bid_pro_id'], 6, '') . '</td>';
     $left_column .= '<td>' . $pro_name . '</td>';
     $left_column .= '<td class="center">' . $uni_name . '</td>';
     $left_column .= '<td class="center">' . $row['bid_pro_number'] . '</td>';
     $left_column .= '<td class="text-right">' . number_format($row['bid_pro_price']) . '</td>';
     $left_column .= '<td class="text-right">' . number_format($total) . '</td>';
     $left_column .= $list->end_tr();
     $totalAll += $total;
 }
 unset($menu_listing);
 $left_column .= $list->showFooter();
 // lay ra thong tin cua nha cug cap, trang thai thanh toan,ngay nhap khi xem chi tiet tu trang index
 if (trim($position) == 'right') {
     $db_date_brand_store_status = new db_query('SELECT * FROM bill_out
                                                         LEFT JOIN categories_multi ON bio_store_id = cat_id
                                                         LEFT JOIN suppliers ON bio_supplier_id = sup_id
        }
    } elseif ($data_financial['fin_cat_id'] == 32) {
        $db_bill = new db_query('SELECT * FROM bill_out WHERE bio_id = ' . $data_financial['fin_billcode']);
        if ($data_bill = mysqli_fetch_assoc($db_bill->result)) {
            $ngay_no = $data_bill['bio_start_time'];
            $bill_id = $data_bill['bio_id'];
            $so_no = $data_bill['bio_money_debit'] + $data_financial['fin_money'];
        }
    }
    unset($db_bill);
}
unset($db_financies);
$content_column .= '<div class="section-content">';
$content_column .= $list->showHeader(1);
$content_column .= $list->start_tr(1, $bill_id, 'class="menu-normal record-item" data-record_id="' . $bill_id . '"');
$content_column .= '<td class="center">' . format_codenumber($bill_id, 6, '') . '</td>';
$content_column .= '<td class="center">' . date('d/m/Y h:i', $ngay_no) . '</td>';
$content_column .= '<td class="text-right">' . number_format($so_no) . '</td>';
$content_column .= '<td class="text-right">' . number_format($thanhtoan) . '</td>';
$content_column .= $list->end_tr();
$content_column .= $list->showFooter();
$content_column .= '</div>';
$custom_script = '<script>
    var windowHeight        = windowHeight || $(window).height();
    var wrapperHeight       = windowHeight;
    var wrapperContent      = $(\'#wrapper-full\');
    wrapperContent.height(wrapperHeight);
    var sectionContent_class = $(\'.section-content\');
    sectionContent_class.height(wrapperHeight - 10);
    var table_scoll = $(\'.table-listing-bound\');
    table_scoll.height(wrapperHeight - 10);
示例#23
0
                            WHERE 1 ' . $list->sqlSearch() . $db_extra_and . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' ASC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$center_column .= $list->showHeader($total_row);
$i = 0;
$array_unit = array();
$db_query = new db_query('SELECT * FROM units');
while ($row = mysqli_fetch_assoc($db_query->result)) {
    $array_unit[$row['uni_id']] = $row['uni_name'];
}
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $center_column .= $list->start_tr($i, $row[$id_field], 'class="menu-normal record-item" ondblclick="detailRecord()" onclick="active_record(' . $row[$id_field] . ')" data-record_id="' . $row[$id_field] . '"');
    /* code something */
    $center_column .= '<td class="center">' . format_codenumber($row['men_id'], 3) . '</td>';
    $center_column .= '<td>' . $row['men_name'] . '</td>';
    $center_column .= '<td class="center">' . (isset($array_unit[$row['men_unit_id']]) ? $array_unit[$row['men_unit_id']] : '') . '</td>';
    $center_column .= '<td class="text-right">' . format_number($row['men_price']) . ' vnđ</td>';
    $center_column .= '<td class="center">' . '</td>';
    $center_column .= $list->end_tr();
}
$center_column .= $list->showFooter();
//Khối bên phải, hiển thị công thức chế biến tương ứng với menu
$right_control = list_admin_control_button($add_btn, $edit_btn, $trash_btn, 1);
$right_column = '<div class="alert-warning alert text-center">Chọn một thực đơn để xem công thức chế biến</div>';
if ($isAjaxRequest) {
    $action = getValue('action', 'str', 'POST', '');
    switch ($action) {
        case 'listRecord':
            echo $center_column;
示例#24
0
<?php

require_once 'inc_security.php';
if (!isset($_GET['id']) || !isset($_GET['type'])) {
    die;
}
$record_id = getValue('id', 'int');
$type = getValue('type', 'str');
$footer_control = '';
$name_object = '';
$name = '';
$total_money = '';
$number_bill = 0;
$id = format_codenumber($record_id, 6, '');
$avatars = '<i class="fa fa-camera fa-2x"></i>';
$tabel = '';
$left_join = '';
$id_column = '';
$status = '';
$total_debit = 0;
if (trim($type) == 'customer') {
    $tabel = 'bill_in';
    $left_join = 'LEFT JOIN customers ON bii_customer_id = cus_id';
    $name_object = 'KH';
    $id_column = 'bii_customer_id = ' . $record_id;
    $status = 'bii_status';
    $name_key = 'cus_name';
    $totalmoney = 'bii_money_debit';
    $image = 'cus_picture';
}
if (trim($type) == 'supplier') {
示例#25
0
 function _listColumn($row = array())
 {
     global $array_unit;
     $list_column = '';
     $list_column .= '<td class="center" width="100">' . format_codenumber($row['pro_id'], 6, PREFIX_PRODUCT_CODE) . '</td>';
     $list_column .= '<td class="center" width="100">' . $row['pro_code'] . '</td>';
     $list_column .= '<td class="center">' . $row['pro_name'] . '</td>';
     $list_column .= '<td class="center">' . $array_unit[$row['pro_unit_id']] . '</td>';
     $list_column .= '<td class="center">' . $row['pro_instock'] . '</td>';
     return $list_column;
 }