mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-25 00:44:03 -04:00
@@ -72,8 +72,8 @@ class Items extends Secure_Controller
|
||||
{
|
||||
$this->load->helper('file');
|
||||
$this->load->library('image_lib');
|
||||
$base_path = "uploads/item_pics/" . $pic_id ;
|
||||
$images = glob ($base_path. "*");
|
||||
$base_path = './uploads/item_pics/' . $pic_id;
|
||||
$images = glob($base_path . '.*');
|
||||
if(sizeof($images) > 0)
|
||||
{
|
||||
$image_path = $images[0];
|
||||
@@ -190,7 +190,7 @@ class Items extends Secure_Controller
|
||||
$data['selected_supplier'] = $item_info->supplier_id;
|
||||
|
||||
$data['logo_exists'] = $item_info->pic_id != '';
|
||||
$images = glob("uploads/item_pics/" . $item_info->pic_id . ".*");
|
||||
$images = glob('./uploads/item_pics/' . $item_info->pic_id . '.*');
|
||||
$data['image_path'] = sizeof($images) > 0 ? base_url($images[0]) : '';
|
||||
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
|
||||
@@ -248,20 +248,20 @@ function get_items_manage_table_headers()
|
||||
function get_item_data_row($item, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$item_tax_info=$CI->Item_taxes->get_info($item->item_id);
|
||||
$item_tax_info = $CI->Item_taxes->get_info($item->item_id);
|
||||
$tax_percents = '';
|
||||
foreach($item_tax_info as $tax_info)
|
||||
{
|
||||
$tax_percents.=to_tax_decimals($tax_info['percent']) . '%, ';
|
||||
$tax_percents .= to_tax_decimals($tax_info['percent']) . '%, ';
|
||||
}
|
||||
// remove ', ' from last item
|
||||
$tax_percents=substr($tax_percents, 0, -2);
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$tax_percents = substr($tax_percents, 0, -2);
|
||||
$controller_name = strtolower(get_class($CI));
|
||||
|
||||
$image = '';
|
||||
if (!empty($item->pic_id))
|
||||
if ($item->pic_id != '')
|
||||
{
|
||||
$images = glob("uploads/item_pics/" . $item->pic_id . ".*");
|
||||
$images = glob('./uploads/item_pics/' . $item->pic_id . '.*');
|
||||
if (sizeof($images) > 0)
|
||||
{
|
||||
$image .= '<a class="rollover" href="'. base_url($images[0]) .'"><img src="'.site_url('items/pic_thumb/'.$item->pic_id).'"></a>';
|
||||
|
||||
Reference in New Issue
Block a user