bankstatement advance screen

This commit is contained in:
gayathri1990 2018-07-16 17:51:20 +05:30
parent d3dc61c8ca
commit 2dc312f6ef
7 changed files with 138 additions and 94 deletions

View File

@ -220,7 +220,8 @@ class cashbook extends BaseController
//$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense '; //$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense ';
$this->global['pageTitle'] = 'Siddharth : Bank Report - File Upload'; $this->global['pageTitle'] = 'Siddharth : Bank Report - File Upload';
$data['bankbalance'] = $this->cashbook_model->getbalancedetails(); $data['bankbalance'] = $this->cashbook_model->getbalancedetails();
$data['clearbalance'] = $this->cashbook_model->clearedbalance(); $data['cleareddebitbalance'] = $this->cashbook_model->cleareddebitbalance();
$data['clearedcreditbalance'] = $this->cashbook_model->clearedcreditbalance();
$this->loadViews("bankingfile", $this->global, $data , NULL); $this->loadViews("bankingfile", $this->global, $data , NULL);
} }
function bankfileupload() function bankfileupload()
@ -316,8 +317,8 @@ class cashbook extends BaseController
$credit=$sheet->getCell('G'.$x)->getValue(); $credit=$sheet->getCell('G'.$x)->getValue();
$balance=$sheet->getCell('H'.$x)->getValue(); $balance=$sheet->getCell('H'.$x)->getValue();
// $IsActive=0;
$filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'Balance'=>$balance,'Bankname'=>$bank); $filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'Balance'=>$balance,'Bankname'=>$bank,'IsActive'=> $IsActive);
@ -476,17 +477,18 @@ class cashbook extends BaseController
{ {
$statu1='OPEN'; $statu1='OPEN';
} }
$isactive=1;
//$clearbalance=$totalbankamount- //$clearbalance=$totalbankamount-
if($amounttype=='CREDIT') if($amounttype=='CREDIT')
{ {
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu); $cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu,'IsActive'=>$isactive);
//print_r($cashbookstatus1); //print_r($cashbookstatus1);
//die(); //die();
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid); $res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
} }
else else
{ {
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$statu1); $cashbookstatus = array('Clearbalance'=>$total,'Status'=>$statu1,'IsActive'=>$isactive);
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid); $res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
} }
@ -922,17 +924,18 @@ class cashbook extends BaseController
if($amounttype=='CREDIT') if($amounttype=='CREDIT')
{ {
$updatecredit=$invam+$cashamnt; $updatecredit=$invam+$cashamnt;
//print_r($updateamount); $isactive=0;
$cashbookstatus1= array('cclearbalance'=>$updatecredit,'cstatus'=>$status); $cashbookstatus1= array('cclearbalance'=>$updatecredit,'cstatus'=>$status,'IsActive'=>$isactive);
//print_r($cashbookstatus1); //print_r($cashbookstatus1);
//die(); //die();
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid); $res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
} }
else else
{ {
$updatedepit=$poamnt+$cashamnt; $updatedepit=$poamnt+$cashamnt;
$cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status); $cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status,'IsActive'=>$isactive);
// print_r($cashbookstatus); // print_r($cashbookstatus);
//die(); //die();
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid); $res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
@ -1011,9 +1014,6 @@ class cashbook extends BaseController
public function mappingpo() public function mappingpo()
{ {
$this->global['pageTitle'] = 'Siddharth : Bank Report - Debited Settlements'; $this->global['pageTitle'] = 'Siddharth : Bank Report - Debited Settlements';
$SupplierName = $this->input->post('SupplierName'); $SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date'); $fdate = $this->input->post('from_date');
@ -1030,7 +1030,6 @@ class cashbook extends BaseController
$data['balancetoclear'] =$_GET['balancetoclear']; $data['balancetoclear'] =$_GET['balancetoclear'];
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid); $data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
$data['mapping'] = $this->cashbook_model->debitpolist($bankid); $data['mapping'] = $this->cashbook_model->debitpolist($bankid);
// $data['mappingimage'] = $this->cashbook_model->debitimage($bankid);
$data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid); $data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid);
$data['paidpoamount'] = $this->cashbook_model->poamonut($bankid); $data['paidpoamount'] = $this->cashbook_model->poamonut($bankid);
$data['supplier'] = $this->cashbook_model->getsupplier(); $data['supplier'] = $this->cashbook_model->getsupplier();
@ -1144,8 +1143,8 @@ class cashbook extends BaseController
{ {
$status='CLOSE'; $status='CLOSE';
} }
$active=1;
$bankdata = array('Clearbalance'=>$clearedblnce,'Balancetocleared'=>$balancetocleared,'Status'=>$status); $bankdata = array('Clearbalance'=>$clearedblnce,'Balancetocleared'=>$balancetocleared,'Status'=>$status,'IsActive'=>$active);
if($check == 1) if($check == 1)
{ {
@ -1266,8 +1265,8 @@ class cashbook extends BaseController
} }
$active=1;
$bankdata = array('cclearbalance'=>$clearedblnce,'cbalancetocleared'=>$balancetoreceived,'cstatus'=>$status); $bankdata = array('cclearbalance'=>$clearedblnce,'cbalancetocleared'=>$balancetoreceived,'cstatus'=>$status,'IsActive'=>$active);
if($check == 1) if($check == 1)
{ {
$res = $this->cashbook_model->bankcreditupdate($bankdata,$bankid); $res = $this->cashbook_model->bankcreditupdate($bankdata,$bankid);
@ -1333,8 +1332,6 @@ class cashbook extends BaseController
public function amountpaid() public function amountpaid()
{ {
//$this->global['pageTitle'] = 'Siddharth : amountpaid'; //$this->global['pageTitle'] = 'Siddharth : amountpaid';
$this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details'; $this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details';
if ($this->input->post('btn_submit')) if ($this->input->post('btn_submit'))
@ -1342,7 +1339,6 @@ class cashbook extends BaseController
$SupplierName = $this->input->post('SupplierName'); $SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date'); $fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date'); $tdate = $this->input->post('to_date');
$data['bankdebit'] = $this->cashbook_model->debitpolistfilter($SupplierName,$fdate,$tdate); $data['bankdebit'] = $this->cashbook_model->debitpolistfilter($SupplierName,$fdate,$tdate);
} }
$data['amountpaid'] = $this->cashbook_model->paided(); $data['amountpaid'] = $this->cashbook_model->paided();
@ -1384,7 +1380,6 @@ 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');
@ -1426,17 +1421,33 @@ class cashbook extends BaseController
$Bankid = $_GET['bankid']; $Bankid = $_GET['bankid'];
$Amount = $_GET['amount']; $Amount = $_GET['amount'];
$igrno = $_GET['igrno']; $igrno = $_GET['igrno'];
$balancetoclear=$_GET['balancetoclear'];
//for T_Bankreport IsActive//
$bankdebit=$_GET['debit'];
$mapped= $Amount+$balancetoclear;
if( $bankdebit==$mapped)
{
$active=0;
}
else
{
$active=1;
}
/////////////////
$id=$_GET['id']; $id=$_GET['id'];
$balancetoclear=$_GET['balancetoclear'];
$bankamount=$_GET['bankamount']; $bankamount=$_GET['bankamount'];
$updateamount=$bankamount-$Amount; $updateamount=$bankamount-$Amount;
$updatebalancetoclear=$Amount+$balancetoclear; $updatebalancetoclear=$Amount+$balancetoclear;
$data['$bankmappingamount'] = $this->cashbook_model->gettotalbankmappingpo($igrno); $data['$bankmappingamount'] = $this->cashbook_model->gettotalbankmappingpo($igrno);
$amountpaid=$data['$bankmappingamount'][0]->Amountpaid; $amountpaid=$data['$bankmappingamount'][0]->Amountpaid;
//if($Amount==)
//$data['$totallineitemamount']=$this->cashbook_model->gettotallineitem($igrno); //$data['$totallineitemamount']=$this->cashbook_model->gettotallineitem($igrno);
if($amountpaid==$totalamount) if($amountpaid==$totalamount)
{ {
$BankStatus=NO_PAIDIGR; $BankStatus=NO_PAIDIGR;
@ -1447,7 +1458,7 @@ class cashbook extends BaseController
} }
$result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus); $result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus);
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear); $result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear,$active);
//for update mapping amount in t_bankmappingpo table// //for update mapping amount in t_bankmappingpo table//
$balancetopay=$_GET['balancetopay']; $balancetopay=$_GET['balancetopay'];
$totalbalancetopay=$Amount + $balancetopay; $totalbalancetopay=$Amount + $balancetopay;
@ -1455,7 +1466,7 @@ class cashbook extends BaseController
$updatebankpoamount=$totalamount-$totalbalancetopay; $updatebankpoamount=$totalamount-$totalbalancetopay;
$result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive); $result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive);
//for update mapping amount inT_Bankporeport table// //for update mapping amount inT_Bankporeport table//
$result3= $this->cashbook_model->updateBankporeportpo($igrno,$totalbalancetopay,$updatebankpoamount,$Bankid); $result3= $this->cashbook_model->updateBankporeportpo($igrno,$totalbalancetopay,$updatebankpoamount,$Bankid,$active);
if(count($result2)>0) if(count($result2)>0)
{ {
@ -1467,6 +1478,7 @@ class cashbook extends BaseController
{ {
$this->global['pageTitle'] = 'Siddharth : Bank Report - Delete Mapping Invoice'; $this->global['pageTitle'] = 'Siddharth : Bank Report - Delete Mapping Invoice';
$credit= $this->input->post('credit');
$invoiceno = $this->input->post('invoiceno'); $invoiceno = $this->input->post('invoiceno');
$bankid = $this->input->post('bankid'); $bankid = $this->input->post('bankid');
$mappingid=$this->input->post('mappingid'); $mappingid=$this->input->post('mappingid');
@ -1477,7 +1489,19 @@ class cashbook extends BaseController
$balancetoreceived = $this->input->post('balancetoreceived'); $balancetoreceived = $this->input->post('balancetoreceived');
$updatebalancetoclear=$amountreceived+$bankingbalclear; $updatebalancetoclear=$amountreceived+$bankingbalclear;
$updateclearbalance=$bankingclear-$amountreceived; $updateclearbalance=$bankingclear-$amountreceived;
$bankstatement=array('cbalancetocleared'=>$updatebalancetoclear,'cclearbalance'=>$updateclearbalance);
//update Isactive field in T_Bankreport //////
$mapped=$balancetoreceived+$amountreceived;
if($credit==$mapped)
{
$active=0;
}
else
{
$active=1;
}
$bankstatement=array('cbalancetocleared'=>$updatebalancetoclear,'cclearbalance'=>$updateclearbalance,'IsActive'=>$active);
$result1= $this->cashbook_model->updatebankreportiv($bankid,$bankstatement); $result1= $this->cashbook_model->updatebankreportiv($bankid,$bankstatement);
if($totinvoiceamount==$amountreceived) if($totinvoiceamount==$amountreceived)
{ {

View File

@ -31,12 +31,12 @@ class cashbook_model extends CI_Model
$r = $this->db->affected_rows(); $r = $this->db->affected_rows();
return $r; return $r;
} }
function addcashbook($bankcash1) // function addcashbook($bankcash1)
{ // {
$this->db->insert('T_Bankmappingcashbook',$bankcash1); // $this->db->insert('T_Bankmappingcashbook',$bankcash1);
$r = $this->db->affected_rows(); // $r = $this->db->affected_rows();
return $r; // return $r;
} // }
function getIncomeExpenseList($i="") function getIncomeExpenseList($i="")
{ {
@ -94,6 +94,7 @@ class cashbook_model extends CI_Model
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left'); $this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
$this->db->where('t_income_expense.IsActive',1); $this->db->where('t_income_expense.IsActive',1);
$this->db->where('t_income_expense.account_code','ADV001'); $this->db->where('t_income_expense.account_code','ADV001');
//$this->db->where('t_income_expense.account_code','0013');
$this->db->order_by("date","desc"); $this->db->order_by("date","desc");
if(!empty($i)) if(!empty($i))
{ {
@ -324,15 +325,25 @@ function bankstatement($fdate,$tdate,$fa,$aa){
} }
function clearedbalance(){ function cleareddebitbalance(){
$sql = 'SELECT SUM(cclearbalance) as credit,SUM(Clearbalance) as debit FROM T_bankreport'; $sql = "SELECT SUM(Balancetocleared) as debit FROM T_bankreport where Clearbalance >'0'";
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
function clearedcreditbalance(){
$sql = "SELECT SUM(cbalancetocleared) as credit FROM T_bankreport where cclearbalance >'0'";
$query = $this->db->query($sql);
return $query->result();
}
function debitbankstatemet($Supplierid,$fdate,$tdate) function debitbankstatemet($Supplierid,$fdate,$tdate)
{ {
@ -420,11 +431,12 @@ function receiptdata()
function debitpolist($bankid) function debitpolist($bankid)
{ {
$this->db->select('bp.id,bp.mid,igrm.MaterialRcvdDate,bp.PONO,bp.Suppliername,bp.Totalpoamount, $this->db->select('bp.id,bp.mid,igrm.MaterialRcvdDate,bp.PONO,bp.Suppliername,bp.Totalpoamount,br.Debit,
bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo,igrm.file,bu.FilePath'); bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo,igrm.file,bu.FilePath');
$this->db->from ('T_Bankmappingpo bp'); $this->db->from ('T_Bankmappingpo bp');
$this->db->join ('T_IGR_Master igrm','bp.IGRNO = igrm.IGRNO','left'); $this->db->join ('T_IGR_Master igrm','bp.IGRNO = igrm.IGRNO','left');
$this->db->join ('T_PurchaseOrder_BillUpload bu','bu.PONO = bp.PONO','left'); $this->db->join ('T_PurchaseOrder_BillUpload bu','bu.PONO = bp.PONO','left');
$this->db->join ('T_bankreport br','br.ID=bp.mid');
$this->db->where('bp.IsActive',1); $this->db->where('bp.IsActive',1);
$this->db->where('bp.mid',$bankid); $this->db->where('bp.mid',$bankid);
// $this->db->where('igrde.BankStatus !=','ST072'); // $this->db->where('igrde.BankStatus !=','ST072');
@ -469,7 +481,7 @@ function debitpolist($bankid)
$this->db->where('sd.SupplierID',$SupplierName); $this->db->where('sd.SupplierID',$SupplierName);
} }
$this->db->where('bm.IsActive',1);; $this->db->where('bm.IsActive',1);
$this->db->group_by('bm.id'); $this->db->group_by('bm.id');
$query = $this->db->get(); $query = $this->db->get();
return $query->result(); return $query->result();
@ -478,11 +490,12 @@ function debitpolist($bankid)
function creditinvoicelist($bankid) function creditinvoicelist($bankid)
{ {
$this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid, $this->db->select('bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,
balancetoreceived,amountreceived,ID'); bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit');
$this->db->from ('T_Bankmappingiv'); $this->db->from ('T_Bankmappingiv bm');
$this->db->where('bankid',$bankid); $this->db->join('T_bankreport br','br.ID=bm.bankid');
$this->db->where('IsActive',1); $this->db->where('bm.bankid',$bankid);
$this->db->where('bm.IsActive',1);
//$this->db->group_by('invoiceno'); //$this->db->group_by('invoiceno');
$query = $this->db->get(); $query = $this->db->get();
return $query->result(); return $query->result();
@ -881,10 +894,11 @@ function debitpolist($bankid)
} }
} }
function deletemapping($Bankid,$updateamount,$updatebalancetoclear) function deletemapping($Bankid,$updateamount,$updatebalancetoclear,$active)
{ {
$this->db->set('Clearbalance',$updateamount); $this->db->set('Clearbalance',$updateamount);
$this->db->set('Balancetocleared',$updatebalancetoclear); $this->db->set('Balancetocleared',$updatebalancetoclear);
$this->db->set('IsActive',$active);
$this->db->where('ID',$Bankid); $this->db->where('ID',$Bankid);
$this->db->update('T_bankreport'); $this->db->update('T_bankreport');
$r = $this->db->affected_rows(); $r = $this->db->affected_rows();

View File

@ -400,18 +400,7 @@ function GetPayment(i)
var ponovalue = igrlineitem+','+poamount; var ponovalue = igrlineitem+','+poamount;
temppo.push(ponovalue); temppo.push(ponovalue);
console.log(temppo); console.log(temppo);
var total=0;
$.each(temppo, function( index, value )
{
var res2 = value.split(',');
var pono=res2[0];
//alert(pono+'pono');
var bam=res2[1];
//alert(bam+'bam');
total=parseFloat(bam)+parseFloat(total);
$('#addvalue').val(parseFloat(total).toFixed(2));
});
//console.log(temppo); //console.log(temppo);
var supname =document.getElementById ("sn"+i ).innerText; var supname =document.getElementById ("sn"+i ).innerText;
@ -475,20 +464,22 @@ function GetPayment(i)
j=parseInt(j)+1; j=parseInt(j)+1;
//alert(j+'j'); //alert(j+'j');
var to=0; var to=0;
// for(t=1;t<j;t++) for(t=1;t<j;t++)
// { {
var total=0;
$.each(temppo, function( index, value )
{
var res2 = value.split(',');
// //var pono1 =document.getElementById ( "pono"+i ).innerText; var pono=res2[0];
// //alert(pono1); //alert(pono+'pono');
var bam=res2[1];
//alert(bam+'bam');
total=parseFloat(bam)+parseFloat(total);
$('#addvalue').val(parseFloat(total).toFixed(2));
});
// var tt=parseFloat( $('#totala'+t).val() == '' ? '0.00' : $('#totala'+t).val()); }
// to = parseFloat(to) + parseFloat (tt);
// $('#addvalue').val(parseFloat(to).toFixed(2));
// //var total= $('#addvalue').val();
// //total=addvalue;
// //alert(total);
// }
@ -526,11 +517,11 @@ else
{ {
var w=s; var w=s;
//alert(w+'w');
delamount= $('#totala'+w).val(); delamount= $('#totala'+w).val();
break; //break;
} }
} }
// //alert(w); // //alert(w);
@ -545,7 +536,7 @@ else
$('#Rowid').val(ro); $('#Rowid').val(ro);
//$('#addvalue').val(''); //$('#addvalue').val('');
$('#invoicepaymet'+i).val(''); //$('#invoicepaymet'+i).val('');
$('#hideigrline'+i).val(''); $('#hideigrline'+i).val('');
$('#date1'+i).val(''); $('#date1'+i).val('');
$('#purchaseono'+i).val(''); $('#purchaseono'+i).val('');
@ -562,7 +553,7 @@ function GetAmount(i)
{ {
//alert('text'); //alert('text');
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val()) var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
//alert(amount); alert(amount);
var negative=0; var negative=0;
if(amount<0) if(amount<0)
{ {
@ -629,6 +620,7 @@ function GetAmount(i)
{ {
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val()); var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
tot11= parseFloat(tot11)+parseFloat(Payingamount); tot11= parseFloat(tot11)+parseFloat(Payingamount);
alert(tot11);
$('#addvalue').val(parseFloat(tot11).toFixed(2)); $('#addvalue').val(parseFloat(tot11).toFixed(2));
} }

View File

@ -15,17 +15,27 @@ if(!empty($bankbalance)){
<?php <?php
if(!empty($clearbalance)){ if(!empty($cleareddebitbalance)){
foreach($clearbalance as $b) foreach($cleareddebitbalance as $b)
// print_r($t);die(); // print_r($t);die();
{ {
// $creditdebit= $b->creditdebit;
$credit = $b->credit;
$debit = $b->debit; $debit = $b->debit;
// //
}}
if(!empty($clearedcreditbalance)){
foreach($clearedcreditbalance as $a)
// print_r($t);die();
{
$credit = $a->credit;
//
}} }}
?> ?>

View File

@ -556,10 +556,10 @@ function calculategrandtotal(){
tempTotal[index]=parseFloat(res2[2]); tempTotal[index]=parseFloat(res2[2]);
} }
else{ else
{
tempTotal[index]=parseFloat(res2[3]); tempTotal[index]=parseFloat(res2[3]);
} }
}); });
@ -567,8 +567,11 @@ function calculategrandtotal(){
var sum = 0; var sum = 0;
for (var i = 0; i < tempTotal.length; i++) { for (var i = 0; i < tempTotal.length; i++) {
sum += tempTotal[i] << 0;
sum += tempTotal[i];
} }
$('#addvalue').val(parseFloat(sum).toFixed(2)); $('#addvalue').val(parseFloat(sum).toFixed(2));
} }

View File

@ -169,6 +169,7 @@ foreach($financialyear as $item)
<input type="hidden" name="mappingid" id="mappingid<?php echo $i ?>" value="<?php echo $ap->ID?>"/> <input type="hidden" name="mappingid" id="mappingid<?php echo $i ?>" value="<?php echo $ap->ID?>"/>
<input type="hidden" name="credit" id="credit<?php echo $i ?>" value="<?php echo $ap->Credit?>"/>
<input type="hidden" name="bankingbalclear" id="bankingbalclear<?php echo $i ?>" value="<?php echo $bankbaltoclear; ?>"/> <input type="hidden" name="bankingbalclear" id="bankingbalclear<?php echo $i ?>" value="<?php echo $bankbaltoclear; ?>"/>
<input type="hidden" name="bankingclear" id="bankingclear<?php echo $i ?>" value="<?php echo $bankclear; ?>"/> <input type="hidden" name="bankingclear" id="bankingclear<?php echo $i ?>" value="<?php echo $bankclear; ?>"/>
<input type="hidden" name="bankingid" id="bankingid<?php echo $i ?>" value="<?php echo $ap->bankid; ?>"/> <input type="hidden" name="bankingid" id="bankingid<?php echo $i ?>" value="<?php echo $ap->bankid; ?>"/>
@ -290,12 +291,12 @@ var bankid=$('#bankingid'+i).val();
var amountreceived=$('#amountreceived'+i).text(); var amountreceived=$('#amountreceived'+i).text();
var bankingclear=$('#bankingclear'+i).val(); var bankingclear=$('#bankingclear'+i).val();
var mappingid=$('#mappingid'+i).val(); var mappingid=$('#mappingid'+i).val();
var credit=$('#credit'+i).val();
var bankingbalclear=$('#bankingbalclear'+i).val(); var bankingbalclear=$('#bankingbalclear'+i).val();
$.ajax( $.ajax(
{ {
data:{mappingid:mappingid,invoiceno:invoiceno,bankid:bankid,amountreceived:amountreceived,bankingclear:bankingclear,bankingbalclear:bankingbalclear,totinvoiceamount:totinvoiceamount,balancetoreceived:balancetoreceived}, data:{credit:credit,mappingid:mappingid,invoiceno:invoiceno,bankid:bankid,amountreceived:amountreceived,bankingclear:bankingclear,bankingbalclear:bankingbalclear,totinvoiceamount:totinvoiceamount,balancetoreceived:balancetoreceived},
type:"POST", type:"POST",
url:"<?php echo base_url() ?>DeleteInvoice", url:"<?php echo base_url() ?>DeleteInvoice",
success:function(data) success:function(data)

View File

@ -334,7 +334,7 @@ if(!empty($mapping))
?> ?>
<td> <td>
<a data-toggle="tooltip" href="<?php echo base_url().'cashbook/Deletemappingpo?bankid='.$ap->mid; ?>&id=<?php echo $ap->id ?>&amount=<?php echo $ap->Amountpaid?>&bankamount=<?php echo $bankamount?>&balancetoclear=<?php echo$balancetoclear?>&igrno=<?php echo $ap->IGRLineItemNo?>&balancetopay=<?php echo $ap->Balancetopay?>&totalpoamount=<?php echo $ap->Totalpoamount?>"><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details"></i>&nbsp;&nbsp;&nbsp;</a> <a data-toggle="tooltip" href="<?php echo base_url().'cashbook/Deletemappingpo?bankid='.$ap->mid; ?>&id=<?php echo $ap->id ?>&amount=<?php echo $ap->Amountpaid?>&bankamount=<?php echo $bankamount?>&balancetoclear=<?php echo$balancetoclear?>&igrno=<?php echo $ap->IGRLineItemNo?>&balancetopay=<?php echo $ap->Balancetopay?>&totalpoamount=<?php echo $ap->Totalpoamount?>&debit=<?php echo $ap->Debit?>"><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details"></i>&nbsp;&nbsp;&nbsp;</a>
</td> </td>