HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oa.sanjiangapp.com/app/cash/trade/js/report.js
$(document).ready(function()
{
    $("#mainNavbar .navbar-nav a[href*=trade][href*=report]").parent().addClass('active');
    $('#menu .nav a[href*=export2Excel]').addClass('iframe').attr('data-width', '700px');

    var labels   = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
    var datasets = [];

    var datasetIn  = {label: $('#barChart').find('thead .chart-label-in').text(), color: 'green', data: []};
    var datasetOut = {label: $('#barChart').find('thead .chart-label-out').text(), color: 'red', data: []};
    
    $('#barChart').find('.chart-color-dot-in').css('color', 'green');
    $('#barChart').find('.chart-color-dot-out').css('color', 'red');
    
    var chartLabels = [];
    $('#barChart').find('tbody .chart-label').each(function(){ chartLabels.push($(this).text()); })

    $.each(labels, function(key, value)
    {
        if($.inArray(value, chartLabels) != -1)
        {
            $('#barChart').find('tbody .chart-value-in').each(function()
            {
                if($(this).parent('tr').find('.chart-label').text() == value)
                {
                    datasetIn.data.push(parseFloat($(this).text()));
                }
            })

            $('#barChart').find('tbody .chart-value-out').each(function()
            {
                if($(this).parent('tr').find('.chart-label').text() == value)
                {
                    datasetOut.data.push(parseFloat($(this).text()));
                }
            })
        }
        else
        {
            datasetIn.data.push(parseFloat(0));
            datasetOut.data.push(parseFloat(0));
        }
    })
    
    var data = {labels: labels, datasets: [datasetIn, datasetOut]};
    
    var options = {multiTooltipTemplate: "<%= datasetLabel %> <%= value %>"};
    chart = $('#chart-annual').barChart(data, options);
    
    $('#currency').change(function()
    {
       var selectYear     = $('#year option:selected').text();
       var selectCurrency = $('#currency').val();
       location.href = createLink('trade', 'report', "date=" + selectYear + "&currency=" + selectCurrency);
    })

    $('td.monthly > .table-wrapper').height($('td.monthly > .chart-wrapper').outerHeight() - 2);
    $('td.annual > .table-wrapper').height($('td.annual > .chart-wrapper').outerHeight() - 2);

    initTableHeader();
})