mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Add Retail Price to Items Summary Report
This commit is contained in:
@@ -228,6 +228,7 @@ class Reports extends Secure_Controller
|
||||
{
|
||||
$tabular_data[] = $this->xss_clean(array(
|
||||
'item_name' => $row['name'],
|
||||
'unit_price' => $row['unit_price'],
|
||||
'quantity' => to_quantity_decimals($row['quantity_purchased']),
|
||||
'subtotal' => to_currency($row['subtotal']),
|
||||
'tax' => to_currency_tax($row['tax']),
|
||||
|
||||
@@ -8,6 +8,7 @@ class Summary_items extends Summary_report
|
||||
{
|
||||
return array(
|
||||
array('item_name' => $this->lang->line('reports_item')),
|
||||
array('unit_price' => $this->lang->line('reports_unit_price'), 'sorter' => 'number_sorter'),
|
||||
array('quantity' => $this->lang->line('reports_quantity')),
|
||||
array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'),
|
||||
array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'),
|
||||
@@ -22,6 +23,7 @@ class Summary_items extends Summary_report
|
||||
|
||||
$this->db->select('
|
||||
MAX(items.name) AS name,
|
||||
MAX(items.unit_price) AS unit_price,
|
||||
SUM(sales_items.quantity_purchased) AS quantity_purchased
|
||||
');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user