Ejemplo n.º 1
0
        }
        Registry::set('navigation.dynamic.active_section', $report_id);
        foreach ($reports[$report_id]['tables'] as $key => $value) {
            Registry::set('navigation.tabs.table_' . $value['table_id'], array('title' => $value['description'], 'href' => "sales_reports.view?report_id={$report_id}&table_id=" . $value['table_id'], 'ajax' => true));
        }
        // [/Page sections]
        Tygh::$app['view']->assign('report_id', $report_id);
        Tygh::$app['view']->assign('intervals', $intervals);
        Tygh::$app['view']->assign('table', $report['tables'][$table_id]);
        // FIX IT
        Tygh::$app['view']->assign('report', $report);
    }
}
// ********************************* // ********************************
if (!empty($_REQUEST['report_id'])) {
    Tygh::$app['view']->assign('report_elements', fn_get_parameters($_REQUEST['report_id']));
    Tygh::$app['view']->assign('report_id', $_REQUEST['report_id']);
}
$colors = array('pink', 'peru', 'plum', 'azure', 'aquamarine', 'blueviolet', 'firebrick', 'royalblue', 'darkgreen', 'darkorange', 'deepskyblue', 'gold ', 'darkseagreen ', 'tomato', 'wheat', 'seagreen');
Tygh::$app['view']->assign('colors', $colors);
Tygh::$app['view']->assign('depend_items', $depend_items);
function fn_sr_get_random_color()
{
    $numbers = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F');
    $color = '';
    for ($i = 0; $i < 6; $i++) {
        $color .= $numbers[rand(0, 15)];
    }
    return '#' . $color;
}
function fn_update_sales_report($report_data, $report_id = 0, $lang_code = DESCR_SL)
Ejemplo n.º 2
0
        }
        Registry::set('navigation.dynamic.active_section', $report_id);
        foreach ($reports[$report_id]['tables'] as $key => $value) {
            Registry::set('navigation.tabs.table_' . $value['table_id'], array('title' => $value['description'], 'href' => "sales_reports.view?report_id={$report_id}&table_id=" . $value['table_id'], 'ajax' => true));
        }
        // [/Page sections]
        Registry::get('view')->assign('report_id', $report_id);
        Registry::get('view')->assign('intervals', $intervals);
        Registry::get('view')->assign('table', $report['tables'][$table_id]);
        // FIX IT
        Registry::get('view')->assign('report', $report);
    }
}
// ********************************* // ********************************
if (!empty($_REQUEST['report_id'])) {
    Registry::get('view')->assign('report_elements', fn_get_parameters($_REQUEST['report_id']));
    Registry::get('view')->assign('report_id', $_REQUEST['report_id']);
}
$colors = array('pink', 'peru', 'plum', 'azure', 'aquamarine', 'blueviolet', 'firebrick', 'royalblue', 'darkgreen', 'darkorange', 'deepskyblue', 'gold ', 'darkseagreen ', 'tomato', 'wheat', 'seagreen');
Registry::get('view')->assign('colors', $colors);
Registry::get('view')->assign('depend_items', $depend_items);
function fn_sr_get_random_color()
{
    $numbers = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F');
    $color = '';
    for ($i = 0; $i < 6; $i++) {
        $color .= $numbers[rand(0, 15)];
    }
    return '#' . $color;
}
function fn_update_sales_report($report_data, $report_id = 0, $lang_code = DESCR_SL)
Ejemplo n.º 3
0
            }
        }
        if (!empty($table_conditions)) {
            $view->assign('table_conditions', $table_conditions);
        }
        // Periods
        $intervals = db_get_array("SELECT a.* FROM ?:sales_reports_intervals as a ORDER BY a.interval_id");
        // [Page sections]
        foreach ($reports as $key => $value) {
            Registry::set('navigation.dynamic.sections.' . $key, array('title' => $value['description'], 'href' => "sales_reports.reports?report_id={$key}", 'ajax' => true));
        }
        Registry::set('navigation.dynamic.active_section', $report_id);
        foreach ($reports[$report_id]['tables'] as $key => $value) {
            Registry::set('navigation.tabs.table_' . $value['table_id'], array('title' => $value['description'], 'href' => "sales_reports.reports?report_id={$report_id}&table_id=" . $value['table_id'], 'ajax' => true));
        }
        // [/Page sections]
        $view->assign('report_id', $report_id);
        $view->assign('intervals', $intervals);
        $view->assign('table', $report['tables'][$table_id]);
        // FIX IT
        $view->assign('report', $report);
    }
}
// ********************************* // ********************************
if (!empty($_REQUEST['report_id'])) {
    $view->assign('report_elements', fn_get_parameters($_REQUEST['report_id']));
    $view->assign('report_id', $_REQUEST['report_id']);
}
$colors = array('pink', 'peru', 'plum', 'azure', 'aquamarine', 'blueviolet', 'firebrick', 'royalblue', 'darkgreen', 'darkorange', 'deepskyblue', 'gold ', 'darkseagreen ', 'tomato', 'wheat', 'seagreen');
$view->assign('colors', $colors);
$view->assign('depend_items', $depend_items);