{% include '@Application/codecovers_header.html.twig' %}
{% include '@Application/inc/menu/skeleton_with_menu_codecovers.html.twig' %}
<style>
.card div[class*="col-md"], .card div[class*="col-lg"], .card div[class*="col-xs"], .card div[class*="col-sm"] {
margin-bottom: 0px;
}
</style>
<!-- BEGIN BASE-->
<div id="base">
<!-- BEGIN CONTENT-->
<div id="content">
<section>
<div class="section-body">
{% set company_data=''|getUserCompany %}
{% set pending_doc_list={} %}
{% set pending_approval_list={} %}
{% set override_approval_list={} %}
{% set monthly_summary_data= ''|getMonthlySummary %}
{% set so_count_details=100|getSoCountAndMore() %}
{#{{ dump(monthly_summary_data) }}#}
<div class="row clearfix">
{% include '@Application/inc/notification/error_notification.html.twig' %}
{% include '@Application/inc/notification/success_notification.html.twig' %}
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6" style="cursor: pointer;">
<div class="card pending_task_trigger">
<div class="body no-padding">
<div class="alert alert-callout alert-warning no-margin">
{# <strong class="pull-right text-warning text-lg">{{ (pending_approval_list|length) +(override_approval_list|length) }}#}
{# <i class="material-icons">playlist_add_check</i></strong>#}
{# <strong class="text-xl number count-to-amount-specific" data-from="0"#}
{# data-to="{{ (pending_approval_list|length) +(override_approval_list|length) }}"#}
{# data-speed="{{ 1000 }}" data-fresh-interval="20">#}
{# </strong>#}
<strong class="pull-right text-warning text-lg">0<i class="material-icons">playlist_add_check</i></strong>
<strong class="text-xl number count-to-amount-specific" data-from="0"
data-to="0"
data-speed="1000" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">PENDING TASKS</span>
</div>
</div><!--end .card-body -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
<div class="card ">
<div class="body no-padding">
<div class="alert alert-callout alert-success no-margin">
<strong class="pull-right text-success text-lg"><i class="material-icons">add_shopping_cart</i>
{#<i class="zmdi zmdi-trending-up"></i>#}
</strong>
<strong class="text-xl number count-to-amount" data-from="0"
data-to="{{ company_data.revenue }}"
data-speed="{{ 1000 }}" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">SALES</span>
<div class="stick-bottom-left-right">
<div class="height-2 revenue-tm-sparkline" data-line-color="#bdc1c1"></div>
</div>
</div>
</div><!--end .card-body -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
<div class="card ">
<div class="body no-padding">
<div class="alert alert-callout alert-info no-margin">
<strong class="pull-right text-success text-lg"><i class="material-icons">work</i>
</strong>
<strong class="text-xl number count-to-amount" data-from="0"
data-to="{{ company_data.netWorth }}"
data-speed="{{ 1000 }}" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">NET WORTH</span>
<div class="stick-bottom-left-right">
<div class="height-2 nw-tm-sparkline" data-line-color="#bdc1c1"></div>
</div>
</div>
</div><!--end .card-body -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
<div class="card style-accent">
<div class="body no-padding">
<div class="alert alert-callout alert-info no-margin">
<strong class="pull-right text-success text-lg"><i class="material-icons">call_received</i>
</strong>
<strong class="text-xl number count-to-amount" data-from="0"
data-to="{{ company_data.receivable }}"
data-speed="{{ 1000 }}" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">RECEIVABLE</span>
</div>
</div><!--end .card-body -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
<div class="card style-accent">
<div class="body no-padding">
<div class="alert alert-callout no-margin">
<strong class="pull-right text-success text-lg"><i
class="material-icons">call_made</i> </strong>
<strong class="text-xl number count-to-amount" data-from="0"
data-to="{{ company_data.payable }}"
data-speed="{{ 1000 }}" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">PAYABLE</span>
</div>
</div><!--end .card-body -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
<div class="card style-accent">
<div class="body no-padding">
<div class="alert alert-callout alert-warning no-margin">
<strong class="pull-right text-success text-lg"><i class="material-icons">trending_up</i>
</strong>
<strong class="text-xl number count-to-percentage" data-from="0"
data-to="{{ monthly_summary_data.latestMonthlyGrowth }}"
data-speed="{{ 1000 }}" data-fresh-interval="20">
</strong>
<br>
<span class="opacity-50">GROWTH</span>
<div class="stick-bottom-left-right">
<div class="height-2 mg-tm-sparkline" data-line-color="#bdc1c1"></div>
</div>
</div>
</div><!--end .card-body -->
</div>
</div>
</div>
<div class="row clearfix pending_task_div" id="" style="display: none;">
<div class=" col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="card">
<div class="header">
<header>PENDING TASKS</header>
<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>
</div>
<div class="body">
{% if pending_approval_list is empty and override_approval_list is empty %}
<blockquote class="m-b-25">
<p>Great! No Pending Tasks</p>
<footer><cite title="Source Title">The News Bee</cite></footer>
</blockquote>
{% else %}
<div class="table-responsive">
<table class="table table-hover table-condensed dashboard-task-infos">
<thead>
<tr>
<th>#</th>
<th>Document</th>
<th>Status</th>
<th>Type</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% set ind=0 %}
{% for item in pending_approval_list %}
{% set ind=ind+1 %}
<tr class="pending_row_{{ item.entity }}_{{ item.entityId }}">
<td>{{ ind }}</td>
<td>{{ item.documentHash }}</td>
<td><span class="label bg-orange" style="background: orange;">Pending Approval</span></td>
<td>{{ item.entityAlias }}</td>
<td>
<div class="btn-group ">
<button type="button"
class="btn ink-reaction btn-sm btn-primary dropdown-toggle waves-effect"
data-toggle="dropdown">
Action <i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu animation-expand"
style=""
role="menu">
<li><a href="{% if item.viewPath != '' and not item.viewPath is null %}{{ path(item.viewPath) }}/{{ item.entityId }}{% endif %}"> View</a></li>
<li><a href="#" class="trigger_approval_btn"
data-toggle="modal"
data-entity="{{ item.entity }}"
data-entity-id="{{ item.entityId }}"
data-approval-id="{{ item.approvalId }}"
data-target="#approveDocument">Approve</a></li>
</ul>
</div>
{# <a class="btn btn-primary btn-sm waves-effect"#}
{# href="{{ path(item.viewPath) }}/{{ item.entityId }}">#}
{# View#}
{# </a>#}
{#<div class="progress">#}
{#<div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>#}
{#</div>#}
</td>
</tr>
{% endfor %}
{% for item in override_approval_list %}
{% set ind=ind+1 %}
<tr class="pending_row_{{ item.entity }}_{{ item.entityId }}">
<td>{{ ind }}</td>
<td>{{ item.documentHash }}</td>
<td><span class="label " style="background: blue;">Override</span></td>
<td>{{ item.entityAlias }}</td>
<td>
<div class="btn-group ">
<button type="button"
class="btn ink-reaction btn-sm btn-primary dropdown-toggle waves-effect"
data-toggle="dropdown">
Action <i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu animation-expand"
style=""
role="menu">
<li><a href="{{ path(item.viewPath) }}/{{ item.entityId }}"> View</a></li>
<li><a href="#" class="trigger_approval_btn"
data-toggle="modal"
data-entity="{{ item.entity }}"
data-entity-id="{{ item.entityId }}"
data-approval-id="{{ item.approvalId }}"
data-target="#approveDocument">Approve</a></li>
</ul>
</div>
{#<div class="progress">#}
{#<div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>#}
{#</div>#}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="row">
<!-- BEGIN SITE ACTIVITY -->
<div class="col-md-9">
<div class="card ">
<div class="row">
<div class="col-md-8">
<div class="header">
<header>Revenue & Expense</header>
</div><!--end .header -->
<div class="body height-8">
<div id="rev_exp_chart_legend"
class="flot-legend-horizontal stick-top-right no-y-padding"></div>
<div id="rev_exp_chart" class="flot height-7" data-title="Sales & Expenses"
data-color="#7dd8d2,#0aa89e"></div>
</div><!--end .body -->
</div><!--end .col -->
<div class="col-md-4">
<div class="header">
<header>Current stats</header>
</div>
<div class="body height-8">
<strong>{{ company_data.sales|number_format(2,'.',',') }}</strong> Sales
<span class="pull-right text-success text-sm">0,18% <i
class="zmdi zmdi-trending-up"></i></span>
<div class="progress progress-hairline">
<div class="progress-bar progress-bar-primary-dark" style="width:43%"></div>
</div>
{{ so_count_details.soCount }} Orders
<span class="pull-right text-success text-sm">0,68% <i
class="zmdi zmdi-trending-up"></i></span>
<div class="progress progress-hairline">
<div class="progress-bar progress-bar-primary-dark" style="width:11%"></div>
</div>
{{ company_data.cash|number_format(2,'.',',') }} in Cash
<span class="pull-right text-danger text-sm">21,08% <i
class="zmdi zmdi-trending-down"></i></span>
<div class="progress progress-hairline">
<div class="progress-bar progress-bar-danger" style="width:93%"></div>
</div>
{{ company_data.bank|number_format(2,'.',',') }} in Bank
<span class="pull-right text-success text-sm">0,18% <i
class="zmdi zmdi-trending-up"></i></span>
<div class="progress progress-hairline">
<div class="progress-bar progress-bar-primary-dark" style="width:63%"></div>
</div>
0 Return Occurrance
<span class="pull-right text-success text-sm">0,18% <i
class="zmdi zmdi-trending-up"></i></span>
<div class="progress progress-hairline">
<div class="progress-bar progress-bar-primary-dark" style="width:47%"></div>
</div>
</div><!--end .body -->
</div><!--end .col -->
</div><!--end .row -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END SITE ACTIVITY -->
<!-- BEGIN SERVER STATUS -->
{#{{ dump(so_count_details) }}#}
<div class="col-md-3">
<div class="card">
<div class="header">
<header class="text-primary">Sales Status</header>
</div><!--end .header -->
<div class="body height-4">
<div class="pull-right text-center">
{% set isNegative=0 %}
{% set currVal=so_count_details.soCount %}
{% set maxVal=so_count_details.nextMax %}
{% if currVal <0 %}
{% set currVal=(-1)*currVal %}
{% set isNegative=1 %}
{% endif %}
<em class="text-primary">Orders</em>
<br/>
<div id="bankStatusKnob"
class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">
<input type="text" class="dial" data-min="0"
data-max="{{ maxVal }}"
data-thickness=".09"
value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>
</div>
</div>
{#<div class="body height-4">#}
{#<div class="pull-right text-center">#}
{#{% set isNegative=0 %}#}
{#{% set knobNumberMarker= monthly_summary_data.companyCashModMarker %}#}
{#{% set currVal=monthly_summary_data.companyCashMod %}#}
{#{% set maxVal=100 %}#}
{#{% if currVal <0 %}#}
{#{% set currVal=(-1)*currVal %}#}
{#{% set isNegative=1 %}#}
{#{% endif %}#}
{#<em class="text-primary">Cash <span#}
{#id="cashStatusKnobMarker">{{ knobNumberMarker!=''?'('~knobNumberMarker~')' }}</span></em>#}
{#<br/>#}
{#<div id="bankStatusKnob"#}
{#class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">#}
{#<input type="text" class="dial" data-min="0"#}
{#data-max="{{ knobNumberMarker=='M'?1000:(knobNumberMarker=='K'?1000:1000) }}"#}
{#data-thickness=".09"#}
{#value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>#}
{#</div>#}
{#</div>#}
{#<div class="pull-right text-center">#}
{#{% set isNegative=0 %}#}
{#{% set knobNumberMarker= monthly_summary_data.companyBankModMarker %}#}
{#{% set currVal=monthly_summary_data.companyBankMod %}#}
{#{% set maxVal=100 %}#}
{#{% if currVal <0 %}#}
{#{% set currVal=(-1)*currVal %}#}
{#{% set isNegative=1 %}#}
{#{% endif %}#}
{#<em class="text-primary">Bank <span#}
{#id="bankStatusKnobMarker">{{ knobNumberMarker!=''?'('~knobNumberMarker~')' }}</span></em>#}
{#<br/>#}
{#<div id="bankStatusKnob"#}
{#class="knob knob-shadow {{ isNegative==1?'knob-warning':'knob-primary' }} knob-body-track size-2">#}
{#<input type="text" class="dial" data-min="0"#}
{#data-max="{{ knobNumberMarker=='M'?1000:(knobNumberMarker=='K'?1000:1000) }}"#}
{#data-thickness=".09"#}
{#value="{{ currVal|number_format(0,'','') }}" data-readOnly=true>#}
{#</div>#}
{#</div>#}
</div><!--end .body -->
<div class="body height-4 no-padding">
<div class="stick-bottom-left-right">
<div id="cashRickshawGraph" class="height-4" data-color1="#0aa89e"
data-color2="rgba(79, 89, 89, 0.2)"></div>
{#<div id="cashRickshawGraph" class="flot height-4" data-title="Sales & Expenses"#}
{#data-color="#0aa89e,rgba(79, 89, 89, 0.2)"></div>#}
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END SERVER STATUS -->
</div><!--end .row -->
<div class="row clearfix" id="report_mother_div">
</div>
<div class="row clearfix">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="row clearfix">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- AREA CHART -->
<div class="card ">
<div class="header">
<header class="">EXPENSE INFO</header>
<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>
</div>
<div class="body scroll height-14">
{% set expense_data_grouped=monthly_summary_data.expense_data_grouped %}
{% set expense_data_month_list=monthly_summary_data.expense_data_month_list %}
{% set expense_data_by_month=monthly_summary_data.expense_data_by_month %}
{#{{ dump(expense_data_month_list) }}#}
{#{{ dump(expense_data_grouped) }}#}
{#{{ dump(expense_data_by_month) }}#}
{#{{ dump(expense_data_by_month['May'][103]) }}#}
{% if not expense_data_grouped is empty %}
<table class="table table-bordered the_data_table skip_export" style="">
<thead>
<tr>
<th>Expense Type</th>
<th>Head</th>
{% for mon in expense_data_month_list %}
<th>{{ mon }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for entry in expense_data_grouped %}
{% if entry.skip!=1 %}
<tr>
<td>{{ entry.group_name }}</td>
<td>{{ entry.head_name }}</td>
{% for mon in expense_data_month_list %}
{% if entry.value_by_month[mon] is defined %}
<th class="trans_amount">{{ entry.value_by_month[mon].amount|number_format(2,'.',',') }}</th>
{% else %}
<th></th>
{% endif %}
{% endfor %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}
</div><!-- /.body -->
</div><!-- /.card -->
</div><!-- /.col (LEFT) -->
<!-- Task Info -->
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<div class="card">
<div class="header">
<header>FINANCIAL STATUS</header>
<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>
</div>
<div class="body height-8">
<div id="donut_chart" class="dashboard-donut-chart "
style="height: 100%"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<!-- AREA CHART -->
<div class="card ">
<div class="header">
<header class="">MONTHLY GROWTH</header>
<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>
</div>
<div class="body height-8">
<div class="chart">
<canvas id="areaChart" style=""></canvas>
</div>
</div><!-- /.body -->
</div><!-- /.card -->
</div><!-- /.col (LEFT) -->
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 " style="">
<div class="row clearfix">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="card">
<div class="header">
<header>QUICK LINKS</header>
<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>
</div>
<div class="body height-14">
{#<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=""Arial"" 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=""Arial"" 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>#}
<h5>Quick Entry</h5>
<a href="#" class="btn btn-default waves-effect btn-block"
data-toggle="modal"
data-target="#newExpenseModal">
RECORD EXPENSE
</a>
<a href="#" class="btn btn-block bg-green waves-effect" data-toggle="modal"
data-target="#newPaymentModal">
Make Payment
</a>
<a href="#" class="btn btn-block bg-blue waves-effect" data-toggle="modal"
data-target="#newReceiptModal">
Receive Payment
</a>
<h5>Lists</h5>
<a href="{{ path('voucher_list') }}"
class="btn btn-block btn-primary bg-grey waves-effect">
Transactions
</a>
<a href="{{ path('check_register') }}"
class="btn btn-block bg-green waves-effect">
Check List
</a>
<a href="{{ path('chart_of_accounts') }}"
class="btn btn-block bg-blue btn-primary waves-effect">
Chart of Accounts
</a>
<h5>Reports</h5>
<a href="{{ path('view_ledger_head') }}"
class="btn btn-block btn-primary bg-grey waves-effect"
data-toggle="modal">
Ledger
</a>
<a href="{{ path('view_trial_balance') }}"
class="btn btn-block bg-green waves-effect">
Trial Balance
</a>
<a href="{{ path('view_financial_report') }}"
class="btn btn-block bg-blue btn-primary waves-effect">
Financial Statements
</a>
{#<button class="btn btn-primary waves-effect">Record Expense</button>#}
{#<button class="btn btn-default waves-effect">Make Payment</button>#}
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- AREA CHART -->
<div class="card ">
<div class="header">
<header class="">RECENT SALES</header>
<div class="tools">
<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>
</div>
<div class="body height-8">
{% set so_list=''|getRecentSales %}
{#{{ dump(so_list) }}#}
{% if not so_list is empty %}
<table class="table table-striped" style="table-layout: fixed">
<tbody>
{% for entry in so_list %}
<tr>
<td style="white-space: nowrap;overflow: hidden;">{{ entry.client }}</td>
<td>{{ entry.date|date('M d') }}</td>
<td style="text-align: right">{{ entry.so_amount|number_format(0,'.',',') }}</td>
<!-- <td style="text-align: right;">{{ entry.so_amount|number_format(0,'.',',') }}</td>-->
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div><!-- /.body -->
</div><!-- /.card -->
</div>
</div>
</div>
<!-- #END# Browser Usage -->
</div>
<div class="row">
<!-- BEGIN TODOS -->
<div class="col-md-3">
<div class="card ">
<div class="header">
<header>Todo's</header>
<div class="tools">
<a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
</div>
</div><!--end .header -->
<div class="body no-padding height-9 scroll">
<ul class="list" data-sortable="true">
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox" checked>
<span>Call clients for follow-up</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox">
<span>
Schedule meeting
<small>opportunity for new customers</small>
</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox">
<span>
Upload files to server
<small>The files must be shared with all members of the board</small>
</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox">
<span>Forward important tasks</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox">
<span>Forward important tasks</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
<li class="tile">
<div class="checkbox checkbox-styled tile-text">
<label>
<input type="checkbox">
<span>Forward important tasks</span>
</label>
</div>
<a class="btn btn-flat ink-reaction btn-default">
<i class="zmdi zmdi-delete"></i>
</a>
</li>
</ul>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END TODOS -->
<!-- BEGIN REGISTRATION HISTORY -->
<div class="col-md-6">
<div class="card">
<div class="header">
<header>Registration history</header>
<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>
</div><!--end .header -->
<div class="body no-padding height-9">
<div class="row">
<div class="col-sm-6 hidden-xs">
<div class="force-padding text-sm text-default-light">
<p>
<i class="zmdi zmdi-mode-comment text-primary-light"></i>
The registrations are measured from the time that the redesign was
fully
implemented and after the first e-mailing.
</p>
</div>
</div><!--end .col -->
<div class="col-sm-6">
<div class="force-padding pull-right text-default-light">
<h2 class="no-margin text-primary-dark"><span
class="text-xxl">66.05%</span>
</h2>
<i class="fa fa-caret-up text-success fa-fw"></i> more registrations
</div>
</div><!--end .col -->
</div><!--end .row -->
<div class="stick-bottom-left-right force-padding">
<div id="flot-registrations" class="flot height-5"
data-title="Registration history"
data-color="#0aa89e"></div>
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END REGISTRATION HISTORY -->
<!-- BEGIN NEW REGISTRATIONS -->
<div class="col-md-3">
<div class="card">
<div class="header">
<header>New registrations</header>
<div class="tools hidden-md">
<a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
</div>
</div><!--end .header -->
<div class="body no-padding height-9 scroll">
<ul class="list divider-full-bleed">
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar9463a.jpg?1422538626"
alt=""/>
</div>
<div class="tile-text">Ann Laurens</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar42dba.jpg?1422538625"
alt=""/>
</div>
<div class="tile-text">Alex Nelson</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar114335.jpg?1422538623"
alt=""/>
</div>
<div class="tile-text">Mary Peterson</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar7463a.jpg?1422538626"
alt=""/>
</div>
<div class="tile-text">Philip Ericsson</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar8463a.jpg?1422538626"
alt=""/>
</div>
<div class="tile-text">Jim Peters</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
<li class="tile">
<div class="tile-content">
<div class="tile-icon">
<img src="codecovers/assets/img/modules/materialadmin/avatar2666b.jpg?1422538624"
alt=""/>
</div>
<div class="tile-text">Jessica Cruise</div>
</div>
<a class="btn btn-flat ink-reaction">
<i class="zmdi zmdi-block text-default-light"></i>
</a>
</li>
</ul>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END NEW REGISTRATIONS -->
</div><!--end .row -->
<div class="row">
<!-- BEGIN ALERT - REVENUE -->
<div class="col-md-3 col-sm-6">
<div class="card">
<div class="body no-padding">
<div class="alert alert-callout alert-info no-margin">
<strong class="pull-right text-success text-lg">0,38% <i
class="zmdi zmdi-trending-up"></i></strong>
<strong class="text-xl">$ 32,829</strong><br/>
<span class="opacity-50">Revenue</span>
<div class="stick-bottom-left-right">
<div class="height-2 sparkline-revenue" data-line-color="#bdc1c1"></div>
</div>
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END ALERT - REVENUE -->
<!-- BEGIN ALERT - VISITS -->
<div class="col-md-3 col-sm-6">
<div class="card">
<div class="body no-padding">
<div class="alert alert-callout alert-warning no-margin">
<strong class="pull-right text-warning text-lg">0,01% <i
class="zmdi zmdi-swap-vertical"></i></strong>
<strong class="text-xl">432,901</strong><br/>
<span class="opacity-50">Visits</span>
<div class="stick-bottom-right">
<div class="height-1 sparkline-visits" data-bar-color="#e5e6e6"></div>
</div>
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END ALERT - VISITS -->
<!-- BEGIN ALERT - BOUNCE RATES -->
<div class="col-md-3 col-sm-6">
<div class="card">
<div class="body no-padding">
<div class="alert alert-callout alert-danger no-margin">
<strong class="pull-right text-danger text-lg">0,18% <i
class="zmdi zmdi-trending-down"></i></strong>
<strong class="text-xl">42.90%</strong><br/>
<span class="opacity-50">Bounce rate</span>
<div class="stick-bottom-left-right">
<div class="progress progress-hairline no-margin">
<div class="progress-bar progress-bar-danger" style="width:43%"></div>
</div>
</div>
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END ALERT - BOUNCE RATES -->
<!-- BEGIN ALERT - TIME ON SITE -->
<div class="col-md-3 col-sm-6">
<div class="card">
<div class="body no-padding">
<div class="alert alert-callout alert-success no-margin">
<h1 class="pull-right text-success"><i class="zmdi zmdi-timer"></i></h1>
<strong class="text-xl">54 sec.</strong><br/>
<span class="opacity-50">Avg. time on site</span>
</div>
</div><!--end .body -->
</div><!--end .card -->
</div><!--end .col -->
<!-- END ALERT - TIME ON SITE -->
</div><!--end .row -->
</div><!--end .section-body -->
</section>
</div>
<!--end #content-->
<!-- END CONTENT -->
</div>
{% include '@Application/pages/system/modals/approve_document_modal.html.twig' %}
<script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}ckeditor/adapters/jquery.js"></script>
{% include '@Application/modals/input_forms/generic_ck_editor_modal.html.twig' %}
<!--end #base-->
<!-- END BASE -->
{% include '@Application/footer/footer_js_codecovers.html.twig' %}
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.min.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.time.min.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.resize.min.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.orderBars.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/jquery.flot.pie.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/flot/curvedLines.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/jquery-knob/jquery.knob.min.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/sparkline/jquery.sparkline.min.js"></script>
{#<script src="codecovers/assets/js/modules/materialadmin/libs/nanoscroller/jquery.nanoscroller.min.js"></script>#}
<script src="codecovers/assets/js/modules/materialadmin/libs/d3/d3.min.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/d3/d3.v3.js"></script>
<script src="codecovers/assets/js/modules/materialadmin/libs/rickshaw/rickshaw.min.js"></script>
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/App.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppNavigation.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppOffcanvas.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppCard.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppForm.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppNavSearch.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/source/AppVendor.js"></script>#}
{#<script src="codecovers/assets/js/modules/materialadmin/core/demo/Demo.js"></script>#}
<script src="codecovers/assets/js/modules/materialadmin/core/demo/DemoDashboard.js"></script>
{% include '@Application/modals/input_forms/add_payment.html.twig' %}
{% include '@Application/modals/input_forms/add_expense.html.twig' %}
{% include '@Application/modals/input_forms/add_receipt.html.twig' %}
{% include '@Application/codecovers_footer.html.twig' %}
<script src="{{ absolute_url(path('dashboard')) }}js/Chart.js"></script>
<script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/raphael/raphael.min.js"></script>
<script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/morrisjs/morris.js"></script>
<script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/jquery-countto/jquery.countTo.js"></script>
<link rel="stylesheet" type="text/css"
href="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/waitme/waitMe.css"/>
<script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/waitme/waitMe.js"></script>
<script src="{{ absolute_url(path('dashboard')) }}condensed_assets/dashboard_functions.js"></script>
<script>
{#var summary_data={{ ''|getMonthlySummary|json_encode|raw() }}#}
var summary_data ={{ monthly_summary_data|json_encode|raw() }}
var dashboardDataForUser ={{ dashboardDataForUser|json_encode|raw() }}
{#var summary_data={{ ''|getMonthlySummary }}#}
var areaChartData = {
// labels: ["January", "February", "March", "April", "May", "June", "July"],
labels: summary_data.monthList,
datasets: [
{
label: "Monthly Growth",
borderColor: 'rgba(255,255,255, 0.75)',
backgroundColor: 'rgba(255, 114, 84, 0.2)',
pointBorderColor: 'rgba(255, 188, 212, 0)',
pointBackgroundColor: 'rgba(255, 188, 212, 0.9)',
pointBorderWidth: 1,
// data: [65, 59, 80, 81, 56, 55, 40]
data: summary_data.monGrowth
},
// {
// label: "Expense",
// fillColor: "rgba(60,141,188,0.9)",
// strokeColor: "rgba(60,141,188,0.8)",
// pointColor: "#3b8bba",
// pointStrokeColor: "rgba(60,141,188,1)",
// pointHighlightFill: "#fff",
// pointHighlightStroke: "rgba(60,141,188,1)",
//// data: [28, 48, 40, 19, 86, 27, 90]
// data: summary_data.expense
// }
]
};
var barChartData = {
// labels: ["January", "February", "March", "April", "May", "June", "July"],
labels: summary_data.monthList,
datasets: [
{
label: "Revenue",
borderColor: 'rgba(255,255,255, 0.75)',
backgroundColor: 'rgba(1, 114, 84, 0.8)',
pointBorderColor: 'rgba(0, 188, 212, 0)',
pointBackgroundColor: 'rgba(0, 188, 212, 0.9)',
pointBorderWidth: 1,
// data: [65, 59, 80, 81, 56, 55, 40]
data: summary_data.revenue
},
{
label: "Expense",
borderColor: 'rgba(0, 188, 212, 0.75)',
backgroundColor: 'rgba(217, 41, 41, 0.8)',
pointBorderColor: 'rgba(0, 188, 212, 0)',
pointBackgroundColor: 'rgba(0, 188, 212, 0.9)',
pointBorderWidth: 1,
// data: [28, 48, 40, 19, 86, 27, 90]
data: summary_data.expense
}
]
};
var loading_by_id = [];
var box_data =
{
info: {
name: 'Sales Report',
reportType: 'sales_by_client',
reportSeparator: 1
},
functionSettings: {
reportGenerator: 'SalesReport', //function name
route: 'sales_report', //post route
},
querySettings: {
filterData: {
//variables and values here
clientId: [],
clientTypeId: [],
salesPersonId: [],
supervisorId: [],
regionLevelId: [],
regionId: [],
geographicalRegionLevelId: [],
geographicalRegionId: []
},
columnSelector: ['invoice_amount'],
// columnSelector: ['invoice_amount','received_amount',],
// columnSelector: ['invoice_amount','due_amount','received_amount','order_amount'],
nonUniqueColumnSelector: [],
periodData: {
// type: '_during_', //_during_, _by_chunk_, _quarterly_, _weekly_,_monthly_,_yearly_,_last_month_,_last_year_,_today_,_yesterday_ etc
type: '_by_chunk_', //_during_, _by_chunk_, _quarterly_, _weekly_,_monthly_,_yearly_,_last_month_,_last_year_,_today_,_yesterday_ etc
startDate: '',
endDate: '{{ ''|date('Y-m-d') }}',
periodSeparator: '_month_',// like _month_ _year_ _quarterly
periodValue: 12, // for by chunks
periodValueType: '_month_' // for by chunks _month_ , _year_ etc ( eg. 3 months)
}
},
//query Output
queryOutput: {},
queryColumnAdditionalData: {},
periodSeparatorColumnData: {},
queryUniqueColumn: '',
queryUniqueField: '',
//data for renderer
rendererSettings: {},
result: {},
output: {
format: [
{
type: 'list',
subType: 'table'
},
{
type: 'chart',
subType: 'bar'
}
], //or chart or infobox
data: [],
type: 'dashboard',//or print or dashboard
generateRowDiv: 0,
generateColDiv: 0,
generateCardDiv: 0,
rowDivClass: '',
colDivClass: 'col-lg-3 col-md-3 col-sm-12 col-xs-12',
cardDivClass: '',
divUniqueId: '1009' /// card id will be report_card_1009, col id will be report_col_1009 row will be row_1009
},
refreshInterval: 0
};
var last_report_list_index = 0;
function load_data_box() {
if (typeof dashboardDataForUser[last_report_list_index] === 'undefined')
return;
var reportConfig = dashboardDataForUser[last_report_list_index].widgetData;
// loading_by_id[reportConfig.output.divUniqueId] = $('#report_card_' + reportConfig.output.divUniqueId).waitMe({
// effect: 'timer',
// text: 'Loading...',
// bg: 'rgba(255,255,255,0.90)',
// color: '#555'
// });
// console.log(reportConfig)
jQuery.post(BaseURL + "sales_report", {
// pids: ServiceIDs
reportConfig: reportConfig,
returnJson: 1,
}, function (data) {
// console.log(data);
var gottenReportConfig = data.reportConfig;
var div_unique_id = gottenReportConfig.output.divUniqueId;
var report_title = gottenReportConfig.output.title;
var report_type_title = gottenReportConfig.output.reportTypeTitle;
var report_period_title = gottenReportConfig.output.periodTitle;
$('#report_body_' + div_unique_id).html(data.renderedReport);
$('#report_type_title_' + div_unique_id).text(report_type_title);
// console.log($('#report_period_title_' + div_unique_id).html())
// console.log($('#report_period_title_' + div_unique_id).text())
$('#report_period_title_' + div_unique_id).text(report_period_title);
// console.log(report_period_title)
loading_by_id[div_unique_id].waitMe('hide');
// // console.log('#report_body_' + div_unique_id +'.scroll')
// // console.log($('#report_body_' + div_unique_id +'.scroll'))
materialadmin.AppVendor.addScroller($('#report_body_' + div_unique_id + '.scroll'));
// $('#report_body_' + div_unique_id +'.scroll').nanoScroller();
//now load next report
last_report_list_index++;
load_data_box();
if (gottenReportConfig.refreshInterval != 0) {
// alert(gottenReportConfig.refreshInterval)
// setTimeout(function(gottenReportConfig) { load_data_box(gottenReportConfig); }, 1*gottenReportConfig.refreshInterval);
// setTimeout(load_data_box(gottenReportConfig), 60000);
}
});
}
function check_and_generate_dashboard_report() {
var mother_div = $('#report_mother_div');
var unique_id = '112'
for (var j = 0; j < dashboardDataForUser.length; j++) {
var div_unique_id = unique_id + '_' + j;
// alert(div_unique_id)
//create the col and card
//data-loading-effect="timer"
var sizeTiny = 1 * dashboardDataForUser[j].widgetSizeTiny;
var sizeSmall = 1 * dashboardDataForUser[j].widgetSizeSmall;
var sizeMedium = 1 * dashboardDataForUser[j].widgetSizeMedium;
var sizeLarge = 1 * dashboardDataForUser[j].widgetSizeLarge;
// alert(sizeMedium)
var sizestr = '';
sizestr += sizeTiny > 0 ? (' col-xs-' + sizeTiny) : '';
sizestr += sizeSmall > 0 ? (' col-sm-' + sizeSmall) : '';
sizestr += sizeMedium > 0 ? (' col-md-' + sizeMedium) : '';
sizestr += sizeLarge > 0 ? (' col-lg-' + sizeLarge) : '';
if (sizestr == '')
sizestr = "col-lg-3 col-md-3 col-sm-6 col-xs-12";
// alert(sizestr)
var html = '<div class="' + sizestr + '" id="report_col_' + div_unique_id + '" > <div class="card " id="report_card_' + div_unique_id + '">' +
'<div class="header style-primary-dark">' +
'<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>' +
' <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>' +
// '<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>' +
'</div>' +
'<div class="body height-8 scroll style-default-bright" id="report_body_' + div_unique_id + '">' +
'</div>' +
'</div>' +
'</div>';
mother_div.append(html);
var reportConfig = dashboardDataForUser[j].widgetData;
reportConfig.output.divUniqueId = div_unique_id;
reportConfig.refreshInterval = dashboardDataForUser[j].refreshInterval;
dashboardDataForUser[j].widgetData = reportConfig;
loading_by_id[reportConfig.output.divUniqueId] = $('#report_card_' + reportConfig.output.divUniqueId).waitMe({
effect: 'timer',
text: 'Loading...',
bg: 'rgba(255,255,255,0.90)',
color: '#555'
});
// load_data_box(reportConfig);
}
last_report_list_index = 0;
load_data_box();
}
function abbreviateNumber(number) {
var SI_POSTFIXES = ["", "k", "M", "G", "T", "P", "E"];
var tier = Math.log10(Math.abs(number)) / 3 | 0;
if (tier == 0) return number;
var postfix = SI_POSTFIXES[tier];
var scale = Math.pow(10, tier * 3);
var scaled = number / scale;
var formatted = scaled.toFixed(1) + '';
if (/\.0$/.test(formatted))
formatted = formatted.substr(0, formatted.length - 2);
return formatted + postfix;
}
jQuery(document).ready(function () {
// materialadmin.DemoDashboard._initSparklines();
// materialadmin.DemoDashboard._initFlotVisitors();
//this._generateFlotChart();
// materialadmin.DemoDashboard._initRickshaw();
materialadmin.DemoDashboard._initKnob();
// materialadmin.DemoDashboard._initFlotRegistration();
materialadmin.App.callOnResize(function () {
var options = $('.revenue-tm-sparkline').data();
options.type = 'line';
options.width = '100%';
options.height = $('.revenue-tm-sparkline').height() + 'px';
options.fillColor = false;
$('.revenue-tm-sparkline').sparkline(summary_data.revenue, options);
});
materialadmin.App.callOnResize(function () {
var options = $('.nw-tm-sparkline').data();
options.type = 'line';
options.width = '100%';
options.height = $('.nw-tm-sparkline').height() + 'px';
options.fillColor = false;
$('.nw-tm-sparkline').sparkline(summary_data.netWorth, options);
});
materialadmin.App.callOnResize(function () {
var options = $('.mg-tm-sparkline').data();
options.type = 'line';
options.width = '100%';
options.height = $('.mg-tm-sparkline').height() + 'px';
options.fillColor = false;
$('.mg-tm-sparkline').sparkline(summary_data.monGrowth, options);
});
// console.log(summary_data.tsCommaRevenue)
// console.log(JSON.stringify(summary_data.tsCommaRevenue))
// console.log(summary_data.tsCommaExpense)
// console.log(JSON.stringify(summary_data.tsCommaExpense))
var chart_obj = $('#rev_exp_chart')
var labelColor = chart_obj.css('color');
materialadmin.DemoDashboard._generateFlotChart('#rev_exp_chart',
[
{
label: 'Revenue',
data: summary_data.tsCommaRevenue,
last: true
},
{
label: 'Expense',
data: summary_data.tsCommaExpense,
last: true
}
],
{
colors: chart_obj.data('color').split(','),
series: {
shadowSize: 0,
lines: {
show: true,
lineWidth: false,
fill: true
},
curvedLines: {
apply: true,
active: true,
monotonicFit: false
}
},
legend: {
container: $('#rev_exp_chart_legend')
},
xaxis: {
mode: "time",
// timeformat: "%d %b",
timeformat: "%b",
font: {color: labelColor}
},
yaxis: {
font: {color: labelColor}
},
grid: {
borderWidth: 0,
color: labelColor,
hoverable: true
}
}
);
// generate_cash_bank_rickshaw_chart([summary_data.tsCommaCashObj, summary_data.tsCommaBankObj])
{#generate_cash_bank_rickshaw_chart([{{ so_count_details.soCountRickshawData|json_encode|raw }}])#}
generate_cash_bank_rickshaw_chart({{ so_count_details.soCountRickshawData|json_encode|raw }})
// var chart_obj=$('#cashRickshawGraph')
// var labelColor = chart_obj.css('color');
// materialadmin.DemoDashboard._generateFlotChart('#cashRickshawGraph',
// [
// {
// label: 'Cash',
// data: summary_data.tsCommaCash,
// last: true
// },
// {
// label: 'Bank',
// data: summary_data.tsCommaBank,
// last: true
// }
// ],
// {
// colors: chart_obj.data('color').split(','),
// series: {
// shadowSize: 0,
// lines: {
// show: true,
// lineWidth: false,
// fill: true
// },
// curvedLines: {
// apply: true,
// active: true,
// monotonicFit: false
// }
// },
// legend: {
// show:false,
//// container: $('#rev_exp_chart_legend')
// },
// xaxis: {
// mode: "time",
// show:false,
//// timeformat: "%d %b",
// tickLength:0,
// timeformat: "%b",
// font: {color: labelColor}
// },
// yaxis: {
// font: {color: labelColor},
// tickLength:0,
// show:false,
// },
// grid: {
// borderWidth: 0,
// color: labelColor,
// hoverable: true
// }
// }
// );
$(document).on('click', '#report_mother_div .card .header .tools .btn-refresh', function (e) {
var card = $(e.currentTarget).closest('.card');
materialadmin.AppCard.addCardLoader(card);
setTimeout(function () {
materialadmin.AppCard.removeCardLoader(card);
}, 1500);
});
$(document).on('click', '#report_mother_div .card .header .tools .btn-collapse', function (e) {
var card = $(e.currentTarget).closest('.card');
materialadmin.AppCard.toggleCardCollapse(card);
});
$(document).on('click', '#report_mother_div .card .header .tools .btn-close', function (e) {
var card = $(e.currentTarget).closest('.card');
materialadmin.AppCard.removeCard(card);
});
$(document).on('click', '#report_mother_div .card .header .tools .menu-card-styling a', function (e) {
// o._handleCardStyling(e);
});
$(document).ajaxStart(function () {
//$( ".log" ).text( "Triggered ajaxStart handler." );
$("#ajax_loader_here").show();
});
$(document).ajaxComplete(function () {
//$( ".log" ).text( "Triggered ajaxStart handler." );
$("#ajax_loader_here").hide();
});
$('.pending_task_trigger').click(function () {
// $('.pending_task_div').show('slow')
$('.pending_task_div').toggle('slow')
})
$('.count-to').countTo(
);
$('.count-to-amount').countTo(
{
formatter: function (value, options) {
// value=value.split('৳')[1];
// return '৳' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ',');
// // console.log(value)
// // console.log('৳' + value.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'))
// return '৳' + value.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
// return '৳ ' + abbreviateNumber(value.toFixed(0));
return abbreviateNumber(value.toFixed(0));
}
}
);
$('.count-to-percentage').countTo(
{
formatter: function (value, options) {
// value=value.split('৳')[1];
// return '৳' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ',');
// // console.log(value)
// // console.log('৳' + value.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'))
// return '৳' + value.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
// return '৳ ' + abbreviateNumber(value.toFixed(0));
return abbreviateNumber(value.toFixed(0)) + '%';
}
}
);
//Sales count to
$('.sales-count-to').countTo({
formatter: function (value, options) {
return '$' + value.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ' ').replace('.', ',');
}
});
// setTimeout(check_and_generate_dashboard_report, 5000);
check_and_generate_dashboard_report();
})
//// console.log(JSON.stringify(box_data))
</script>
{% verbatim %}
<script>
$(function () {
function initDonutChart() {
window.my_don = Morris.Donut({
element: 'donut_chart',
data: [{
label: 'ASSET',
value: summary_data.assetPercentage
}, {
label: 'LIABILITY',
value: summary_data.liabilityPercentage
}, {
label: 'INCOME',
value: summary_data.incomePercentage
}, {
label: 'EXPENSE',
value: summary_data.expensePercentage
}
],
colors: ['rgb(233, 30, 99)', 'rgb(0, 188, 212)', 'rgb(255, 152, 0)', 'rgb(0, 150, 136)'],
formatter: function (y) {
return y + '%'
},
resize: true
});
$(window).on("resize", function () {
my_don.redraw();
});
}
initDonutChart()
function getChartJs(type) {
var config = null;
if (type === 'line') {
config = {
type: 'line',
data: areaChartData,
options: {
responsive: true,
legend: {
display: true,
labels: {
fontColor: '#333'
}
}
}
}
}
else if (type === 'bar') {
// console.log(barChartData)
config = {
type: 'bar',
data: barChartData,
options: {
responsive: true,
legend: {
display: true,
labels: {
fontColor: '#333'
}
}
}
}
}
else if (type === 'radar') {
config = {
type: 'radar',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: "My First dataset",
data: [65, 25, 90, 81, 56, 55, 40],
borderColor: 'rgba(0, 188, 212, 0.8)',
backgroundColor: 'rgba(0, 188, 212, 0.5)',
pointBorderColor: 'rgba(0, 188, 212, 0)',
pointBackgroundColor: 'rgba(0, 188, 212, 0.8)',
pointBorderWidth: 1
}, {
label: "My Second dataset",
data: [72, 48, 40, 19, 96, 27, 100],
borderColor: 'rgba(233, 30, 99, 0.8)',
backgroundColor: 'rgba(233, 30, 99, 0.5)',
pointBorderColor: 'rgba(233, 30, 99, 0)',
pointBackgroundColor: 'rgba(233, 30, 99, 0.8)',
pointBorderWidth: 1
}]
},
options: {
responsive: true,
legend: false
}
}
}
else if (type === 'pie') {
config = {
type: 'pie',
data: {
datasets: [{
data: [225, 50, 100, 40],
backgroundColor: [
"rgb(233, 30, 99)",
"rgb(255, 193, 7)",
"rgb(0, 188, 212)",
"rgb(139, 195, 74)"
],
}],
labels: [
"Pink",
"Amber",
"Cyan",
"Light Green"
]
},
options: {
responsive: true,
legend: false
}
}
}
return config;
}
new Chart($("#areaChart").get(0).getContext("2d"), getChartJs('line'));
// new Chart($("#barChart").get(0).getContext("2d"), getChartJs('bar'));
//following is for load in single page now only works perfectly with sale sinvoice. will work on it later
// $('a').click(function(e){
// $( "#test_ajax_loader").hide();
//
//
// if(($(this).attr('href')).indexOf('#')!=-1)
// {
//
//// e.preventDefault();
//// alert("ache");
//// // console.log(abc.indexOf('#'))
// }
// else
// {
//// alert("nai")
// e.preventDefault();
// $( "#test_ajax_loader" ).load( $(this).attr('href')+'?include_html=0', function() {
// alert(ACTIVE_ROUTE)
//// $('#test_ajax_loader input[type="text"]').trigger('change')
// $.AdminBSB.input.activate();
// generic.init()
//
// $( "#test_ajax_loader").show();
//
// });
// window.history.pushState("", "", $(this).attr('href'));
//
//
//// window.location.href.replace($(this).attr('href'));
//
// }
//
// })
// // console.log('MATHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
// console.log(materialadmin.DemoDashboard)
});
</script>
{% endverbatim %}