mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-28 19:10:11 -04:00
@@ -10,13 +10,13 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
|
||||
function index($limit_from=0)
|
||||
{
|
||||
$data['controller_name']=$this->get_controller_name();
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['controller_name'] = $this->get_controller_name();
|
||||
$data['form_width'] = $this->get_form_width();
|
||||
$lines_per_page = $this->Appconfig->get('lines_per_page');
|
||||
$item_kits = $this->Item_kit->get_all($lines_per_page,$limit_from);
|
||||
$data['links'] = $this->_initialize_pagination($this->Item_kit,$lines_per_page,$limit_from);
|
||||
$data['manage_table']=get_item_kits_manage_table($item_kits,$this);
|
||||
$this->load->view('item_kits/manage',$data);
|
||||
$item_kits = $this->Item_kit->get_all($lines_per_page, $limit_from);
|
||||
$data['links'] = $this->_initialize_pagination($this->Item_kit, $lines_per_page, $limit_from);
|
||||
$data['manage_table'] = get_item_kits_manage_table($item_kits, $this);
|
||||
$this->load->view('item_kits/manage', $data);
|
||||
}
|
||||
|
||||
function search()
|
||||
@@ -26,8 +26,8 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
$lines_per_page = $this->Appconfig->get('lines_per_page');
|
||||
$customers = $this->Item_kit->search($search, $lines_per_page, $limit_from);
|
||||
$total_rows = $this->Item_kit->get_found_rows($search);
|
||||
$links = $this->_initialize_pagination($this->Item_kit,$lines_per_page, $limit_from, $total_rows);
|
||||
$data_rows=get_item_kits_manage_table_data_rows($customers,$this);
|
||||
$links = $this->_initialize_pagination($this->Item_kit, $lines_per_page, $limit_from, $total_rows, 'search');
|
||||
$data_rows = get_item_kits_manage_table_data_rows($customers, $this);
|
||||
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
|
||||
}
|
||||
|
||||
@@ -36,43 +36,45 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'), $this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function get_row()
|
||||
{
|
||||
$item_kit_id = $this->input->post('row_id');
|
||||
$data_row=get_item_kit_data_row($this->Item_kit->get_info($item_kit_id),$this);
|
||||
$data_row = get_item_kit_data_row($this->Item_kit->get_info($item_kit_id), $this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($item_kit_id=-1)
|
||||
{
|
||||
$data['item_kit_info']=$this->Item_kit->get_info($item_kit_id);
|
||||
$this->load->view("item_kits/form",$data);
|
||||
$data['item_kit_info'] = $this->Item_kit->get_info($item_kit_id);
|
||||
$this->load->view("item_kits/form", $data);
|
||||
}
|
||||
|
||||
function save($item_kit_id=-1)
|
||||
{
|
||||
$item_kit_data = array(
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description')
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description')
|
||||
);
|
||||
|
||||
if($this->Item_kit->save($item_kit_data,$item_kit_id))
|
||||
if ($this->Item_kit->save($item_kit_data, $item_kit_id))
|
||||
{
|
||||
//New item kit
|
||||
if($item_kit_id==-1)
|
||||
if ($item_kit_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_adding').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_data['item_kit_id']));
|
||||
echo json_encode(array('success'=>true,
|
||||
'message'=>$this->lang->line('item_kits_successful_adding').' '.$item_kit_data['name'],
|
||||
'item_kit_id'=>$item_kit_data['item_kit_id']));
|
||||
$item_kit_id = $item_kit_data['item_kit_id'];
|
||||
}
|
||||
else //previous item
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_id));
|
||||
echo json_encode(array('success'=>true,
|
||||
'message'=>$this->lang->line('item_kits_successful_updating').' '.$item_kit_data['name'],
|
||||
'item_kit_id'=>$item_kit_id));
|
||||
}
|
||||
|
||||
if ($this->input->post('item_kit_item'))
|
||||
@@ -91,24 +93,25 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_error_adding_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>-1));
|
||||
echo json_encode(array('success'=>false,
|
||||
'message'=>$this->lang->line('item_kits_error_adding_updating').' '.$item_kit_data['name'],
|
||||
'item_kit_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$item_kits_to_delete=$this->input->post('ids');
|
||||
$item_kits_to_delete = $this->input->post('ids');
|
||||
|
||||
if($this->Item_kit->delete_list($item_kits_to_delete))
|
||||
if ($this->Item_kit->delete_list($item_kits_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_deleted').' '.
|
||||
count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
|
||||
echo json_encode(array('success'=>true,
|
||||
'message'=>$this->lang->line('item_kits_successful_deleted').' '.count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
|
||||
echo json_encode(array('success'=>false,
|
||||
'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,16 +125,21 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
{
|
||||
$item_kit_info = $this->Item_kit->get_info($item_kid_id);
|
||||
|
||||
$result[] = array('name' =>$item_kit_info->name, 'item_id'=> 'KIT '.$item_kid_id, 'item_number'=>'KIT '.$item_kid_id);
|
||||
$result[] = array('name'=>$item_kit_info->name, 'item_id'=>'KIT '.$item_kid_id, 'item_number'=>'KIT '.$item_kid_id);
|
||||
}
|
||||
|
||||
$data['items'] = $result;
|
||||
$data['configs'] = $this->Appconfig->get_all();
|
||||
$data['barcode_config'] = $this->barcode_lib->get_barcode_config();
|
||||
$barcode_config = $this->barcode_lib->get_barcode_config();
|
||||
// in case the selected barcode type is not Code39 or Code128 we set by default Code128
|
||||
// the rationale for this is that EAN codes cannot have strings as seed, so 'KIT ' is not allowed
|
||||
if($barcode_config['barcode_type'] != '1' && $barcode_config['barcode_type'] != '2')
|
||||
{
|
||||
$barcode_config['barcode_type'] = '2';
|
||||
}
|
||||
$data['barcode_config'] = $barcode_config;
|
||||
$this->load->view("barcode_sheet", $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
|
||||
@@ -447,6 +447,7 @@ function get_item_kits_manage_table( $item_kits, $controller )
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('item_kits_kit'),
|
||||
$CI->lang->line('item_kits_name'),
|
||||
$CI->lang->line('item_kits_description'),
|
||||
' ',
|
||||
@@ -493,6 +494,7 @@ function get_item_kit_data_row($item_kit,$controller)
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='item_kit_$item_kit->item_kit_id' value='".$item_kit->item_kit_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.'KIT '.$item_kit->item_kit_id.'</td>';
|
||||
$table_data_row.='<td width="15%">'.$item_kit->name.'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Error adding/updating Item Kit";
|
||||
$lang["item_kits_info"] = "Item Kit Info";
|
||||
$lang["item_kits_item"] = "Item";
|
||||
$lang["item_kits_items"] = "Items";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Item Kit Name";
|
||||
$lang["item_kits_new"] = "New Item Kit";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "No item kits to display";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Error agregando/actualizando el Kit
|
||||
$lang["item_kits_info"] = "Info de Kit de Artículos";
|
||||
$lang["item_kits_item"] = "Artículo";
|
||||
$lang["item_kits_items"] = "Artículos";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Nombre del Kit de Artículos";
|
||||
$lang["item_kits_new"] = "Nuevo Kit de Artículos";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "No hay kits de artículos para mostrar";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Érreur d\'ajout/édition de Kit";
|
||||
$lang["item_kits_info"] = "Détails du Kit";
|
||||
$lang["item_kits_item"] = "Item";
|
||||
$lang["item_kits_items"] = "Items";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Nom du Kit";
|
||||
$lang["item_kits_new"] = "Nouveau Kit";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "Aucun kit à afficher";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Tambah/Ubah Item Paket tidak berhasi
|
||||
$lang["item_kits_info"] = "Item Paket Info";
|
||||
$lang["item_kits_item"] = "Item Barang";
|
||||
$lang["item_kits_items"] = "Item Barang";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Nama Item Paket";
|
||||
$lang["item_kits_new"] = "Item Paket Baru";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "Tidak ada Item Paket yang ditampilkan";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Fout bij het toevoegen/aanpassen van
|
||||
$lang["item_kits_info"] = "Product Set Info";
|
||||
$lang["item_kits_item"] = "Product";
|
||||
$lang["item_kits_items"] = "Producten";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Naam";
|
||||
$lang["item_kits_new"] = "Nieuwe Set";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "Geen sets gevonden";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Ошибка при добавлен
|
||||
$lang["item_kits_info"] = "Информация о товаре комплекта";
|
||||
$lang["item_kits_item"] = "товар";
|
||||
$lang["item_kits_items"] = "товары";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Наименование товара комплект";
|
||||
$lang["item_kits_new"] = "Новый товар комплект";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "Нет товара комплекты для отображения";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "เพิ่ม/ปรับปร
|
||||
$lang["item_kits_info"] = "ข้อมูลสินค้าหมู่";
|
||||
$lang["item_kits_item"] = "สินค้า";
|
||||
$lang["item_kits_items"] = "สินค้า";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "ชื่อสินค้าหมู่";
|
||||
$lang["item_kits_new"] = "สร้างสินค้าหมู่";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "ไม่มีสินค้าแสดง";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Ürün seti ekleme/güncelleme hatas
|
||||
$lang["item_kits_info"] = "Ürün Seti Bilgisi";
|
||||
$lang["item_kits_item"] = "Ürün";
|
||||
$lang["item_kits_items"] = "Ürünler";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "Ürün Seti İsmi";
|
||||
$lang["item_kits_new"] = "Yeni Ürün Seti";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "Gösterecek ürün seti yok";
|
||||
|
||||
@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "新增/更新產品套件錯誤";
|
||||
$lang["item_kits_info"] = "產品套件資料";
|
||||
$lang["item_kits_item"] = "產品";
|
||||
$lang["item_kits_items"] = "產品";
|
||||
$lang["item_kits_kit"] = "Kit Id";
|
||||
$lang["item_kits_name"] = "產品套件";
|
||||
$lang["item_kits_new"] = "新增產品套件";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "沒有產品套件";
|
||||
|
||||
@@ -87,7 +87,6 @@ class Barcode_lib
|
||||
try
|
||||
{
|
||||
// Code128 is used for the receipts
|
||||
|
||||
$barcode = $this->get_barcode_instance(2);
|
||||
|
||||
// set the receipt number to generate the barcode for
|
||||
|
||||
@@ -20,15 +20,18 @@ class Item_kit extends CI_Model
|
||||
{
|
||||
$this->db->from('item_kits');
|
||||
$this->db->order_by("name", "asc");
|
||||
if ($rows > 0) {
|
||||
if ($rows > 0)
|
||||
{
|
||||
$this->db->limit($rows, $limit_from);
|
||||
}
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
function get_total_rows()
|
||||
{
|
||||
$this->db->from('item_kits');
|
||||
|
||||
return $this->db->count_all_results();
|
||||
}
|
||||
|
||||
@@ -49,14 +52,14 @@ class Item_kit extends CI_Model
|
||||
else
|
||||
{
|
||||
//Get empty base parent object, as $item_kit_id is NOT an item kit
|
||||
$item_obj=new stdClass();
|
||||
$item_obj = new stdClass();
|
||||
|
||||
//Get all the fields from items table
|
||||
$fields = $this->db->list_fields('item_kits');
|
||||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$item_obj->$field='';
|
||||
$item_obj->$field = '';
|
||||
}
|
||||
|
||||
return $item_obj;
|
||||
@@ -71,26 +74,30 @@ class Item_kit extends CI_Model
|
||||
$this->db->from('item_kits');
|
||||
$this->db->where_in('item_kit_id',$item_kit_ids);
|
||||
$this->db->order_by("name", "asc");
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts or updates an item kit
|
||||
*/
|
||||
function save(&$item_kit_data,$item_kit_id=false)
|
||||
function save(&$item_kit_data, $item_kit_id=false)
|
||||
{
|
||||
if (!$item_kit_id or !$this->exists($item_kit_id))
|
||||
{
|
||||
if($this->db->insert('item_kits',$item_kit_data))
|
||||
{
|
||||
$item_kit_data['item_kit_id']=$this->db->insert_id();
|
||||
$item_kit_data['item_kit_id'] = $this->db->insert_id();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db->where('item_kit_id', $item_kit_id);
|
||||
return $this->db->update('item_kits',$item_kit_data);
|
||||
|
||||
return $this->db->update('item_kits', $item_kit_data);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -106,14 +113,15 @@ class Item_kit extends CI_Model
|
||||
*/
|
||||
function delete_list($item_kit_ids)
|
||||
{
|
||||
$this->db->where_in('item_kit_id',$item_kit_ids);
|
||||
$this->db->where_in('item_kit_id', $item_kit_ids);
|
||||
|
||||
return $this->db->delete('item_kits');
|
||||
}
|
||||
|
||||
/*
|
||||
Get search suggestions to find kits
|
||||
*/
|
||||
function get_search_suggestions($search,$limit=25)
|
||||
function get_search_suggestions($search, $limit=25)
|
||||
{
|
||||
$suggestions = array();
|
||||
|
||||
@@ -123,16 +131,16 @@ class Item_kit extends CI_Model
|
||||
$by_name = $this->db->get();
|
||||
foreach($by_name->result() as $row)
|
||||
{
|
||||
$suggestions[]=$row->name;
|
||||
$suggestions[] = $row->name;
|
||||
}
|
||||
|
||||
//only return $limit suggestions
|
||||
if(count($suggestions > $limit))
|
||||
{
|
||||
$suggestions = array_slice($suggestions, 0,$limit);
|
||||
$suggestions = array_slice($suggestions, 0, $limit);
|
||||
}
|
||||
return $suggestions;
|
||||
|
||||
return $suggestions;
|
||||
}
|
||||
|
||||
function get_item_kit_search_suggestions($search, $limit=25)
|
||||
@@ -145,38 +153,41 @@ class Item_kit extends CI_Model
|
||||
$by_name = $this->db->get();
|
||||
foreach($by_name->result() as $row)
|
||||
{
|
||||
$suggestions[]='KIT '.$row->item_kit_id.'|'.$row->name;
|
||||
$suggestions[]='KIT ' . $row->item_kit_id . ' | ' . $row->name;
|
||||
}
|
||||
|
||||
//only return $limit suggestions
|
||||
if(count($suggestions > $limit))
|
||||
{
|
||||
$suggestions = array_slice($suggestions, 0,$limit);
|
||||
$suggestions = array_slice($suggestions, 0, $limit);
|
||||
}
|
||||
|
||||
return $suggestions;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Preform a search on items
|
||||
*/
|
||||
function search($search, $rows = 0, $limit_from = 0)
|
||||
function search($search, $rows=0, $limit_from=0)
|
||||
{
|
||||
$this->db->from('item_kits');
|
||||
$this->db->where("name LIKE '%".$this->db->escape_like_str($search)."%' or
|
||||
description LIKE '%".$this->db->escape_like_str($search)."%'");
|
||||
$this->db->where("(name LIKE '%".$this->db->escape_like_str($search)."%' OR
|
||||
description LIKE '%".$this->db->escape_like_str($search)."%')");
|
||||
$this->db->order_by("name", "asc");
|
||||
if ($rows > 0) {
|
||||
if ($rows > 0)
|
||||
{
|
||||
$this->db->limit($rows, $limit_from);
|
||||
}
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
function get_found_rows($search)
|
||||
function get_found_rows($search, $is_deleted=0)
|
||||
{
|
||||
$this->db->from('item_kits');
|
||||
$this->db->where("name LIKE '%".$this->db->escape_like_str($search)."%' or
|
||||
description LIKE '%".$this->db->escape_like_str($search)."%'");
|
||||
$this->db->where("(name LIKE '%".$this->db->escape_like_str($search)."%' OR
|
||||
description LIKE '%".$this->db->escape_like_str($search)."%')");
|
||||
|
||||
return $this->db->get()->num_rows();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,21 +16,22 @@
|
||||
|
||||
<body class=<?php echo "font_".$this->barcode_lib->get_font_name($barcode_config['barcode_font']); ?>
|
||||
style="font-size:<?php echo $barcode_config['barcode_font_size'] + 5; //5 is size offset for font in display label?>px">
|
||||
<table cellspacing=<?php echo $barcode_config['barcode_page_cellspacing']; ?> width=<?php echo $barcode_config['barcode_page_width']."%"; ?> >
|
||||
<tr>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach($items as $item)
|
||||
{
|
||||
if ($count % $barcode_config['barcode_num_in_row'] == 0 and $count != 0)
|
||||
{
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
echo "<td>" . $this->barcode_lib->create_display_barcode($item, $barcode_config) . "</td>";
|
||||
$count++;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=<?php echo $barcode_config['barcode_page_cellspacing']; ?> width=<?php echo $barcode_config['barcode_page_width']."%"; ?> >
|
||||
<tr>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach($items as $item)
|
||||
{
|
||||
if ($count % $barcode_config['barcode_num_in_row'] == 0 and $count != 0)
|
||||
{
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
echo "<td>" . $this->barcode_lib->create_display_barcode($item, $barcode_config) . "</td>";
|
||||
$count++;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php $this->load->view("partial/header"); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
@@ -6,10 +7,12 @@ $(document).ready(function()
|
||||
enable_select_all();
|
||||
enable_checkboxes();
|
||||
enable_row_selection();
|
||||
enable_search(suggest_url: '<?php echo site_url("$controller_name/suggest")?>','<?php echo $this->lang->line("common_confirm_search")?>');
|
||||
var widget = enable_search({suggest_url : '<?php echo site_url("$controller_name/suggest")?>',
|
||||
confirm_message : '<?php echo $this->lang->line("common_confirm_search")?>'
|
||||
});
|
||||
enable_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>','<?php echo $this->lang->line($controller_name."_none_selected")?>');
|
||||
|
||||
$('#generate_barcodes').click(function()
|
||||
|
||||
$('#generate_barcodes').click(function()
|
||||
{
|
||||
var selected = get_selected_values();
|
||||
if (selected.length == 0)
|
||||
@@ -20,7 +23,6 @@ $(document).ready(function()
|
||||
|
||||
$(this).attr('href','index.php/item_kits/generate_barcodes/'+selected.join(':'));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function init_table_sorting()
|
||||
@@ -34,7 +36,7 @@ function init_table_sorting()
|
||||
headers:
|
||||
{
|
||||
0: { sorter: false},
|
||||
3: { sorter: false}
|
||||
4: { sorter: false}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -78,23 +80,26 @@ function post_item_kit_form_submit(response)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $this->pagination->create_links();?>
|
||||
<div id="pagination"><?= $links ?></div>
|
||||
<?php echo form_open("$controller_name/search",array('id'=>'search_form')); ?>
|
||||
<div id="table_action_header">
|
||||
<ul>
|
||||
<li class="float_left"><span><?php echo anchor("$controller_name/delete",$this->lang->line("common_delete"),array('id'=>'delete')); ?></span></li>
|
||||
<li class="float_left"><span><?php echo anchor("$controller_name/generate_barcodes",$this->lang->line("items_generate_barcodes"),array('id'=>'generate_barcodes', 'target' =>'_blank','title'=>$this->lang->line('items_generate_barcodes'))); ?></span></li>
|
||||
<li class="float_right">
|
||||
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
|
||||
<?php echo form_open("$controller_name/search",array('id'=>'search_form')); ?>
|
||||
<input type="text" name ='search' id='search'/>
|
||||
<input type="hidden" name ='limit_from' id='limit_from'/>
|
||||
</form>
|
||||
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
|
||||
<input type="text" name ='search' id='search'/>
|
||||
<input type="hidden" name ='limit_from' id='limit_from'/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php echo form_close(); ?>
|
||||
|
||||
<div id="table_holder">
|
||||
<?php echo $manage_table; ?>
|
||||
<?php echo $manage_table; ?>
|
||||
</div>
|
||||
|
||||
<div id="feedback_bar"></div>
|
||||
|
||||
<?php $this->load->view("partial/footer"); ?>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php $this->load->view("partial/header"); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
@@ -47,7 +48,6 @@ function resize_thumbs()
|
||||
$('a.rollover').imgPreview();
|
||||
}
|
||||
|
||||
|
||||
function init_table_sorting()
|
||||
{
|
||||
//Only init if there is more than one row
|
||||
@@ -62,7 +62,6 @@ function init_table_sorting()
|
||||
8: { sorter: false},
|
||||
9: { sorter: false}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -110,24 +109,25 @@ function post_bulk_form_submit(response)
|
||||
}
|
||||
}
|
||||
|
||||
function show_hide_search_filter(search_filter_section, switchImgTag) {
|
||||
var ele = document.getElementById(search_filter_section);
|
||||
var imageEle = document.getElementById(switchImgTag);
|
||||
var elesearchstate = document.getElementById('search_section_state');
|
||||
if(ele.style.display == "block")
|
||||
{
|
||||
ele.style.display = "none";
|
||||
imageEle.innerHTML = '<img src=" <?php echo base_url()?>images/plus.png" style="border:0;outline:none;padding:0px;margin:0px;position:relative;top:-5px;" >';
|
||||
elesearchstate.value="none";
|
||||
}
|
||||
else
|
||||
{
|
||||
ele.style.display = "block";
|
||||
imageEle.innerHTML = '<img src=" <?php echo base_url()?>images/minus.png" style="border:0;outline:none;padding:0px;margin:0px;position:relative;top:-5px;" >';
|
||||
elesearchstate.value="block";
|
||||
}
|
||||
}
|
||||
function show_hide_search_filter(search_filter_section, switchImgTag)
|
||||
{
|
||||
var ele = document.getElementById(search_filter_section);
|
||||
var imageEle = document.getElementById(switchImgTag);
|
||||
var elesearchstate = document.getElementById('search_section_state');
|
||||
|
||||
if(ele.style.display == "block")
|
||||
{
|
||||
ele.style.display = "none";
|
||||
imageEle.innerHTML = '<img src=" <?php echo base_url()?>images/plus.png" style="border:0;outline:none;padding:0px;margin:0px;position:relative;top:-5px;" >';
|
||||
elesearchstate.value="none";
|
||||
}
|
||||
else
|
||||
{
|
||||
ele.style.display = "block";
|
||||
imageEle.innerHTML = '<img src=" <?php echo base_url()?>images/minus.png" style="border:0;outline:none;padding:0px;margin:0px;position:relative;top:-5px;" >';
|
||||
elesearchstate.value="block";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="title_bar">
|
||||
@@ -173,23 +173,22 @@ function show_hide_search_filter(search_filter_section, switchImgTag) {
|
||||
<li class="float_left"><span><?php echo anchor("$controller_name/bulk_edit/width:$form_width",$this->lang->line("items_bulk_edit"),array('id'=>'bulk_edit','title'=>$this->lang->line('items_edit_multiple_items'))); ?></span></li>
|
||||
<li class="float_left"><span><?php echo anchor("$controller_name/generate_barcodes",$this->lang->line("items_generate_barcodes"),array('id'=>'generate_barcodes', 'target' =>'_blank','title'=>$this->lang->line('items_generate_barcodes'))); ?></span></li>
|
||||
<?php if (count($stock_locations) > 1): ?>
|
||||
<li class="float_left">
|
||||
<span>
|
||||
<?php echo form_dropdown('stock_location',$stock_locations,$stock_location,'id="stock_location" onchange="$(\'#search_form\').submit();"'); ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="float_left"><span><?php echo form_dropdown('stock_location',$stock_locations,$stock_location,'id="stock_location" onchange="$(\'#search_form\').submit();"'); ?></span></li>
|
||||
<?php endif; ?>
|
||||
<li class="float_right">
|
||||
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
|
||||
<input type="text" name ='search' id='search'/>
|
||||
<input type="hidden" name ='limit_from' id='limit_from'/>
|
||||
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
|
||||
<input type="text" name ='search' id='search'/>
|
||||
<input type="hidden" name ='limit_from' id='limit_from'/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php echo form_close(); ?>
|
||||
|
||||
<div id="table_holder">
|
||||
<?php echo $manage_table; ?>
|
||||
<?php echo $manage_table; ?>
|
||||
</div>
|
||||
|
||||
<div id="feedback_bar"></div>
|
||||
|
||||
<?php $this->load->view("partial/footer"); ?>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"item_kits_info","Product Set Info","Info de Kit de Artículos","Item Kit Info","Détails du Kit","產品套件資料","Информация о товаре комплекта","ข้อมูลสินค้าหมู่","Ürün Seti Bilgisi","Item Paket Info"
|
||||
"item_kits_item","Product","Artículo","Item","Item","產品","товар","สินค้า","Ürün","Item Barang"
|
||||
"item_kits_items","Producten","Artículos","Items","Items","產品","товары","สินค้า","Ürünler","Item Barang"
|
||||
"item_kits_kit","Kit Id","Kit Id","Kit Id","Kit Id","Kit Id","Kit Id","Kit Id","Kit Id","Kit Id"
|
||||
"item_kits_name","Naam","Nombre del Kit de Artículos","Item Kit Name","Nom du Kit","產品套件","Наименование товара комплект","ชื่อสินค้าหมู่","Ürün Seti İsmi","Nama Item Paket"
|
||||
"item_kits_new","Nieuwe Set","Nuevo Kit de Artículos","New Item Kit","Nouveau Kit","新增產品套件","Новый товар комплект","สร้างสินค้าหมู่","Yeni Ürün Seti","Item Paket Baru"
|
||||
"item_kits_no_item_kits_to_display","Geen sets gevonden","No hay kits de artículos para mostrar","No item kits to display","Aucun kit à afficher","沒有產品套件","Нет товара комплекты для отображения","ไม่มีสินค้าแสดง","Gösterecek ürün seti yok","Tidak ada Item Paket yang ditampilkan"
|
||||
|
||||
|
Reference in New Issue
Block a user