'rep', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'ReportsEventHandler','file'=>'reports_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'ReportsTagProcessor','file'=>'reports_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', 4 => 'mode', // 't' for temp '' for normal ), 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => false, 'HookToPrefix' => 'rep', 'HookToSpecial' => '*', 'HookToEvent' => Array('OnAfterConfigRead'), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'OnUpdateConfig', ), ), 'IDField' => 'CategoryId', 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('d'=>'!la_title_Adding_Discount!'), 'edit_status_labels' => Array('d'=>'!la_title_Editing_Discount!'), 'new_titlefield' => Array('d'=>'!la_title_New_Discount!'), ), 'report_options'=>Array('format' => "!la_title_ReportOptions!"), 'report_results'=>Array('format' => "!la_title_ReportResults!"), 'report_chart'=>Array('format' => "!la_title_SalesReportChart!"), ), 'PermSection' => Array('main' => 'in-commerce:reports'), 'Sections' => Array( 'in-commerce:reports' => Array( 'parent' => 'in-commerce', 'icon' => 'in-commerce:summary_logs', 'label' => 'la_tab_SaleReports', 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event'=>'OnNew'), 'permissions' => Array('view', 'add'), 'priority' => 3, 'type' => stTREE, ), ), 'FilterMenu' => Array( 'Groups' => Array( Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER), Array('mode' => 'AND', 'filters' => Array(4,5,6), 'type' => WHERE_FILTER), ), 'Filters' => Array( 0 => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1' ), 1 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2' ), 2 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ), 3 => Array(), 4 => Array('label' => 'la_Flat', 'on_sql' => '', 'off_sql' => 'Type != 1' ), 5 => Array('label' => 'la_Percent', 'on_sql' => '', 'off_sql' => 'Type != 2' ), 6 => Array('label' => 'la_FreeShipping', 'on_sql' => '', 'off_sql' => 'Type != 3' ), ) ), 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s', ), // key - special, value - list select sql 'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s', ), 'ListSortings' => Array( '' => Array( 'Sorting' => Array('Name' => 'asc'), ) ), 'CalculatedFields' => Array ( '' => Array ( 'CategoryId' => '0', ), ), 'Fields' => Array( ), 'VirtualFields' => Array( 'ReportType' => array('formatter'=>'kOptionsFormatter','options'=>array( 12 => 'la_Overall', 1 => 'la_ByCategory', 2 => 'la_ByUser', 5 => 'la_byProduct' ),'use_phrases'=>1,'default'=>12 ), 'FromDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ), 'ToDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ), 'Recursive' => array('default'=>1), 'SkipEmpty' => array('default'=>1), 'CategoryId' => Array ('type' => 'int', 'default' => 0), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'), 'Fields' => Array( 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), 'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'), 'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'), 'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'), 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'), 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'), ), ), ), ); ?>