<div id="flapOrder" class="tab-pane fade {if !isset($tab.data.active_store) || !$tab.data.active_store} active {/if} in boxFlex">
        {$tab.data.empty_graph->printScripts()}

        {insert_orders_filter template_name="block.statsOrdersFilter.tpl" filterName='flapStatsOrder' saveFilter=true}
        {printDateBar barName='Order' graphs=['Order', 'Sales']}

        <div class="row bottom-space" data-display-area="orders">
            <div class="col-md-6">
                {printIntervalBar barName='Order'}
                <div class="well graph" id="orders">

                </div>
            </div>
            <div class="col-md-6" >
                {printIntervalBar barName='Sales'}
                <div class="well graph" id="sales">

                </div>
            </div>
        </div>

</div>

<script type="application/javascript">
    {block onready append}
    {literal}

    function getOrderGraph(interval) {
       reloadGraph('#orders', {
          typegraph:"orders",
          acn:"getOrderGraph",
          intervalOrder:interval
       }, '#flapOrder');
    }

    function getSalesGraph(interval){
       reloadGraph('#sales', {
          typegraph:"sales",
          acn:"getOrderGraph",
          intervalSales:interval
       }, '#flapOrder');
    }

    {/literal}
    {/block}
</script>
