bankstatement
This commit is contained in:
parent
5346bd5385
commit
5725f23c93
@ -223,6 +223,7 @@ $route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
|||||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||||
$route['updateExpense'] = "cashbook/updateExpense";
|
$route['updateExpense'] = "cashbook/updateExpense";
|
||||||
$route['Bankingview']= "cashbook/bankfileview";
|
$route['Bankingview']= "cashbook/bankfileview";
|
||||||
|
$route['Bankfiletostatement']= "cashbook/bankfileupload";
|
||||||
$route['Bankingstatement']= "cashbook/bankdata";
|
$route['Bankingstatement']= "cashbook/bankdata";
|
||||||
$route['Debitstatement']= "cashbook/bankdebitdata";
|
$route['Debitstatement']= "cashbook/bankdebitdata";
|
||||||
$route['Cashstatement']= "cashbook/cashreceipt";
|
$route['Cashstatement']= "cashbook/cashreceipt";
|
||||||
|
|||||||
@ -190,11 +190,11 @@ class cashbook extends BaseController
|
|||||||
$res = $this->cashbook_model->bankfiledata($filedataupload);
|
$res = $this->cashbook_model->bankfiledata($filedataupload);
|
||||||
}
|
}
|
||||||
if( $res == 1 ){
|
if( $res == 1 ){
|
||||||
echo "<script>alert('Saved Successfully!');window.location.href='bankdata';</script>";
|
echo "<script>alert('Saved Successfully!');window.location.href='Bankingstatement';</script>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "<script>alert('Saved unsuccessfully!');window.location.href='bankdata';</script>";
|
echo "<script>alert('Saved unsuccessfully!');window.location.href='Bankingstatement';</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -879,7 +879,8 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
|
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
|
||||||
|
print_r($podata1);
|
||||||
|
//die();
|
||||||
$podata = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
|
$podata = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
|
||||||
|
|
||||||
|
|
||||||
@ -923,6 +924,8 @@ class cashbook extends BaseController
|
|||||||
$rw = $this->input->post('rw');
|
$rw = $this->input->post('rw');
|
||||||
|
|
||||||
$date = $this->input->post('date');
|
$date = $this->input->post('date');
|
||||||
|
$date = date_create($date);//,'Y-m-d');
|
||||||
|
$date = date_format($date,'Y-m-d');
|
||||||
$invid = $this->input->post('invid');
|
$invid = $this->input->post('invid');
|
||||||
$cname = $this->input->post('cname');
|
$cname = $this->input->post('cname');
|
||||||
$invamount = $this->input->post('invamount');
|
$invamount = $this->input->post('invamount');
|
||||||
@ -1036,6 +1039,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : amountpaid';
|
$this->global['pageTitle'] = 'Siddharth : amountpaid';
|
||||||
$data['amountpaid'] = $this->cashbook_model->paided();
|
$data['amountpaid'] = $this->cashbook_model->paided();
|
||||||
|
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||||
$this->loadViews("bankamountpaid", $this->global,$data, NULL);
|
$this->loadViews("bankamountpaid", $this->global,$data, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1046,14 +1050,8 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
// $this->load->model('cashbook_model');
|
// $this->load->model('cashbook_model');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
||||||
|
$data['getcustomer'] = $this->cashbook_model->getcustomer();
|
||||||
$data['amountreceived'] = $this->cashbook_model->received();
|
$data['amountreceived'] = $this->cashbook_model->received();
|
||||||
|
|
||||||
//print_r( $data['amountpaid']);
|
|
||||||
//die();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("bankamountreceived", $this->global,$data, NULL);
|
$this->loadViews("bankamountreceived", $this->global,$data, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -232,7 +232,6 @@ function debitpolist($bankid)
|
|||||||
Balancetopay,Amountpaid');
|
Balancetopay,Amountpaid');
|
||||||
$this->db->from ('T_Bankmappingpo');
|
$this->db->from ('T_Bankmappingpo');
|
||||||
$this->db->where('mid',$bankid);
|
$this->db->where('mid',$bankid);
|
||||||
|
|
||||||
//$this->db->group_by('PONO');
|
//$this->db->group_by('PONO');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
return $query->result();
|
return $query->result();
|
||||||
@ -254,7 +253,7 @@ function debitpolist($bankid)
|
|||||||
function invoiceamonut($bankid)
|
function invoiceamonut($bankid)
|
||||||
{
|
{
|
||||||
$this->db->select('sum(amountreceived)as amountreceived');
|
$this->db->select('sum(amountreceived)as 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();
|
||||||
@ -265,7 +264,7 @@ function debitpolist($bankid)
|
|||||||
function poamonut($bankid)
|
function poamonut($bankid)
|
||||||
{
|
{
|
||||||
$this->db->select('sum(Amountpaid)as amountpaid');
|
$this->db->select('sum(Amountpaid)as amountpaid');
|
||||||
$this->db->from ('T_Bankporeport');
|
$this->db->from ('T_Bankmappingpo');
|
||||||
$this->db->where('mid',$bankid);
|
$this->db->where('mid',$bankid);
|
||||||
//$this->db->group_by('invoiceno');
|
//$this->db->group_by('invoiceno');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
@ -323,7 +322,6 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
{
|
{
|
||||||
$this->db->select('bmp.mid,bmp.PONO,bmp.Amountpaid,br.Narration');
|
$this->db->select('bmp.mid,bmp.PONO,bmp.Amountpaid,br.Narration');
|
||||||
$this->db->from ('T_Bankmappingpo as bmp');
|
$this->db->from ('T_Bankmappingpo as bmp');
|
||||||
|
|
||||||
$this->db->join('T_bankreport br','br.ID = bmp.mid');
|
$this->db->join('T_bankreport br','br.ID = bmp.mid');
|
||||||
$this->db->where('PONO',$pono);
|
$this->db->where('PONO',$pono);
|
||||||
//$this->db->group_by('PONO');
|
//$this->db->group_by('PONO');
|
||||||
@ -338,7 +336,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
$this->db->from ('T_Bankmappingiv 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('invoiceno');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
@ -524,7 +522,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
function paided()
|
function paided()
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_Bankporeport');
|
$this->db->from('T_Bankmappingpo');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
$result = $query->result();
|
$result = $query->result();
|
||||||
return $result;
|
return $result;
|
||||||
@ -533,7 +531,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
function received()
|
function received()
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_Bankinvoicereport');
|
$this->db->from('T_Bankmappingiv');
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
$result = $query->result();
|
$result = $query->result();
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -106,13 +106,13 @@ if(!empty($amountpaid))
|
|||||||
<?php echo 'Customer'; ?>
|
<?php echo 'Customer'; ?>
|
||||||
</label>
|
</label>
|
||||||
<select class="form-control" id="Customer" name="Customer">
|
<select class="form-control" id="Customer" name="Customer">
|
||||||
<option value="">Select Supplier</option>
|
<option value="">Select Customer</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($supplier as $gs):
|
foreach($customer as $gs):
|
||||||
|
|
||||||
{?>
|
{?>
|
||||||
|
|
||||||
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
|
<option value="<?php echo $gs->client_id;?>"><?php echo $gs->client_name ; ?></option>
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
<?php } endforeach; ?>
|
||||||
|
|||||||
@ -268,17 +268,17 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" id="date1"></div>
|
<div class="col-md-12" id="date1"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="pono1"></div>
|
<div class="col-md-12" id="purchaseono"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="sn1"></div>
|
<div class="col-md-12" id="supname"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="aa1"></div>
|
<div class="col-md-12" id="aa1"></div>
|
||||||
|
|
||||||
<!--<div class="col-md-12" id="aa2"></div>-->
|
<!--<div class="col-md-12" id="aa2"></div>-->
|
||||||
|
|
||||||
<div class="col-md-12" id="tov1"></div>
|
<div class="col-md-12" id="ttamnt"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="qw1"></div>
|
<div class="col-md-12" id="totala"></div>
|
||||||
<!--<input type="text" name="qw1" id="qw1">-->
|
<!--<input type="text" name="qw1" id="qw1">-->
|
||||||
|
|
||||||
|
|
||||||
@ -355,11 +355,12 @@ var tot1=0;
|
|||||||
var intex=1;
|
var intex=1;
|
||||||
var row=0;
|
var row=0;
|
||||||
var j=1;
|
var j=1;
|
||||||
|
var addvalue=0;
|
||||||
var tott=0;
|
var tott=0;
|
||||||
var total=0;
|
var total=0;
|
||||||
function GetPayment(i)
|
function GetPayment(i)
|
||||||
{
|
{
|
||||||
|
//alert('check');
|
||||||
var bankdebitamount=$('#debitamount').val();
|
var bankdebitamount=$('#debitamount').val();
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var balanceamount=bankdebitamount-totalvalue;
|
var balanceamount=bankdebitamount-totalvalue;
|
||||||
@ -376,20 +377,13 @@ function GetPayment(i)
|
|||||||
|
|
||||||
}
|
}
|
||||||
temp=intex;
|
temp=intex;
|
||||||
|
//alert(temp+'temp');success
|
||||||
if(x==true)
|
if(x==true)
|
||||||
{
|
{
|
||||||
var bankdebitamount=$('#debitamount').val();
|
var bankdebitamount=$('#debitamount').val();
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var balanceamount=bankdebitamount-totalvalue;
|
var balanceamount=bankdebitamount-totalvalue;
|
||||||
// if(bankdebitamount<totalvalue)
|
|
||||||
// {
|
|
||||||
// alert('your mapping amount is larege '+totalvalue);
|
|
||||||
// $(".checkboxcheckbox").prop("disabled", true);
|
|
||||||
// // alert('you have remaining'+balanceamount);
|
|
||||||
// // alert('your amount is equal to debit amount');
|
|
||||||
// // $(".checkboxcheckbox").prop("disabled", true);
|
|
||||||
|
|
||||||
// }
|
|
||||||
if(bankdebitamount==totalvalue)
|
if(bankdebitamount==totalvalue)
|
||||||
{
|
{
|
||||||
//alert('you have remaining'+balanceamount);
|
//alert('you have remaining'+balanceamount);
|
||||||
@ -404,20 +398,15 @@ if(x==true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
row= parseInt(row)+1;
|
row= parseInt(row)+1;
|
||||||
//alert(row);
|
|
||||||
$('#Rowid').val(row);
|
$('#Rowid').val(row);
|
||||||
var date= document.getElementById ( "date"+i ).innerText;
|
var date= document.getElementById ( "date"+i ).innerText;
|
||||||
var pono =document.getElementById ( "pono"+i ).innerText;
|
var pono =document.getElementById ( "pono"+i ).innerText;
|
||||||
var supname =document.getElementById ("sn"+i ).innerText;
|
var supname =document.getElementById ("sn"+i ).innerText;
|
||||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
var totalordervalue =document.getElementById ("tov"+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('advance' + advanceamount);
|
|
||||||
//alert(j+'j');
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'date1'+j,
|
name:'date1'+j,
|
||||||
@ -427,75 +416,55 @@ if(x==true)
|
|||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'pono1'+j,
|
name:'purchaseono'+j,
|
||||||
id:'pono1'+j,
|
id:'purchaseono'+j,
|
||||||
value:pono
|
value:pono
|
||||||
}).appendTo('#pono1');
|
}).appendTo('#purchaseono');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'sn1'+j,
|
name:'supname'+j,
|
||||||
id:'sn1'+j,
|
id:'supname'+j,
|
||||||
value:supname
|
value:supname
|
||||||
}).appendTo('#sn1');
|
}).appendTo('#supname');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'qw1'+j,
|
name:'totala'+j,
|
||||||
id:'qw1'+j,
|
id:'totala'+j,
|
||||||
value:invoicepayment
|
value:invoicepayment
|
||||||
}).appendTo('#qw1');
|
}).appendTo('#totala');
|
||||||
|
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'tov1'+j,
|
name:'ttamnt'+j,
|
||||||
id:'tov1'+j,
|
id:'ttamnt'+j,
|
||||||
value:totalordervalue
|
value:totalordervalue
|
||||||
}).appendTo('#tov1');
|
}).appendTo('#ttamnt');
|
||||||
|
|
||||||
//j= parseInt(j)+1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(negative==1)
|
|
||||||
{
|
|
||||||
|
|
||||||
for(o=1;o<j;o++)
|
|
||||||
{
|
|
||||||
$('#qw1'+o).val('')
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
|
//alert(t+'t');
|
||||||
|
var tt=parseFloat( $('#totala'+t).val() == '' ? '0.00' : $('#totala'+t).val());
|
||||||
to = parseFloat(to) + parseFloat (tt);
|
to = parseFloat(to) + parseFloat (tt);
|
||||||
$('#addvalue').val(parseFloat(to).toFixed(2));
|
$('#addvalue').val(parseFloat(to).toFixed(2));
|
||||||
|
//var total= $('#addvalue').val();
|
||||||
|
//total=addvalue;
|
||||||
|
//alert(total);
|
||||||
|
|
||||||
}
|
}
|
||||||
//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));
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GetAmount(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,15 +482,13 @@ else
|
|||||||
for(s=1;s<=j;s++)
|
for(s=1;s<=j;s++)
|
||||||
{
|
{
|
||||||
|
|
||||||
var ch= $('#pono1'+s).val();
|
var ch= $('#purchaseono'+s).val();
|
||||||
//alert(ch);
|
//alert(ch);
|
||||||
if(Inid==ch)
|
if(Inid==ch)
|
||||||
{
|
{
|
||||||
|
|
||||||
var w=s;
|
var w=s;
|
||||||
delamount= $('#qw1'+w).val();
|
delamount= $('#totala'+w).val();
|
||||||
//alert(delamount)
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,10 +497,7 @@ else
|
|||||||
|
|
||||||
// //alert(w);
|
// //alert(w);
|
||||||
var tote= $('#addvalue').val();
|
var tote= $('#addvalue').val();
|
||||||
//alert(tote)
|
|
||||||
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
|
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
|
||||||
//alert(afterdeltot)
|
|
||||||
|
|
||||||
tot=parseFloat(tot)- parseFloat(Payment);
|
tot=parseFloat(tot)- parseFloat(Payment);
|
||||||
$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
|
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
|
||||||
@ -545,10 +509,10 @@ else
|
|||||||
//$('#addvalue').val('');
|
//$('#addvalue').val('');
|
||||||
$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
$('#date1'+i).val('');
|
$('#date1'+i).val('');
|
||||||
$('#pono1'+i).val('');
|
$('#purchaseono'+i).val('');
|
||||||
$('#sn1'+i).val('');
|
$('#supname'+i).val('');
|
||||||
$('#tov1'+i).val('');
|
$('#ttamnt'+i).val('');
|
||||||
$('#qw1'+i).val('');
|
$('#totala'+i).val('');
|
||||||
//$('#aa'+i).val('');
|
//$('#aa'+i).val('');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -568,7 +532,7 @@ function isNumberKey(evt)
|
|||||||
}
|
}
|
||||||
function GetAmount(i)
|
function GetAmount(i)
|
||||||
{
|
{
|
||||||
|
//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;
|
||||||
@ -581,7 +545,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 )
|
||||||
{
|
{
|
||||||
//alert(x);
|
//alert(x);
|
||||||
var date= document.getElementById ( "date"+i ).innerText;
|
var date= document.getElementById ( "date"+i ).innerText;
|
||||||
@ -595,7 +559,7 @@ function GetAmount(i)
|
|||||||
for(k=1;k<=j-1;k++)
|
for(k=1;k<=j-1;k++)
|
||||||
{
|
{
|
||||||
//alert(k)
|
//alert(k)
|
||||||
var idcheck=$('#pono1'+k).val();
|
var idcheck=$('#purchaseono'+k).val();
|
||||||
// alert(idcheck)
|
// alert(idcheck)
|
||||||
|
|
||||||
if(pono==idcheck)
|
if(pono==idcheck)
|
||||||
@ -614,10 +578,10 @@ function GetAmount(i)
|
|||||||
{
|
{
|
||||||
//alert(cid+'cid');
|
//alert(cid+'cid');
|
||||||
$('#date1').val(date);
|
$('#date1').val(date);
|
||||||
$('#pono1'+cid).val(pono);
|
$('#purchaseono'+cid).val(pono);
|
||||||
$('#sn1'+cid).val(supname);
|
$('#supname'+cid).val(supname);
|
||||||
$('#tov1'+cid).val(totalordervalue);
|
$('#ttamnt'+cid).val(totalordervalue);
|
||||||
$('#qw1'+cid).val(amount);
|
$('#totala'+cid).val(amount);
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
//$('#inv_total'+cid).val(invoicepayment);
|
//$('#inv_total'+cid).val(invoicepayment);
|
||||||
@ -634,12 +598,8 @@ function GetAmount(i)
|
|||||||
var tot11=0
|
var tot11=0
|
||||||
for(l=1;l<j;l++)
|
for(l=1;l<j;l++)
|
||||||
{
|
{
|
||||||
//var Payingamount= $('#inv_amount'+l).val();
|
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
||||||
|
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
||||||
var Payingamount=parseFloat( $('#qw1'+l).val() == '' ? '0.00' : $('#qw1'+l).val());
|
|
||||||
//alert(Payingamount)
|
|
||||||
tot11= parseFloat(tot11)+parseFloat(Payingamount)
|
|
||||||
//alert(tot11)
|
|
||||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,10 +634,11 @@ function Save()
|
|||||||
|
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
var date =$('#date1'+i).val();
|
var date =$('#date1'+i).val();
|
||||||
var pono =$('#pono1'+i).val();
|
var pono =$('#purchaseono'+i).val();
|
||||||
var suppliername=$('#sn1'+i).val();
|
var suppliername=$('#supname'+i).val();
|
||||||
var totalordervalue=$('#tov1'+i).val();
|
//alert(suppliername);
|
||||||
var amountpaid=$('#qw1'+i).val();
|
var totalordervalue=$('#ttamnt'+i).val();
|
||||||
|
var amountpaid=$('#totala'+i).val();
|
||||||
//alert(amountpaid+'qw1');
|
//alert(amountpaid+'qw1');
|
||||||
var invoicepaymet=$('#invoicepaymet'+i).text();
|
var invoicepaymet=$('#invoicepaymet'+i).text();
|
||||||
// alert(invoicepaymet);
|
// alert(invoicepaymet);
|
||||||
@ -689,6 +650,8 @@ function Save()
|
|||||||
|
|
||||||
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
||||||
{
|
{
|
||||||
|
//alert(date+'date');
|
||||||
|
//die();
|
||||||
//alert('you have remainining'+balnceamount);
|
//alert('you have remainining'+balnceamount);
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,26 +47,17 @@ function checkYearMonthAsEmpty()
|
|||||||
<div class="col-md-8 col-md-offset-2" style="border:2px dotted;padding:2%;">
|
<div class="col-md-8 col-md-offset-2" style="border:2px dotted;padding:2%;">
|
||||||
|
|
||||||
|
|
||||||
<form id="upload" method="post" action="<?php echo base_url() ?>cashbook/bankfileupload"; role="form" enctype="multipart/form-data">
|
<form id="upload" method="post" action="<?php echo base_url() ?>Bankfiletostatement"; role="form" enctype="multipart/form-data">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-4"> <span>Bank Names</span>
|
<div class="col-md-4"> <span>Bank Names</span>
|
||||||
|
|
||||||
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
|
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
|
||||||
<option value="">Select Bank Name</option>
|
<option value="Indian Bank">Select Bank Name</option>
|
||||||
<?php
|
|
||||||
if(!empty($bankdetails))
|
<option value="Indian Bank"><?php echo 'Indian Bank' ?></option>
|
||||||
{
|
|
||||||
foreach ($bankdetails as $bank)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $bank->Bank_name ?>"><?php echo $bank->Bank_name ?></option>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -268,7 +268,7 @@
|
|||||||
|
|
||||||
<div class="col-md-12" id="invoiceamount1"></div>
|
<div class="col-md-12" id="invoiceamount1"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="invoice_balance1"></div>
|
<div class="col-md-12" id="invoicerec"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ if(x==true)
|
|||||||
}).appendTo('#customername1');
|
}).appendTo('#customername1');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'text',
|
type:'hidden',
|
||||||
name:'invoiceamount1'+j,
|
name:'invoiceamount1'+j,
|
||||||
id:'invoiceamount1'+j,
|
id:'invoiceamount1'+j,
|
||||||
value:invoiceamount
|
value:invoiceamount
|
||||||
@ -398,10 +398,10 @@ if(x==true)
|
|||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'invoice_balance1'+j,
|
name:'invoicerec'+j,
|
||||||
id:'invoice_balance1'+j,
|
id:'invoicerec'+j,
|
||||||
value:invoicereceived
|
value:invoicereceived
|
||||||
}).appendTo('#invoice_balance1');
|
}).appendTo('#invoicerec');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -429,10 +429,8 @@ if(x==true)
|
|||||||
for(t=1;t<j;t++)
|
for(t=1;t<j;t++)
|
||||||
{
|
{
|
||||||
//var tt= $('#inv_amount'+t).val();
|
//var tt= $('#inv_amount'+t).val();
|
||||||
var tt=parseFloat( $('#invoice_balance1'+t).val() == '' ? '0.00' : $('#invoice_balance1'+t).val());
|
var tt=parseFloat( $('#invoiceamount1'+t).val() == '' ? '0.00' : $('#invoiceamount1'+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));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -461,7 +459,7 @@ else
|
|||||||
{
|
{
|
||||||
|
|
||||||
var w=s;
|
var w=s;
|
||||||
delamount= $('#invoice_balance1'+w).val();
|
delamount= $('#invoicerec'+w).val();
|
||||||
//alert(delamount)
|
//alert(delamount)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -488,7 +486,7 @@ else
|
|||||||
$('#invoiceid1'+i).val('');
|
$('#invoiceid1'+i).val('');
|
||||||
$('#customername1'+i).val('');
|
$('#customername1'+i).val('');
|
||||||
$('#invoiceamount1'+i).val('');
|
$('#invoiceamount1'+i).val('');
|
||||||
$('#invoice_balance1'+i).val('');
|
$('#invoicerec'+i).val('');
|
||||||
|
|
||||||
//$('#aa'+i).val('');
|
//$('#aa'+i).val('');
|
||||||
|
|
||||||
@ -550,7 +548,7 @@ function GetAmount(i)
|
|||||||
$('#invoiceid1'+cid).val(invid);
|
$('#invoiceid1'+cid).val(invid);
|
||||||
$('#customername1'+cid).val(cusname);
|
$('#customername1'+cid).val(cusname);
|
||||||
$('#invoiceamount1'+cid).val(invoiceamount);
|
$('#invoiceamount1'+cid).val(invoiceamount);
|
||||||
$('#invoice_balance1'+cid).val(amount);
|
$('#invoicerec'+cid).val(amount);
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
}
|
}
|
||||||
@ -568,7 +566,7 @@ function GetAmount(i)
|
|||||||
{
|
{
|
||||||
//var Payingamount= $('#inv_amount'+l).val();
|
//var Payingamount= $('#inv_amount'+l).val();
|
||||||
|
|
||||||
var Payingamount=parseFloat( $('#invoice_balance1'+l).val() == '' ? '0.00' : $('#invoice_balance1'+l).val());
|
var Payingamount=parseFloat( $('#invoicerec'+l).val() == '' ? '0.00' : $('#invoicerec'+l).val());
|
||||||
//alert(Payingamount)
|
//alert(Payingamount)
|
||||||
tot11= parseFloat(tot11)+parseFloat(Payingamount)
|
tot11= parseFloat(tot11)+parseFloat(Payingamount)
|
||||||
//alert(tot11)
|
//alert(tot11)
|
||||||
@ -606,14 +604,13 @@ function Save()
|
|||||||
var invid =$('#invoiceid1'+i).val();
|
var invid =$('#invoiceid1'+i).val();
|
||||||
var customername=$('#customername1'+i).val();
|
var customername=$('#customername1'+i).val();
|
||||||
var invoiceamount=$('#invoiceamount1'+i).val();
|
var invoiceamount=$('#invoiceamount1'+i).val();
|
||||||
var amountreceived=$('#invoice_balance1'+i).val();
|
var amountreceived=$('#invoicerec'+i).val();
|
||||||
|
//alert(amountreceived+'amr');
|
||||||
var invoicereceived=$('#invoicereceived'+i).text();
|
var invoicereceived=$('#invoicereceived'+i).text();
|
||||||
var payment = parseFloat(invoiceamount);
|
//var payment = parseFloat(invoiceamount);
|
||||||
// if(payment<=invoicereceived)
|
if(parseFloat(totalvalue)<=parseFloat(bankdebitamount))
|
||||||
// {
|
{
|
||||||
// alert('1if');
|
|
||||||
// if(totalvalue<=bankdebitamount)
|
|
||||||
// {
|
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
data:{date:date,invid:invid,cname:customername,invamount:invoiceamount,ar:amountreceived,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw,invrec:invoicereceived},
|
data:{date:date,invid:invid,cname:customername,invamount:invoiceamount,ar:amountreceived,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw,invrec:invoicereceived},
|
||||||
@ -663,16 +660,16 @@ function Save()
|
|||||||
// });
|
// });
|
||||||
// alert(i);
|
// alert(i);
|
||||||
// }
|
// }
|
||||||
// else{
|
else{
|
||||||
|
|
||||||
// alert('You are payment exceeding');
|
alert('You are payment exceeding');
|
||||||
// location.reload();
|
location.reload();
|
||||||
// }
|
}
|
||||||
// j=j+1;
|
// j=j+1;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -233,7 +233,7 @@ function loadAccountType(id)
|
|||||||
<p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p>
|
<p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p>
|
||||||
<p style="margin-left:41px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
<p style="margin-left:41px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
||||||
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
||||||
<p style="margin-left:41px;">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
<p style="margin-left:41px;" id="rembalance">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -522,15 +522,41 @@ function loadAccountType(id)
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
// function amountcheck()
|
||||||
|
// {
|
||||||
|
// var typeofmap = "<?php echo $typeofmap;?>";
|
||||||
|
// if(typeofmap=='Bank')
|
||||||
|
// {
|
||||||
|
// var bankamount = $('#bankamount').val();
|
||||||
|
// var cashamount = $('#totalamount').val();
|
||||||
|
// //alert(cashamount+'mam');
|
||||||
|
// if(parseFloat(bankamount)>=parseFloat(cashamount))
|
||||||
|
// {
|
||||||
|
// validate();
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// alert('Your mapping amount is large');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// validate();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
function amountcheck()
|
function amountcheck()
|
||||||
{
|
{
|
||||||
var typeofmap = "<?php echo $typeofmap;?>";
|
var typeofmap = "<?php echo $typeofmap;?>";
|
||||||
|
var rembalance="<?php echo $balancetoupdate;?>";
|
||||||
if(typeofmap=='Bank')
|
if(typeofmap=='Bank')
|
||||||
{
|
{
|
||||||
var bankamount = $('#bankamount').val();
|
|
||||||
|
//alert(rembalance+'rb');
|
||||||
var cashamount = $('#totalamount').val();
|
var cashamount = $('#totalamount').val();
|
||||||
//alert(cashamount+'mam');
|
//var totalupdate=parseFloat(rembalance)+parseFloat(cashamount);
|
||||||
if(parseFloat(bankamount)>=parseFloat(cashamount))
|
alert(cashamount+'text');
|
||||||
|
alert(totalupdate+'totalupdate');
|
||||||
|
if(parseFloat(totalupdate)>=parseFloat(cashamount))
|
||||||
{
|
{
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
@ -544,7 +570,6 @@ function amountcheck()
|
|||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validate()
|
function validate()
|
||||||
{
|
{
|
||||||
var accode = $('#accode').val();
|
var accode = $('#accode').val();
|
||||||
|
|||||||
@ -279,7 +279,7 @@ $(function() {
|
|||||||
|
|
||||||
<?php $assd=$dep->AssDep;
|
<?php $assd=$dep->AssDep;
|
||||||
|
|
||||||
if($assd == PURCHASE || $DEPCode == PURCHASE){?>
|
if($assd == PURCHASE){?>
|
||||||
|
|
||||||
|
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
@ -1151,7 +1151,18 @@ $(function() {
|
|||||||
<span>Bank Statements</span>
|
<span>Bank Statements</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>Bankamountpaid">
|
||||||
|
<i class="fa fa-credit-card"></i>
|
||||||
|
<span>Amount Paid Reports(PO)</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>Bankamountreceived">
|
||||||
|
<i class="fa fa-credit-card"></i>
|
||||||
|
<span>Amount Recived Reports(Inv)</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -1220,7 +1231,18 @@ $(function() {
|
|||||||
<span>Bank Statements</span>
|
<span>Bank Statements</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>Bankamountpaid">
|
||||||
|
<i class="fa fa-credit-card"></i>
|
||||||
|
<span>Amount Paid Reports(PO)</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="<?php echo base_url(); ?>Bankingstatement">
|
||||||
|
<i class="fa fa-credit-card"></i>
|
||||||
|
<span>Amount Recived Reports(Inv)</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user