added category column to the inventory summary report due huge product data

closes https://github.com/opensourcepos/opensourcepos/issues/2526
This commit is contained in:
PICCORO Lenz McKAY
2019-09-02 22:34:30 -04:30
parent 7ebae8ad8a
commit 37189ba1f3
2 changed files with 3 additions and 1 deletions

View File

@@ -1547,6 +1547,7 @@ class Reports extends Secure_Controller
$tabular_data[] = $this->xss_clean(array(
'item_name' => $row['name'],
'item_number' => $row['item_number'],
'category' => $row['category'],
'quantity' => to_quantity_decimals($row['quantity']),
'low_sell_quantity' => to_quantity_decimals($row['low_sell_quantity']),
'reorder_level' => to_quantity_decimals($row['reorder_level']),

View File

@@ -8,6 +8,7 @@ class Inventory_summary extends Report
{
return array(array('item_name' => $this->lang->line('reports_item_name')),
array('item_number' => $this->lang->line('reports_item_number')),
array('category' => $this->lang->line('reports_category')),
array('quantity' => $this->lang->line('reports_quantity')),
array('low_sell_quantity' => $this->lang->line('reports_low_sell_quantity')),
array('reorder_level' => $this->lang->line('reports_reorder_level')),
@@ -19,7 +20,7 @@ class Inventory_summary extends Report
public function getData(array $inputs)
{
$this->db->select($this->Item->get_item_name('name') . ', items.item_number, item_quantities.quantity, (item_quantities.quantity * items.qty_per_pack) as low_sell_quantity, items.reorder_level, stock_locations.location_name, items.cost_price, items.unit_price, (items.cost_price * item_quantities.quantity) AS sub_total_value');
$this->db->select($this->Item->get_item_name('name') . ', items.item_number, items.category, item_quantities.quantity, (item_quantities.quantity * items.qty_per_pack) as low_sell_quantity, items.reorder_level, stock_locations.location_name, items.cost_price, items.unit_price, (items.cost_price * item_quantities.quantity) AS sub_total_value');
$this->db->from('items AS items');
$this->db->join('item_quantities AS item_quantities', 'items.item_id = item_quantities.item_id');
$this->db->join('stock_locations AS stock_locations', 'item_quantities.location_id = stock_locations.location_id');