src/ApplicationBundle/Resources/views/pages/dashboard/index_sales.html.twig line 1

Open in your IDE?
  1. {% include '@Application/codecovers_header.html.twig' %}
  2. {% include '@Application/inc/menu/skeleton_with_menu_codecovers.html.twig' %}
  3. <style>
  4.     .card div[class*="col-md"], .card div[class*="col-lg"], .card div[class*="col-xs"], .card div[class*="col-sm"] {
  5.         margin-bottom: 0px;
  6.     }
  7. </style>
  8. <!-- BEGIN BASE-->
  9. <div id="base">
  10.     <!-- BEGIN CONTENT-->
  11.     <div id="content">
  12.         <section>
  13.             <div class="section-body">
  14.                 {% set company_data=''|getUserCompany %}
  15.                 {% set pending_doc_list={} %}
  16.                 {% set pending_approval_list={} %}
  17.                 {% set override_approval_list={} %}
  18.                 {% set monthly_summary_data=  ''|getMonthlySummary %}
  19.                 {% set so_count_details=100|getSoCountAndMore() %}
  20.                 {#{{ dump(monthly_summary_data) }}#}
  21.                 <div class="row clearfix">
  22.                     {% include '@Application/inc/notification/error_notification.html.twig' %}
  23.                     {% include '@Application/inc/notification/success_notification.html.twig' %}
  24.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6" style="cursor: pointer;">
  25.                         <div class="card pending_task_trigger">
  26.                             <div class="body no-padding">
  27.                                 <div class="alert alert-callout alert-warning no-margin">
  28. {#                                    <strong class="pull-right text-warning text-lg">{{ (pending_approval_list|length) +(override_approval_list|length) }}#}
  29. {#                                        <i class="material-icons">playlist_add_check</i></strong>#}
  30. {#                                    <strong class="text-xl number count-to-amount-specific" data-from="0"#}
  31. {#                                            data-to="{{ (pending_approval_list|length) +(override_approval_list|length) }}"#}
  32. {#                                            data-speed="{{ 1000 }}" data-fresh-interval="20">#}
  33. {#                                    </strong>#}
  34.                                     <strong class="pull-right text-warning text-lg">0<i class="material-icons">playlist_add_check</i></strong>
  35.                                     <strong class="text-xl number count-to-amount-specific" data-from="0"
  36.                                             data-to="0"
  37.                                             data-speed="1000" data-fresh-interval="20">&nbsp;
  38.                                     </strong>
  39.                                     <br>
  40.                                     <span class="opacity-50">PENDING TASKS</span>
  41.                                 </div>
  42.                             </div><!--end .card-body -->
  43.                         </div>
  44.                     </div>
  45.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
  46.                         <div class="card ">
  47.                             <div class="body no-padding">
  48.                                 <div class="alert alert-callout alert-success no-margin">
  49.                                     <strong class="pull-right text-success text-lg"><i class="material-icons">add_shopping_cart</i>
  50.                                         {#<i class="zmdi zmdi-trending-up"></i>#}
  51.                                     </strong>
  52.                                     <strong class="text-xl number count-to-amount" data-from="0"
  53.                                             data-to="{{ company_data.revenue }}"
  54.                                             data-speed="{{ 1000 }}" data-fresh-interval="20">
  55.                                     </strong>
  56.                                     <br>
  57.                                     <span class="opacity-50">SALES</span>
  58.                                     <div class="stick-bottom-left-right">
  59.                                         <div class="height-2 revenue-tm-sparkline" data-line-color="#bdc1c1"></div>
  60.                                     </div>
  61.                                 </div>
  62.                             </div><!--end .card-body -->
  63.                         </div>
  64.                     </div>
  65.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
  66.                         <div class="card ">
  67.                             <div class="body no-padding">
  68.                                 <div class="alert alert-callout alert-info no-margin">
  69.                                     <strong class="pull-right text-success text-lg"><i class="material-icons">work</i>
  70.                                     </strong>
  71.                                     <strong class="text-xl number count-to-amount" data-from="0"
  72.                                             data-to="{{ company_data.netWorth }}"
  73.                                             data-speed="{{ 1000 }}" data-fresh-interval="20">
  74.                                     </strong>
  75.                                     <br>
  76.                                     <span class="opacity-50">NET WORTH</span>
  77.                                     <div class="stick-bottom-left-right">
  78.                                         <div class="height-2 nw-tm-sparkline" data-line-color="#bdc1c1"></div>
  79.                                     </div>
  80.                                 </div>
  81.                             </div><!--end .card-body -->
  82.                         </div>
  83.                     </div>
  84.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
  85.                         <div class="card style-accent">
  86.                             <div class="body no-padding">
  87.                                 <div class="alert alert-callout alert-info no-margin">
  88.                                     <strong class="pull-right text-success text-lg"><i class="material-icons">call_received</i>
  89.                                     </strong>
  90.                                     <strong class="text-xl number count-to-amount" data-from="0"
  91.                                             data-to="{{ company_data.receivable }}"
  92.                                             data-speed="{{ 1000 }}" data-fresh-interval="20">
  93.                                     </strong>
  94.                                     <br>
  95.                                     <span class="opacity-50">RECEIVABLE</span>
  96.                                 </div>
  97.                             </div><!--end .card-body -->
  98.                         </div>
  99.                     </div>
  100.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
  101.                         <div class="card style-accent">
  102.                             <div class="body no-padding">
  103.                                 <div class="alert alert-callout  no-margin">
  104.                                     <strong class="pull-right text-success text-lg"><i
  105.                                                 class="material-icons">call_made</i> </strong>
  106.                                     <strong class="text-xl number count-to-amount" data-from="0"
  107.                                             data-to="{{ company_data.payable }}"
  108.                                             data-speed="{{ 1000 }}" data-fresh-interval="20">
  109.                                     </strong>
  110.                                     <br>
  111.                                     <span class="opacity-50">PAYABLE</span>
  112.                                 </div>
  113.                             </div><!--end .card-body -->
  114.                         </div>
  115.                     </div>
  116.                     <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
  117.                         <div class="card style-accent">
  118.                             <div class="body no-padding">
  119.                                 <div class="alert alert-callout alert-warning no-margin">
  120.                                     <strong class="pull-right text-success text-lg"><i class="material-icons">trending_up</i>
  121.                                     </strong>
  122.                                     <strong class="text-xl number count-to-percentage" data-from="0"
  123.                                             data-to="{{ monthly_summary_data.latestMonthlyGrowth }}"
  124.                                             data-speed="{{ 1000 }}" data-fresh-interval="20">
  125.                                     </strong>
  126.                                     <br>
  127.                                     <span class="opacity-50">GROWTH</span>
  128.                                     <div class="stick-bottom-left-right">
  129.                                         <div class="height-2 mg-tm-sparkline" data-line-color="#bdc1c1"></div>
  130.                                     </div>
  131.                                 </div>
  132.                             </div><!--end .card-body -->
  133.                         </div>
  134.                     </div>
  135.                 </div>
  136.                 <div class="row clearfix pending_task_div" id="" style="display: none;">
  137.                     <div class=" col-xs-12 col-sm-12 col-md-12 col-lg-12">
  138.                         <div class="card">
  139.                             <div class="header">
  140.                                 <header>PENDING TASKS</header>
  141.                                 <div class="tools">
  142.                                     <a class="btn btn-icon-toggle btn-refresh"><i class="zmdi zmdi-refresh"></i></a>
  143.                                     <a class="btn btn-icon-toggle btn-collapse"><i class="fa fa-angle-down"></i></a>
  144.                                     <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  145.                                 </div>
  146.                             </div>
  147.                             <div class="body">
  148.                                 {% if pending_approval_list is empty and override_approval_list is empty %}
  149.                                     <blockquote class="m-b-25">
  150.                                         <p>Great! No Pending Tasks</p>
  151.                                         <footer><cite title="Source Title">The News Bee</cite></footer>
  152.                                     </blockquote>
  153.                                 {% else %}
  154.                                     <div class="table-responsive">
  155.                                         <table class="table table-hover table-condensed dashboard-task-infos">
  156.                                             <thead>
  157.                                             <tr>
  158.                                                 <th>#</th>
  159.                                                 <th>Document</th>
  160.                                                 <th>Status</th>
  161.                                                 <th>Type</th>
  162.                                                 <th>Action</th>
  163.                                             </tr>
  164.                                             </thead>
  165.                                             <tbody>
  166.                                             {% set ind=0 %}
  167.                                             {% for item in pending_approval_list %}
  168.                                                 {% set ind=ind+1 %}
  169.                                                 <tr class="pending_row_{{ item.entity }}_{{ item.entityId }}">
  170.                                                     <td>{{ ind }}</td>
  171.                                                     <td>{{ item.documentHash }}</td>
  172.                                                     <td><span class="label bg-orange" style="background: orange;">Pending Approval</span></td>
  173.                                                     <td>{{ item.entityAlias }}</td>
  174.                                                     <td>
  175.                                                         <div class="btn-group ">
  176.                                                         <button type="button"
  177.                                                                 class="btn ink-reaction btn-sm btn-primary dropdown-toggle  waves-effect"
  178.                                                                 data-toggle="dropdown">
  179.                                                             Action <i class="fa fa-caret-down"></i>
  180.                                                         </button>
  181.                                                         <ul class="dropdown-menu animation-expand"
  182.                                                             style=""
  183.                                                             role="menu">
  184.                                                             <li><a  href="{% if item.viewPath != '' and not item.viewPath is null %}{{ path(item.viewPath) }}/{{ item.entityId }}{% endif %}"> View</a></li>
  185.                                                             <li><a href="#" class="trigger_approval_btn"
  186.                                                                    data-toggle="modal"
  187.                                                                    data-entity="{{ item.entity }}"
  188.                                                                    data-entity-id="{{ item.entityId }}"
  189.                                                                    data-approval-id="{{ item.approvalId }}"
  190.                                                                    data-target="#approveDocument">Approve</a></li>
  191.                                                         </ul>
  192.                                                         </div>
  193. {#                                                        <a class="btn btn-primary btn-sm waves-effect"#}
  194. {#                                                           href="{{ path(item.viewPath) }}/{{ item.entityId }}">#}
  195. {#                                                            View#}
  196. {#                                                        </a>#}
  197.                                                         {#<div class="progress">#}
  198.                                                         {#<div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>#}
  199.                                                         {#</div>#}
  200.                                                     </td>
  201.                                                 </tr>
  202.                                             {% endfor %}
  203.                                             {% for item in override_approval_list %}
  204.                                                 {% set ind=ind+1 %}
  205.                                                 <tr class="pending_row_{{ item.entity }}_{{ item.entityId }}">
  206.                                                     <td>{{ ind }}</td>
  207.                                                     <td>{{ item.documentHash }}</td>
  208.                                                     <td><span class="label " style="background: blue;">Override</span></td>
  209.                                                     <td>{{ item.entityAlias }}</td>
  210.                                                     <td>
  211.                                                         <div class="btn-group ">
  212.                                                             <button type="button"
  213.                                                                     class="btn ink-reaction btn-sm btn-primary dropdown-toggle  waves-effect"
  214.                                                                     data-toggle="dropdown">
  215.                                                                 Action <i class="fa fa-caret-down"></i>
  216.                                                             </button>
  217.                                                             <ul class="dropdown-menu animation-expand"
  218.                                                                 style=""
  219.                                                                 role="menu">
  220.                                                                 <li><a  href="{{ path(item.viewPath) }}/{{ item.entityId }}"> View</a></li>
  221.                                                                 <li><a href="#" class="trigger_approval_btn"
  222.                                                                        data-toggle="modal"
  223.                                                                        data-entity="{{ item.entity }}"
  224.                                                                        data-entity-id="{{ item.entityId }}"
  225.                                                                        data-approval-id="{{ item.approvalId }}"
  226.                                                                        data-target="#approveDocument">Approve</a></li>
  227.                                                             </ul>
  228.                                                         </div>
  229.                                                         {#<div class="progress">#}
  230.                                                         {#<div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>#}
  231.                                                         {#</div>#}
  232.                                                     </td>
  233.                                                 </tr>
  234.                                             {% endfor %}
  235.                                             </tbody>
  236.                                         </table>
  237.                                     </div>
  238.                                 {% endif %}
  239.                             </div>
  240.                         </div>
  241.                     </div>
  242.                 </div>
  243.                 <div class="row">
  244.                     <!-- BEGIN SITE ACTIVITY -->
  245.                     <div class="col-md-9">
  246.                         <div class="card ">
  247.                             <div class="row">
  248.                                 <div class="col-md-8">
  249.                                     <div class="header">
  250.                                         <header>Revenue & Expense</header>
  251.                                     </div><!--end .header -->
  252.                                     <div class="body height-8">
  253.                                         <div id="rev_exp_chart_legend"
  254.                                              class="flot-legend-horizontal stick-top-right no-y-padding"></div>
  255.                                         <div id="rev_exp_chart" class="flot height-7" data-title="Sales & Expenses"
  256.                                              data-color="#7dd8d2,#0aa89e"></div>
  257.                                     </div><!--end .body -->
  258.                                 </div><!--end .col -->
  259.                                 <div class="col-md-4">
  260.                                     <div class="header">
  261.                                         <header>Current stats</header>
  262.                                     </div>
  263.                                     <div class="body height-8">
  264.                                         <strong>{{ company_data.sales|number_format(2,'.',',') }}</strong> Sales
  265.                                         <span class="pull-right text-success text-sm">0,18% <i
  266.                                                     class="zmdi zmdi-trending-up"></i></span>
  267.                                         <div class="progress progress-hairline">
  268.                                             <div class="progress-bar progress-bar-primary-dark" style="width:43%"></div>
  269.                                         </div>
  270.                                         {{ so_count_details.soCount }} Orders
  271.                                         <span class="pull-right text-success text-sm">0,68% <i
  272.                                                     class="zmdi zmdi-trending-up"></i></span>
  273.                                         <div class="progress progress-hairline">
  274.                                             <div class="progress-bar progress-bar-primary-dark" style="width:11%"></div>
  275.                                         </div>
  276.                                         {{ company_data.cash|number_format(2,'.',',') }} in Cash
  277.                                         <span class="pull-right text-danger text-sm">21,08% <i
  278.                                                     class="zmdi zmdi-trending-down"></i></span>
  279.                                         <div class="progress progress-hairline">
  280.                                             <div class="progress-bar progress-bar-danger" style="width:93%"></div>
  281.                                         </div>
  282.                                         {{ company_data.bank|number_format(2,'.',',') }} in Bank
  283.                                         <span class="pull-right text-success text-sm">0,18% <i
  284.                                                     class="zmdi zmdi-trending-up"></i></span>
  285.                                         <div class="progress progress-hairline">
  286.                                             <div class="progress-bar progress-bar-primary-dark" style="width:63%"></div>
  287.                                         </div>
  288.                                         0 Return Occurrance
  289.                                         <span class="pull-right text-success text-sm">0,18% <i
  290.                                                     class="zmdi zmdi-trending-up"></i></span>
  291.                                         <div class="progress progress-hairline">
  292.                                             <div class="progress-bar progress-bar-primary-dark" style="width:47%"></div>
  293.                                         </div>
  294.                                     </div><!--end .body -->
  295.                                 </div><!--end .col -->
  296.                             </div><!--end .row -->
  297.                         </div><!--end .card -->
  298.                     </div><!--end .col -->
  299.                     <!-- END SITE ACTIVITY -->
  300.                     <!-- BEGIN SERVER STATUS -->
  301.                     {#{{ dump(so_count_details) }}#}
  302.                     <div class="col-md-3">
  303.                         <div class="card">
  304.                             <div class="header">
  305.                                 <header class="text-primary">Sales Status</header>
  306.                             </div><!--end .header -->
  307.                             <div class="body height-4">
  308.                                 <div class="pull-right text-center">
  309.                                     {% set isNegative=0 %}
  310.                                     {% set currVal=so_count_details.soCount %}
  311.                                     {% set maxVal=so_count_details.nextMax %}
  312.                                     {% if currVal <0 %}
  313.                                         {% set currVal=(-1)*currVal %}
  314.                                         {% set isNegative=1 %}
  315.                                     {% endif %}
  316.                                     <em class="text-primary">Orders</em>
  317.                                     <br/>
  318.                                     <div id="bankStatusKnob"
  319.                                          class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">
  320.                                         <input type="text" class="dial" data-min="0"
  321.                                                data-max="{{ maxVal }}"
  322.                                                data-thickness=".09"
  323.                                                value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>
  324.                                     </div>
  325.                                 </div>
  326.                                 {#<div class="body height-4">#}
  327.                                 {#<div class="pull-right text-center">#}
  328.                                 {#{% set isNegative=0 %}#}
  329.                                 {#{% set knobNumberMarker= monthly_summary_data.companyCashModMarker %}#}
  330.                                 {#{% set currVal=monthly_summary_data.companyCashMod %}#}
  331.                                 {#{% set maxVal=100 %}#}
  332.                                 {#{% if currVal <0 %}#}
  333.                                 {#{% set currVal=(-1)*currVal %}#}
  334.                                 {#{% set isNegative=1 %}#}
  335.                                 {#{% endif %}#}
  336.                                 {#<em class="text-primary">Cash <span#}
  337.                                 {#id="cashStatusKnobMarker">{{ knobNumberMarker!=''?'('~knobNumberMarker~')' }}</span></em>#}
  338.                                 {#<br/>#}
  339.                                 {#<div id="bankStatusKnob"#}
  340.                                 {#class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">#}
  341.                                 {#<input type="text" class="dial" data-min="0"#}
  342.                                 {#data-max="{{ knobNumberMarker=='M'?1000:(knobNumberMarker=='K'?1000:1000) }}"#}
  343.                                 {#data-thickness=".09"#}
  344.                                 {#value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>#}
  345.                                 {#</div>#}
  346.                                 {#</div>#}
  347.                                 {#<div class="pull-right text-center">#}
  348.                                 {#{% set isNegative=0 %}#}
  349.                                 {#{% set knobNumberMarker= monthly_summary_data.companyBankModMarker %}#}
  350.                                 {#{% set currVal=monthly_summary_data.companyBankMod %}#}
  351.                                 {#{% set maxVal=100 %}#}
  352.                                 {#{% if currVal <0 %}#}
  353.                                 {#{% set currVal=(-1)*currVal %}#}
  354.                                 {#{% set isNegative=1 %}#}
  355.                                 {#{% endif %}#}
  356.                                 {#<em class="text-primary">Bank <span#}
  357.                                 {#id="bankStatusKnobMarker">{{ knobNumberMarker!=''?'('~knobNumberMarker~')' }}</span></em>#}
  358.                                 {#<br/>#}
  359.                                 {#<div id="bankStatusKnob"#}
  360.                                 {#class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">#}
  361.                                 {#<input type="text" class="dial" data-min="0"#}
  362.                                 {#data-max="{{ knobNumberMarker=='M'?1000:(knobNumberMarker=='K'?1000:1000) }}"#}
  363.                                 {#data-thickness=".09"#}
  364.                                 {#value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>#}
  365.                                 {#</div>#}
  366.                                 {#</div>#}
  367.                             </div><!--end .body -->
  368.                             <div class="body height-4 no-padding">
  369.                                 <div class="stick-bottom-left-right">
  370.                                     <div id="cashRickshawGraph" class="height-4" data-color1="#0aa89e"
  371.                                          data-color2="rgba(79, 89, 89, 0.2)"></div>
  372.                                     {#<div id="cashRickshawGraph" class="flot height-4" data-title="Sales & Expenses"#}
  373.                                     {#data-color="#0aa89e,rgba(79, 89, 89, 0.2)"></div>#}
  374.                                 </div>
  375.                             </div><!--end .body -->
  376.                         </div><!--end .card -->
  377.                     </div><!--end .col -->
  378.                     <!-- END SERVER STATUS -->
  379.                 </div><!--end .row -->
  380.                 <div class="row clearfix" id="report_mother_div">
  381.                 </div>
  382.                 <div class="row clearfix">
  383.                     <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
  384.                         <div class="row clearfix">
  385.                             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  386.                                 <!-- AREA CHART -->
  387.                                 <div class="card  ">
  388.                                     <div class="header">
  389.                                         <header class="">EXPENSE INFO</header>
  390.                                         <div class="tools">
  391.                                             <a class="btn btn-icon-toggle btn-refresh"><i
  392.                                                         class="zmdi zmdi-refresh"></i></a>
  393.                                             <a class="btn btn-icon-toggle btn-collapse"><i
  394.                                                         class="fa fa-angle-down"></i></a>
  395.                                             <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  396.                                         </div>
  397.                                     </div>
  398.                                     <div class="body scroll height-14">
  399.                                         {% set expense_data_grouped=monthly_summary_data.expense_data_grouped %}
  400.                                         {% set expense_data_month_list=monthly_summary_data.expense_data_month_list %}
  401.                                         {% set expense_data_by_month=monthly_summary_data.expense_data_by_month %}
  402.                                         {#{{ dump(expense_data_month_list) }}#}
  403.                                         {#{{ dump(expense_data_grouped) }}#}
  404.                                         {#{{ dump(expense_data_by_month) }}#}
  405.                                         {#{{ dump(expense_data_by_month['May'][103]) }}#}
  406.                                         {% if not expense_data_grouped is empty %}
  407.                                             <table class="table table-bordered the_data_table skip_export" style="">
  408.                                                 <thead>
  409.                                                 <tr>
  410.                                                     <th>Expense Type</th>
  411.                                                     <th>Head</th>
  412.                                                     {% for mon in expense_data_month_list %}
  413.                                                         <th>{{ mon }}</th>
  414.                                                     {% endfor %}
  415.                                                 </tr>
  416.                                                 </thead>
  417.                                                 <tbody>
  418.                                                 {% for entry in expense_data_grouped %}
  419.                                                     {% if entry.skip!=1 %}
  420.                                                         <tr>
  421.                                                             <td>{{ entry.group_name }}</td>
  422.                                                             <td>{{ entry.head_name }}</td>
  423.                                                             {% for mon in expense_data_month_list %}
  424.                                                                 {% if entry.value_by_month[mon] is defined %}
  425.                                                                     <th class="trans_amount">{{ entry.value_by_month[mon].amount|number_format(2,'.',',') }}</th>
  426.                                                                 {% else %}
  427.                                                                     <th></th>
  428.                                                                 {% endif %}
  429.                                                             {% endfor %}
  430.                                                         </tr>
  431.                                                     {% endif %}
  432.                                                 {% endfor %}
  433.                                                 </tbody>
  434.                                             </table>
  435.                                         {% endif %}
  436.                                     </div><!-- /.body -->
  437.                                 </div><!-- /.card -->
  438.                             </div><!-- /.col (LEFT) -->
  439.                             <!-- Task Info -->
  440.                             <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
  441.                                 <div class="card">
  442.                                     <div class="header">
  443.                                         <header>FINANCIAL STATUS</header>
  444.                                         <div class="tools">
  445.                                             <a class="btn btn-icon-toggle btn-refresh"><i
  446.                                                         class="zmdi zmdi-refresh"></i></a>
  447.                                             <a class="btn btn-icon-toggle btn-collapse"><i
  448.                                                         class="fa fa-angle-down"></i></a>
  449.                                             <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  450.                                         </div>
  451.                                     </div>
  452.                                     <div class="body height-8">
  453.                                         <div id="donut_chart" class="dashboard-donut-chart "
  454.                                              style="height: 100%"></div>
  455.                                     </div>
  456.                                 </div>
  457.                             </div>
  458.                             <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
  459.                                 <!-- AREA CHART -->
  460.                                 <div class="card  ">
  461.                                     <div class="header">
  462.                                         <header class="">MONTHLY GROWTH</header>
  463.                                         <div class="tools">
  464.                                             <a class="btn btn-icon-toggle btn-refresh"><i
  465.                                                         class="zmdi zmdi-refresh"></i></a>
  466.                                             <a class="btn btn-icon-toggle btn-collapse"><i
  467.                                                         class="fa fa-angle-down"></i></a>
  468.                                             <a class="btn btn-icon-toggle btn-close"><i
  469.                                                         class="zmdi zmdi-close"></i></a>
  470.                                         </div>
  471.                                     </div>
  472.                                     <div class="body height-8">
  473.                                         <div class="chart">
  474.                                             <canvas id="areaChart" style=""></canvas>
  475.                                         </div>
  476.                                     </div><!-- /.body -->
  477.                                 </div><!-- /.card -->
  478.                             </div><!-- /.col (LEFT) -->
  479.                         </div>
  480.                     </div>
  481.                     <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 " style="">
  482.                         <div class="row clearfix">
  483.                             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  484.                                 <div class="card">
  485.                                     <div class="header">
  486.                                         <header>QUICK LINKS</header>
  487.                                         <div class="tools">
  488.                                             {#<a class="btn btn-icon-toggle btn-refresh"><i class="zmdi zmdi-refresh"></i></a>#}
  489.                                             <a class="btn btn-icon-toggle btn-collapse"><i
  490.                                                         class="fa fa-angle-down"></i></a>
  491.                                             <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  492.                                         </div>
  493.                                     </div>
  494.                                     <div class="body height-14">
  495.                                         {#<div id="donut_chart" class="dashboard-donut-chart"><svg height="265" version="1.1" width="270" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow: hidden; position: relative; left: -0.328125px;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.2.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><path fill="none" stroke="#e91e63" d="M135,214.16666666666669A81.66666666666667,81.66666666666667,0,0,0,197.36598314293147,79.77497187236375" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#e91e63" stroke="#ffffff" d="M135,217.16666666666669A84.66666666666667,84.66666666666667,0,0,0,199.65697844205954,77.83813410440976L224.73064921585035,56.64052075513561A117.5,117.5,0,0,1,135,250Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#00bcd4" d="M197.36598314293147,79.77497187236375A81.66666666666667,81.66666666666667,0,0,0,66.93689880580898,87.36842900724861" stroke-width="2" opacity="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 1;"></path><path fill="#00bcd4" stroke="#ffffff" d="M199.65697844205954,77.83813410440976A84.66666666666667,84.66666666666667,0,0,0,64.4366216190836,85.71053456261693L32.90534820871349,64.80264351087293A122.5,122.5,0,0,1,228.5489747143972,53.41245780854564Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#ff9800" d="M66.93689880580898,87.36842900724861A81.66666666666667,81.66666666666667,0,0,0,65.44216513257356,175.29196248129173" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#ff9800" stroke="#ffffff" d="M64.4366216190836,85.71053456261693A84.66666666666667,84.66666666666667,0,0,0,62.88697936193341,176.86391212346163L34.92189064992728,194.06802765165443A117.5,117.5,0,0,1,37.07247685325579,67.56580091859239Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#009688" d="M65.44216513257356,175.29196248129173A81.66666666666667,81.66666666666667,0,0,0,115.52090387726372,211.80957860615354" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#009688" stroke="#ffffff" d="M62.88697936193341,176.86391212346163A84.66666666666667,84.66666666666667,0,0,0,114.80534524418361,214.72299169780814L106.97395353769576,246.60867942313925A117.5,117.5,0,0,1,34.92189064992728,194.06802765165443Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><path fill="none" stroke="#607d8b" d="M115.52090387726372,211.80957860615354A81.66666666666667,81.66666666666667,0,0,0,134.9743436604178,214.16666263657822" stroke-width="2" opacity="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0;"></path><path fill="#607d8b" stroke="#ffffff" d="M114.80534524418361,214.72299169780814A84.66666666666667,84.66666666666667,0,0,0,134.97340118263722,217.1666624885342L134.96308628692765,249.99999420160748A117.5,117.5,0,0,1,106.97395353769576,246.60867942313925Z" stroke-width="3" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path><text x="135" y="122.5" text-anchor="middle" font-family="&quot;Arial&quot;" font-size="15px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: Arial; font-size: 15px; font-weight: 800;" font-weight="800" transform="matrix(1.8561,0,0,1.8561,-115.9895,-114.2841)" stroke-width="0.5387755102040815"><tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Firefox</tspan></text><text x="135" y="142.5" text-anchor="middle" font-family="&quot;Arial&quot;" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: Arial; font-size: 14px;" transform="matrix(1.7014,0,0,1.7014,-94.682,-94.3368)" stroke-width="0.5877551020408163"><tspan dy="5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">30%</tspan></text></svg></div>#}
  496.                                         <h5>Quick Entry</h5>
  497.                                         <a href="#" class="btn btn-default waves-effect btn-block"
  498.                                            data-toggle="modal"
  499.                                            data-target="#newExpenseModal">
  500.                                             RECORD EXPENSE
  501.                                         </a>
  502.                                         <a href="#" class="btn btn-block bg-green waves-effect" data-toggle="modal"
  503.                                            data-target="#newPaymentModal">
  504.                                             Make Payment
  505.                                         </a>
  506.                                         <a href="#" class="btn btn-block bg-blue waves-effect" data-toggle="modal"
  507.                                            data-target="#newReceiptModal">
  508.                                             Receive Payment
  509.                                         </a>
  510.                                         <h5>Lists</h5>
  511.                                         <a href="{{ path('voucher_list') }}"
  512.                                            class="btn btn-block btn-primary bg-grey waves-effect">
  513.                                             Transactions
  514.                                         </a>
  515.                                         <a href="{{ path('check_register') }}"
  516.                                            class="btn btn-block bg-green waves-effect">
  517.                                             Check List
  518.                                         </a>
  519.                                         <a href="{{ path('chart_of_accounts') }}"
  520.                                            class="btn btn-block bg-blue btn-primary waves-effect">
  521.                                             Chart of Accounts
  522.                                         </a>
  523.                                         <h5>Reports</h5>
  524.                                         <a href="{{ path('view_ledger_head') }}"
  525.                                            class="btn btn-block btn-primary bg-grey waves-effect"
  526.                                            data-toggle="modal">
  527.                                             Ledger
  528.                                         </a>
  529.                                         <a href="{{ path('view_trial_balance') }}"
  530.                                            class="btn btn-block bg-green waves-effect">
  531.                                             Trial Balance
  532.                                         </a>
  533.                                         <a href="{{ path('view_financial_report') }}"
  534.                                            class="btn btn-block bg-blue btn-primary waves-effect">
  535.                                             Financial Statements
  536.                                         </a>
  537.                                         {#<button class="btn btn-primary waves-effect">Record Expense</button>#}
  538.                                         {#<button class="btn btn-default waves-effect">Make Payment</button>#}
  539.                                     </div>
  540.                                 </div>
  541.                             </div>
  542.                             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  543.                                 <!-- AREA CHART -->
  544.                                 <div class="card  ">
  545.                                     <div class="header">
  546.                                         <header class="">RECENT SALES</header>
  547.                                         <div class="tools">
  548.                                             <a class="btn btn-icon-toggle btn-collapse"><i
  549.                                                         class="fa fa-angle-down"></i></a>
  550.                                             <a class="btn btn-icon-toggle btn-close"><i
  551.                                                         class="zmdi zmdi-close"></i></a>
  552.                                         </div>
  553.                                     </div>
  554.                                     <div class="body height-8">
  555.                                         {% set so_list=''|getRecentSales %}
  556.                                         {#{{ dump(so_list) }}#}
  557.                                         {% if not so_list is empty %}
  558.                                             <table class="table table-striped" style="table-layout: fixed">
  559.                                                 <tbody>
  560.                                                 {% for entry in so_list %}
  561.                                                     <tr>
  562.                                                         <td style="white-space: nowrap;overflow: hidden;">{{ entry.client }}</td>
  563.                                                         <td>{{ entry.date|date('M d') }}</td>
  564.                                                         <td style="text-align: right">{{ entry.so_amount|number_format(0,'.',',') }}</td>
  565.                                                         <!--                                                    <td style="text-align: right;">{{ entry.so_amount|number_format(0,'.',',') }}</td>-->
  566.                                                     </tr>
  567.                                                 {% endfor %}
  568.                                                 </tbody>
  569.                                             </table>
  570.                                         {% endif %}
  571.                                     </div><!-- /.body -->
  572.                                 </div><!-- /.card -->
  573.                             </div>
  574.                         </div>
  575.                     </div>
  576.                     <!-- #END# Browser Usage -->
  577.                 </div>
  578.                 <div class="row">
  579.                     <!-- BEGIN TODOS -->
  580.                     <div class="col-md-3">
  581.                         <div class="card ">
  582.                             <div class="header">
  583.                                 <header>Todo's</header>
  584.                                 <div class="tools">
  585.                                     <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  586.                                 </div>
  587.                             </div><!--end .header -->
  588.                             <div class="body no-padding height-9 scroll">
  589.                                 <ul class="list" data-sortable="true">
  590.                                     <li class="tile">
  591.                                         <div class="checkbox checkbox-styled tile-text">
  592.                                             <label>
  593.                                                 <input type="checkbox" checked>
  594.                                                 <span>Call clients for follow-up</span>
  595.                                             </label>
  596.                                         </div>
  597.                                         <a class="btn btn-flat ink-reaction btn-default">
  598.                                             <i class="zmdi zmdi-delete"></i>
  599.                                         </a>
  600.                                     </li>
  601.                                     <li class="tile">
  602.                                         <div class="checkbox checkbox-styled tile-text">
  603.                                             <label>
  604.                                                 <input type="checkbox">
  605.                                             <span>
  606.                                                 Schedule meeting
  607.                                                 <small>opportunity for new customers</small>
  608.                                             </span>
  609.                                             </label>
  610.                                         </div>
  611.                                         <a class="btn btn-flat ink-reaction btn-default">
  612.                                             <i class="zmdi zmdi-delete"></i>
  613.                                         </a>
  614.                                     </li>
  615.                                     <li class="tile">
  616.                                         <div class="checkbox checkbox-styled tile-text">
  617.                                             <label>
  618.                                                 <input type="checkbox">
  619.                                             <span>
  620.                                                 Upload files to server
  621.                                                 <small>The files must be shared with all members of the board</small>
  622.                                             </span>
  623.                                             </label>
  624.                                         </div>
  625.                                         <a class="btn btn-flat ink-reaction btn-default">
  626.                                             <i class="zmdi zmdi-delete"></i>
  627.                                         </a>
  628.                                     </li>
  629.                                     <li class="tile">
  630.                                         <div class="checkbox checkbox-styled tile-text">
  631.                                             <label>
  632.                                                 <input type="checkbox">
  633.                                                 <span>Forward important tasks</span>
  634.                                             </label>
  635.                                         </div>
  636.                                         <a class="btn btn-flat ink-reaction btn-default">
  637.                                             <i class="zmdi zmdi-delete"></i>
  638.                                         </a>
  639.                                     </li>
  640.                                     <li class="tile">
  641.                                         <div class="checkbox checkbox-styled tile-text">
  642.                                             <label>
  643.                                                 <input type="checkbox">
  644.                                                 <span>Forward important tasks</span>
  645.                                             </label>
  646.                                         </div>
  647.                                         <a class="btn btn-flat ink-reaction btn-default">
  648.                                             <i class="zmdi zmdi-delete"></i>
  649.                                         </a>
  650.                                     </li>
  651.                                     <li class="tile">
  652.                                         <div class="checkbox checkbox-styled tile-text">
  653.                                             <label>
  654.                                                 <input type="checkbox">
  655.                                                 <span>Forward important tasks</span>
  656.                                             </label>
  657.                                         </div>
  658.                                         <a class="btn btn-flat ink-reaction btn-default">
  659.                                             <i class="zmdi zmdi-delete"></i>
  660.                                         </a>
  661.                                     </li>
  662.                                 </ul>
  663.                             </div><!--end .body -->
  664.                         </div><!--end .card -->
  665.                     </div><!--end .col -->
  666.                     <!-- END TODOS -->
  667.                     <!-- BEGIN REGISTRATION HISTORY -->
  668.                     <div class="col-md-6">
  669.                         <div class="card">
  670.                             <div class="header">
  671.                                 <header>Registration history</header>
  672.                                 <div class="tools">
  673.                                     <a class="btn btn-icon-toggle btn-refresh"><i class="zmdi zmdi-refresh"></i></a>
  674.                                     <a class="btn btn-icon-toggle btn-collapse"><i class="fa fa-angle-down"></i></a>
  675.                                     <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  676.                                 </div>
  677.                             </div><!--end .header -->
  678.                             <div class="body no-padding height-9">
  679.                                 <div class="row">
  680.                                     <div class="col-sm-6 hidden-xs">
  681.                                         <div class="force-padding text-sm text-default-light">
  682.                                             <p>
  683.                                                 <i class="zmdi zmdi-mode-comment text-primary-light"></i>
  684.                                                 The registrations are measured from the time that the redesign was
  685.                                                 fully
  686.                                                 implemented and after the first e-mailing.
  687.                                             </p>
  688.                                         </div>
  689.                                     </div><!--end .col -->
  690.                                     <div class="col-sm-6">
  691.                                         <div class="force-padding pull-right text-default-light">
  692.                                             <h2 class="no-margin text-primary-dark"><span
  693.                                                         class="text-xxl">66.05%</span>
  694.                                             </h2>
  695.                                             <i class="fa fa-caret-up text-success fa-fw"></i> more registrations
  696.                                         </div>
  697.                                     </div><!--end .col -->
  698.                                 </div><!--end .row -->
  699.                                 <div class="stick-bottom-left-right force-padding">
  700.                                     <div id="flot-registrations" class="flot height-5"
  701.                                          data-title="Registration history"
  702.                                          data-color="#0aa89e"></div>
  703.                                 </div>
  704.                             </div><!--end .body -->
  705.                         </div><!--end .card -->
  706.                     </div><!--end .col -->
  707.                     <!-- END REGISTRATION HISTORY -->
  708.                     <!-- BEGIN NEW REGISTRATIONS -->
  709.                     <div class="col-md-3">
  710.                         <div class="card">
  711.                             <div class="header">
  712.                                 <header>New registrations</header>
  713.                                 <div class="tools hidden-md">
  714.                                     <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  715.                                 </div>
  716.                             </div><!--end .header -->
  717.                             <div class="body no-padding height-9 scroll">
  718.                                 <ul class="list divider-full-bleed">
  719.                                     <li class="tile">
  720.                                         <div class="tile-content">
  721.                                             <div class="tile-icon">
  722.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar9463a.jpg?1422538626"
  723.                                                      alt=""/>
  724.                                             </div>
  725.                                             <div class="tile-text">Ann Laurens</div>
  726.                                         </div>
  727.                                         <a class="btn btn-flat ink-reaction">
  728.                                             <i class="zmdi zmdi-block text-default-light"></i>
  729.                                         </a>
  730.                                     </li>
  731.                                     <li class="tile">
  732.                                         <div class="tile-content">
  733.                                             <div class="tile-icon">
  734.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar42dba.jpg?1422538625"
  735.                                                      alt=""/>
  736.                                             </div>
  737.                                             <div class="tile-text">Alex Nelson</div>
  738.                                         </div>
  739.                                         <a class="btn btn-flat ink-reaction">
  740.                                             <i class="zmdi zmdi-block text-default-light"></i>
  741.                                         </a>
  742.                                     </li>
  743.                                     <li class="tile">
  744.                                         <div class="tile-content">
  745.                                             <div class="tile-icon">
  746.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar114335.jpg?1422538623"
  747.                                                      alt=""/>
  748.                                             </div>
  749.                                             <div class="tile-text">Mary Peterson</div>
  750.                                         </div>
  751.                                         <a class="btn btn-flat ink-reaction">
  752.                                             <i class="zmdi zmdi-block text-default-light"></i>
  753.                                         </a>
  754.                                     </li>
  755.                                     <li class="tile">
  756.                                         <div class="tile-content">
  757.                                             <div class="tile-icon">
  758.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar7463a.jpg?1422538626"
  759.                                                      alt=""/>
  760.                                             </div>
  761.                                             <div class="tile-text">Philip Ericsson</div>
  762.                                         </div>
  763.                                         <a class="btn btn-flat ink-reaction">
  764.                                             <i class="zmdi zmdi-block text-default-light"></i>
  765.                                         </a>
  766.                                     </li>
  767.                                     <li class="tile">
  768.                                         <div class="tile-content">
  769.                                             <div class="tile-icon">
  770.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar8463a.jpg?1422538626"
  771.                                                      alt=""/>
  772.                                             </div>
  773.                                             <div class="tile-text">Jim Peters</div>
  774.                                         </div>
  775.                                         <a class="btn btn-flat ink-reaction">
  776.                                             <i class="zmdi zmdi-block text-default-light"></i>
  777.                                         </a>
  778.                                     </li>
  779.                                     <li class="tile">
  780.                                         <div class="tile-content">
  781.                                             <div class="tile-icon">
  782.                                                 <img src="codecovers/assets/img/modules/materialadmin/avatar2666b.jpg?1422538624"
  783.                                                      alt=""/>
  784.                                             </div>
  785.                                             <div class="tile-text">Jessica Cruise</div>
  786.                                         </div>
  787.                                         <a class="btn btn-flat ink-reaction">
  788.                                             <i class="zmdi zmdi-block text-default-light"></i>
  789.                                         </a>
  790.                                     </li>
  791.                                 </ul>
  792.                             </div><!--end .body -->
  793.                         </div><!--end .card -->
  794.                     </div><!--end .col -->
  795.                     <!-- END NEW REGISTRATIONS -->
  796.                 </div><!--end .row -->
  797.                 <div class="row">
  798.                     <!-- BEGIN ALERT - REVENUE -->
  799.                     <div class="col-md-3 col-sm-6">
  800.                         <div class="card">
  801.                             <div class="body no-padding">
  802.                                 <div class="alert alert-callout alert-info no-margin">
  803.                                     <strong class="pull-right text-success text-lg">0,38% <i
  804.                                                 class="zmdi zmdi-trending-up"></i></strong>
  805.                                     <strong class="text-xl">$ 32,829</strong><br/>
  806.                                     <span class="opacity-50">Revenue</span>
  807.                                     <div class="stick-bottom-left-right">
  808.                                         <div class="height-2 sparkline-revenue" data-line-color="#bdc1c1"></div>
  809.                                     </div>
  810.                                 </div>
  811.                             </div><!--end .body -->
  812.                         </div><!--end .card -->
  813.                     </div><!--end .col -->
  814.                     <!-- END ALERT - REVENUE -->
  815.                     <!-- BEGIN ALERT - VISITS -->
  816.                     <div class="col-md-3 col-sm-6">
  817.                         <div class="card">
  818.                             <div class="body no-padding">
  819.                                 <div class="alert alert-callout alert-warning no-margin">
  820.                                     <strong class="pull-right text-warning text-lg">0,01% <i
  821.                                                 class="zmdi zmdi-swap-vertical"></i></strong>
  822.                                     <strong class="text-xl">432,901</strong><br/>
  823.                                     <span class="opacity-50">Visits</span>
  824.                                     <div class="stick-bottom-right">
  825.                                         <div class="height-1 sparkline-visits" data-bar-color="#e5e6e6"></div>
  826.                                     </div>
  827.                                 </div>
  828.                             </div><!--end .body -->
  829.                         </div><!--end .card -->
  830.                     </div><!--end .col -->
  831.                     <!-- END ALERT - VISITS -->
  832.                     <!-- BEGIN ALERT - BOUNCE RATES -->
  833.                     <div class="col-md-3 col-sm-6">
  834.                         <div class="card">
  835.                             <div class="body no-padding">
  836.                                 <div class="alert alert-callout alert-danger no-margin">
  837.                                     <strong class="pull-right text-danger text-lg">0,18% <i
  838.                                                 class="zmdi zmdi-trending-down"></i></strong>
  839.                                     <strong class="text-xl">42.90%</strong><br/>
  840.                                     <span class="opacity-50">Bounce rate</span>
  841.                                     <div class="stick-bottom-left-right">
  842.                                         <div class="progress progress-hairline no-margin">
  843.                                             <div class="progress-bar progress-bar-danger" style="width:43%"></div>
  844.                                         </div>
  845.                                     </div>
  846.                                 </div>
  847.                             </div><!--end .body -->
  848.                         </div><!--end .card -->
  849.                     </div><!--end .col -->
  850.                     <!-- END ALERT - BOUNCE RATES -->
  851.                     <!-- BEGIN ALERT - TIME ON SITE -->
  852.                     <div class="col-md-3 col-sm-6">
  853.                         <div class="card">
  854.                             <div class="body no-padding">
  855.                                 <div class="alert alert-callout alert-success no-margin">
  856.                                     <h1 class="pull-right text-success"><i class="zmdi zmdi-timer"></i></h1>
  857.                                     <strong class="text-xl">54 sec.</strong><br/>
  858.                                     <span class="opacity-50">Avg. time on site</span>
  859.                                 </div>
  860.                             </div><!--end .body -->
  861.                         </div><!--end .card -->
  862.                     </div><!--end .col -->
  863.                     <!-- END ALERT - TIME ON SITE -->
  864.                 </div><!--end .row -->
  865.             </div><!--end .section-body -->
  866.         </section>
  867.     </div>
  868.     <!--end #content-->
  869.     <!-- END CONTENT -->
  870. </div>
  871. {% include '@Application/pages/system/modals/approve_document_modal.html.twig' %}
  872. <script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}ckeditor/ckeditor.js"></script>
  873. <script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}ckeditor/adapters/jquery.js"></script>
  874. {% include '@Application/modals/input_forms/generic_ck_editor_modal.html.twig' %}
  875. <!--end #base-->
  876. <!-- END BASE -->
  877. {% include '@Application/footer/footer_js_codecovers.html.twig' %}
  878. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.min.js"></script>
  879. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.time.min.js"></script>
  880. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.resize.min.js"></script>
  881. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.orderBars.js"></script>
  882. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.pie.js"></script>
  883. <script src="codecovers/assets/js/modules/materialadmin/libs/flot/curvedLines.js"></script>
  884. <script src="codecovers/assets/js/modules/materialadmin/libs/jquery-knob/jquery.knob.min.js"></script>
  885. <script src="codecovers/assets/js/modules/materialadmin/libs/sparkline/jquery.sparkline.min.js"></script>
  886. {#<script src="codecovers/assets/js/modules/materialadmin/libs/nanoscroller/jquery.nanoscroller.min.js"></script>#}
  887. <script src="codecovers/assets/js/modules/materialadmin/libs/d3/d3.min.js"></script>
  888. <script src="codecovers/assets/js/modules/materialadmin/libs/d3/d3.v3.js"></script>
  889. <script src="codecovers/assets/js/modules/materialadmin/libs/rickshaw/rickshaw.min.js"></script>
  890. {#<script src="codecovers/assets/js/modules/materialadmin/core/source/App.js"></script>#}
  891.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppNavigation.js"></script>#}
  892.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppOffcanvas.js"></script>#}
  893.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppCard.js"></script>#}
  894.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppForm.js"></script>#}
  895.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppNavSearch.js"></script>#}
  896.     {#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppVendor.js"></script>#}
  897.     {#<script src="codecovers/assets/js/modules/materialadmin/core/demo/Demo.js"></script>#}
  898. <script src="codecovers/assets/js/modules/materialadmin/core/demo/DemoDashboard.js"></script>
  899. {% include '@Application/modals/input_forms/add_payment.html.twig' %}
  900. {% include '@Application/modals/input_forms/add_expense.html.twig' %}
  901. {% include '@Application/modals/input_forms/add_receipt.html.twig' %}
  902. {% include '@Application/codecovers_footer.html.twig' %}
  903. <script src="{{ absolute_url(path('dashboard')) }}js/Chart.js"></script>
  904. <script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/raphael/raphael.min.js"></script>
  905. <script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/morrisjs/morris.js"></script>
  906. <script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/jquery-countto/jquery.countTo.js"></script>
  907. <link rel="stylesheet" type="text/css"
  908.       href="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/waitme/waitMe.css"/>
  909. <script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/waitme/waitMe.js"></script>
  910. <script src="{{ absolute_url(path('dashboard')) }}condensed_assets/dashboard_functions.js"></script>
  911. <script>
  912.     {#var summary_data={{ ''|getMonthlySummary|json_encode|raw() }}#}
  913.     var summary_data ={{ monthly_summary_data|json_encode|raw() }}
  914.     var dashboardDataForUser ={{ dashboardDataForUser|json_encode|raw() }}
  915.     {#var summary_data={{ ''|getMonthlySummary }}#}
  916.     var areaChartData = {
  917. //        labels: ["January", "February", "March", "April", "May", "June", "July"],
  918.         labels: summary_data.monthList,
  919.         datasets: [
  920.             {
  921.                 label: "Monthly Growth",
  922.                 borderColor: 'rgba(255,255,255, 0.75)',
  923.                 backgroundColor: 'rgba(255, 114, 84, 0.2)',
  924.                 pointBorderColor: 'rgba(255, 188, 212, 0)',
  925.                 pointBackgroundColor: 'rgba(255, 188, 212, 0.9)',
  926.                 pointBorderWidth: 1,
  927. //                data: [65, 59, 80, 81, 56, 55, 40]
  928.                 data: summary_data.monGrowth
  929.             },
  930. //            {
  931. //                label: "Expense",
  932. //                fillColor: "rgba(60,141,188,0.9)",
  933. //                strokeColor: "rgba(60,141,188,0.8)",
  934. //                pointColor: "#3b8bba",
  935. //                pointStrokeColor: "rgba(60,141,188,1)",
  936. //                pointHighlightFill: "#fff",
  937. //                pointHighlightStroke: "rgba(60,141,188,1)",
  938. ////                data: [28, 48, 40, 19, 86, 27, 90]
  939. //                data: summary_data.expense
  940. //            }
  941.         ]
  942.     };
  943.     var barChartData = {
  944. //        labels: ["January", "February", "March", "April", "May", "June", "July"],
  945.         labels: summary_data.monthList,
  946.         datasets: [
  947.             {
  948.                 label: "Revenue",
  949.                 borderColor: 'rgba(255,255,255, 0.75)',
  950.                 backgroundColor: 'rgba(1, 114, 84, 0.8)',
  951.                 pointBorderColor: 'rgba(0, 188, 212, 0)',
  952.                 pointBackgroundColor: 'rgba(0, 188, 212, 0.9)',
  953.                 pointBorderWidth: 1,
  954. //                data: [65, 59, 80, 81, 56, 55, 40]
  955.                 data: summary_data.revenue
  956.             },
  957.             {
  958.                 label: "Expense",
  959.                 borderColor: 'rgba(0, 188, 212, 0.75)',
  960.                 backgroundColor: 'rgba(217, 41, 41, 0.8)',
  961.                 pointBorderColor: 'rgba(0, 188, 212, 0)',
  962.                 pointBackgroundColor: 'rgba(0, 188, 212, 0.9)',
  963.                 pointBorderWidth: 1,
  964. //                data: [28, 48, 40, 19, 86, 27, 90]
  965.                 data: summary_data.expense
  966.             }
  967.         ]
  968.     };
  969.     var loading_by_id = [];
  970.     var box_data =
  971.     {
  972.         info: {
  973.             name: 'Sales Report',
  974.             reportType: 'sales_by_client',
  975.             reportSeparator: 1
  976.         },
  977.         functionSettings: {
  978.             reportGenerator: 'SalesReport', //function name
  979.             route: 'sales_report', //post route
  980.         },
  981.         querySettings: {
  982.             filterData: {
  983.                 //variables and values here
  984.                 clientId: [],
  985.                 clientTypeId: [],
  986.                 salesPersonId: [],
  987.                 supervisorId: [],
  988.                 regionLevelId: [],
  989.                 regionId: [],
  990.                 geographicalRegionLevelId: [],
  991.                 geographicalRegionId: []
  992.             },
  993.             columnSelector: ['invoice_amount'],
  994. //            columnSelector: ['invoice_amount','received_amount',],
  995. //            columnSelector: ['invoice_amount','due_amount','received_amount','order_amount'],
  996.             nonUniqueColumnSelector: [],
  997.             periodData: {
  998. //                type: '_during_', //_during_, _by_chunk_, _quarterly_, _weekly_,_monthly_,_yearly_,_last_month_,_last_year_,_today_,_yesterday_ etc
  999.                 type: '_by_chunk_', //_during_, _by_chunk_, _quarterly_, _weekly_,_monthly_,_yearly_,_last_month_,_last_year_,_today_,_yesterday_ etc
  1000.                 startDate: '',
  1001.                 endDate: '{{ ''|date('Y-m-d') }}',
  1002.                 periodSeparator: '_month_',// like _month_  _year_ _quarterly
  1003.                 periodValue: 12, // for by chunks
  1004.                 periodValueType: '_month_' // for by chunks _month_ , _year_ etc ( eg. 3 months)
  1005.             }
  1006.         },
  1007.         //query Output
  1008.         queryOutput: {},
  1009.         queryColumnAdditionalData: {},
  1010.         periodSeparatorColumnData: {},
  1011.         queryUniqueColumn: '',
  1012.         queryUniqueField: '',
  1013.         //data for renderer
  1014.         rendererSettings: {},
  1015.         result: {},
  1016.         output: {
  1017.             format: [
  1018.                 {
  1019.                     type: 'list',
  1020.                     subType: 'table'
  1021.                 },
  1022.                 {
  1023.                     type: 'chart',
  1024.                     subType: 'bar'
  1025.                 }
  1026.             ], //or chart or infobox
  1027.             data: [],
  1028.             type: 'dashboard',//or print or dashboard
  1029.             generateRowDiv: 0,
  1030.             generateColDiv: 0,
  1031.             generateCardDiv: 0,
  1032.             rowDivClass: '',
  1033.             colDivClass: 'col-lg-3 col-md-3 col-sm-12 col-xs-12',
  1034.             cardDivClass: '',
  1035.             divUniqueId: '1009' /// card id will be report_card_1009, col id will be report_col_1009 row will be row_1009
  1036.         },
  1037.         refreshInterval: 0
  1038.     };
  1039.     var last_report_list_index = 0;
  1040.     function load_data_box() {
  1041.         if (typeof dashboardDataForUser[last_report_list_index] === 'undefined')
  1042.             return;
  1043.         var reportConfig = dashboardDataForUser[last_report_list_index].widgetData;
  1044. //        loading_by_id[reportConfig.output.divUniqueId] = $('#report_card_' + reportConfig.output.divUniqueId).waitMe({
  1045. //            effect: 'timer',
  1046. //            text: 'Loading...',
  1047. //            bg: 'rgba(255,255,255,0.90)',
  1048. //            color: '#555'
  1049. //        });
  1050.         //    console.log(reportConfig)
  1051.         jQuery.post(BaseURL + "sales_report", {
  1052.             //            pids: ServiceIDs
  1053.             reportConfig: reportConfig,
  1054.             returnJson: 1,
  1055.         }, function (data) {
  1056.             //    console.log(data);
  1057.             var gottenReportConfig = data.reportConfig;
  1058.             var div_unique_id = gottenReportConfig.output.divUniqueId;
  1059.             var report_title = gottenReportConfig.output.title;
  1060.             var report_type_title = gottenReportConfig.output.reportTypeTitle;
  1061.             var report_period_title = gottenReportConfig.output.periodTitle;
  1062.             $('#report_body_' + div_unique_id).html(data.renderedReport);
  1063.             $('#report_type_title_' + div_unique_id).text(report_type_title);
  1064.             //    console.log($('#report_period_title_' + div_unique_id).html())
  1065.             //    console.log($('#report_period_title_' + div_unique_id).text())
  1066.             $('#report_period_title_' + div_unique_id).text(report_period_title);
  1067.             //    console.log(report_period_title)
  1068.             loading_by_id[div_unique_id].waitMe('hide');
  1069. //            //    console.log('#report_body_' + div_unique_id +'.scroll')
  1070. //            //    console.log($('#report_body_' + div_unique_id +'.scroll'))
  1071.             materialadmin.AppVendor.addScroller($('#report_body_' + div_unique_id + '.scroll'));
  1072. //            $('#report_body_' + div_unique_id +'.scroll').nanoScroller();
  1073.             //now load next report
  1074.             last_report_list_index++;
  1075.             load_data_box();
  1076.             if (gottenReportConfig.refreshInterval != 0) {
  1077. //                alert(gottenReportConfig.refreshInterval)
  1078. //                setTimeout(function(gottenReportConfig) { load_data_box(gottenReportConfig); }, 1*gottenReportConfig.refreshInterval);
  1079. //                setTimeout(load_data_box(gottenReportConfig), 60000);
  1080.             }
  1081.         });
  1082.     }
  1083.     function check_and_generate_dashboard_report() {
  1084.         var mother_div = $('#report_mother_div');
  1085.         var unique_id = '112'
  1086.         for (var j = 0; j < dashboardDataForUser.length; j++) {
  1087.             var div_unique_id = unique_id + '_' + j;
  1088. //            alert(div_unique_id)
  1089.             //create the col and card
  1090.             //data-loading-effect="timer"
  1091.             var sizeTiny = 1 * dashboardDataForUser[j].widgetSizeTiny;
  1092.             var sizeSmall = 1 * dashboardDataForUser[j].widgetSizeSmall;
  1093.             var sizeMedium = 1 * dashboardDataForUser[j].widgetSizeMedium;
  1094.             var sizeLarge = 1 * dashboardDataForUser[j].widgetSizeLarge;
  1095. //            alert(sizeMedium)
  1096.             var sizestr = '';
  1097.             sizestr += sizeTiny > 0 ? (' col-xs-' + sizeTiny) : '';
  1098.             sizestr += sizeSmall > 0 ? (' col-sm-' + sizeSmall) : '';
  1099.             sizestr += sizeMedium > 0 ? (' col-md-' + sizeMedium) : '';
  1100.             sizestr += sizeLarge > 0 ? (' col-lg-' + sizeLarge) : '';
  1101.             if (sizestr == '')
  1102.                 sizestr = "col-lg-3 col-md-3 col-sm-6 col-xs-12";
  1103. //            alert(sizestr)
  1104.             var html = '<div class="' + sizestr + '" id="report_col_' + div_unique_id + '" > <div class="card " id="report_card_' + div_unique_id + '">' +
  1105.                     '<div class="header style-primary-dark">' +
  1106.                     '<header><span style="text-transform: uppercase"  id="report_type_title_' + div_unique_id + '">REPORT</span><br><small style="line-height: 31px;" id="report_period_title_' + div_unique_id + '">Waiting to Load.</small></header>' +
  1107.                     ' <div class="tools"> <a class="btn btn-icon-toggle btn-refresh"><i class="zmdi zmdi-refresh"></i></a> <a class="btn btn-icon-toggle btn-collapse"><i class="fa fa-angle-down"></i></a> <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a> </div>' +
  1108. //                    '<ul class="header-dropdown m-r--5"><li><a href="javascript:void(0);" data-toggle="cardloading" data-loading-effect="timer"><i class="material-icons">loop</i></a></li></ul>' +
  1109.                     '</div>' +
  1110.                     '<div class="body height-8 scroll style-default-bright" id="report_body_' + div_unique_id + '">' +
  1111.                     '</div>' +
  1112.                     '</div>' +
  1113.                     '</div>';
  1114.             mother_div.append(html);
  1115.             var reportConfig = dashboardDataForUser[j].widgetData;
  1116.             reportConfig.output.divUniqueId = div_unique_id;
  1117.             reportConfig.refreshInterval = dashboardDataForUser[j].refreshInterval;
  1118.             dashboardDataForUser[j].widgetData = reportConfig;
  1119.             loading_by_id[reportConfig.output.divUniqueId] = $('#report_card_' + reportConfig.output.divUniqueId).waitMe({
  1120.                 effect: 'timer',
  1121.                 text: 'Loading...',
  1122.                 bg: 'rgba(255,255,255,0.90)',
  1123.                 color: '#555'
  1124.             });
  1125. //            load_data_box(reportConfig);
  1126.         }
  1127.         last_report_list_index = 0;
  1128.         load_data_box();
  1129.     }
  1130.     function abbreviateNumber(number) {
  1131.         var SI_POSTFIXES = ["", "k", "M", "G", "T", "P", "E"];
  1132.         var tier = Math.log10(Math.abs(number)) / 3 | 0;
  1133.         if (tier == 0) return number;
  1134.         var postfix = SI_POSTFIXES[tier];
  1135.         var scale = Math.pow(10, tier * 3);
  1136.         var scaled = number / scale;
  1137.         var formatted = scaled.toFixed(1) + '';
  1138.         if (/\.0$/.test(formatted))
  1139.             formatted = formatted.substr(0, formatted.length - 2);
  1140.         return formatted + postfix;
  1141.     }
  1142.     jQuery(document).ready(function () {
  1143. //            materialadmin.DemoDashboard._initSparklines();
  1144. //            materialadmin.DemoDashboard._initFlotVisitors();
  1145.         //this._generateFlotChart();
  1146. //            materialadmin.DemoDashboard._initRickshaw();
  1147.         materialadmin.DemoDashboard._initKnob();
  1148. //            materialadmin.DemoDashboard._initFlotRegistration();
  1149.         materialadmin.App.callOnResize(function () {
  1150.             var options = $('.revenue-tm-sparkline').data();
  1151.             options.type = 'line';
  1152.             options.width = '100%';
  1153.             options.height = $('.revenue-tm-sparkline').height() + 'px';
  1154.             options.fillColor = false;
  1155.             $('.revenue-tm-sparkline').sparkline(summary_data.revenue, options);
  1156.         });
  1157.         materialadmin.App.callOnResize(function () {
  1158.             var options = $('.nw-tm-sparkline').data();
  1159.             options.type = 'line';
  1160.             options.width = '100%';
  1161.             options.height = $('.nw-tm-sparkline').height() + 'px';
  1162.             options.fillColor = false;
  1163.             $('.nw-tm-sparkline').sparkline(summary_data.netWorth, options);
  1164.         });
  1165.         materialadmin.App.callOnResize(function () {
  1166.             var options = $('.mg-tm-sparkline').data();
  1167.             options.type = 'line';
  1168.             options.width = '100%';
  1169.             options.height = $('.mg-tm-sparkline').height() + 'px';
  1170.             options.fillColor = false;
  1171.             $('.mg-tm-sparkline').sparkline(summary_data.monGrowth, options);
  1172.         });
  1173.         //    console.log(summary_data.tsCommaRevenue)
  1174.         //    console.log(JSON.stringify(summary_data.tsCommaRevenue))
  1175.         //    console.log(summary_data.tsCommaExpense)
  1176.         //    console.log(JSON.stringify(summary_data.tsCommaExpense))
  1177.         var chart_obj = $('#rev_exp_chart')
  1178.         var labelColor = chart_obj.css('color');
  1179.         materialadmin.DemoDashboard._generateFlotChart('#rev_exp_chart',
  1180.                 [
  1181.                     {
  1182.                         label: 'Revenue',
  1183.                         data: summary_data.tsCommaRevenue,
  1184.                         last: true
  1185.                     },
  1186.                     {
  1187.                         label: 'Expense',
  1188.                         data: summary_data.tsCommaExpense,
  1189.                         last: true
  1190.                     }
  1191.                 ],
  1192.                 {
  1193.                     colors: chart_obj.data('color').split(','),
  1194.                     series: {
  1195.                         shadowSize: 0,
  1196.                         lines: {
  1197.                             show: true,
  1198.                             lineWidth: false,
  1199.                             fill: true
  1200.                         },
  1201.                         curvedLines: {
  1202.                             apply: true,
  1203.                             active: true,
  1204.                             monotonicFit: false
  1205.                         }
  1206.                     },
  1207.                     legend: {
  1208.                         container: $('#rev_exp_chart_legend')
  1209.                     },
  1210.                     xaxis: {
  1211.                         mode: "time",
  1212. //                        timeformat: "%d %b",
  1213.                         timeformat: "%b",
  1214.                         font: {color: labelColor}
  1215.                     },
  1216.                     yaxis: {
  1217.                         font: {color: labelColor}
  1218.                     },
  1219.                     grid: {
  1220.                         borderWidth: 0,
  1221.                         color: labelColor,
  1222.                         hoverable: true
  1223.                     }
  1224.                 }
  1225.         );
  1226. //        generate_cash_bank_rickshaw_chart([summary_data.tsCommaCashObj, summary_data.tsCommaBankObj])
  1227.         {#generate_cash_bank_rickshaw_chart([{{  so_count_details.soCountRickshawData|json_encode|raw }}])#}
  1228.         generate_cash_bank_rickshaw_chart({{  so_count_details.soCountRickshawData|json_encode|raw }})
  1229. //        var chart_obj=$('#cashRickshawGraph')
  1230. //        var labelColor = chart_obj.css('color');
  1231. //        materialadmin.DemoDashboard._generateFlotChart('#cashRickshawGraph',
  1232. //                [
  1233. //                    {
  1234. //                        label: 'Cash',
  1235. //                        data: summary_data.tsCommaCash,
  1236. //                        last: true
  1237. //                    },
  1238. //                    {
  1239. //                        label: 'Bank',
  1240. //                        data: summary_data.tsCommaBank,
  1241. //                        last: true
  1242. //                    }
  1243. //                ],
  1244. //                {
  1245. //                    colors: chart_obj.data('color').split(','),
  1246. //                    series: {
  1247. //                        shadowSize: 0,
  1248. //                        lines: {
  1249. //                            show: true,
  1250. //                            lineWidth: false,
  1251. //                            fill: true
  1252. //                        },
  1253. //                        curvedLines: {
  1254. //                            apply: true,
  1255. //                            active: true,
  1256. //                            monotonicFit: false
  1257. //                        }
  1258. //                    },
  1259. //                    legend: {
  1260. //                        show:false,
  1261. ////                        container: $('#rev_exp_chart_legend')
  1262. //                    },
  1263. //                    xaxis: {
  1264. //                        mode: "time",
  1265. //                        show:false,
  1266. ////                        timeformat: "%d %b",
  1267. //                        tickLength:0,
  1268. //                        timeformat: "%b",
  1269. //                        font: {color: labelColor}
  1270. //                    },
  1271. //                    yaxis: {
  1272. //                        font: {color: labelColor},
  1273. //                        tickLength:0,
  1274. //                        show:false,
  1275. //                    },
  1276. //                    grid: {
  1277. //                        borderWidth: 0,
  1278. //                        color: labelColor,
  1279. //                        hoverable: true
  1280. //                    }
  1281. //                }
  1282. //        );
  1283.         $(document).on('click', '#report_mother_div .card .header .tools .btn-refresh', function (e) {
  1284.             var card = $(e.currentTarget).closest('.card');
  1285.             materialadmin.AppCard.addCardLoader(card);
  1286.             setTimeout(function () {
  1287.                 materialadmin.AppCard.removeCardLoader(card);
  1288.             }, 1500);
  1289.         });
  1290.         $(document).on('click', '#report_mother_div .card .header .tools .btn-collapse', function (e) {
  1291.             var card = $(e.currentTarget).closest('.card');
  1292.             materialadmin.AppCard.toggleCardCollapse(card);
  1293.         });
  1294.         $(document).on('click', '#report_mother_div .card .header .tools .btn-close', function (e) {
  1295.             var card = $(e.currentTarget).closest('.card');
  1296.             materialadmin.AppCard.removeCard(card);
  1297.         });
  1298.         $(document).on('click', '#report_mother_div .card .header .tools .menu-card-styling a', function (e) {
  1299. //            o._handleCardStyling(e);
  1300.         });
  1301.         $(document).ajaxStart(function () {
  1302.             //$( ".log" ).text( "Triggered ajaxStart handler." );
  1303.             $("#ajax_loader_here").show();
  1304.         });
  1305.         $(document).ajaxComplete(function () {
  1306.             //$( ".log" ).text( "Triggered ajaxStart handler." );
  1307.             $("#ajax_loader_here").hide();
  1308.         });
  1309.         $('.pending_task_trigger').click(function () {
  1310. //            $('.pending_task_div').show('slow')
  1311.             $('.pending_task_div').toggle('slow')
  1312.         })
  1313.         $('.count-to').countTo(
  1314.         );
  1315.         $('.count-to-amount').countTo(
  1316.                 {
  1317.                     formatter: function (value, options) {
  1318. //                        value=value.split('৳')[1];
  1319. //                        return '৳' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ',');
  1320. //                        //    console.log(value)
  1321. //                        //    console.log('৳' + value.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'))
  1322. //                        return '৳' + value.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
  1323. //                        return '৳ ' + abbreviateNumber(value.toFixed(0));
  1324.                         return abbreviateNumber(value.toFixed(0));
  1325.                     }
  1326.                 }
  1327.         );
  1328.         $('.count-to-percentage').countTo(
  1329.                 {
  1330.                     formatter: function (value, options) {
  1331. //                        value=value.split('৳')[1];
  1332. //                        return '৳' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ',');
  1333. //                        //    console.log(value)
  1334. //                        //    console.log('৳' + value.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'))
  1335. //                        return '৳' + value.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
  1336. //                        return '৳ ' + abbreviateNumber(value.toFixed(0));
  1337.                         return abbreviateNumber(value.toFixed(0)) + '%';
  1338.                     }
  1339.                 }
  1340.         );
  1341.         //Sales count to
  1342.         $('.sales-count-to').countTo({
  1343.             formatter: function (value, options) {
  1344.                 return '$' + value.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ' ').replace('.', ',');
  1345.             }
  1346.         });
  1347. //        setTimeout(check_and_generate_dashboard_report, 5000);
  1348.         check_and_generate_dashboard_report();
  1349.     })
  1350.     ////    console.log(JSON.stringify(box_data))
  1351. </script>
  1352. {% verbatim %}
  1353.     <script>
  1354.         $(function () {
  1355.             function initDonutChart() {
  1356.                 window.my_don = Morris.Donut({
  1357.                     element: 'donut_chart',
  1358.                     data: [{
  1359.                         label: 'ASSET',
  1360.                         value: summary_data.assetPercentage
  1361.                     }, {
  1362.                         label: 'LIABILITY',
  1363.                         value: summary_data.liabilityPercentage
  1364.                     }, {
  1365.                         label: 'INCOME',
  1366.                         value: summary_data.incomePercentage
  1367.                     }, {
  1368.                         label: 'EXPENSE',
  1369.                         value: summary_data.expensePercentage
  1370.                     }
  1371.                     ],
  1372.                     colors: ['rgb(233, 30, 99)', 'rgb(0, 188, 212)', 'rgb(255, 152, 0)', 'rgb(0, 150, 136)'],
  1373.                     formatter: function (y) {
  1374.                         return y + '%'
  1375.                     },
  1376.                     resize: true
  1377.                 });
  1378.                 $(window).on("resize", function () {
  1379.                     my_don.redraw();
  1380.                 });
  1381.             }
  1382.             initDonutChart()
  1383.             function getChartJs(type) {
  1384.                 var config = null;
  1385.                 if (type === 'line') {
  1386.                     config = {
  1387.                         type: 'line',
  1388.                         data: areaChartData,
  1389.                         options: {
  1390.                             responsive: true,
  1391.                             legend: {
  1392.                                 display: true,
  1393.                                 labels: {
  1394.                                     fontColor: '#333'
  1395.                                 }
  1396.                             }
  1397.                         }
  1398.                     }
  1399.                 }
  1400.                 else if (type === 'bar') {
  1401.                     //    console.log(barChartData)
  1402.                     config = {
  1403.                         type: 'bar',
  1404.                         data: barChartData,
  1405.                         options: {
  1406.                             responsive: true,
  1407.                             legend: {
  1408.                                 display: true,
  1409.                                 labels: {
  1410.                                     fontColor: '#333'
  1411.                                 }
  1412.                             }
  1413.                         }
  1414.                     }
  1415.                 }
  1416.                 else if (type === 'radar') {
  1417.                     config = {
  1418.                         type: 'radar',
  1419.                         data: {
  1420.                             labels: ["January", "February", "March", "April", "May", "June", "July"],
  1421.                             datasets: [{
  1422.                                 label: "My First dataset",
  1423.                                 data: [65, 25, 90, 81, 56, 55, 40],
  1424.                                 borderColor: 'rgba(0, 188, 212, 0.8)',
  1425.                                 backgroundColor: 'rgba(0, 188, 212, 0.5)',
  1426.                                 pointBorderColor: 'rgba(0, 188, 212, 0)',
  1427.                                 pointBackgroundColor: 'rgba(0, 188, 212, 0.8)',
  1428.                                 pointBorderWidth: 1
  1429.                             }, {
  1430.                                 label: "My Second dataset",
  1431.                                 data: [72, 48, 40, 19, 96, 27, 100],
  1432.                                 borderColor: 'rgba(233, 30, 99, 0.8)',
  1433.                                 backgroundColor: 'rgba(233, 30, 99, 0.5)',
  1434.                                 pointBorderColor: 'rgba(233, 30, 99, 0)',
  1435.                                 pointBackgroundColor: 'rgba(233, 30, 99, 0.8)',
  1436.                                 pointBorderWidth: 1
  1437.                             }]
  1438.                         },
  1439.                         options: {
  1440.                             responsive: true,
  1441.                             legend: false
  1442.                         }
  1443.                     }
  1444.                 }
  1445.                 else if (type === 'pie') {
  1446.                     config = {
  1447.                         type: 'pie',
  1448.                         data: {
  1449.                             datasets: [{
  1450.                                 data: [225, 50, 100, 40],
  1451.                                 backgroundColor: [
  1452.                                     "rgb(233, 30, 99)",
  1453.                                     "rgb(255, 193, 7)",
  1454.                                     "rgb(0, 188, 212)",
  1455.                                     "rgb(139, 195, 74)"
  1456.                                 ],
  1457.                             }],
  1458.                             labels: [
  1459.                                 "Pink",
  1460.                                 "Amber",
  1461.                                 "Cyan",
  1462.                                 "Light Green"
  1463.                             ]
  1464.                         },
  1465.                         options: {
  1466.                             responsive: true,
  1467.                             legend: false
  1468.                         }
  1469.                     }
  1470.                 }
  1471.                 return config;
  1472.             }
  1473.             new Chart($("#areaChart").get(0).getContext("2d"), getChartJs('line'));
  1474. //            new Chart($("#barChart").get(0).getContext("2d"), getChartJs('bar'));
  1475.             //following is for load in single page now only works perfectly with sale sinvoice. will work on it later
  1476. //        $('a').click(function(e){
  1477. //            $( "#test_ajax_loader").hide();
  1478. //
  1479. //
  1480. //            if(($(this).attr('href')).indexOf('#')!=-1)
  1481. //            {
  1482. //
  1483. ////                e.preventDefault();
  1484. ////                alert("ache");
  1485. ////                //    console.log(abc.indexOf('#'))
  1486. //            }
  1487. //            else
  1488. //            {
  1489. ////                alert("nai")
  1490. //                e.preventDefault();
  1491. //                $( "#test_ajax_loader" ).load( $(this).attr('href')+'?include_html=0', function() {
  1492. //                    alert(ACTIVE_ROUTE)
  1493. ////                    $('#test_ajax_loader input[type="text"]').trigger('change')
  1494. //                    $.AdminBSB.input.activate();
  1495. //                    generic.init()
  1496. //
  1497. //                    $( "#test_ajax_loader").show();
  1498. //
  1499. //            });
  1500. //                window.history.pushState("", "", $(this).attr('href'));
  1501. //
  1502. //
  1503. ////                window.location.href.replace($(this).attr('href'));
  1504. //
  1505. //            }
  1506. //
  1507. //        })
  1508. //            //    console.log('MATHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
  1509.             //    console.log(materialadmin.DemoDashboard)
  1510.         });
  1511.     </script>
  1512. {% endverbatim %}