mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-03 05:12:50 -04:00
Refactor + fix detailed reports (#68)
This commit is contained in:
@@ -1251,7 +1251,7 @@ class Reports extends Secure_Controller
|
||||
{
|
||||
$quantity_purchased .= ' [' . $this->Stock_location->get_location_name($drow['item_location']) . ']';
|
||||
}
|
||||
$details_data[$row['sale_id']][] = $this->xss_clean(array_merge(array(
|
||||
$details_data[$row['sale_id']][] = $this->xss_clean(array(
|
||||
$drow['name'],
|
||||
$drow['category'],
|
||||
$drow['serialnumber'],
|
||||
@@ -1262,8 +1262,11 @@ 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'])));
|
||||
|
||||
$attribute_values = (isset($drow['attribute_values'])) ? $drow['attribute_values'] : '';
|
||||
append_attribute_values($details_data[$row['sale_id']][0], $definition_names, $attribute_values);
|
||||
$details_data[$row['sale_id']][0] = array_values($details_data[$row['sale_id']][0]);
|
||||
}
|
||||
|
||||
if(isset($report_data['rewards'][$key]))
|
||||
@@ -1364,14 +1367,17 @@ class Reports extends Secure_Controller
|
||||
{
|
||||
$quantity_purchased .= ' [' . $this->Stock_location->get_location_name($drow['item_location']) . ']';
|
||||
}
|
||||
$details_data[$row['receiving_id']][] = $this->xss_clean(array_merge(array(
|
||||
$details_data[$row['receiving_id']][] = $this->xss_clean(array(
|
||||
$drow['item_number'],
|
||||
$drow['name'],
|
||||
$drow['category'],
|
||||
$quantity_purchased,
|
||||
to_currency($drow['total']),
|
||||
($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'])));
|
||||
|
||||
$attribute_values = (isset($drow['attribute_values'])) ? $drow['attribute_values'] : '';
|
||||
append_attribute_values($details_data[$row['receiving_id']][0], $definition_names, $attribute_values);
|
||||
$details_data[$row['receiving_id']][0] = array_values($details_data[$row['receiving_id']][0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user