maintenances batchcard issues fixes and cashbook report
This commit is contained in:
parent
29d3645d64
commit
bd936e04da
@ -718,6 +718,7 @@ class batchcard extends BaseController
|
||||
|
||||
function addMaint(){
|
||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||
$data['supplist'] = $this->batchcard_model->getSupplierlist();
|
||||
$data['MachineList'] = $this->batchcard_model->getmachine_codename();
|
||||
$this->global['pageTitle'] = 'Siddharth : Add Maintenance/Breakdown';
|
||||
$this->loadViews("BatchcardMaintAdd", $this->global,$data,NULL);
|
||||
@ -863,7 +864,7 @@ class batchcard extends BaseController
|
||||
// $date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
// $updatedon = $date->format('d-m-Y H:i:s');
|
||||
|
||||
$editmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Subtype'=>$maintenance_subtype,'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'UpdatedBy'=>$updatedby);
|
||||
$editmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Supplier'=>$supplier,'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'UpdatedBy'=>$updatedby);
|
||||
//'Maint_Date'=>$maintenance_date,'Maint_Time'=>$maintenance_time,
|
||||
//print_r($editmntbr);
|
||||
//die();
|
||||
|
||||
@ -1062,44 +1062,118 @@ class report extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function monthexpenses()
|
||||
{
|
||||
// public function monthexpensess()
|
||||
// {
|
||||
|
||||
$this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - ';
|
||||
// $this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - ';
|
||||
|
||||
|
||||
|
||||
$data['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
|
||||
// $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
// $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
|
||||
// // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
|
||||
// $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
|
||||
|
||||
$this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL);
|
||||
// $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL);
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// public function yearexpensess()
|
||||
// {
|
||||
|
||||
// $this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - ';
|
||||
|
||||
// $fyear = $this->input->post('financialyear');
|
||||
|
||||
// $fa=substr( $fyear,0,-5);
|
||||
// $aa=substr( $fyear,5,5);
|
||||
// //echo $fyear;
|
||||
// //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport();
|
||||
// $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
||||
// $data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
|
||||
// //print_r($data['finyear']);
|
||||
// $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
|
||||
|
||||
// $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
||||
|
||||
|
||||
// }
|
||||
public function monthexpenses()
|
||||
{
|
||||
// $this->global['pageTitle'] = 'Cashbook - Cashbook Monthly Reports ';
|
||||
// $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
|
||||
// // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
|
||||
// $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$monthyearvalue = $this->input->post('monthyear');
|
||||
$this->global['pageTitle'] = ' Cashbook - Cashbook Monthly Reports';
|
||||
|
||||
if($monthyearvalue == ''){
|
||||
|
||||
$data['monthyearvalue'] = '';
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$data['monthyearvalue'] = $monthyearvalue;
|
||||
$monthyear = explode("-",$monthyearvalue);
|
||||
|
||||
$month = $monthyear[0];
|
||||
$year = $monthyear[1];
|
||||
|
||||
|
||||
$premonth = $monthyear[0]-1;
|
||||
$premonth = $premonth < 10 ? '0'.$premonth : ''.$premonth;
|
||||
$premonth = $premonth == '00' ? '12' : $premonth;
|
||||
|
||||
$yearvalue = $premonth == '12' ? $year-1 : $year;
|
||||
|
||||
$data['prevmonthtotal']=$this->dahsboard_Model->monthbeforetotal($premonth,$yearvalue);
|
||||
|
||||
//$data['monthlyreport']=$this->dahsboard_Model->month_incexp_report($month,$year);
|
||||
$data['monthlyreport']=$this->dahsboard_Model->monthexpensereport($month,$year);
|
||||
|
||||
}
|
||||
|
||||
$this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function yearexpenses()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - ';
|
||||
// public function yearly_incexp()
|
||||
// {
|
||||
$this->global['pageTitle'] = 'Cashbook - Cashbook Yearly Reports';
|
||||
|
||||
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
|
||||
|
||||
$fyear = $this->input->post('financialyear');
|
||||
$fyear = $this->input->post('financialyear');
|
||||
|
||||
if($fyear ==''){
|
||||
|
||||
$data['fyears'] = '';
|
||||
|
||||
}else{
|
||||
|
||||
$data['fyears'] = $fyear;
|
||||
//echo $data['fyears'];
|
||||
$fa=substr( $fyear,0,-5);
|
||||
$aa=substr( $fyear,5,5);
|
||||
//echo $fyear;
|
||||
//$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport();
|
||||
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
||||
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
|
||||
//print_r($data['finyear']);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$finyear = explode("-",$fyear);
|
||||
|
||||
$b4oneyear = $finyear[0] -1;
|
||||
$b4twoyear = $finyear[1] -1;
|
||||
|
||||
|
||||
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
||||
|
||||
|
||||
}
|
||||
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
||||
|
||||
$data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($b4oneyear,$b4twoyear);
|
||||
|
||||
|
||||
//$this->loadviews("cashbookyearlyreport",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
||||
}
|
||||
public function cashbookdepartment()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
@ -1157,7 +1231,11 @@ class report extends BaseController
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
||||
$data['tdy']=$this->dahsboard_Model->today();
|
||||
//print_r($data['tdy']);
|
||||
$now = new DateTime();
|
||||
$currentdate = $now->format('Y-m-d'); // MySQL datetime format
|
||||
$yesterday = date('Y-m-d', strtotime("-1 day"));
|
||||
|
||||
$data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbooktoday",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
@ -2221,7 +2221,7 @@ if ($cname!= ''){
|
||||
return $query->result();
|
||||
}
|
||||
//home --this month//
|
||||
function monthexpensereport()
|
||||
function monthexpensereport($month,$year)
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
@ -2240,7 +2240,8 @@ if ($cname!= ''){
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
tinc.total,tinc.towhom,tinc.description,monthname(tinc.date)as month,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where month(tinc.date)= month(current_date())group by tinc.account_code";
|
||||
tinc.total,tinc.towhom,tinc.description,monthname(tinc.date)as month,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where month(tinc.date)= ".$month." and year(tinc.date)=".$year." group by tinc.account_code";
|
||||
//tinc.total,tinc.towhom,tinc.description,monthname(tinc.date)as month,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where month(tinc.date)= month(current_date())group by tinc.account_code";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
@ -2254,7 +2255,8 @@ if ($cname!= ''){
|
||||
sum(total) as total
|
||||
from t_income_expense
|
||||
where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
|
||||
group by month ";
|
||||
group by month
|
||||
ORDER BY FIELD(month,'April','May','June','July','August','September','October','November','December','January', 'February', 'March') ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
@ -1,167 +1,202 @@
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
$monthyr = '';
|
||||
$mthyr = '' ;
|
||||
$monthNum = '' ;
|
||||
$yearNum = '';
|
||||
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
|
||||
|
||||
if(!empty($monthlyreport))
|
||||
{
|
||||
|
||||
}
|
||||
if(!empty($monthlyincreport))
|
||||
{
|
||||
if(!empty($prevmonthtotal))
|
||||
{
|
||||
foreach ($prevmonthtotal as $prevttl){
|
||||
|
||||
// $payamt = $prevmonthtotal[0]->payment_amt;
|
||||
$payamt = $prevttl->payment_amt;
|
||||
// $recamt = $prevmonthtotal[0]->receipt_amt;
|
||||
$recamt = $prevttl->receipt_amt;
|
||||
}}
|
||||
if(!empty($monthyearvalue))
|
||||
{
|
||||
$monthyr = explode("-",$monthyearvalue);
|
||||
$monthNum = $monthyr[0];
|
||||
$yearNum = $monthyr[1];
|
||||
$dateObj = DateTime::createFromFormat('!m', $monthNum);
|
||||
$monthName = $dateObj->format('F');
|
||||
}
|
||||
// $inrsymbol='';
|
||||
// if(!empty($Indiancurrency))
|
||||
// {
|
||||
// foreach ($Indiancurrency as $inr)
|
||||
// {
|
||||
// $inrsymbol = $inr->FontCode2000;
|
||||
// }}
|
||||
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
float: right;
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
.ui-datepicker-calendar {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
var d = new Date();
|
||||
|
||||
//var month = d.getMonth();
|
||||
var month = d.getMonth() + 1;
|
||||
month = month < 10 ? '0' + month : '' + month;
|
||||
var day = d.getDate();
|
||||
var year = d.getFullYear() ;
|
||||
var SIAStartYear = year - 2015;
|
||||
var mindt = year-70;
|
||||
var maxdt = year-15;
|
||||
|
||||
|
||||
$('#monthyear').datepicker( {
|
||||
//minDate : new Date(year-SIAStartYear,0,1),
|
||||
//maxDate :'now',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
showButtonPanel: true,
|
||||
dateFormat: 'mm-yy',
|
||||
onClose: function(dateText, inst) {
|
||||
$(this).datepicker('setDate', new Date(inst.selectedYear, inst.selectedMonth, 1));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="container-fluid">
|
||||
<div class="box-header">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report <?php if($monthyr != ''){ echo '('.$monthName.'-'.$yearNum.')'; } else { echo ''; }//<?php ($month=date('F');echo $month;)?></b></p></h3></center>
|
||||
<!-- <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-md-offset-6">
|
||||
<center>
|
||||
<!-- <div class="panel-body"> -->
|
||||
|
||||
<form role="form" id="monthlycashbook" action="<?php echo base_url() ?>report/monthexpenses" method="post" enctype="multipart/form-data">
|
||||
<div class="col-md-8">
|
||||
<label for="monthyear">Month year : </label><span style="color:red" ><?php echo '*' ?></span>
|
||||
<?php if($monthyearvalue !=''){?>
|
||||
<input name="monthyear" id="monthyear" class="date-picker" value="<?php echo $monthyearvalue; ?>"/>
|
||||
<?php } else{ ?>
|
||||
<input name="monthyear" id="monthyear" class="date-picker"/>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" class="btn btn-success" id="monthly" name="btn_submit" value="View Report">
|
||||
</div>
|
||||
</form>
|
||||
<!-- </div> -->
|
||||
</center>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table id="cbmthly" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||
<th style="text-align:right;"> Current Balances(<i class="fa fa-rupee ">)</th>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<!--<th>Received From</th>
|
||||
<th>Paid To</th>-->
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($monthlyreport)){
|
||||
foreach($monthlyreport as $mr)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>&c=<?php echo $mr->type?>"><span><?php echo $mr->name?></span></a></td>
|
||||
<td align="left"><span><?php echo $mr->type?></span></td>
|
||||
<!--<td align="left"><span><?php echo $mr->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $mr->paymentname?></span></td>-->
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($mr->income,2,'.','');
|
||||
echo number_format($mr->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($mr->expense,2,'.','');
|
||||
echo number_format($mr->expense,2,'.','');?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Previous Month Balance(Opening Balances)</strong></td>
|
||||
<td> </td>
|
||||
<?php $in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','') ?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($monthlyreport)){
|
||||
foreach($monthlyreport as $mr)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>&c=<?php echo $mr->type?>"><span><?php echo $mr->name?></span></a></td>
|
||||
<td align="left"><span><?php echo $mr->type?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($mr->income,2,'.','');
|
||||
echo number_format($mr->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($mr->expense,2,'.','');
|
||||
echo number_format($mr->expense,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($ti,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($tvt,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Current Month Closing Balances</strong></td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
@ -170,34 +205,42 @@ if(!empty($monthlyincreport))
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
table = $('#cbmthly').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
"bSort": false,
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
$('#monthly').click(function() {
|
||||
|
||||
if($("#monthyear").val().length < 1)
|
||||
{
|
||||
alert('Please Select/Choose Month Year');
|
||||
$("#monthyear").focus();
|
||||
return false;
|
||||
}
|
||||
//alert('finished');
|
||||
});
|
||||
</script>
|
||||
@ -1,12 +1,22 @@
|
||||
|
||||
<?php
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
$strdayttl = '';
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
// [date] => 2018-02-21 [payment_amt] => 0 [receipt_amt] => 13 ) )
|
||||
if(!empty($yesterdaytotal))
|
||||
{
|
||||
foreach ($yesterdaytotal as $ttl)
|
||||
{
|
||||
$strdayttl = $ttl->date;
|
||||
$payamt = $ttl->payment_amt;
|
||||
$recamt = $ttl->receipt_amt;
|
||||
}}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
@ -47,17 +57,30 @@ if(!empty($Indiancurrency))
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th>Type</th>
|
||||
<th>Received From</th>
|
||||
<th>Paid To</th>
|
||||
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||
<th>Description</th>
|
||||
<th>Action</th>
|
||||
<th>Current Balances (₹)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Yesterday Balances (opening balances)</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<?php $in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
@ -99,49 +122,40 @@ if(!empty($Indiancurrency))
|
||||
?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong> <?php echo number_format($ti,2,'.','');?> </strong> </td>
|
||||
<td style="text-align:right"><strong> <?php echo number_format($tvt,2,'.','');?> </strong> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Today Closing Balances</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@ -164,6 +178,7 @@ if(!empty($Indiancurrency))
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
"bSort": false,
|
||||
buttons: [
|
||||
|
||||
{
|
||||
|
||||
@ -1,24 +1,38 @@
|
||||
<?php
|
||||
$inrsymbol='';
|
||||
$finyear ='';
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
//print_r($fyears);
|
||||
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
}}
|
||||
|
||||
|
||||
if(!empty($b4finyeartotal)){
|
||||
foreach ($b4finyeartotal as $prevttl)
|
||||
{
|
||||
//$payamt = $b4finyeartotal[0]->payment_amt;
|
||||
//$recamt = $b4finyeartotal[0]->receipt_amt;
|
||||
$payamt = $prevttl->payment_amt;
|
||||
$recamt = $prevttl->receipt_amt;
|
||||
}}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
foreach($financialyear as $item)
|
||||
|
||||
{
|
||||
$finyear = $item->financial_year;
|
||||
|
||||
} ?>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
@ -31,6 +45,7 @@ foreach($financialyear as $item)
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
@ -43,171 +58,163 @@ foreach($financialyear as $item)
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(<?php echo $finyear?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-md-offset-6">
|
||||
|
||||
<center>
|
||||
<div class="panel-body">
|
||||
<form method="post" action=" ">
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value="">Select Year</option>
|
||||
<?php
|
||||
foreach($financialyear as $item):
|
||||
|
||||
{?>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="container-fluid">
|
||||
<div class="box-header">
|
||||
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Year Report <?php if(!empty ($fyears) ){
|
||||
echo '('.$fyears.')'; }
|
||||
else { echo ''; }//echo $finyear?></b></p></h3></center>
|
||||
|
||||
<!-- <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report <?php if($monthyr != ''){ echo '('.$monthName.'-'.$yearNum.')'; } else { echo ''; }//<?php ($month=date('F');echo $month;)?></b></p></h3></center> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-md-offset-6">
|
||||
<center>
|
||||
<!-- <div class="panel-body"> -->
|
||||
<form method="post" action="<?php echo base_url() ?>report/yearexpenses">
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value=" ">Select Year</option>
|
||||
<?php
|
||||
foreach($financialyear as $item):
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" class="btn btn-success" id="year" name="btn_submit" value="View Report">
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" class="btn btn-success" id="yearly" name="btn_submit" value="View Report">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th>Month</th>
|
||||
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($yearlyreport)){
|
||||
foreach($yearlyreport as $yr)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<!--<td><span><?php echo $yr->date?></span></td>-->
|
||||
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
|
||||
<!--<td align="left"><span><?php echo $yr->type?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($yr->inc,2,'.','');
|
||||
echo number_format($yr->inc,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($yr->exp,2,'.','');
|
||||
echo number_format($yr->exp,2,'.','');?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<!-- </div> -->
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table id="yearlypayment" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Month</th>
|
||||
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||
<th>Current Balances (<i class="fa fa-rupee ">)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
<td style="text-align:left;"><strong>Previous Year Balance(opening balances)</strong></td>
|
||||
<?php $in = $recamt-$payamt;?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','') ?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($yearlyreport)){
|
||||
foreach($yearlyreport as $yr)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($yr->inc,2,'.','');
|
||||
echo number_format($yr->inc,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($yr->exp,2,'.','');
|
||||
echo number_format($yr->exp,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<!-- <td> </td> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td style="text-align:right"><strong> <?php echo number_format($ti,2,'.','');?> </strong> </td>
|
||||
<td style="text-align:right"><strong> <?php echo number_format($tvt,2,'.','');?> </strong> </td>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Current Year Closing Balances</strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- content-wrapper -->
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
|
||||
table = $('#yearlypayment').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
"bSort": false,
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
|
||||
} );
|
||||
<?php if(!empty ($fyears) ){ ?>
|
||||
$('#financialyear option[value="<?php echo $fyears ?>"]').attr("selected", "selected");
|
||||
<?php } ?>
|
||||
} );
|
||||
|
||||
|
||||
$('#yearly').click(function() {
|
||||
if($("option:selected", $("#financialyear")).val() == " ")
|
||||
{
|
||||
alert('Please Select/Choose Financial year ');
|
||||
$("#financialyear").focus();
|
||||
return false;
|
||||
}
|
||||
//alert('finished');
|
||||
});
|
||||
//
|
||||
|
||||
</script>
|
||||
|
||||
@ -53,8 +53,8 @@ if(!empty($Indiancurrency))
|
||||
<th>Paid Type</th>
|
||||
<!--<th>Received From</th>
|
||||
<th>Paid To</th>-->
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||
|
||||
<!--<th>Description</th>-->
|
||||
|
||||
@ -168,7 +168,5 @@ $(document).ready(function() {
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -10,7 +10,12 @@ $month_in='';
|
||||
$month_ex='';
|
||||
$year_in='';
|
||||
$year_ex='';
|
||||
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
|
||||
if(!empty($todayincome))
|
||||
{
|
||||
foreach ($todayincome as $ti)
|
||||
@ -58,6 +63,8 @@ if(!empty($yesterdaytotal))
|
||||
{
|
||||
$strdaydate = $ttl->date;
|
||||
$strday_balances = ($ttl->payment_amt)-($ttl->receipt_amt);
|
||||
$payamt = $ttl->payment_amt;
|
||||
$recamt = $ttl->receipt_amt;
|
||||
}
|
||||
}
|
||||
if(!empty($prevmonthtotal))
|
||||
@ -72,7 +79,6 @@ if(!empty($b4finyeartotal)){
|
||||
$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@ -111,8 +117,8 @@ if(!empty($b4finyeartotal)){
|
||||
<!-- Main content -->
|
||||
<section>
|
||||
<!-- Info boxes -->
|
||||
<center>
|
||||
<div class="col-md-12">
|
||||
<center>
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- fix for small devices only -->
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
@ -120,7 +126,7 @@ if(!empty($b4finyeartotal)){
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red" style="height: 117px;padding: 35px;width: 120px;"><i class="fa fa-hourglass-end"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number" ><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's payments" ><?php echo "Today" ?></a></span>
|
||||
<span class="info-box-number" ><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's Cashbook Report" ><?php echo "Today" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($strday_balances,2,'.',''); ?> </span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><i class="fa fa-rupee "></i><?php echo number_format($today_in,2,'.',''); ?> </span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($today_ex,2,'.',''); ?> </span>
|
||||
@ -135,7 +141,7 @@ if(!empty($b4finyeartotal)){
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua" style="height: 117px;padding: 35px;width: 120px;"><i<i class="fa fa-spinner"></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "This Month" ?></a></span>
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly Cashbook Report"><?php echo "This Month" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($premonth_balances,2,'.',''); ?> </span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><i class="fa fa-rupee "></i><?php echo number_format($month_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($month_ex,2,'.',''); ?></span>
|
||||
@ -150,7 +156,7 @@ if(!empty($b4finyeartotal)){
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green" style="height: 117px;padding: 35px;width: 120px;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly payments"><?php echo "This Year" ?></a></span>
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly Cashbook Report"><?php echo "This Year" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($preyear_balances,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><i class="fa fa-rupee "></i><?php echo number_format($year_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($year_ex,2,'.',''); ?></span>
|
||||
@ -203,10 +209,24 @@ if(!empty($b4finyeartotal)){
|
||||
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||
<th>Description</th>
|
||||
<th>File</th>
|
||||
<th>Current Balances (<i class="fa fa-rupee ">)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Yesterday Balances (opening balances)</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<?php $in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
@ -245,6 +265,7 @@ if(!empty($b4finyeartotal)){
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
@ -252,36 +273,32 @@ if(!empty($b4finyeartotal)){
|
||||
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($ti,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($tvt,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Today Closing Balances</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
@ -293,6 +310,9 @@ if(!empty($b4finyeartotal)){
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -310,24 +330,25 @@ if(!empty($b4finyeartotal)){
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title:$('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
"bSort": false,
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user