bank report
This commit is contained in:
parent
6699b62473
commit
770f841c65
@ -382,6 +382,16 @@ class cashbook extends BaseController
|
||||
{
|
||||
$statu='OPEN';
|
||||
}
|
||||
$debitbalance=$totalbankamount-$total;
|
||||
if($debitbalance==0)
|
||||
|
||||
{
|
||||
$statu1='CLOSE';
|
||||
}
|
||||
else
|
||||
{
|
||||
$statu1='OPEN';
|
||||
}
|
||||
//$clearbalance=$totalbankamount-
|
||||
if($amounttype=='CREDIT')
|
||||
{
|
||||
@ -392,7 +402,7 @@ class cashbook extends BaseController
|
||||
}
|
||||
else
|
||||
{
|
||||
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$stat);
|
||||
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$statu1);
|
||||
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||
|
||||
}
|
||||
@ -750,20 +760,26 @@ class cashbook extends BaseController
|
||||
//}
|
||||
}
|
||||
|
||||
public function bankdata()
|
||||
{
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : bankstatement';
|
||||
|
||||
$fdate = $this->input->post('from_date');
|
||||
$tdate = $this->input->post('to_date');
|
||||
$data['bankreport'] = $this->cashbook_model->bankstatement($fdate,$tdate);
|
||||
|
||||
|
||||
$this->loadViews("bankstatement", $this->global, $data,NULL);
|
||||
|
||||
}
|
||||
public function bankdata()
|
||||
{
|
||||
|
||||
if ($this->input->post('btn_submit'))
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : bankstatement';
|
||||
// $ab=$this->input->post('financialyear');
|
||||
// $fa=substr($ab,0,-5);
|
||||
// $aa=substr($ab,5,5);
|
||||
|
||||
$fdate = $this->input->post('from_date');
|
||||
$tdate = $this->input->post('to_date');
|
||||
}
|
||||
// $data['finyear']=$this->cashbook_model->report_finyear();
|
||||
$data['bankreport'] = $this->cashbook_model->bankstatement($fdate,$tdate);
|
||||
|
||||
|
||||
$this->loadViews("bankstatement", $this->global, $data,NULL);
|
||||
|
||||
}
|
||||
public function bankdebitdata()
|
||||
{
|
||||
if ($this->input->post('btn_submit'))
|
||||
|
||||
@ -146,23 +146,35 @@ class cashbook_model extends CI_Model
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
function bankstatement($fdate,$tdate){
|
||||
function bankstatement($fdate,$tdate,$fa,$aa){
|
||||
|
||||
|
||||
$sql="SELECT *,date_format(reportdate,'%d-%m-%Y')as date,tie.total,date_format(valuedate,'%d-%m-%Y')as valuedate from T_bankreport as br left join t_income_expense as tie on tie.bankid=br.ID where reportdate !=0 group by(br.ID)";
|
||||
if ($fdate and $tdate != ''){
|
||||
$fdate= date("Y-m-d",strtotime($fdate));
|
||||
$tdate=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
$sql.="and date(reportdate) >= '".$fdate."'
|
||||
and date(reportdate) <= '".$tdate."'";
|
||||
}
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql="SELECT *,date_format(reportdate,'%d-%m-%Y')as date,tie.total,date_format(valuedate,'%d-%m-%Y')as valuedate from T_bankreport as br left join t_income_expense as tie on tie.bankid=br.ID where br.reportdate !=0 ";
|
||||
if ($fdate and $tdate != '')
|
||||
{
|
||||
|
||||
$fdate= date("Y-m-d",strtotime($fdate));
|
||||
$tdate=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
$sql.= " and date(reportdate) >= '".$fdate."'
|
||||
and date(reportdate) <= '".$tdate."'";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$sql.=" group by(br.ID) "."ORDER BY br.ID+0 DESC ";
|
||||
// $sql.=" ORDER BY br.ID+0 DESC ";
|
||||
|
||||
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function debitbankstatemet($Supplierid,$fdate,$tdate)
|
||||
{
|
||||
@ -351,9 +363,9 @@ function debitpolist($bankid)
|
||||
|
||||
function mappingcash($SupplierName,$fdate,$tdate,$bankid)
|
||||
{
|
||||
$this->db->select('date,bankid,cashtype,amounttype,total,account_code,totalbankamount');
|
||||
$this->db->from ('t_income_expense');
|
||||
//$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left');
|
||||
$this->db->select('ie.date,ie.bankid,ie.cashtype,ie.amounttype,ie.total,ac.name,totalbankamount');
|
||||
$this->db->from ('t_income_expense as ie');
|
||||
$this->db->join ('t_accountcode ac ','ac.code = ie.account_code','left');
|
||||
$this->db->where('bankid',$bankid);
|
||||
|
||||
//$this->db->group_by('mid');
|
||||
|
||||
@ -131,10 +131,7 @@
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:24px;">
|
||||
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@ -258,7 +255,10 @@
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="col-md-2 col-md-offset-10">
|
||||
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -132,10 +132,7 @@
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:24px;">
|
||||
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@ -251,7 +248,10 @@
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="col-md-2 col-md-offset-10" style="margin-top:24px;">
|
||||
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -277,7 +277,7 @@ if(!empty($mapping))
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<th>Account Code</th>
|
||||
<th>Account Name</th>
|
||||
<th>Bankid</th>
|
||||
<th>Amount Type</th>
|
||||
<th>Total Amount<?php echo '('.$inrsymbol.')' ?></th>
|
||||
@ -306,7 +306,8 @@ if(!empty($mapping))
|
||||
|
||||
|
||||
<td align="left" id="date"><span><?php echo $mc->date?></span></td>
|
||||
<td align="left" id="date"><span><?php echo $mc->account_code?></span></td>
|
||||
<td align="left" id="date"><span><?php echo $mc->name?></span></td>
|
||||
|
||||
<!--<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/receipt?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>-->
|
||||
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
|
||||
|
||||
|
||||
@ -76,6 +76,8 @@
|
||||
// $attributes = array('class' => 'form-label-left bankdata ','name' => 'bankdata','id' => 'bankdata');
|
||||
|
||||
// echo form_open($this->config->base_url().'/cashbook/bankdebitdata/',$attributes); ?>
|
||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
@ -128,6 +130,7 @@
|
||||
$type = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -138,9 +141,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
@ -283,7 +284,8 @@
|
||||
|
||||
?>
|
||||
|
||||
<td align="left" id="credit2<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/mappinginvoice?d=<?php echo $t->ID?>"></a><span><?php echo $clearbalance;?></span></td>
|
||||
<td align="left" id="credit2<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/mappinginvoice?d=<?php echo $t->ID?>"><span><?php echo $clearbalance?></a></span></td>
|
||||
|
||||
|
||||
<td align="left" id="credited<?php echo $i ?>"><span><?php echo ($t->Credit)-($t->cclearbalance);?></span></td>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user