CORE POS - Fannie
The CORE POS back end
Public Member Functions | Public Attributes | Protected Attributes | List of all members
DepartmentMovementReport Class Reference
Inheritance diagram for DepartmentMovementReport:
FannieReportPage FanniePage

Public Member Functions

 fetch_report_data ()
 
 calculate_footers ($data)
 
 report_description_content ()
 
 form_content ()
 
 helpContent ()
 
- Public Member Functions inherited from FannieReportPage
 preprocess ()
 
 form_content ()
 
 bodyContent ()
 
 report_content ()
 
 both_content ()
 
 calculate_footers ($data)
 
 assign_headers ()
 
 select_headers ($incrIndex=False)
 
 report_description_content ()
 
 report_end_content ()
 
 fetch_report_data ()
 
 render_data ($data, $headers=array(), $footers=array(), $format='html')
 
 dekey_array ($arr)
 
 htmlLine ($row, $header=False)
 
 csvLine ($row)
 
 excelFormat ($item, $style='')
 
 xlsMeta ($data)
 
 drawPage ()
 
 draw_page ()
 

Public Attributes

 $description = '[Department Movement] lists sales for a department or group of departments over a given date range.'
 
 $report_set = 'Movement Reports'
 
 $themed = true
 
- Public Attributes inherited from FannieReportPage
 $required = True
 
 $description
 
 $page_set = 'Reports'
 
 $report_set = ''
 
 $discoverable = true
 
const META_BOLD = 1
 
const META_BLANK = 2
 
const META_REPEAT_HEADERS = 4
 
const META_CHART_DATA = 8
 
const META_COLOR = 16
 

Protected Attributes

 $report_cache = 'none'
 
 $title = "Fannie : Department Movement"
 
 $header = "Department Movement"
 
 $required_fields = array('date1', 'date2')
 
- Protected Attributes inherited from FannieReportPage
 $content_function = "form_content"
 
 $required_fields = array()
 
 $report_headers = array()
 
 $report_format = 'html'
 
 $report_cache = 'none'
 
 $multi_report_mode = False
 
 $multi_counter = 1
 
 $header_index = 0
 
 $sortable = true
 
 $no_sort_but_style = false
 
 $sort_column = 0
 
 $sort_direction = 0
 
 $no_jquery = false
 
 $chart_label_column = 0
 
 $chart_data_columns = array()
 

Additional Inherited Members

- Protected Member Functions inherited from FannieReportPage
 format ($data)
 
 checkDataCache ()
 
 freshenCache ($data)
 
 defaultDescriptionContent ($datefields=array())
 
 formatCheck ()
 

Member Function Documentation

DepartmentMovementReport::calculate_footers (   $data)

Sum the quantity and total columns for a footer, but also set up headers and sorting.

The number of columns varies depending on which data grouping the user selected.

Use the width of the first record to determine how the data is grouped

The Department and Weekday datasets are both four columns wide so I have to resort to form parameters

DepartmentMovementReport::fetch_report_data ( )

Lots of options on this report.

Build a WHERE condition for later. Superdepartment (buyer) takes precedence over department and negative values have special meaning

Extra lookup to write condition in terms of transaction.department seems to result in better index utilization and faster queries

Provide more WHERE conditions to filter irrelevant transaction records, as a stop-gap until this is handled more uniformly across the application.

Select a summary table. For UPC results, per-unique-ring summary is needed. For date/dept/weekday results the per-department summary is fine (and a smaller table)

Build an appropriate query depending on the grouping option

Copy the results into an array. Date requires a special case to combine year, month, and day into a single field


The documentation for this class was generated from the following file: