deleted function in bankstatement

This commit is contained in:
gayathri1990 2018-11-22 17:13:03 +05:30
parent 3553d4dd05
commit cbff2e3e76
4 changed files with 30 additions and 7 deletions

View File

@ -1884,6 +1884,7 @@ class cashbook extends BaseController
$totalamount =$this->input->post('Totalpoamount'); $totalamount =$this->input->post('Totalpoamount');
$Amount = $this->input->post('paidamount'); $Amount = $this->input->post('paidamount');
$id=$this->input->post('mappingid'); $id=$this->input->post('mappingid');
$igrno = $this->input->post('IGRItemNo'); $igrno = $this->input->post('IGRItemNo');
@ -1920,9 +1921,9 @@ class cashbook extends BaseController
$result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive); $result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive);
$data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($igrno); $data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($igrno);
$amountpaidpo= $data['$poreportamount'][0]->Amountpaid; $amountpaidpo= $data['$poreportamount'][0]->Amountpaid;
$balancetopay= $data['$poreportamount'][0]->Balancetopay; $balancetopaypo= $data['$poreportamount'][0]->Balancetopay;
$amountpaidupdate=$amountpaidpo-$Amount; $amountpaidupdate=($amountpaidpo) - ($Amount);
$balancetopayupdate=$balancetopay+$Amount; $balancetopayupdate=($balancetopaypo) + ($Amount);
if($amountpaidupdate==0) if($amountpaidupdate==0)
{ {
$IsAct=0; $IsAct=0;
@ -1931,7 +1932,7 @@ class cashbook extends BaseController
{ {
$IsAct=1; $IsAct=1;
} }
$result3= $this->cashbook_model->updateBankporeportpo($igrno,$balancetopayupdate,$amountpaidupdate,$Bankid,$IsAct); $result3= $this->cashbook_model->updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct);
$this->loadViews("bankstatement", $this->global,$data, NULL); $this->loadViews("bankstatement", $this->global,$data, NULL);
} }
public function Deletemappingpo() public function Deletemappingpo()

View File

@ -1183,7 +1183,7 @@ function receiptdata()
{ {
$this->db->select('bm.ID,bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid, $this->db->select('bm.ID,bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,
bm.balancetoreceived,bm.amountreceived,br.cclearbalance,br.cbalancetocleared'); bm.balancetoreceived,bm.amountreceived,br.cclearbalance,br.cbalancetocleared,bm.BankDate');
$this->db->from ('T_Bankmappingiv bm'); $this->db->from ('T_Bankmappingiv bm');
$this->db->join('ip_invoices iv','iv.invoice_number=bm.invoiceno'); $this->db->join('ip_invoices iv','iv.invoice_number=bm.invoiceno');
$this->db->join ('ip_clients ic','ic.client_name = bm.customername','left'); $this->db->join ('ip_clients ic','ic.client_name = bm.customername','left');
@ -1906,7 +1906,7 @@ function receiptdata()
// } // }
function received($clientid,$fdate,$tdate,$fa,$aa,$m) function received($clientid,$fdate,$tdate,$fa,$aa,$m)
{ {
$this->db->select('bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,bm.customerid, $this->db->select('bm.indate,bm.BankDate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,bm.customerid,
bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared'); bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared');
$this->db->from ('T_Bankmappingiv bm'); $this->db->from ('T_Bankmappingiv bm');
$this->db->join('ip_invoices iv','iv.invoice_number=bm.invoiceno'); $this->db->join('ip_invoices iv','iv.invoice_number=bm.invoiceno');
@ -2234,6 +2234,19 @@ function receiptdata()
return $r; return $r;
} }
function updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct)
{
$this->db->set('Balancetopay',$balancetopayupdate);
$this->db->set('Amountpaid',$amountpaidupdate);
$this->db->set('IsActive',$IsAct);
$this->db->where('IGRLineItemNo',$igrno);
//$this->db->where('mid',$Bankid);
$this->db->update('T_Bankporeport');
$r = $this->db->affected_rows();
return $r;
}
function updatebankinvoicereport($invoiceno,$bankid,$balancetoreceivedupdate,$amountreceivedupdate,$IsAct) function updatebankinvoicereport($invoiceno,$bankid,$balancetoreceivedupdate,$amountreceivedupdate,$IsAct)
{ {
$this->db->set('balancetoreceived',$balancetoreceivedupdate); $this->db->set('balancetoreceived',$balancetoreceivedupdate);

View File

@ -230,6 +230,7 @@ if(!empty($amountpaid))
<tr> <tr>
<th>Date</th> <th>Date</th>
<th>BankDate</th>
<th>PONO</th> <th>PONO</th>
<th>IGR NO</th> <th>IGR NO</th>
<th>IGRItemNo</th> <th>IGRItemNo</th>
@ -268,6 +269,7 @@ if(!empty($amountpaid))
<input type="hidden" name="bankingid" id="bankingid<?php echo $i ?>" value="<?php echo $ap->mid; ?>"/> <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->Podate),'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="bankdate<?php echo $i ?>"><span><?php echo date_format(date_create($ap->BankDate),'d-m-Y'); ?></span></td>
<td align="left" id="pono<?php echo $i ?>"><span><?php echo $ap->PONO?></span></td> <td align="left" id="pono<?php echo $i ?>"><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"><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> <td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></td>
@ -374,19 +376,24 @@ if(!empty($amountpaid))
<script> <script>
function podelete(i) function podelete(i)
{ {
alert('ok');
$('#content').loader('show'); $('#content').loader('show');
var totalamount=$('#tpoa'+i).text();//totalpoamount var totalamount=$('#tpoa'+i).text();//totalpoamount
var paidamount=$('#ap'+i).text();//amountpaid var paidamount=$('#ap'+i).text();//amountpaid
var balancetopay=$('#btp'+i).text();//balancetopay var balancetopay=$('#btp'+i).text();//balancetopay
var Igritemno=$('#igritemno'+i).text();//igritemno var Igritemno=$('#igritemno'+i).text();//igritemno
var bankid=$('#bankingid'+i).val();//bankid var bankid=$('#bankingid'+i).val();//bankid
var mappingid=$('#mapid'+i).val(); var mappingid=$('#mapid'+i).val();
var bankingclear=$('#bankingbalclear'+i).val(); var bankingclear=$('#bankingbalclear'+i).val();

View File

@ -240,6 +240,7 @@ foreach($financialyear as $item)
<tr> <tr>
<th>Date</th> <th>Date</th>
<th>BankDate</th>
<th>INVOICENO</th> <th>INVOICENO</th>
<!--<th>Supplier Name</th>--> <!--<th>Supplier Name</th>-->
<th>Total Invoice Amount (&#8377;)</th> <th>Total Invoice Amount (&#8377;)</th>
@ -274,6 +275,7 @@ foreach($financialyear as $item)
<!-- <td align="left" id="date<?php echo $i ?>"><span><?php echo $ap->indate?></span></td> --> <!-- <td align="left" id="date<?php echo $i ?>"><span><?php echo $ap->indate?></span></td> -->
<td align="left"><?php $Pdt = new DateTime($ap->indate);$Created_Date = $Pdt->format('d-m-Y'); echo $Created_Date?></td> <td align="left"><?php $Pdt = new DateTime($ap->indate);$Created_Date = $Pdt->format('d-m-Y'); echo $Created_Date?></td>
<td align="left" id="bankdate<?php echo $i ?>"><span><?php echo date_format(date_create($ap->BankDate),'d-m-Y'); ?></span></td>
<td align="left" id="invno<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $ap->invoiceno;?>"><span><?php echo $ap->invoiceno?></span></a></td> <td align="left" id="invno<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $ap->invoiceno;?>"><span><?php echo $ap->invoiceno?></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>--> <!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->