issues fixes
This commit is contained in:
parent
ef6d4810cd
commit
6780b2b030
@ -1022,15 +1022,11 @@ class report extends BaseController
|
||||
$data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount();
|
||||
$data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount();
|
||||
$data['cashbook']=$this->dahsboard_Model->cashbook();
|
||||
|
||||
$income="RECEIPT";
|
||||
$expense="PAYMENT";
|
||||
$data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income);
|
||||
$data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense);
|
||||
$data['todayincome']=$this->dahsboard_Model->today_data($income);
|
||||
$data['todayexpense']=$this->dahsboard_Model->today_data($expense);
|
||||
$data['yearincome']=$this->dahsboard_Model->yearwise_data($income);
|
||||
$data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense);
|
||||
|
||||
$data['dailyIncomeExpense']=$this->dahsboard_Model->today_data();
|
||||
$data['monthlyIncomeExpense']=$this->dahsboard_Model->monthwise_data();
|
||||
$data['yearlyIncomeExpense']=$this->dahsboard_Model->yearwise_data();
|
||||
|
||||
$data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal();
|
||||
$data['tdy']=$this->dahsboard_Model->today();
|
||||
//echo ($data['tdy']);
|
||||
@ -1053,60 +1049,20 @@ class report extends BaseController
|
||||
$premonth = $premonth == '00' ? '12' : $premonth;
|
||||
$yearvalue = $premonth == '12' ? $year-1 : $year;
|
||||
$preyear = $yearvalue-1;
|
||||
|
||||
$data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($preyear,$yearvalue);
|
||||
$data['prevmonthtotal']=$this->dahsboard_Model->monthbeforetotal($premonth,$yearvalue);
|
||||
$data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday);
|
||||
|
||||
$data['yearlybalances']=$this->dahsboard_Model->getYearlyOpeningAmt($yearvalue);
|
||||
$lastdate =cal_days_in_month(CAL_GREGORIAN,$premonth,$yearvalue);
|
||||
$dateformat = '20'.$yearvalue.'-'.$premonth.'-'.$lastdate;
|
||||
$data['monthlybalances']=$this->dahsboard_Model->getMonthlyOpeningAmt($dateformat);
|
||||
$data['yesterdaybalances'] = $this->dahsboard_Model->getDailyOpeningAmt($yesterday);
|
||||
|
||||
$this->loadviews("reportcashbook",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
// public function monthexpensess()
|
||||
// {
|
||||
|
||||
// $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();
|
||||
|
||||
|
||||
// $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');
|
||||
$monthyearvalue = $this->input->post('monthyear');
|
||||
$this->global['pageTitle'] = ' Cashbook - Cashbook Monthly Reports';
|
||||
|
||||
if($monthyearvalue == ''){
|
||||
@ -1119,19 +1075,16 @@ class report extends BaseController
|
||||
$data['monthyearvalue'] = $monthyearvalue;
|
||||
$monthyear = explode("-",$monthyearvalue);
|
||||
|
||||
$month = $monthyear[0];
|
||||
$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);
|
||||
$yearvalue = $premonth == '12' ? $year-1 : $year;
|
||||
$lastdate = cal_days_in_month(CAL_GREGORIAN,$premonth,$yearvalue);
|
||||
$dateformat = $yearvalue.'-'.$premonth.'-'.$lastdate;
|
||||
$data['monthlybalances']=$this->dahsboard_Model->getMonthlyOpeningAmt($dateformat);
|
||||
$data['monthlyreport']=$this->dahsboard_Model->monthexpensereport($month,$year);
|
||||
|
||||
}
|
||||
@ -1141,8 +1094,7 @@ class report extends BaseController
|
||||
}
|
||||
public function yearexpenses()
|
||||
{
|
||||
// public function yearly_incexp()
|
||||
// {
|
||||
|
||||
$this->global['pageTitle'] = 'Cashbook - Cashbook Yearly Reports';
|
||||
|
||||
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
|
||||
@ -1156,20 +1108,18 @@ class report extends BaseController
|
||||
}else{
|
||||
|
||||
$data['fyears'] = $fyear;
|
||||
//echo $data['fyears'];
|
||||
|
||||
$fa=substr( $fyear,0,-5);
|
||||
$aa=substr( $fyear,5,5);
|
||||
|
||||
$finyear = explode("-",$fyear);
|
||||
|
||||
$b4oneyear = $finyear[0] -1;
|
||||
$b4twoyear = $finyear[1] -1;
|
||||
$prev_year = $finyear[0];
|
||||
|
||||
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
|
||||
|
||||
$data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($b4oneyear,$b4twoyear);
|
||||
$data['yearlybalances']=$this->dahsboard_Model->getYearlyOpeningAmt($prev_year);
|
||||
|
||||
|
||||
//$this->loadviews("cashbookyearlyreport",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
||||
@ -1235,7 +1185,7 @@ class report extends BaseController
|
||||
$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['yesterdaybalances'] = $this->dahsboard_Model->getDailyOpeningAmt($yesterday);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbooktoday",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
@ -2263,22 +2263,30 @@ if ($cname!= ''){
|
||||
}
|
||||
|
||||
//home--report--Day Wise Report //
|
||||
function today_data($value='')
|
||||
function today_data()
|
||||
{
|
||||
$sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
|
||||
$query = $this->db->query($sql,array($value));
|
||||
$sql="SELECT sum(if(type = 'RECEIPT',total,0)) as daily_income_amt,
|
||||
sum(if(type = 'PAYMENT',total,0)) as daily_expenses_amt
|
||||
FROM t_income_expense
|
||||
WHERE DATE(date) = CURRENT_DATE";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function monthwise_data($value='')
|
||||
function monthwise_data()
|
||||
{
|
||||
$sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())";
|
||||
$query = $this->db->query($sql,array($value));
|
||||
//$sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())";
|
||||
$sql="SELECT sum(if(type = 'RECEIPT',total,0)) as monthly_income_amt,
|
||||
sum(if(type = 'PAYMENT',total,0)) as monthly_expenses_amt
|
||||
FROM t_income_expense
|
||||
WHERE YEAR(date) = YEAR(curdate()) AND MONTH(date) = MONTH(curdate())";
|
||||
$query = $this->db->query($sql);
|
||||
//,array($value));
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function yearwise_data($value='')
|
||||
function yearwise_data()
|
||||
{
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
@ -2289,13 +2297,47 @@ if ($cname!= ''){
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
|
||||
$sql="SELECT type,sum(total) as yearlydata from t_income_expense
|
||||
where
|
||||
type = ? and (date >= '".$fa."-04-01' and date <= '".$aa."-03-31')";
|
||||
$query = $this->db->query($sql,array($value));
|
||||
$sql="SELECT sum(if(type = 'RECEIPT',total,0)) as yearly_income_amt,
|
||||
sum(if(type = 'PAYMENT',total,0)) as yearly_expenses_amt
|
||||
FROM t_income_expense
|
||||
WHERE (date >= '".$fa."-04-01' and date <= '".$aa."-03-31')";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
// function today_data($value='')
|
||||
// {
|
||||
// $sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
|
||||
// $query = $this->db->query($sql,array($value));
|
||||
// return $query->result();
|
||||
|
||||
// }
|
||||
|
||||
// function monthwise_data($value='')
|
||||
// {
|
||||
// $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())";
|
||||
// $query = $this->db->query($sql,array($value));
|
||||
// return $query->result();
|
||||
|
||||
// }
|
||||
// function yearwise_data($value='')
|
||||
// {
|
||||
// if (date('m') >= 4) {
|
||||
// $yearl = date('Y').'-'.(date('Y')+1);
|
||||
// } else {
|
||||
// $yearl = (date('Y')-1).'-'.date('Y');
|
||||
// }
|
||||
// $ab=$yearl;
|
||||
// $fa=substr($ab,0,-5);
|
||||
// $aa=substr($ab,5,5);
|
||||
|
||||
// $sql="SELECT type,sum(total) as yearlydata from t_income_expense
|
||||
// where
|
||||
// type = ? and (date >= '".$fa."-04-01' and date <= '".$aa."-03-31')";
|
||||
// $query = $this->db->query($sql,array($value));
|
||||
// return $query->result();
|
||||
|
||||
// }
|
||||
function departmentwise($sid='',$d='',$c='')
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
@ -2542,40 +2584,73 @@ function INRSymbol()
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function monthbeforetotal($month,$year){
|
||||
// function monthbeforetotal($month,$year){
|
||||
|
||||
$sql="SELECT month(date) as monthnum ,year(date) as yearnum,
|
||||
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
FROM t_income_expense
|
||||
WHERE
|
||||
month(date) = '".$month."'and year(date) = '".$year."'";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
// $sql="SELECT month(date) as monthnum ,year(date) as yearnum,
|
||||
// sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
// sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
// FROM t_income_expense
|
||||
// WHERE
|
||||
// month(date) = '".$month."'and year(date) = '".$year."'";
|
||||
// $query = $this->db->query($sql);
|
||||
// return $query->result();
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
function yearbeforetotal($pre,$curr){
|
||||
$sql="SELECT
|
||||
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
FROM t_income_expense
|
||||
where date >= '".$pre."-04-01' and date <= '".$curr."-03-31'";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
//print_r($query->result());
|
||||
// function yearbeforetotal($pre,$curr){
|
||||
// $sql="SELECT
|
||||
// sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
// sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
// FROM t_income_expense
|
||||
// where date >= '".$pre."-04-01' and date <= '".$curr."-03-31'";
|
||||
// $query = $this->db->query($sql);
|
||||
// return $query->result();
|
||||
// //print_r($query->result());
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
function daybeforetotal($yesterday){
|
||||
$sql="select date,
|
||||
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
from t_income_expense
|
||||
where date = ? ";
|
||||
$query = $this->db->query($sql,array($yesterday));
|
||||
return $query->result();
|
||||
}
|
||||
// function daybeforetotal($yesterday){
|
||||
// $sql="select date,
|
||||
// sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||
// sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||
// from t_income_expense
|
||||
// where date = ? ";
|
||||
// $query = $this->db->query($sql,array($yesterday));
|
||||
// return $query->result();
|
||||
// }
|
||||
|
||||
|
||||
function getYearlyOpeningAmt($prev_year){
|
||||
$sql="SELECT min(date),(sum(if(type = 'RECEIPT',total,0)) - sum(if(type = 'PAYMENT',total,0)) ) as opening_amt
|
||||
FROM t_income_expense
|
||||
WHERE date >= (select min(date) from t_income_expense) and date <= '".$prev_year."-03-31' ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
//print_r($query->result());
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getMonthlyOpeningAmt($dateformat){
|
||||
//echo $dateformat;
|
||||
//die();
|
||||
$sql="SELECT month('".$dateformat."') as monthnum ,year('".$dateformat."') as yearnum,
|
||||
(sum(if(type = 'RECEIPT',total,0)) - sum(if(type = 'PAYMENT',total,0))) as opening_amt
|
||||
FROM t_income_expense
|
||||
WHERE date >= (select min(date) from t_income_expense) and date <= '".$dateformat."'";
|
||||
//WHERE month(date) between (select month(min(date)) from t_income_expense) and '".$month."' and year(date) = '".$year."'";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function getDailyOpeningAmt($yesterday){
|
||||
$sql="select date,(sum(if(type = 'RECEIPT',total,0)) - sum(if(type = 'PAYMENT',total,0))) as opening_amt
|
||||
from t_income_expense
|
||||
where date between (select min(date) from t_income_expense) and '".$yesterday."'";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function accountname()
|
||||
{
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
$tiapr=0.00;$timay=0.00;$tijun=0.00;$tijul=0.00;$tiaug=0.00;$tisep=0.00;$tioct=0.00;$tinov=0.00;$tidec=0.00;
|
||||
$teapr=0.00;$temay=0.00;$tejun=0.00;$tejul=0.00;$teaug=0.00;$tesep=0.00;$teoct=0.00;$tenov=0.00;$tedec=0.00;
|
||||
$tinjan=0.00;$tinfeb=0.00;$tinmar=0.00;
|
||||
$texjan=0.00;$texfeb=0.00;$texmar=0.00;
|
||||
$rowwise = 0.00;
|
||||
$tinjan=0.00;$tinfeb=0.00;$tinmar=0.00;$rowwiseincome = 0.00;
|
||||
$texjan=0.00;$texfeb=0.00;$texmar=0.00;$rowwiseexpense = 0.00;
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
@ -140,7 +139,7 @@ if (date('m') >= 4) {
|
||||
<th style="text-align:center" colspan="2">January</th>
|
||||
<th style="text-align:center" colspan="2">February</th>
|
||||
<th style="text-align:center" colspan="2">March</th>
|
||||
<th style="text-align:center" rowspan="2">Total</th>
|
||||
<th style="text-align:center" colspan="2">Total</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||
@ -166,6 +165,8 @@ if (date('m') >= 4) {
|
||||
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -204,7 +205,8 @@ if (date('m') >= 4) {
|
||||
<td><?php $texfeb= $texfeb + number_format($d->FebExpense,2,'.',''); echo number_format($d->FebExpense,2,'.',''); ?></td>
|
||||
<td><?php $tinmar= $tinmar + number_format($d->MarIncome,2,'.',''); echo number_format($d->MarIncome,2,'.',''); ?></td>
|
||||
<td><?php $texmar= $texmar + number_format($d->MarExpense,2,'.',''); echo number_format($d->MarExpense,2,'.',''); ?></td>
|
||||
<td><?php $rowwise = $rowwise + number_format($d->overalltotal,2,'.',''); echo number_format($d->overalltotal,2,'.',''); ?></td>
|
||||
<td><?php $rowwiseincome = $rowwiseincome + number_format($d->receiptoverall,2,'.',''); echo number_format($d->receiptoverall,2,'.',''); ?></td>
|
||||
<td><?php $rowwiseexpense = $rowwiseexpense + number_format($d->paymentoverall,2,'.',''); echo number_format($d->paymentoverall,2,'.',''); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@ -235,7 +237,8 @@ if (date('m') >= 4) {
|
||||
<td><b><?php echo number_format($texfeb,2,'.',''); ?></b></td>
|
||||
<td><b><?php echo number_format($tinmar,2,'.',''); ?></b></td>
|
||||
<td><b><?php echo number_format($texmar,2,'.',''); ?></b></td>
|
||||
<td><b><?php echo number_format($rowwise,2,'.',''); ?></b></td>
|
||||
<td><b><?php echo number_format($rowwiseincome,2,'.',''); ?></b></td>
|
||||
<td><b><?php echo number_format($rowwiseexpense,2,'.',''); ?></b></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php } ?>
|
||||
@ -288,6 +291,4 @@ $(document).ready(function() {
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</script>
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
//$in=0.00;
|
||||
//$payamt=0.00;
|
||||
//$recamt = 0.00;
|
||||
$opening_balances = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
$monthyr = '';
|
||||
@ -11,14 +12,15 @@ $mthyr = '' ;
|
||||
$monthNum = '' ;
|
||||
$yearNum = '';
|
||||
|
||||
if(!empty($prevmonthtotal))
|
||||
if(!empty($monthlybalances))
|
||||
{
|
||||
foreach ($prevmonthtotal as $prevttl){
|
||||
foreach ($monthlybalances as $prevttl){
|
||||
|
||||
// $payamt = $prevmonthtotal[0]->payment_amt;
|
||||
$payamt = $prevttl->payment_amt;
|
||||
// $recamt = $prevmonthtotal[0]->receipt_amt;
|
||||
$recamt = $prevttl->receipt_amt;
|
||||
// $payamt = $monthlybalances[0]->payment_amt;
|
||||
//$payamt = $prevttl->payment_amt;
|
||||
$opening_balances = $prevttl->opening_amt;
|
||||
// $recamt = $monthlybalances[0]->receipt_amt;
|
||||
//$recamt = $prevttl->receipt_amt;
|
||||
}}
|
||||
if(!empty($monthyearvalue))
|
||||
{
|
||||
@ -80,8 +82,8 @@ $(function() {
|
||||
|
||||
|
||||
$('#monthyear').datepicker( {
|
||||
//minDate : new Date(year-SIAStartYear,0,1),
|
||||
//maxDate :'now',
|
||||
minDate : new Date(year-SIAStartYear,0,1),
|
||||
maxDate :'now',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
showButtonPanel: true,
|
||||
@ -143,8 +145,8 @@ $(function() {
|
||||
<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>
|
||||
<?php //$in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($opening_balances,2,'.','') ?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
@ -164,7 +166,7 @@ $(function() {
|
||||
<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>
|
||||
<td align="right"><span><?php echo number_format($opening_balances+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -176,7 +178,7 @@ $(function() {
|
||||
<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>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $opening_balances+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
|
||||
<?php
|
||||
$strdayttl = '';
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$opening_balances = 0.00;
|
||||
$zero=0.00;
|
||||
$curr_balances=0.00;
|
||||
$ti=0.00;
|
||||
@ -13,9 +11,10 @@ $tvt=0.00;
|
||||
{
|
||||
foreach ($yesterdaytotal as $ttl)
|
||||
{
|
||||
$strdayttl = $ttl->date;
|
||||
$payamt = $ttl->payment_amt;
|
||||
$recamt = $ttl->receipt_amt;
|
||||
// $strdayttl = $ttl->date;
|
||||
// $payamt = $ttl->payment_amt;
|
||||
// $recamt = $ttl->receipt_amt;
|
||||
$opening_balances = $ttl->opening_amt;
|
||||
}}
|
||||
?>
|
||||
|
||||
@ -74,8 +73,9 @@ $tvt=0.00;
|
||||
<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>
|
||||
<?php //$in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($opening_balances,2,'.','');?></strong></td>
|
||||
<!-- <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>
|
||||
@ -122,7 +122,8 @@ $tvt=0.00;
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
<!-- <td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td> -->
|
||||
<td align="right"><span><?php echo number_format($opening_balances+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -139,7 +140,8 @@ $tvt=0.00;
|
||||
<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>
|
||||
<!-- <td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td> -->
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $opening_balances+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
|
||||
@ -3,29 +3,18 @@ $inrsymbol='';
|
||||
$finyear ='';
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
$in=0.00;
|
||||
$payamt=0.00;
|
||||
$recamt = 0.00;
|
||||
$opening_balances = 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;
|
||||
}}
|
||||
if(!empty($yearlybalances)){
|
||||
foreach ($yearlybalances as $prevttl)
|
||||
{
|
||||
|
||||
$opening_balances = $prevttl->opening_amt ;
|
||||
|
||||
}}
|
||||
|
||||
|
||||
?>
|
||||
@ -112,8 +101,7 @@ if(!empty($Indiancurrency))
|
||||
<tbody>
|
||||
<tr>
|
||||
<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($opening_balances,2,'.','') ?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td></td>
|
||||
|
||||
@ -132,7 +120,7 @@ if(!empty($Indiancurrency))
|
||||
<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>
|
||||
<td align="right"><span><?php echo number_format($opening_balances+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -143,7 +131,7 @@ if(!empty($Indiancurrency))
|
||||
<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>
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $opening_balances+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
<?php
|
||||
$strday_balances = '';
|
||||
$premonth_balances = '' ;
|
||||
@ -10,80 +8,58 @@ $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))
|
||||
if(!empty($dailyIncomeExpense))
|
||||
{
|
||||
foreach ($todayincome as $ti)
|
||||
foreach ($dailyIncomeExpense as $t)
|
||||
{
|
||||
$today_in=$ti->todaydata;
|
||||
$today_in = $t->daily_income_amt;
|
||||
$today_ex = $t->daily_expenses_amt;
|
||||
}}
|
||||
|
||||
if(!empty($todayexpense))
|
||||
{
|
||||
foreach ($todayexpense as $te)
|
||||
{
|
||||
$today_ex=$te->todaydata;
|
||||
}}
|
||||
|
||||
if(!empty($monthlywiseincome))
|
||||
{
|
||||
foreach ($monthlywiseincome as $mi)
|
||||
{
|
||||
$month_in = $mi->monthlydata;
|
||||
}}
|
||||
|
||||
if(!empty($monthlywiseexpense))
|
||||
{
|
||||
foreach ($monthlywiseexpense as $me)
|
||||
{
|
||||
$month_ex = $me->monthlydata;
|
||||
}}
|
||||
if(!empty($yearexpense))
|
||||
{
|
||||
foreach ($yearexpense as $ye)
|
||||
{
|
||||
$year_ex=$ye->yearlydata;
|
||||
}}
|
||||
|
||||
|
||||
if(!empty($yearincome))
|
||||
{
|
||||
foreach ($yearincome as $yi)
|
||||
{
|
||||
$year_in = $yi->yearlydata;
|
||||
}}
|
||||
|
||||
if(!empty($yesterdaytotal))
|
||||
if(!empty($monthlyIncomeExpense))
|
||||
{
|
||||
foreach ($yesterdaytotal as $ttl)
|
||||
foreach ($monthlyIncomeExpense as $m)
|
||||
{
|
||||
$month_in = $m->monthly_income_amt;
|
||||
$month_ex = $m->monthly_expenses_amt;
|
||||
}}
|
||||
|
||||
if(!empty($yearlyIncomeExpense))
|
||||
{
|
||||
foreach ($yearlyIncomeExpense as $y)
|
||||
{
|
||||
$year_in = $y->yearly_income_amt;
|
||||
$year_ex = $y->yearly_expenses_amt;
|
||||
}}
|
||||
|
||||
if(!empty($yesterdaybalances))
|
||||
{
|
||||
foreach ($yesterdaybalances as $ttl)
|
||||
{
|
||||
$strdaydate = $ttl->date;
|
||||
$strday_balances = ($ttl->payment_amt)-($ttl->receipt_amt);
|
||||
$payamt = $ttl->payment_amt;
|
||||
$recamt = $ttl->receipt_amt;
|
||||
}
|
||||
}
|
||||
if(!empty($prevmonthtotal))
|
||||
$strday_balances = $ttl->opening_amt;
|
||||
}}
|
||||
|
||||
if(!empty($monthlybalances))
|
||||
{
|
||||
foreach ($prevmonthtotal as $prevttl){
|
||||
$premonth_balances = ($prevttl->payment_amt) - ($prevttl->receipt_amt);
|
||||
foreach ($monthlybalances as $prevttl){
|
||||
//$premonth_balances = ($prevttl->payment_amt) - ($prevttl->receipt_amt);
|
||||
$premonth_balances = $prevttl->opening_amt;
|
||||
}
|
||||
}
|
||||
if(!empty($b4finyeartotal)){
|
||||
foreach ($b4finyeartotal as $preyearttl)
|
||||
|
||||
if(!empty($yearlybalances)){
|
||||
foreach ($yearlybalances as $preyearttl)
|
||||
{
|
||||
$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
||||
//$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
||||
$preyear_balances = $preyearttl->opening_amt;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
@ -220,8 +196,8 @@ if(!empty($b4finyeartotal)){
|
||||
<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>
|
||||
<?php //$in = $recamt-$payamt;//prevmonthincome-prevmonthexpense ?>
|
||||
<td style="text-align:right"><strong><?php echo number_format($strday_balances,2,'.','');?></strong></td>
|
||||
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@ -265,7 +241,8 @@ if(!empty($b4finyeartotal)){
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
<!-- <td align="right"><span><?php echo number_format($in+$ti-$tvt,2,'.',''); ?></span></td> -->
|
||||
<td align="right"><span><?php echo number_format($strday_balances+$ti-$tvt,2,'.',''); ?></span></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
@ -283,7 +260,8 @@ if(!empty($b4finyeartotal)){
|
||||
<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>
|
||||
<!-- <td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td> -->
|
||||
<td style="text-align:right"><strong><?php $curr_balances = $strday_balances+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user