Add company name to barcode layout options

This commit is contained in:
jekkos-t520
2015-02-08 18:05:29 +01:00
parent 93968814db
commit 377284f491
2 changed files with 18 additions and 7 deletions

View File

@@ -54,18 +54,26 @@ class Barcode_lib
"&type=".$this->CI->Appconfig->get('barcode_type').
"' onerror=\"(function(pThis){pThis.onerror = null; pThis.src = pThis.src;})(this)\" />";
}
else if($layout_type == 'name'){
else if($layout_type == 'name')
{
$result = $this->CI->lang->line('items_name') . " " . $item['name'];
}
else if($layout_type == 'category'){
else if($layout_type == 'category')
{
$result = $this->CI->lang->line('items_category') . " " . $item['category'];
}
else if($layout_type == 'cost_price'){
else if($layout_type == 'cost_price')
{
$result = $this->CI->lang->line('items_cost_price') . " " . to_currency($item['cost_price']);
}
else if($layout_type == 'unit_price'){
else if($layout_type == 'unit_price')
{
$result = $this->CI->lang->line('items_unit_price') . " " . to_currency($item['unit_price']);
}
else if($layout_type == 'company_name')
{
$result = $this->CI->Appconfig->get('company');
}
return $result;
}

View File

@@ -99,7 +99,8 @@ echo form_open('config/save_barcode/',array('id'=>'barcode_config_form'));
'category' => 'Category',
'item_code' => 'Item code',
'cost_price' => 'Cost price',
'unit_price' => 'Unit price'
'unit_price' => 'Unit price',
'company_name' => 'Company Name'
),
$this->config->item('barcode_first_row'));
?>
@@ -110,7 +111,8 @@ echo form_open('config/save_barcode/',array('id'=>'barcode_config_form'));
'category' => 'Category',
'item_code' => 'Item code',
'cost_price' => 'Cost price',
'unit_price' => 'Unit price'
'unit_price' => 'Unit price',
'company_name' => 'Company Name'
),
$this->config->item('barcode_second_row'));
?>
@@ -121,7 +123,8 @@ echo form_open('config/save_barcode/',array('id'=>'barcode_config_form'));
'category' => 'Category',
'item_code' => 'Item code',
'cost_price' => 'Cost price',
'unit_price' => 'Unit price'
'unit_price' => 'Unit price',
'company_name' => 'Company Name'
),
$this->config->item('barcode_third_row'));
?>