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(){
|
function addMaint(){
|
||||||
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
$data['emplist'] = $this->batchcard_model->getEmplistforReport();
|
||||||
|
$data['supplist'] = $this->batchcard_model->getSupplierlist();
|
||||||
$data['MachineList'] = $this->batchcard_model->getmachine_codename();
|
$data['MachineList'] = $this->batchcard_model->getmachine_codename();
|
||||||
$this->global['pageTitle'] = 'Siddharth : Add Maintenance/Breakdown';
|
$this->global['pageTitle'] = 'Siddharth : Add Maintenance/Breakdown';
|
||||||
$this->loadViews("BatchcardMaintAdd", $this->global,$data,NULL);
|
$this->loadViews("BatchcardMaintAdd", $this->global,$data,NULL);
|
||||||
@ -863,7 +864,7 @@ class batchcard extends BaseController
|
|||||||
// $date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
// $date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
// $updatedon = $date->format('d-m-Y H:i:s');
|
// $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,
|
//'Maint_Date'=>$maintenance_date,'Maint_Time'=>$maintenance_time,
|
||||||
//print_r($editmntbr);
|
//print_r($editmntbr);
|
||||||
//die();
|
//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['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
|
||||||
// $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
|
// // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
|
||||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
// $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()
|
public function yearexpenses()
|
||||||
{
|
{
|
||||||
|
// public function yearly_incexp()
|
||||||
$this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - ';
|
// {
|
||||||
|
$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);
|
$fa=substr( $fyear,0,-5);
|
||||||
$aa=substr( $fyear,5,5);
|
$aa=substr( $fyear,5,5);
|
||||||
//echo $fyear;
|
$finyear = explode("-",$fyear);
|
||||||
//$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport();
|
|
||||||
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
$b4oneyear = $finyear[0] -1;
|
||||||
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
|
$b4twoyear = $finyear[1] -1;
|
||||||
//print_r($data['finyear']);
|
|
||||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
|
||||||
|
|
||||||
|
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
||||||
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
|
||||||
|
$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()
|
public function cashbookdepartment()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||||
@ -1157,7 +1231,11 @@ class report extends BaseController
|
|||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
||||||
$data['tdy']=$this->dahsboard_Model->today();
|
$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();
|
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||||
$this->loadviews("cashbooktoday",$this->global,$data, NULL);
|
$this->loadviews("cashbooktoday",$this->global,$data, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2221,7 +2221,7 @@ if ($cname!= ''){
|
|||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
//home --this month//
|
//home --this month//
|
||||||
function monthexpensereport()
|
function monthexpensereport($month,$year)
|
||||||
{
|
{
|
||||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||||
ifnull(case
|
ifnull(case
|
||||||
@ -2240,7 +2240,8 @@ if ($cname!= ''){
|
|||||||
when tinc.type = 'RECEIPT'
|
when tinc.type = 'RECEIPT'
|
||||||
then tinc.towhom
|
then tinc.towhom
|
||||||
end, '-') as receiptname,
|
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);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
@ -2254,7 +2255,8 @@ if ($cname!= ''){
|
|||||||
sum(total) as total
|
sum(total) as total
|
||||||
from t_income_expense
|
from t_income_expense
|
||||||
where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
|
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);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
|||||||
@ -1,167 +1,202 @@
|
|||||||
<?php
|
<?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($prevmonthtotal))
|
||||||
if(!empty($Indiancurrency))
|
{
|
||||||
{
|
foreach ($prevmonthtotal as $prevttl){
|
||||||
foreach ($Indiancurrency as $inr)
|
|
||||||
{
|
|
||||||
$inrsymbol = $inr->FontCode2000;
|
|
||||||
}}
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($monthlyreport))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
if(!empty($monthlyincreport))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
// $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">
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
<style>
|
<style>
|
||||||
.dataTables_filter input {padding: 4px;}
|
.dataTables_filter input {padding: 4px;}
|
||||||
|
.dataTables_filter {
|
||||||
.dataTables_filter {
|
width: 50%;
|
||||||
width: 50%;
|
float: right;
|
||||||
float: right;
|
text-align: right;
|
||||||
text-align: right;
|
}
|
||||||
}
|
.dataTables_paginate {
|
||||||
|
width: 50%;
|
||||||
.dataTables_paginate {
|
float: right;
|
||||||
width: 50%;
|
text-align: right;
|
||||||
float: right;
|
}
|
||||||
text-align: right;
|
div.dt-buttons {
|
||||||
}
|
font-size: 15px;
|
||||||
div.dt-buttons {
|
position: relative;
|
||||||
position: relative;
|
float: right;
|
||||||
float: right;
|
}
|
||||||
|
.btn-success {
|
||||||
}
|
background-color: #3c8dbc;
|
||||||
.btn-success {
|
border-color: #3c8dbc;
|
||||||
background-color: #3c8dbc;
|
|
||||||
border-color: #3c8dbc;
|
|
||||||
}
|
}
|
||||||
|
.ui-datepicker-calendar {
|
||||||
|
display: none;
|
||||||
</style>
|
}
|
||||||
|
</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>
|
||||||
|
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<div class="content-wrapper">
|
<tr>
|
||||||
<section class="content">
|
<td style="text-align:left;"><strong>Previous Month Balance(Opening Balances)</strong></td>
|
||||||
<div class="col-md-12">
|
<td> </td>
|
||||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
<?php $in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||||
<div class="panel-heading">
|
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','') ?></strong></td>
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||||
</div>
|
<td> </td>
|
||||||
<div class="btn-group btn-group-justified no-margin">
|
</tr>
|
||||||
|
|
||||||
<div>
|
|
||||||
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
|
<?php
|
||||||
<thead>
|
if(!empty($monthlyreport)){
|
||||||
<tr>
|
foreach($monthlyreport as $mr)
|
||||||
|
{
|
||||||
|
?>
|
||||||
<th>Account Name</th>
|
<tr>
|
||||||
<th>Type</th>
|
<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>
|
||||||
<!--<th>Received From</th>
|
<td align="left"><span><?php echo $mr->type?></span></td>
|
||||||
<th>Paid To</th>-->
|
<td align="right"><span><?php
|
||||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
$ti= $ti + number_format($mr->income,2,'.','');
|
||||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
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>
|
||||||
</tr>
|
<?php
|
||||||
</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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tr>
|
<tr>
|
||||||
|
<td style="text-align:left;"><strong>Total</strong></td>
|
||||||
</tfoot>
|
<td> </td>
|
||||||
</table>
|
<td style="text-align:right"><strong><?php echo number_format($ti,2,'.','');?></strong></td>
|
||||||
</div>
|
<td style="text-align:right"><strong><?php echo number_format($tvt,2,'.','');?></strong></td>
|
||||||
</div>
|
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
</tbody>
|
||||||
</section>
|
<tfoot>
|
||||||
</div>
|
<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://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/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/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 src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
// Bootstrap datepicker
|
// Bootstrap datepicker
|
||||||
// Set up your table
|
// Set up your table
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
table = $('#req').DataTable( {
|
table = $('#cbmthly').DataTable( {
|
||||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
buttons: [
|
"bSort": false,
|
||||||
|
buttons: [
|
||||||
{
|
|
||||||
extend: 'excelHtml5',
|
{
|
||||||
footer: 'true',
|
extend: 'excelHtml5',
|
||||||
//messageTop: $('h3').text(),
|
footer: 'true',
|
||||||
title: $('h3').text(),
|
//messageTop: $('h3').text(),
|
||||||
exportOptions: {
|
title: $('h3').text(),
|
||||||
columns: ':visible'
|
exportOptions: {
|
||||||
|
columns: ':visible'
|
||||||
}
|
|
||||||
},
|
}
|
||||||
|
},
|
||||||
'colvis'
|
|
||||||
]
|
'colvis'
|
||||||
} );
|
]
|
||||||
} );
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
$('#monthly').click(function() {
|
||||||
</script>
|
|
||||||
|
if($("#monthyear").val().length < 1)
|
||||||
|
{
|
||||||
|
alert('Please Select/Choose Month Year');
|
||||||
|
$("#monthyear").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//alert('finished');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -1,12 +1,22 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$inrsymbol='';
|
$strdayttl = '';
|
||||||
if(!empty($Indiancurrency))
|
$in=0.00;
|
||||||
{
|
$payamt=0.00;
|
||||||
foreach ($Indiancurrency as $inr)
|
$recamt = 0.00;
|
||||||
{
|
$zero=0.00;
|
||||||
$inrsymbol = $inr->FontCode2000;
|
$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">
|
<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>
|
<tr>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Account Name</th>
|
<th>Account Name</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Received From</th>
|
<th>Received From</th>
|
||||||
<th>Paid To</th>
|
<th>Paid To</th>
|
||||||
|
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
|
<th>Current Balances (₹)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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
|
<?php
|
||||||
$ti=0.00;
|
$ti=0.00;
|
||||||
$tvt=0.00;
|
$tvt=0.00;
|
||||||
@ -99,49 +122,40 @@ if(!empty($Indiancurrency))
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?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>
|
</tbody>
|
||||||
<tfoot width="100%">
|
<tfoot width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:left;"><strong>Total</strong></td>
|
<td style="text-align:left;"><strong>Today Closing Balances</strong></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td style="text-align:right"><strong>
|
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||||
<?php
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||||
{
|
<td> </td>
|
||||||
echo number_format($ti,2,'.','');
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
}
|
</tr>
|
||||||
?>
|
</tfoot>
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right"><strong>
|
|
||||||
<?php
|
|
||||||
{
|
|
||||||
echo number_format($tvt,2,'.','');
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -164,6 +178,7 @@ if(!empty($Indiancurrency))
|
|||||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
"bSort": false,
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,24 +1,38 @@
|
|||||||
<?php
|
<?php
|
||||||
$inrsymbol='';
|
$inrsymbol='';
|
||||||
$finyear ='';
|
$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))
|
if(!empty($Indiancurrency))
|
||||||
{
|
{
|
||||||
foreach ($Indiancurrency as $inr)
|
foreach ($Indiancurrency as $inr)
|
||||||
{
|
{
|
||||||
$inrsymbol = $inr->FontCode2000;
|
$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;
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
foreach($financialyear as $item)
|
<style>
|
||||||
|
.dataTables_filter input {padding: 4px;}
|
||||||
{
|
|
||||||
$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;}
|
|
||||||
.dataTables_filter {
|
.dataTables_filter {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
@ -31,6 +45,7 @@ foreach($financialyear as $item)
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
div.dt-buttons {
|
div.dt-buttons {
|
||||||
|
font-size: 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
@ -43,171 +58,163 @@ foreach($financialyear as $item)
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<section class="content">
|
||||||
<div class="content-wrapper">
|
<div class="box">
|
||||||
<section class="content">
|
<div class="container-fluid">
|
||||||
<div class="container-fluid">
|
<div class="box-header">
|
||||||
<div class="col-md-12">
|
|
||||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Year Report <?php if(!empty ($fyears) ){
|
||||||
<div class="panel-heading">
|
echo '('.$fyears.')'; }
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(<?php echo $finyear?>)</b></p></h3></center>
|
else { echo ''; }//echo $finyear?></b></p></h3></center>
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-6 col-md-offset-6">
|
<!-- <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>
|
||||||
<center>
|
<div class="col-xs-12 col-md-6 col-md-offset-6">
|
||||||
<div class="panel-body">
|
<center>
|
||||||
<form method="post" action=" ">
|
<!-- <div class="panel-body"> -->
|
||||||
<div class="col-md-8">
|
<form method="post" action="<?php echo base_url() ?>report/yearexpenses">
|
||||||
<select class="form-control" id="financialyear" name="financialyear">
|
<div class="col-md-8">
|
||||||
<option value="">Select Year</option>
|
<select class="form-control" id="financialyear" name="financialyear">
|
||||||
<?php
|
<option value=" ">Select Year</option>
|
||||||
foreach($financialyear as $item):
|
<?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>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input type="submit" class="btn btn-success" id="year" name="btn_submit" value="View Report">
|
<input type="submit" class="btn btn-success" id="yearly" name="btn_submit" value="View Report">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</center>
|
</center>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
<div class="btn-group btn-group-justified no-margin">
|
<div class="col-md-12">
|
||||||
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
|
<div class="box-body">
|
||||||
<thead>
|
<div>
|
||||||
<tr>
|
<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>Month</th>
|
||||||
|
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
<th>Current Balances (<i class="fa fa-rupee ">)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
</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%">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:left;"><strong>Total</strong></td>
|
<td style="text-align:left;"><strong>Previous Year Balance(opening balances)</strong></td>
|
||||||
|
<?php $in = $recamt-$payamt;?>
|
||||||
<td style="text-align:right"><strong>
|
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','') ?></strong></td>
|
||||||
<?php
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||||
{
|
<td></td>
|
||||||
echo number_format($ti,2,'.','');
|
|
||||||
|
</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>
|
<tr>
|
||||||
</td>
|
<td style="text-align:left;"><strong>Total</strong></td>
|
||||||
<td style="text-align:right"><strong>
|
<td style="text-align:right"><strong> <?php echo number_format($ti,2,'.','');?> </strong> </td>
|
||||||
<?php
|
<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>
|
||||||
echo number_format($tvt,2,'.','');
|
</tr>
|
||||||
|
</tbody>
|
||||||
}
|
<tfoot width="100%">
|
||||||
?>
|
<tr>
|
||||||
</strong>
|
<td style="text-align:left;"><strong>Current Year Closing Balances</strong></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>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
|
</div>
|
||||||
</tfoot>
|
</div>
|
||||||
</table>
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div><!-- content-wrapper -->
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.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/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/pdfmake.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.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.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/buttons.colVis.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
// Bootstrap datepicker
|
// Bootstrap datepicker
|
||||||
// Set up your table
|
// Set up your table
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
table = $('#req').DataTable( {
|
|
||||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
table = $('#yearlypayment').DataTable( {
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
buttons: [
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
"bSort": false,
|
||||||
{
|
buttons: [
|
||||||
extend: 'excelHtml5',
|
|
||||||
footer: 'true',
|
{
|
||||||
//messageTop: $('h3').text(),
|
extend: 'excelHtml5',
|
||||||
title: $('h3').text(),
|
footer: 'true',
|
||||||
exportOptions: {
|
//messageTop: $('h3').text(),
|
||||||
columns: ':visible'
|
title: $('h3').text(),
|
||||||
|
exportOptions: {
|
||||||
}
|
columns: ':visible'
|
||||||
},
|
|
||||||
|
}
|
||||||
'colvis'
|
},
|
||||||
]
|
|
||||||
} );
|
'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>
|
</script>
|
||||||
|
|
||||||
@ -53,8 +53,8 @@ if(!empty($Indiancurrency))
|
|||||||
<th>Paid Type</th>
|
<th>Paid Type</th>
|
||||||
<!--<th>Received From</th>
|
<!--<th>Received From</th>
|
||||||
<th>Paid To</th>-->
|
<th>Paid To</th>-->
|
||||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||||
|
|
||||||
<!--<th>Description</th>-->
|
<!--<th>Description</th>-->
|
||||||
|
|
||||||
@ -168,7 +168,5 @@ $(document).ready(function() {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -10,7 +10,12 @@ $month_in='';
|
|||||||
$month_ex='';
|
$month_ex='';
|
||||||
$year_in='';
|
$year_in='';
|
||||||
$year_ex='';
|
$year_ex='';
|
||||||
|
$in=0.00;
|
||||||
|
$payamt=0.00;
|
||||||
|
$recamt = 0.00;
|
||||||
|
$zero=0.00;
|
||||||
|
$curr_balances=0.00;
|
||||||
|
|
||||||
if(!empty($todayincome))
|
if(!empty($todayincome))
|
||||||
{
|
{
|
||||||
foreach ($todayincome as $ti)
|
foreach ($todayincome as $ti)
|
||||||
@ -58,6 +63,8 @@ if(!empty($yesterdaytotal))
|
|||||||
{
|
{
|
||||||
$strdaydate = $ttl->date;
|
$strdaydate = $ttl->date;
|
||||||
$strday_balances = ($ttl->payment_amt)-($ttl->receipt_amt);
|
$strday_balances = ($ttl->payment_amt)-($ttl->receipt_amt);
|
||||||
|
$payamt = $ttl->payment_amt;
|
||||||
|
$recamt = $ttl->receipt_amt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($prevmonthtotal))
|
if(!empty($prevmonthtotal))
|
||||||
@ -72,7 +79,6 @@ if(!empty($b4finyeartotal)){
|
|||||||
$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
@ -111,8 +117,8 @@ if(!empty($b4finyeartotal)){
|
|||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section>
|
<section>
|
||||||
<!-- Info boxes -->
|
<!-- Info boxes -->
|
||||||
<center>
|
<center>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<!-- fix for small devices only -->
|
<!-- fix for small devices only -->
|
||||||
<div class="clearfix visible-sm-block"></div>
|
<div class="clearfix visible-sm-block"></div>
|
||||||
@ -120,7 +126,7 @@ if(!empty($b4finyeartotal)){
|
|||||||
<div class="info-box">
|
<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>
|
<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">
|
<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>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>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>
|
<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">
|
<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>
|
<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">
|
<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>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>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>
|
<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">
|
<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>
|
<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">
|
<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>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>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>
|
<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 style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>File</th>
|
<th>File</th>
|
||||||
|
<th>Current Balances (<i class="fa fa-rupee ">)</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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
|
<?php
|
||||||
$ti=0.00;
|
$ti=0.00;
|
||||||
$tvt=0.00;
|
$tvt=0.00;
|
||||||
@ -245,6 +265,7 @@ if(!empty($b4finyeartotal)){
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?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>
|
</tbody>
|
||||||
<tfoot width="100%">
|
<tfoot width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:left;"><strong>Total</strong></td>
|
<td style="text-align:left;"><strong>Today Closing Balances</strong></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td style="text-align:right"><strong>
|
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||||
<?php
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||||
{
|
<td> </td>
|
||||||
echo number_format($ti,2,'.','');
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
}
|
</tr>
|
||||||
?>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right"><strong>
|
|
||||||
<?php
|
|
||||||
{
|
|
||||||
echo number_format($tvt,2,'.','');
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
@ -293,6 +310,9 @@ if(!empty($b4finyeartotal)){
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -310,24 +330,25 @@ if(!empty($b4finyeartotal)){
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
table = $('#req').DataTable( {
|
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-6'><'col-md-6'>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
buttons: [
|
"bSort": false,
|
||||||
|
buttons: [
|
||||||
{
|
|
||||||
extend: 'excelHtml5',
|
{
|
||||||
footer: 'true',
|
extend: 'excelHtml5',
|
||||||
//messageTop: $('h3').text(),
|
footer: 'true',
|
||||||
title:$('h3').text(),
|
//messageTop: $('h3').text(),
|
||||||
exportOptions: {
|
title: $('h3').text(),
|
||||||
columns: ':visible'
|
exportOptions: {
|
||||||
|
columns: ':visible'
|
||||||
}
|
|
||||||
},
|
}
|
||||||
|
},
|
||||||
'colvis'
|
|
||||||
]
|
'colvis'
|
||||||
} );
|
]
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user