bankingstatement changes

This commit is contained in:
gayathri1990 2018-10-18 16:34:15 +05:30
parent 3ebd8ecbf4
commit 4d39023582
8 changed files with 9151 additions and 83 deletions

View File

@ -1373,9 +1373,10 @@ class cashbook extends BaseController
}
public function amountpaid()
{
$suppliername= $_GET['sid'];
$this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details';
//$suppliername= $_GET['sid'];
if ($this->input->post('btn_submit'))
{
$ab=$this->input->post('financialyear');
@ -1385,19 +1386,21 @@ class cashbook extends BaseController
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$suppliername= $this->input->post('supplier');
// echo "FROM CON".$suppliername;
$data['suppliername']= $suppliername;
$data['bankdebit'] = $this->cashbook_model->debitpolistfilter($suppliername,$fa,$aa,$m,$fdate,$tdate);
}
else
{
$suppliername= $_GET['sid'];
$suppliername= $_GET['sid'];
$data['suppliername']= $suppliername;
$data['bankdebit'] = $this->cashbook_model->paided($suppliername);
}
$data['finyear']=$this->cashbook_model->report_finyear();
//$data['supplier'] = $this->cashbook_model->getsupplier();
// $this->loadViews("bankpaidsupp", $this->global,$data, NULL);
//print_r($data);
$this->loadViews("bankamountpaid", $this->global,$data, NULL);
}
@ -1490,11 +1493,13 @@ class cashbook extends BaseController
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$sd= $this->input->post('supplier');
$data['suppliername']=$sd;
$data['bankunpaid'] = $this->cashbook_model->amountunpaidfilter($sd,$fa,$aa,$m,$fdate,$tdate);
}
else
{
$supplierid1 = $_GET['sid'];
$data['suppliername']=$supplierid1;
$data['bankunpaid'] = $this->cashbook_model->amountunpaid($supplierid1);
}
$data['finyear']=$this->cashbook_model->report_finyear();
@ -1521,11 +1526,13 @@ class cashbook extends BaseController
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$clientname = $this->input->post('customer');
$data['clientname']=$clientname;
$data['amountreceived'] = $this->cashbook_model->creditinvoicelistfilter($clientname,$fdate,$tdate,$fa,$aa,$m);
}
else
{
$clientname= $_GET['sid'];
$clientname= $_GET['sid'];
$data['clientname']=$clientname;
$data['amountreceived'] = $this->cashbook_model->received($clientname);
}
$data['finyear']=$this->cashbook_model->report_finyearamountreceived();
@ -1579,8 +1586,7 @@ class cashbook extends BaseController
$data['amountunreceivedsupplier'] = $this->cashbook_model->unreceivedsupplier();
}
$data['finyear']=$this->cashbook_model->report_finyearamountreceived();
print_r($data['finyear']);
$data['finyear']=$this->cashbook_model->report_finyearamountreceived();
$data['getcustomer'] = $this->cashbook_model->getcustomer();
$this->loadViews("bankunreceivedsupp", $this->global,$data, NULL);
@ -1601,12 +1607,13 @@ class cashbook extends BaseController
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$client =$this->input->post('client');
echo $client;
$data['client']=$client;
$data['amountunreceived'] = $this->cashbook_model->uncreditinvoicelistfilter($client,$fdate,$tdate,$fa,$aa,$m);
}
else
{
$clientname=$_GET['sid'];
$data['client']=$clientname;
$data['amountunreceived'] = $this->cashbook_model->unreceived($clientname);
}
$data['finyear']=$this->cashbook_model->report_finyearamountunreceived();

File diff suppressed because it is too large Load Diff

View File

@ -562,7 +562,7 @@ $sql.=" group by id.IGRItemNo";
function suppliertotal()
{
$sql="select sd.SupplierName as SupplierName,sd.SupplierID,
$sql="select sd.SupplierName as SupplierName,sd.SupplierID,im.CreatedDate,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.SGST/100)),
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.SGST /100))),0),2) as sgst,
@ -786,7 +786,7 @@ $sql.="group by id.IGRItemNo";
function amountunpaidfilter($sd,$fa,$aa,$m,$fdate,$tdate)
{
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as PONO,im.IGRNO,id.IGRItemNo,im.MaterialRcvdDate,br.Balancetopay,br.Amountpaid,sd.SupplierName as SupplierName,sd.SupplierID,im.DeliveryChellanOrInvoiceNo,
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as PONO,im.IGRNO,id.IGRItemNo,im.MaterialRcvdDate,im.DeliveryChellanDate,im.CreatedDate,br.Balancetopay,br.Amountpaid,sd.SupplierName as SupplierName,sd.SupplierID,im.DeliveryChellanOrInvoiceNo,DATEDIFF(CURDATE(),id.CreatedDate)as days,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * pl.Rate)+(rt.AfterSGST),
(id.QuantityAsPerInvoice * pl.Rate)+(st.After_SGST )),0),2) as sgst,
@ -839,15 +839,16 @@ where im.IGRStatus = 'ST027' and id.BankStatus ='ST072' and sd.SupplierID='".$s
if ($fa and $aa != ''){
//$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
$sql.=" and (im.MaterialRcvdDate >= '".$fa."-04-01' and im.MaterialRcvdDate <= '".$aa."-03-31')";
$sql.=" and (im.DeliveryChellanDate >= '".$fa."-04-01' and im.DeliveryChellanDate <= '".$aa."-03-31')";
}
if ($m!= ''){
//$sql.="and monthname(im.CreatedDate) = '".$m."'";
$sql.="and monthname(im.MaterialRcvdDate) = '".$m."'";
$sql.="and monthname(im.DeliveryChellanDate) = '".$m."'";
}
@ -855,8 +856,8 @@ where im.IGRStatus = 'ST027' and id.BankStatus ='ST072' and sd.SupplierID='".$s
$fromd= date("Y-m-d",strtotime($fdate));
$tod=date("Y-m-d",strtotime($tdate));
$sql.="and date(im.MaterialRcvdDate) >= '".$fromd."'
and date(im.MaterialRcvdDate) <= '".$tod."'";
$sql.="and date(im.DeliveryChellanDate) >= '".$fromd."'
and date(im.DeliveryChellanDate) <= '".$tod."'";
}
@ -942,7 +943,7 @@ function receiptdata()
function debitpolistfilter($suppliername,$fa,$aa,$m,$fdate,$tdate)
{
// echo $suppliername+'sn';
$this->db->select('bm.id,bm.mid,igrm.MaterialRcvdDate,bm.PONO,bm.Suppliername,bm.Totalpoamount,
$this->db->select('bm.id,bm.mid,bm.Podate,bm.PONO,bm.Suppliername,bm.Totalpoamount,
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,igrm.file,bm.IGRLineItemNo,br.Clearbalance,br.Balancetocleared,bu.FilePath,bu.BillNo,inward.FilePath as Fpath');
$this->db->from ('T_Bankporeport bm');
$this->db->join ('T_IGR_Master igrm','igrm.PONO = bm.PONO or igrm.IGRNO = bm.IGRNO ','left');
@ -952,7 +953,7 @@ function receiptdata()
$this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =igrm.IGRNO','left');
$this->db->join ('T_PurchaseOrder_BillUpload bu','bm.PONO=bu.PONO','left');
$this->db->where('bm.IsActive',1);
$this->db->where('bm.Suppliername',$suppliername);
$this->db->where('bm.Suppliername',$suppliername);
if ($fa and $aa != ''){
//$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
@ -1087,7 +1088,7 @@ function receiptdata()
function uncreditinvoicelistfilter($client,$fdate,$tdate,$fa,$aa,$m)
{
echo $client;
$this->db->select('iva.invoice_id,iva.invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_id,ic.client_name,BI.balancetoreceived,BI.amountreceived');
$this->db->from ('ip_invoice_amounts iva');
@ -1411,7 +1412,7 @@ function receiptdata()
}
function paided($suppliername)
{
$this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,
$this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate,
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,bm.IGRLineItemNo,br.Balancetocleared,br.Clearbalance');
$this->db->from ('T_Bankporeport bm');
$this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =bm.IGRNO','left');
@ -1426,7 +1427,7 @@ function receiptdata()
}
function amountpaidsupplierwise()
{
$this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,
$this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate,
bm.Balancetopay,sum(bm.Amountpaid) as Amountpaid,bm.IGRNO,bm.IGRLineItemNo');
$this->db->from ('T_Bankporeport bm');
$this->db->group_by('bm.Suppliername');
@ -1555,7 +1556,7 @@ function receiptdata()
$this->db->join ('T_Bankinvoicereport BI',' iv.invoice_number =BI.invoiceno','left');
$this->db->where('iv.receivedstatus ','ST066');
$this->db->where('iv.invoice_status_id','2');
$this->db->where('ic.client_name',$clientname);
$this->db->where('ic.client_id',$clientname);
// $this->db->where('iv.receivedstatus','ST066');
$this->db->group_by('iva.invoice_id');
@ -1566,7 +1567,7 @@ function receiptdata()
function unreceivedsupplier()
{
$this->db->select('iva.invoice_id,sum(iva.invoice_total)as invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_name,BI.balancetoreceived,sum(BI.amountreceived)as amountreceived');
$this->db->select('iva.invoice_id,sum(iva.invoice_total)as invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_id,ic.client_name,BI.balancetoreceived,sum(BI.amountreceived)as amountreceived');
$this->db->from ('ip_invoice_amounts iva');
$this->db->join ('ip_invoices iv','iva.invoice_id = iv.invoice_id','left');
$this->db->join ('ip_clients ic','iv.client_id = ic.client_id','left');
@ -1583,7 +1584,7 @@ function receiptdata()
function uncreditinvoicewisefilter($fdate,$tdate,$fa,$aa,$m)
{
$this->db->select('iva.invoice_id,sum(iva.invoice_total)as invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_name,BI.balancetoreceived,sum(BI.amountreceived)as amountreceived');
$this->db->select('iva.invoice_id,sum(iva.invoice_total)as invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_id,ic.client_name,BI.balancetoreceived,sum(BI.amountreceived)as amountreceived');
$this->db->from ('ip_invoice_amounts iva');
$this->db->join ('ip_invoices iv','iva.invoice_id = iv.invoice_id','left');
$this->db->join ('ip_clients ic','iv.client_id = ic.client_id','left');

View File

@ -2,7 +2,7 @@
<?php
echo $suppliername;
if(!empty($amountpaid))
{
@ -93,29 +93,22 @@ if(!empty($amountpaid))
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<div class="col-md-1 col-md-offset-11">
<a href="<?php base_url() ?>amountpaidsupplier" class="btn btn-primary" value="Back"/>Back</a>
</div>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Reports</b></p></h3></center>
<?php
if(!empty($bankdebit)){
foreach($bankdebit as $ap)
{
}
?>
<center><h4 style="color:#3c8dbc"><span><?php echo $ap->Suppliername?></span></h4></center>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Reports </b></p></h3></center>
<center><h4 style="color:#3c8dbc"><span><?php echo $suppliername;?></span></h4></center>
<div class="row">
<div class="col-md-6 col-xs-6">
<input type="hidden" class="form-control required" id="supplier" name="supplier" value="<?php echo $ap->Suppliername;?>"maxlength="250"></textarea>
<input type="hidden" class="form-control required" id="supplier" name="supplier" value="<?php echo $suppliername;?>" ></textarea>
</div>
</div>
<?php
}
?>
<div class="box-body">
<div class="row">
@ -243,7 +236,7 @@ if(!empty($amountpaid))
<input type="hidden" name="clearbal" id="clearbal<?php echo $i ?>" value="<?php echo $ap->Clearbalance; ?>"/>
<input type="hidden" name="bankingid" id="bankingid<?php echo $i ?>" value="<?php echo $ap->mid; ?>"/>
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($ap->MaterialRcvdDate),'d-m-Y'); ?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($ap->Podate),'d-m-Y'); ?></span></td>
<td align="left" id="pono"><span><?php echo $ap->PONO?></span></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></td>

View File

@ -62,28 +62,20 @@ foreach($financialyear as $item)
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<div class="col-md-1 col-md-offset-11">
<a href="<?php base_url() ?>Bankamountreceived" class="btn btn-primary" value="Back"/>Back</a>
</div>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Amount Received Reports</b></p></h3></center>
<?php
if(!empty($amountreceived)){
foreach($amountreceived as $ap)
{
}
?>
<center><h4 style="color:#3c8dbc"><?php echo $ap->customername?></h4></center>
<div class="row">
<center><h4 style="color:#3c8dbc"><span><?php echo $clientname;?></span></h4></center>
<div class="row">
<div class="col-md-6 col-xs-6">
<input type="hidden" class="form-control required" id="customer" name="customer" value="<?php echo $ap->customername;?>"maxlength="250"></textarea>
<input type="hidden" class="form-control required" id="customer" name="customer" value="<?php echo $clientname;?>" ></textarea>
</div>
</div>
<?php
}
?>
<div class="box-body">
<div class="row">
<!-- <div class="col-md-3" style=" border: 2px solid black;font-size:14px;background-color:#ccc;">-->

View File

@ -68,10 +68,11 @@ foreach($financialyear as $item)
<div class="box box-info" id="content">
<br>
<div class="col-md-1 col-md-offset-11">
<a href="<?php base_url() ?>Bankamountunpaid" class="btn btn-primary" value="Back"/>Back</a>
<a href="<?php base_url() ?>amountunpaid" class="btn btn-primary" value="Back"/>Back</a>
</div>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Un Paid Reports</b></p></h3></center>
<center><h4 style="color:#3c8dbc"><span><?php echo $t->SupplierName?></span></h4></center>
<?php
if(!empty($bankunpaid)){
@ -80,17 +81,17 @@ foreach($financialyear as $item)
}
?>
<center><h4 style="color:#3c8dbc"><span><?php echo $t->SupplierName?></span></h4></center>
<?php
}
?>
<div class="row">
<div class="col-md-6 col-xs-6">
<input type="hidden" class="form-control required" id="supplier" name="supplier" value="<?php echo $t->SupplierID;?>"maxlength="250"></textarea>
<input type="hidden" class="form-control required" id="supplier" name="supplier" value="<?php echo $suppliername;?>" ></textarea>
</div>
</div>
<?php
}
?>
<div class="box-body">
<br>
@ -139,9 +140,7 @@ foreach($financialyear as $item)
</select>
</div>
</div>
<div>
<input type="hidden" id="supplierid" name="supplierid" value="<?php echo $t->SupplierID?>">
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'Month'; ?>
@ -334,7 +333,9 @@ foreach($financialyear as $item)
<td class="amount"><strong>
<?php echo $tot_amount; ?>
</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>

View File

@ -37,11 +37,11 @@ foreach($financialyear as $item)
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info" id="content">
<br>
<div class="col-md-1 col-md-offset-11">
<a href="<?php base_url() ?>Bankingstatement" class="btn btn-primary" value="Back"/>Back</a>
<a href="<?php base_url() ?>bankunreceivedsupp" class="btn btn-primary" value="Back"/>Back</a>
</div>
<br>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Un Receivable Invoice Report</b></p></h3></center>
<?php
@ -52,25 +52,25 @@ foreach($financialyear as $item)
}
?>
<center><h4 style="color:#3c8dbc"><?php echo $t->client_name?></h4></center>
<?php
}
?>
<div class="row">
<div class="col-md-6 col-xs-6">
<input type="hidden" class="form-control required" id="client" name="client" value="<?php echo $t->client_id;?>"maxlength="250"></textarea>
<input type="hidden" class="form-control required" id="client" name="client" value="<?php echo $client;?>"maxlength="250"></textarea>
</div>
</div>
<?php
}
?>
<div class="box-body">
<br>
<br>
<div class="row">
<!-- <div class="col-md-3" style=" border: 2px solid black;font-size:14px;background-color:#ccc;"> -->

View File

@ -162,7 +162,7 @@ foreach($financialyear as $item)
<td align="left" id="sn<?php echo $i ?>" ><a href="<?= base_url() ?>cashbook/amountunreceived?sid=<?php echo $t->client_name;?>"><span><?php echo $t->client_name?></span></a></td>
<td align="left" id="sn<?php echo $i ?>" ><a href="<?= base_url() ?>cashbook/amountunreceived?sid=<?php echo $t->client_id;?>"><span><?php echo $t->client_name?></span></a></td>
<td align="left" id="tov<?php echo $i ?>" ><span><?php $tot_amount=$tot_amount+round($invoice_total)?><?php echo round($invoice_total,2)?></span></td>