bankstatement
This commit is contained in:
parent
2370166d7a
commit
8c92964ced
@ -313,9 +313,10 @@ class cashbook extends BaseController
|
|||||||
{
|
{
|
||||||
$stat='OPEN';
|
$stat='OPEN';
|
||||||
}
|
}
|
||||||
$creditbalance=$totalbankamount-$totalamount;
|
$creditbalance=$totalbankamount-$ctotal;
|
||||||
//echo $creditbalance;
|
//echo $creditbalance;
|
||||||
if($creditbalance=='0')
|
//die();
|
||||||
|
if($creditbalance==0)
|
||||||
|
|
||||||
{
|
{
|
||||||
$statu='CLOSE';
|
$statu='CLOSE';
|
||||||
@ -328,6 +329,8 @@ class cashbook extends BaseController
|
|||||||
if($amounttype=='CREDIT')
|
if($amounttype=='CREDIT')
|
||||||
{
|
{
|
||||||
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu);
|
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu);
|
||||||
|
//print_r($cashbookstatus1);
|
||||||
|
//die();
|
||||||
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -707,13 +710,12 @@ class cashbook extends BaseController
|
|||||||
{
|
{
|
||||||
if ($this->input->post('btn_submit'))
|
if ($this->input->post('btn_submit'))
|
||||||
{
|
{
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$Supplierid = $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['cash'] = $_GET['sid'];
|
//$data['cash'] = $_GET['sid'];
|
||||||
//$data['bankid'] = $_GET['d'];
|
//$data['bankid'] = $_GET['d'];
|
||||||
|
$data['bankdepit'] = $this->cashbook_model->debitbankstatemet($Supplierid,$fdate,$tdate);
|
||||||
$data['bankdepit'] = $this->cashbook_model->debitbankstatemet($SupplierName,$fdate,$tdate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['getsupplier'] = $this->cashbook_model->getsupplier();
|
$data['getsupplier'] = $this->cashbook_model->getsupplier();
|
||||||
@ -764,7 +766,7 @@ class cashbook extends BaseController
|
|||||||
$tdate = $this->input->post('to_date');
|
$tdate = $this->input->post('to_date');
|
||||||
$bankid= $_GET['d'];
|
$bankid= $_GET['d'];
|
||||||
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
|
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
|
||||||
$data['mappingiv'] = $this->cashbook_model->creditinvoicelist($SupplierName,$fdate,$tdate,$bankid);
|
$data['mappingiv'] = $this->cashbook_model->creditinvoicelist($bankid);
|
||||||
$data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid);
|
$data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid);
|
||||||
$data['invoiceramount'] = $this->cashbook_model->invoiceamonut($bankid);
|
$data['invoiceramount'] = $this->cashbook_model->invoiceamonut($bankid);
|
||||||
$data['supplier'] = $this->cashbook_model->getsupplier();
|
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||||
@ -804,7 +806,11 @@ class cashbook extends BaseController
|
|||||||
$check = $this->input->post('check');
|
$check = $this->input->post('check');
|
||||||
$rw = $this->input->post('rw');
|
$rw = $this->input->post('rw');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
||||||
$date = $this->input->post('date');
|
$date = $this->input->post('podate');
|
||||||
|
$date = date_create($date);//,'Y-m-d');
|
||||||
|
$date = date_format($date,'Y-m-d');
|
||||||
|
//echo $date;
|
||||||
|
|
||||||
$pono = $this->input->post('pono');
|
$pono = $this->input->post('pono');
|
||||||
$sname = $this->input->post('sname');
|
$sname = $this->input->post('sname');
|
||||||
$tot = $this->input->post('tot');
|
$tot = $this->input->post('tot');
|
||||||
@ -987,9 +993,9 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$updateamount=($totalpaidamount+$eRec);
|
$updateamount=($totalpaidamount+$eRec);
|
||||||
|
|
||||||
$invoicedata1 = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$totalpaidamount,'bankid'=>$bankid);
|
$invoicedata1 = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$amtpaid,'bankid'=>$bankid);
|
||||||
|
|
||||||
$invoicedata = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$amtpaid,'bankid'=>$bankid);
|
$invoicedata = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$ip,'bankid'=>$bankid);
|
||||||
|
|
||||||
// //print_r ($invoicedata);
|
// //print_r ($invoicedata);
|
||||||
// //die();
|
// //die();
|
||||||
@ -1005,7 +1011,7 @@ class cashbook extends BaseController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "update";
|
//echo "update";
|
||||||
$result3 = $this->cashbook_model->invoiceupdate1($invoicedata,$invid);
|
$result3 = $this->cashbook_model->invoiceupdate1($invoicedata1,$invid);
|
||||||
|
|
||||||
}
|
}
|
||||||
if($balancetoreceived1==0)
|
if($balancetoreceived1==0)
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class cashbook_model extends CI_Model
|
|||||||
}
|
}
|
||||||
function getAccounTypes1()
|
function getAccounTypes1()
|
||||||
{
|
{
|
||||||
$this->db->select('name.type');
|
$this->db->select('name,type');
|
||||||
$r = $this->db->get('t_accountcode');
|
$r = $this->db->get('t_accountcode');
|
||||||
return $r->result();
|
return $r->result();
|
||||||
|
|
||||||
@ -150,11 +150,12 @@ class cashbook_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function debitbankstatemet($SupplierName,$fdate,$tdate)
|
function debitbankstatemet($Supplierid,$fdate,$tdate)
|
||||||
{
|
{
|
||||||
$status='ST057';
|
$status='ST057';
|
||||||
//echo $tdate;
|
//echo $tdate;
|
||||||
//die();
|
//die();
|
||||||
|
//$Supplierid;
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
|
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
|
||||||
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
|
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
|
||||||
@ -170,10 +171,11 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->where_in('POM.Status',[ST044,ST056]);
|
$this->db->where_in('POM.Status',[ST044,ST056]);
|
||||||
$this->db->where('POM.Paymentstatus !=','ST057');
|
$this->db->where('POM.Paymentstatus !=','ST057');
|
||||||
//$this->db->or_where('POM.Status',ST056);
|
//$this->db->or_where('POM.Status',ST056);
|
||||||
$this->db->where('supp.SupplierName',$SupplierName);
|
|
||||||
|
|
||||||
|
|
||||||
$this->db->or_where('POM.PODate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
|
||||||
|
$this->db->where('POM.PODate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
||||||
|
$this->db->or_where('supp.SupplierID',$Supplierid);
|
||||||
|
|
||||||
$this->db->group_by('POM.PONO');
|
$this->db->group_by('POM.PONO');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
@ -191,8 +193,9 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iv.invoice_number','left');
|
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iv.invoice_number','left');
|
||||||
$this->db->where('iv.invoice_status_id','2');
|
$this->db->where('iv.invoice_status_id','2');
|
||||||
$this->db->where('iva.receivedstatus !=','ST065');
|
$this->db->where('iva.receivedstatus !=','ST065');
|
||||||
$this->db->where('ic.client_name',$Customer);
|
$this->db->where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
||||||
$this->db->or_where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
$this->db->or_where('ic.client_id',$Customer);
|
||||||
|
|
||||||
$this->db->group_by('iva.invoice_id');
|
$this->db->group_by('iva.invoice_id');
|
||||||
//$this->db->where('inc.type','PAYMENT');
|
//$this->db->where('inc.type','PAYMENT');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
@ -236,13 +239,13 @@ function debitpolist($bankid)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function creditinvoicelist($SupplierName,$fdate,$tdate,$bankid)
|
function creditinvoicelist($bankid)
|
||||||
{
|
{
|
||||||
$this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid as id,
|
$this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid,
|
||||||
balancetoreceived,amountreceived');
|
balancetoreceived,amountreceived');
|
||||||
$this->db->from ('T_Bankinvoicereport');
|
$this->db->from ('T_Bankmappingiv');
|
||||||
$this->db->where('bankid',$bankid);
|
$this->db->where('bankid',$bankid);
|
||||||
$this->db->group_by('invoiceno');
|
//$this->db->group_by('invoiceno');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
@ -332,8 +335,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
function creditlistinv($invno)
|
function creditlistinv($invno)
|
||||||
{
|
{
|
||||||
$this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration');
|
$this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration');
|
||||||
$this->db->from ('T_Bankinvoicereport as bmp');
|
$this->db->from ('T_Bankmappingiv as bmp');
|
||||||
|
|
||||||
$this->db->join('T_bankreport br','br.ID = bmp.bankid');
|
$this->db->join('T_bankreport br','br.ID = bmp.bankid');
|
||||||
$this->db->where('invoiceno',$invno);
|
$this->db->where('invoiceno',$invno);
|
||||||
// $this->db->group_by('PONO');
|
// $this->db->group_by('PONO');
|
||||||
@ -344,7 +346,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
|
|
||||||
function getsupplier()
|
function getsupplier()
|
||||||
{
|
{
|
||||||
$this->db->select('SupplierName');
|
$this->db->select('SupplierName,SupplierID');
|
||||||
$this->db->from('T_SupplierDetailsN');
|
$this->db->from('T_SupplierDetailsN');
|
||||||
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
|
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
|
||||||
//$this->db->where('t_income_expense.id')
|
//$this->db->where('t_income_expense.id')
|
||||||
@ -354,7 +356,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
}
|
}
|
||||||
function getcustomer()
|
function getcustomer()
|
||||||
{
|
{
|
||||||
$this->db->select('client_name');
|
$this->db->select('client_name,client_id');
|
||||||
$this->db->from('ip_clients');
|
$this->db->from('ip_clients');
|
||||||
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
|
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
|
||||||
//$this->db->where('t_income_expense.id')
|
//$this->db->where('t_income_expense.id')
|
||||||
@ -376,12 +378,12 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
function invicedata($invoicedata)
|
// function invicedata($invoicedata)
|
||||||
{
|
// {
|
||||||
$this->db->insert('T_Bankinvoicereport',$invoicedata);
|
// $this->db->insert('T_Bankinvoicereport',$invoicedata);
|
||||||
$r = $this->db->affected_rows();
|
// $r = $this->db->affected_rows();
|
||||||
return $r;
|
// return $r;
|
||||||
}
|
// }
|
||||||
function mappingpo($podata)
|
function mappingpo($podata)
|
||||||
{
|
{
|
||||||
$this->db->insert('T_Bankmappingpo',$podata);
|
$this->db->insert('T_Bankmappingpo',$podata);
|
||||||
|
|||||||
@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
{?>
|
{?>
|
||||||
|
|
||||||
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
|
<option value="<?php echo $gs->SupplierID;?>"><?php echo $gs->SupplierName ; ?></option>
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
<?php } endforeach; ?>
|
||||||
@ -190,6 +190,7 @@
|
|||||||
if(!empty($bankdepit)){
|
if(!empty($bankdepit)){
|
||||||
foreach($bankdepit as $t)
|
foreach($bankdepit as $t)
|
||||||
{
|
{
|
||||||
|
//print_r($bankdepit);
|
||||||
$status=$t->Paymentstatus;
|
$status=$t->Paymentstatus;
|
||||||
$balancetopay=$t->Balancetopay;
|
$balancetopay=$t->Balancetopay;
|
||||||
//print_r($$status);
|
//print_r($$status);
|
||||||
@ -202,7 +203,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<td data-name="sell"><input type="checkbox" class="checkboxcheckbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
<td data-name="sell"><input type="checkbox" class="checkboxcheckbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
||||||
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->PODate?></span></td>
|
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($t->PODate),'d-m-Y');?></span></td>
|
||||||
<td align="left" id="pono<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>
|
<td align="left" id="pono<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?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"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
|
||||||
|
|
||||||
@ -278,7 +279,7 @@
|
|||||||
<div class="col-md-12" id="tov1"></div>
|
<div class="col-md-12" id="tov1"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="qw1"></div>
|
<div class="col-md-12" id="qw1"></div>
|
||||||
|
<!--<input type="text" name="qw1" id="qw1">-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -355,6 +356,7 @@ var intex=1;
|
|||||||
var row=0;
|
var row=0;
|
||||||
var j=1;
|
var j=1;
|
||||||
var tott=0;
|
var tott=0;
|
||||||
|
var total=0;
|
||||||
function GetPayment(i)
|
function GetPayment(i)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -363,6 +365,7 @@ function GetPayment(i)
|
|||||||
var balanceamount=bankdebitamount-totalvalue;
|
var balanceamount=bankdebitamount-totalvalue;
|
||||||
|
|
||||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||||
|
|
||||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||||
var negative=0;
|
var negative=0;
|
||||||
if(amount<0)
|
if(amount<0)
|
||||||
@ -409,11 +412,12 @@ if(x==true)
|
|||||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
||||||
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
|
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
|
||||||
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
|
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
|
||||||
|
//alert(invoicepayment+'ipa');
|
||||||
$('#invoicepaymet'+i).val(invoicepayment);
|
$('#invoicepaymet'+i).val(invoicepayment);
|
||||||
var RowCount= $('#Rowid').val();
|
var RowCount= $('#Rowid').val();
|
||||||
//alert(RowCount);
|
//alert(RowCount);
|
||||||
//alert('advance' + advanceamount);
|
//alert('advance' + advanceamount);
|
||||||
|
//alert(j+'j');
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'date1'+j,
|
name:'date1'+j,
|
||||||
@ -458,7 +462,6 @@ if(x==true)
|
|||||||
|
|
||||||
if(negative==1)
|
if(negative==1)
|
||||||
{
|
{
|
||||||
// alert()
|
|
||||||
|
|
||||||
for(o=1;o<j;o++)
|
for(o=1;o<j;o++)
|
||||||
{
|
{
|
||||||
@ -468,18 +471,25 @@ if(x==true)
|
|||||||
}
|
}
|
||||||
intex = parseInt(intex)+1;
|
intex = parseInt(intex)+1;
|
||||||
j=parseInt(j)+1;
|
j=parseInt(j)+1;
|
||||||
|
//var to=0;
|
||||||
var to=0;
|
var to=0;
|
||||||
for(t=1;t<j;t++)
|
for(t=1;t<j;t++)
|
||||||
{
|
{
|
||||||
//var tt= $('#inv_amount'+t).val();
|
|
||||||
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
|
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
|
||||||
//alert(tt)
|
|
||||||
to = parseFloat(to) + parseFloat (tt);
|
to = parseFloat(to) + parseFloat (tt);
|
||||||
//alert(to);
|
|
||||||
$('#addvalue').val(parseFloat(to).toFixed(2));
|
$('#addvalue').val(parseFloat(to).toFixed(2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//alert(t+'loopt');
|
||||||
|
|
||||||
|
// var to=0;
|
||||||
|
// for(t=1;t<j;t++)
|
||||||
|
// {
|
||||||
|
// //var addedvalue= $('#qw1'+t).val();
|
||||||
|
// var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
|
||||||
|
// to = parseFloat(to) + parseFloat(tt);
|
||||||
|
// $('#addvalue').val(parseFloat(to).toFixed(2));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -530,7 +540,9 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//alert(ro);
|
//alert(ro);
|
||||||
|
|
||||||
$('#Rowid').val(ro);
|
$('#Rowid').val(ro);
|
||||||
|
//$('#addvalue').val('');
|
||||||
$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
$('#date1'+i).val('');
|
$('#date1'+i).val('');
|
||||||
$('#pono1'+i).val('');
|
$('#pono1'+i).val('');
|
||||||
@ -556,6 +568,7 @@ function isNumberKey(evt)
|
|||||||
}
|
}
|
||||||
function GetAmount(i)
|
function GetAmount(i)
|
||||||
{
|
{
|
||||||
|
|
||||||
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;
|
||||||
@ -567,6 +580,7 @@ function GetAmount(i)
|
|||||||
}
|
}
|
||||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||||
|
|
||||||
|
|
||||||
if(x==true && negative == 0)
|
if(x==true && negative == 0)
|
||||||
{
|
{
|
||||||
//alert(x);
|
//alert(x);
|
||||||
@ -636,6 +650,12 @@ function GetAmount(i)
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// //document.getElementById('checkboxcheckbox'+i).checked = false;
|
||||||
|
// $('#invoicepaymet'+i).val('');
|
||||||
|
// $('#addvalue').val('');
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function Save()
|
function Save()
|
||||||
@ -651,7 +671,6 @@ function Save()
|
|||||||
rw= parseFloat(rw)+1;
|
rw= parseFloat(rw)+1;
|
||||||
check = parseFloat(check)+1;
|
check = parseFloat(check)+1;
|
||||||
var bankdebitamount=$('#debitamount').val();
|
var bankdebitamount=$('#debitamount').val();
|
||||||
//alert(bankdebitamount);
|
|
||||||
|
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
var date =$('#date1'+i).val();
|
var date =$('#date1'+i).val();
|
||||||
@ -659,6 +678,7 @@ function Save()
|
|||||||
var suppliername=$('#sn1'+i).val();
|
var suppliername=$('#sn1'+i).val();
|
||||||
var totalordervalue=$('#tov1'+i).val();
|
var totalordervalue=$('#tov1'+i).val();
|
||||||
var amountpaid=$('#qw1'+i).val();
|
var amountpaid=$('#qw1'+i).val();
|
||||||
|
//alert(amountpaid+'qw1');
|
||||||
var invoicepaymet=$('#invoicepaymet'+i).text();
|
var invoicepaymet=$('#invoicepaymet'+i).text();
|
||||||
// alert(invoicepaymet);
|
// alert(invoicepaymet);
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
@ -672,7 +692,7 @@ function Save()
|
|||||||
//alert('you have remainining'+balnceamount);
|
//alert('you have remainining'+balnceamount);
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
data:{date:date,pono:pono,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
data:{podate:date,pono:pono,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>cashbook/receipt",
|
url:"<?php echo base_url() ?>cashbook/receipt",
|
||||||
success:function(data)
|
success:function(data)
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
{?>
|
{?>
|
||||||
|
|
||||||
<option value="<?php echo $gc->client_name;?>"><?php echo $gc->client_name ; ?></option>
|
<option value="<?php echo $gc->client_id;?>"><?php echo $gc->client_name ; ?></option>
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
<?php } endforeach; ?>
|
||||||
@ -205,7 +205,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
||||||
<td align="left" id="invoicedate<?php echo $i ?>"><span><?php echo $t->invoice_date_created?></span></td>
|
<td align="left" id="invoicedate<?php echo $i ?>"><span><?php echo date_format(date_create($t->invoice_date_created),'d-m-Y');?></span></td>
|
||||||
<td align="left" id="invoice_id<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $t->invoice_number;?>"><span><?php echo $t->invoice_number?></span></td>
|
<td align="left" id="invoice_id<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $t->invoice_number;?>"><span><?php echo $t->invoice_number?></span></td>
|
||||||
<td align="left" id="client_name<?php echo $i ?>"><span><?php echo $t->client_name?></span></td>
|
<td align="left" id="client_name<?php echo $i ?>"><span><?php echo $t->client_name?></span></td>
|
||||||
<td align="left" id="invoice_paid<?php echo $i ?>"><span><?php echo $t->invoice_total?></span></td>
|
<td align="left" id="invoice_paid<?php echo $i ?>"><span><?php echo $t->invoice_total?></span></td>
|
||||||
|
|||||||
@ -200,8 +200,8 @@ if(!empty($debitmapping))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td align="left" id="tov"><span><?php echo $ap->indate?></span></td>
|
<td align="left" id="tov"><span><?php echo date_format(date_create($ap->indate),'d-m-Y');?></span></td>
|
||||||
<td align="left" id="invno"><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 $ap->invoiceno?></span></td>
|
||||||
<td align="left" id="aa"><span><?php echo $ap->customername?></span></td>
|
<td align="left" id="aa"><span><?php echo $ap->customername?></span></td>
|
||||||
<td align="left" id="aa"><span><?php echo $ap->totinvoiceamount?></span></td>
|
<td align="left" id="aa"><span><?php echo $ap->totinvoiceamount?></span></td>
|
||||||
<td align="left" id="aa"><span><?php echo $ap->balancetoreceived?></span></td>
|
<td align="left" id="aa"><span><?php echo $ap->balancetoreceived?></span></td>
|
||||||
|
|||||||
@ -209,7 +209,7 @@ if(!empty($mapping))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td align="left" id="date"><span><?php echo $ap->Podate?></span></td>
|
<td align="left" id="date"><span><?php echo date_format(date_create($ap->Podate),'d-m-Y');?></span></td>
|
||||||
<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>
|
<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/mappingdebit?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>-->
|
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user