551 lines
21 KiB
PHP
551 lines
21 KiB
PHP
<div id="content">
|
|
|
|
<?php echo $this->layout->load_view('layout/alerts'); ?>
|
|
|
|
<!-- <div class="row <?php if (get_setting('disable_quickactions') == 1) echo 'hidden'; ?>">
|
|
<div class="col-xs-12">
|
|
|
|
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
|
|
|
<div class="panel-heading">
|
|
<b><?php _trans('quick_actions'); ?></b>
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-justified no-margin">
|
|
<a href="<?php echo site_url('clients/form'); ?>" class="btn btn-default">
|
|
<i class="fa fa-user fa-margin"></i>
|
|
<span class="hidden-xs"><?php _trans('add_client'); ?></span>
|
|
</a>
|
|
<a href="javascript:void(0)" class="create-quote btn btn-default">
|
|
<i class="fa fa-file fa-margin"></i>
|
|
<span class="hidden-xs"><?php _trans('create_quote'); ?></span>
|
|
</a>
|
|
<a href="javascript:void(0)" class="create-invoice btn btn-default">
|
|
<i class="fa fa-file-text fa-margin"></i>
|
|
<span class="hidden-xs"><?php _trans('create_invoice'); ?></span>
|
|
</a>
|
|
<a href="<?php echo site_url('payments/form'); ?>" class="btn btn-default">
|
|
<i class="fa fa-credit-card fa-margin"></i>
|
|
<span class="hidden-xs"><?php _trans('enter_payment'); ?></span>
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
</style>
|
|
<div class="row">
|
|
|
|
<div class="col-xs-4 col-md-4 col-sm-4">
|
|
|
|
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
|
|
|
<div class="panel-heading">
|
|
<center><b><?php _trans('TODAY'); ?></b></center>
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-justified no-margin">
|
|
|
|
|
|
<center><div>
|
|
<?php
|
|
$d = date('Y-m-d', time());
|
|
foreach($resu as $req)
|
|
{
|
|
|
|
?>
|
|
<a href="<?= site_url() ?>/reports/link_sales?d=<?php echo $d;?>"><span> Invoice Count - <?php echo $req->today; ?> <br> Quantity - <?php echo round($req->sum_of_quan); ?> kgs<br>Value - <i class="fa fa-inr"></i><?php echo format_currency(round($req->sum_of_today)); ?> </span></a>
|
|
<?php
|
|
}
|
|
?>
|
|
</div></center>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-4 col-md-4">
|
|
|
|
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
|
|
|
<div class="panel-heading">
|
|
<center><b><?php _trans('MTD'); ?></b></center>
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-justified no-margin">
|
|
|
|
<center><div>
|
|
|
|
<?php
|
|
$dmon= date('F-Y');
|
|
foreach($result as $val)
|
|
{
|
|
|
|
?>
|
|
<a href="<?= site_url() ?>/reports/link_sales?dmon=<?php echo $dmon;?>"><span> Invoice Count - <?php echo $val->months; ?><br>Quantity - <?php echo round($val->sum_of_quantity); ?> kgs<br>Value - <i class="fa fa-inr"></i><?php echo format_currency(round($val->sum_of_month)); ?> </span></a>
|
|
<?php
|
|
}
|
|
?>
|
|
</div></center>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-4 col-md-4">
|
|
|
|
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
|
|
|
<div class="panel-heading">
|
|
<center><b><?php _trans('YTD'); ?></b></center>
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-justified no-margin">
|
|
<?php
|
|
if (date('m') >= 4) {
|
|
$yearl = date('Y').'-'.(date('Y')+1);
|
|
} else {
|
|
$yearl = (date('Y')-1).'-'.date('Y');
|
|
}
|
|
$ab=$yearl;
|
|
|
|
foreach($res as $val)
|
|
{
|
|
|
|
?>
|
|
|
|
<center><div>
|
|
|
|
|
|
<a href="<?= site_url() ?>/reports/link_sales?ab=<?php echo $ab;?>"><span> Invoice Count - <?php echo $val->year; ?><br>Quantity - <?php echo round($val->sum_of_quantity); ?> kgs<br>Value - <i class="fa fa-inr"></i><?php echo format_currency(round($val->sum_of_year)); ?></span></a>
|
|
|
|
</div></center>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-12">
|
|
|
|
<div id="panel-recent-invoices" class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-history fa-margin"></i> <?php _trans('Today Invoices'); ?></b>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
|
<table class="table table-bordered table-hover" id="tab" style="font-size:11px;">
|
|
<thead>
|
|
<tr style="text-align:center;">
|
|
<th style="min-width: 15%;text-align:center;"><?php _trans('Inv'); ?></th>
|
|
<th style="min-width: 15%;text-align:center;"><?php _trans('Inv Date'); ?></th>
|
|
<th style="min-width: 15%;text-align:center;"><?php _trans('Time'); ?></th>
|
|
<th style="min-width: 15%;text-align:center;"><?php _trans('Vehicle No'); ?></th>
|
|
<th style="min-width: 15%;text-align:center;"><?php _trans('Product'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('client'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('Qty'); ?>(kgs)</th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('Rate'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('Value'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('CGST'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('SGST'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('IGST'); ?></th>
|
|
<th style="min-width: 35%;text-align:center;"><?php _trans('TCS'); ?></th>
|
|
<th style="min-width: 35%;text-align: center;"><?php _trans('Total Value'); ?></th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
$tot_sum = 0;
|
|
$tot_rate = 0;
|
|
$tot_value = 0;
|
|
$tot_CGST = 0;
|
|
$tot_SCGT = 0.0000;
|
|
$tot_ICGT = 0;
|
|
$tot_tot = 0;
|
|
$tot_tcs = 0;
|
|
$SCGT = 0.0000;
|
|
foreach ($results as $result) {
|
|
// print_r($result);
|
|
// print_r('maran'); ?>
|
|
<tr>
|
|
<td><?php echo anchor('invoices/view/' . $result->invoice_id,$result->invoice_number); ?></td>
|
|
|
|
<td><?php
|
|
$d=date("d-m-Y",strtotime($result->invoice_date_created));
|
|
echo $d; ?></td>
|
|
<td><?php
|
|
echo $result->invoice_time_created; ?></td>
|
|
<td style="text-align:left;"><?php
|
|
echo $result->vehicle_no; ?></td>
|
|
<td style="text-align:left;"><?php
|
|
echo $result->product_description; ?></td>
|
|
<td style="text-align:left;"><?php
|
|
echo anchor('clients/view/' . $result->client_id,$result->client_name); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_sum= $tot_sum + round($result->item_quantity);
|
|
echo round($result->item_quantity); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_rate= $tot_rate + $result->item_price;
|
|
echo format_currency($result->item_price); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_value= $tot_value + round($result->item_subtotal);
|
|
echo format_currency(round($result->item_subtotal)); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_CGST= $tot_CGST + round($result->cgst);
|
|
echo format_currency(round($result->cgst)); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_SCGT= $tot_SCGT + round($result->sgst);
|
|
echo format_currency(round($result->sgst)); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_ICGT= $tot_ICGT + round($result->igst);
|
|
echo format_currency(round($result->igst)); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_tcs= $tot_tcs + round($result->tcs);
|
|
echo format_currency(round($result->tcs)); ?></td>
|
|
<td class="amount"><?php
|
|
$tot_tot= $tot_tot + round($result->total);
|
|
echo format_currency(round($result->total)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
</tbody>
|
|
<tfoot width="100%">
|
|
<tr>
|
|
<td colspan="6" style="text-align:center;"><strong>Total</strong></td>
|
|
|
|
<td class="amount"><strong>
|
|
<?php
|
|
{
|
|
echo $tot_sum;
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount"><strong>
|
|
<?php
|
|
{
|
|
//echo format_currency($tot_rate,2,'.','');
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_value);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_CGST);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_SCGT);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_ICGT);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_tcs);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount">
|
|
<strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tot_tot);
|
|
|
|
}
|
|
?>
|
|
</strong></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <div class="row">
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div id="panel-quote-overview" class="panel panel-default overview">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-bar-chart fa-margin"></i> <?php _trans('quote_overview'); ?></b>
|
|
<span class="pull-right text-muted"><?php echo lang($quote_status_period); ?></span>
|
|
</div>
|
|
|
|
<table class="table table-bordered table-condensed no-margin">
|
|
<?php foreach ($quote_status_totals as $total) { ?>
|
|
<tr>
|
|
<td>
|
|
<a href="<?php echo site_url($total['href']); ?>">
|
|
<?php echo $total['label']; ?>
|
|
</a>
|
|
</td>
|
|
<td class="amount">
|
|
<span class="<?php echo $total['class']; ?>">
|
|
<?php echo format_currency($total['sum_total']); ?>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div id="panel-invoice-overview" class="panel panel-default overview">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-bar-chart fa-margin"></i> <?php _trans('invoice_overview'); ?></b>
|
|
<span class="pull-right text-muted"><?php echo lang($invoice_status_period); ?></span>
|
|
</div>
|
|
|
|
<table class="table table-bordered table-condensed no-margin">
|
|
<?php foreach ($invoice_status_totals as $total) { ?>
|
|
<tr>
|
|
<td>
|
|
<a href="<?php echo site_url($total['href']); ?>">
|
|
<?php echo $total['label']; ?>
|
|
</a>
|
|
</td>
|
|
<td class="amount">
|
|
<span class="<?php echo $total['class']; ?>">
|
|
<?php echo format_currency($total['sum_total']); ?>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<?php if (empty($overdue_invoices)) { ?>
|
|
<div class="panel panel-default panel-heading">
|
|
<span class="text-muted"><?php _trans('no_overdue_invoices'); ?></span>
|
|
</div>
|
|
<?php } else {
|
|
$overdue_invoices_total = 0;
|
|
foreach ($overdue_invoices as $invoice) {
|
|
$overdue_invoices_total += $invoice->invoice_balance;
|
|
}
|
|
?>
|
|
<div class="panel panel-danger panel-heading">
|
|
<?php echo anchor('invoices/status/overdue', '<i class="fa fa-external-link"></i> ' . trans('overdue_invoices'), 'class="text-danger"'); ?>
|
|
<span class="pull-right text-danger">
|
|
<?php echo format_currency($overdue_invoices_total); ?>
|
|
</span>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div id="panel-recent-quotes" class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-history fa-margin"></i> <?php _trans('recent_quotes'); ?></b>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-condensed no-margin">
|
|
<thead>
|
|
<tr>
|
|
<th><?php _trans('status'); ?></th>
|
|
<th style="min-width: 15%;"><?php _trans('date'); ?></th>
|
|
<th style="min-width: 15%;"><?php _trans('quote'); ?></th>
|
|
<th style="min-width: 35%;"><?php _trans('client'); ?></th>
|
|
<th style="text-align: right;"><?php _trans('balance'); ?></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($quotes as $quote) { ?>
|
|
<tr>
|
|
<td>
|
|
<span class="label
|
|
<?php echo $quote_statuses[$quote->quote_status_id]['class']; ?>">
|
|
<?php echo $quote_statuses[$quote->quote_status_id]['label']; ?>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<?php echo date_from_mysql($quote->quote_date_created); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo anchor('quotes/view/' . $quote->quote_id, ($quote->quote_number ? $quote->quote_number : $quote->quote_id)); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo anchor('clients/view/' . $quote->client_id, htmlsc(format_client($quote))); ?>
|
|
</td>
|
|
<td class="amount">
|
|
<?php echo format_currency($quote->quote_total); ?>
|
|
</td>
|
|
<td style="text-align: center;">
|
|
<a href="<?php echo site_url('quotes/generate_pdf/' . $quote->quote_id); ?>"
|
|
title="<?php _trans('download_pdf'); ?>" target="_blank">
|
|
<i class="fa fa-file-pdf-o"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td colspan="6" class="text-right small">
|
|
<?php echo anchor('quotes/status/all', trans('view_all')); ?>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if (get_setting('projects_enabled') == 1) : ?>
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div id="panel-projects" class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-list fa-margin"></i> <?php _trans('projects'); ?></b>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-condensed no-margin">
|
|
<thead>
|
|
<tr>
|
|
<th><?php _trans('project_name'); ?></th>
|
|
<th><?php _trans('client_name'); ?></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($projects as $project) { ?>
|
|
<tr>
|
|
<td>
|
|
<?php echo anchor('projects/view/' . $project->project_id, htmlsc($project->project_name)); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo anchor('clients/view/' . $project->client_id, htmlsc(format_client($project))); ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div id="panel-recent-invoices" class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
<b><i class="fa fa-check-square-o fa-margin"></i> <?php _trans('tasks'); ?></b>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-condensed no-margin">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th><?php _trans('status'); ?></th>
|
|
<th><?php _trans('task_name'); ?></th>
|
|
<th><?php _trans('task_finish_date'); ?></th>
|
|
<th><?php _trans('project'); ?></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($tasks as $task) { ?>
|
|
<tr>
|
|
<td>
|
|
<span class="label <?php echo $task_statuses["$task->task_status"]['class']; ?>">
|
|
<?php echo $task_statuses["$task->task_status"]['label']; ?>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<?php echo anchor('tasks/form/' . $task->task_id, htmlsc($task->task_name)) ?>
|
|
</td>
|
|
<td>
|
|
<span class="<?php if ($task->is_overdue) { ?>text-danger<?php } ?>">
|
|
<?php echo date_from_mysql($task->task_finish_date); ?>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<?php echo !empty($task->project_id) ? anchor('projects/view/' . $task->project_id, htmlsc($task->project_name)) : ''; ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<?php endif; ?> -->
|
|
|
|
</div>
|