mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-10 18:09:30 -04:00
Fix values when using multiple attribute columns (#68)
This commit is contained in:
@@ -1262,8 +1262,8 @@ class Reports extends Secure_Controller
|
||||
to_currency($drow['total']),
|
||||
to_currency($drow['cost']),
|
||||
to_currency($drow['profit']),
|
||||
($drow['discount_type'] == PERCENT)? $drow['discount'].'%':to_currency($drow['discount']),
|
||||
explode('|', (isset($drow['attribute_values'])) ? $drow['attribute_values'] : ""))));
|
||||
($drow['discount_type'] == PERCENT)? $drow['discount'].'%':to_currency($drow['discount'])),
|
||||
explode('|', (isset($drow['attribute_values'])) ? $drow['attribute_values'] : "")));
|
||||
}
|
||||
|
||||
if(isset($report_data['rewards'][$key]))
|
||||
|
||||
@@ -106,6 +106,7 @@ class Detailed_receivings extends Report
|
||||
$this->db->join('attribute_links', 'attribute_links.item_id = items.item_id AND attribute_links.receiving_id = receivings_items_temp.receiving_id AND definition_id IN (' . implode(',', $inputs['definition_ids']) . ')', 'left');
|
||||
$this->db->join('attribute_values', 'attribute_values.attribute_id = attribute_links.attribute_id', 'left');
|
||||
$this->db->order_by('definition_id');
|
||||
$this->db->group_by('receivings_items_temp.receiving_id');
|
||||
}
|
||||
$this->db->where('receivings_items_temp.receiving_id', $value['receiving_id']);
|
||||
$data['details'][$key] = $this->db->get()->result_array();
|
||||
|
||||
@@ -152,9 +152,11 @@ class Detailed_sales extends Report
|
||||
$this->db->join('attribute_links', 'attribute_links.item_id = sales_items_temp.item_id AND attribute_links.sale_id = sales_items_temp.sale_id AND definition_id IN (' . implode(',', $inputs['definition_ids']) . ')', 'left');
|
||||
$this->db->join('attribute_values', 'attribute_values.attribute_id = attribute_links.attribute_id', 'left');
|
||||
$this->db->order_by('definition_id');
|
||||
$this->db->group_by('sales_items_temp.sale_id');
|
||||
}
|
||||
$this->db->where('sales_items_temp.sale_id', $value['sale_id']);
|
||||
$data['details'][$key] = $this->db->get()->result_array();
|
||||
|
||||
$this->db->select('used, earned');
|
||||
$this->db->from('sales_reward_points');
|
||||
$this->db->where('sale_id', $value['sale_id']);
|
||||
|
||||
Reference in New Issue
Block a user