/** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ if (!module_statistic::can_i('view', 'Staff Report')) { redirect_browser(_BASE_HREF); } $page_title = _l('Staff Report'); $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d'))); $staff_reports = module_statistic::get_statistics_staff($search); if (class_exists('module_table_sort', false)) { module_table_sort::enable_pagination_hook(array('table_id' => 'statistic_list', 'sortable' => array('sort_date' => array('field' => 'transaction_date', 'current' => 2), 'sort_name' => array('field' => 'name'), 'sort_credit' => array('field' => 'credit'), 'sort_debit' => array('field' => 'debit')))); } /* // hack to add a "export" option to the pagination results. if(class_exists('module_import_export',false) && module_statistic::can_i('view','Export Statistic')){ module_import_export::enable_pagination_hook( // what fields do we pass to the import_export module from this customers? array( 'name' => 'Statistic Export', 'parent_form' => 'statistic_form', 'fields'=>array( 'Date' => 'transaction_date', 'Name' => 'name',
<?php /** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ $page_title = _l('Tax Report'); $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('type' => 'ie', 'date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d'))); $tax_reports = module_statistic::get_statistics_tax($search); if (!module_statistic::can_i('view', 'Tax Report')) { redirect_browser(_BASE_HREF); } $currencies = array(); $available_credit_taxes = array(); $available_debit_taxes = array(); foreach ($tax_reports as $id => $finance) { if (isset($finance['payment_type'])) { if ($finance['payment_type'] == _INVOICE_PAYMENT_TYPE_OVERPAYMENT_CREDIT || $finance['payment_type'] == _INVOICE_PAYMENT_TYPE_CREDIT) { // ADD THIS CODE TO get_finance_summary() in finance.php too! // ADD THIS CODE TO finance_list.php too! // dont add these ones to the totals at thebottom, mark then with asterix so people know. unset($tax_reports[$id]); continue; } } if (!isset($currencies[$finance['currency_id']])) {
<?php /** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ $page_title = _l('Ticket Staff Report'); $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d'))); if (!module_statistic::can_i('view', 'Ticket Staff Report')) { redirect_browser(_BASE_HREF); } $staff_members = module_ticket::get_ticket_staff(); // we get all the ticket messages that were sent within this time period // (without autoresponders?) $sql = "SELECT * FROM `" . _DB_PREFIX . "ticket_message` WHERE message_time >= " . (int) strtotime(input_date($search['date_from'])) . " AND message_time <= " . (int) strtotime(input_date($search['date_to'])); $messages = qa($sql); ?> <form action="" method="post" id="statistic_form"> <?php $search_bar = array('elements' => array('date' => array('title' => _l('Date:'), 'fields' => array(array('type' => 'date', 'name' => 'search[date_from]', 'value' => isset($search['date_from']) ? $search['date_from'] : ''), _l('to'), array('type' => 'date', 'name' => 'search[date_to]', 'value' => isset($search['date_to']) ? $search['date_to'] : ''))))); echo module_form::search_bar($search_bar); ?> </form>
/** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ if (!class_exists('module_subscription', false) || !module_statistic::can_i('view', 'Staff Report')) { redirect_browser(_BASE_HREF); } $page_title = _l('Staff Report'); $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d'))); $subscription_reports = module_statistic::get_statistics_subscription($search); if (class_exists('module_table_sort', false)) { module_table_sort::enable_pagination_hook(array('table_id' => 'statistic_list', 'sortable' => array('sort_date' => array('field' => 'transaction_date', 'current' => 2), 'sort_name' => array('field' => 'name'), 'sort_credit' => array('field' => 'credit'), 'sort_debit' => array('field' => 'debit')))); } /* // hack to add a "export" option to the pagination results. if(class_exists('module_import_export',false) && module_statistic::can_i('view','Export Statistic')){ module_import_export::enable_pagination_hook( // what fields do we pass to the import_export module from this customers? array( 'name' => 'Statistic Export', 'parent_form' => 'statistic_form', 'fields'=>array( 'Date' => 'transaction_date', 'Name' => 'name',