function refresh() { $is_serialized = $this->input->post('is_serialized'); $no_description = $this->input->post('no_description'); $search_custom = $this->input->post('search_custom'); //GARRISON ADDED 4/13/2013 $is_deleted = $this->input->post('is_deleted'); // Parq 131215 $this->item_lib->set_item_location($this->input->post('stock_location')); $stock_location = $this->input->post('stock_location'); $stock_locations = $this->Stock_locations->get_allowed_locations(); $data['stock_location'] = $this->item_lib->get_item_location(); $data['stock_locations'] = $stock_locations; $data['search_section_state'] = $this->input->post('search_section_state'); $data['is_serialized'] = $this->input->post('is_serialized'); $data['no_description'] = $this->input->post('no_description'); $data['search_custom'] = $this->input->post('search_custom'); //GARRISON ADDED 4/13/2013 $data['is_deleted'] = $this->input->post('is_deleted'); // Parq 131215 $data['controller_name'] = strtolower(get_class()); $data['form_width'] = $this->get_form_width(); $data['manage_table'] = get_items_manage_table($this->Item->get_all_filtered($stock_location, $is_serialized, $no_description, $search_custom, $is_deleted), $this); //GARRISON MODIFIED 4/13/2013, Parq 131215 $this->load->view('items/manage', $data); }
public function index() { //validar filtro if ($this->input->post() !== false) { $data['low_inventory'] = $this->input->post('low_inventory'); $data['is_serialized'] = $this->input->post('is_serialized'); $data['no_description'] = $this->input->post('no_description'); $this->session->set_userdata('items_fil', $data); } elseif ($this->session->userdata('items_fil')) { $data = $this->session->userdata('items_fil'); } else { $data = []; } $location = $this->input->post('dblocation') != false ? $this->input->post('dblocation') : 'default'; // $this->Item->stabledb($location); $config['base_url'] = site_url('/items/index'); $config['total_rows'] = $this->Item->count_all($data); $config['per_page'] = '20'; $config['uri_segment'] = 3; $this->pagination->initialize($config); $data['items_location'] = $this->set_location(); $data['controller_name'] = strtolower(get_class()); $data['form_width'] = $this->get_form_width(); $data['manage_table'] = get_items_manage_table($this->Item->get_all($data, $config['per_page'], $this->uri->segment($config['uri_segment'])), $this); $this->load->view('items/manage', $data); }
function index($limit_from = 0) { $stock_location = $this->item_lib->get_item_location(); $stock_locations = $this->Stock_location->get_allowed_locations(); $data['controller_name'] = $this->get_controller_name(); $data['form_width'] = $this->get_form_width(); $lines_per_page = $this->Appconfig->get('lines_per_page'); $items = $this->Item->get_all($stock_location, $lines_per_page, $limit_from); $data['links'] = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from); // assume year 2010 as starting date for OSPOS $start_of_time = date($this->config->item('dateformat'), mktime(0, 0, 0, 1, 1, 2010)); $today = date($this->config->item('dateformat')); $start_date = $this->input->post('start_date') != NULL ? $this->input->post('start_date', TRUE) : $start_of_time; $start_date_formatter = date_create_from_format($this->config->item('dateformat'), $start_date); $end_date = $this->input->post('end_date') != NULL ? $this->input->post('end_date', TRUE) : $today; $end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date); $data['start_date'] = $start_date_formatter->format($this->config->item('dateformat')); $data['end_date'] = $end_date_formatter->format($this->config->item('dateformat')); $data['stock_location'] = $stock_location; $data['stock_locations'] = $stock_locations; $data['manage_table'] = get_items_manage_table($this->Item->get_all($stock_location, $lines_per_page, $limit_from), $this); $data['am'] = 'items'; $this->load->view('items/manage', $data); $this->_remove_duplicate_cookies(); }
function index($offset = 0) { $params = $this->session->userdata('item_search_data') ? $this->session->userdata('item_search_data') : array('offset' => 0, 'order_col' => 'item_id', 'order_dir' => 'asc', 'search' => FALSE, 'category' => FALSE); if ($offset != $params['offset']) { redirect('items/index/' . $params['offset']); } $this->check_action_permission('search'); $config['base_url'] = site_url('items/sorting'); $config['per_page'] = $this->config->item('number_of_items_per_page') ? (int) $this->config->item('number_of_items_per_page') : 20; $data['controller_name'] = strtolower(get_class()); $data['per_page'] = $config['per_page']; $data['search'] = $params['search'] ? $params['search'] : ""; $data['category'] = $params['category'] ? $params['category'] : ""; if ($data['search'] || $data['category']) { $config['total_rows'] = $this->Item->search_count_all($data['search'], $data['category']); $table_data = $this->Item->search($data['search'], $data['category'], $data['per_page'], $params['offset'], $params['order_col'], $params['order_dir']); } else { $config['total_rows'] = $this->Item->count_all(); $table_data = $this->Item->get_all($data['per_page'], $params['offset'], $params['order_col'], $params['order_dir']); } $data['total_rows'] = $config['total_rows']; $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); $data['order_col'] = $params['order_col']; $data['order_dir'] = $params['order_dir']; $data['manage_table'] = get_items_manage_table($table_data, $this); $data['categories'][''] = '--' . lang('items_select_category_or_all') . '--'; foreach ($this->Item->get_all_categories()->result() as $category) { $category = $category->category; $data['categories'][$category] = $category; } $this->load->view('items/manage', $data); }
function index() { $data['controller_name'] = strtolower($this->uri->segment(1)); $data['form_width'] = $this->get_form_width(); $data['manage_table'] = get_items_manage_table($this->Item->get_all(), $this); $this->load->view('items/manage', $data); }
function refresh() { $low_inventory = $this->input->post('low_inventory'); $is_serialized = $this->input->post('is_serialized'); $no_description = $this->input->post('no_description'); $data['search_section_state'] = $this->input->post('search_section_state'); $data['low_inventory'] = $this->input->post('low_inventory'); $data['is_serialized'] = $this->input->post('is_serialized'); $data['no_description'] = $this->input->post('no_description'); $data['controller_name'] = strtolower(get_class()); $data['form_width'] = $this->get_form_width(); $data['manage_table'] = get_items_manage_table($this->Item->get_all_filtered($low_inventory, $is_serialized, $no_description), $this); $this->load->view('items/manage', $data); }
function index($limit_from = 0) { $stock_location = $this->item_lib->get_item_location(); $stock_locations = $this->Stock_locations->get_allowed_locations(); $data['controller_name'] = $this->get_controller_name(); $data['form_width'] = $this->get_form_width(); $lines_per_page = $this->Appconfig->get('lines_per_page'); $items = $this->Item->get_all($stock_location, $lines_per_page, $limit_from); $data['links'] = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from); $data['stock_location'] = $stock_location; $data['stock_locations'] = $stock_locations; $data['manage_table'] = get_items_manage_table($this->Item->get_all($stock_location, $lines_per_page, $limit_from), $this); $this->load->view('items/manage', $data); $this->_remove_duplicate_cookies(); }