bankstatement
This commit is contained in:
parent
5346bd5385
commit
5725f23c93
@ -223,6 +223,7 @@ $route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||
$route['updateExpense'] = "cashbook/updateExpense";
|
||||
$route['Bankingview']= "cashbook/bankfileview";
|
||||
$route['Bankfiletostatement']= "cashbook/bankfileupload";
|
||||
$route['Bankingstatement']= "cashbook/bankdata";
|
||||
$route['Debitstatement']= "cashbook/bankdebitdata";
|
||||
$route['Cashstatement']= "cashbook/cashreceipt";
|
||||
|
||||
@ -190,11 +190,11 @@ class cashbook extends BaseController
|
||||
$res = $this->cashbook_model->bankfiledata($filedataupload);
|
||||
}
|
||||
if( $res == 1 ){
|
||||
echo "<script>alert('Saved Successfully!');window.location.href='bankdata';</script>";
|
||||
echo "<script>alert('Saved Successfully!');window.location.href='Bankingstatement';</script>";
|
||||
}
|
||||
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);
|
||||
|
||||
print_r($podata1);
|
||||
//die();
|
||||
$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');
|
||||
|
||||
$date = $this->input->post('date');
|
||||
$date = date_create($date);//,'Y-m-d');
|
||||
$date = date_format($date,'Y-m-d');
|
||||
$invid = $this->input->post('invid');
|
||||
$cname = $this->input->post('cname');
|
||||
$invamount = $this->input->post('invamount');
|
||||
@ -1036,6 +1039,7 @@ class cashbook extends BaseController
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : amountpaid';
|
||||
$data['amountpaid'] = $this->cashbook_model->paided();
|
||||
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||
$this->loadViews("bankamountpaid", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
@ -1046,14 +1050,8 @@ class cashbook extends BaseController
|
||||
|
||||
// $this->load->model('cashbook_model');
|
||||
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
||||
|
||||
$data['amountreceived'] = $this->cashbook_model->received();
|
||||
|
||||
//print_r( $data['amountpaid']);
|
||||
//die();
|
||||
|
||||
|
||||
|
||||
$data['getcustomer'] = $this->cashbook_model->getcustomer();
|
||||
$data['amountreceived'] = $this->cashbook_model->received();
|
||||
$this->loadViews("bankamountreceived", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
@ -232,8 +232,7 @@ function debitpolist($bankid)
|
||||
Balancetopay,Amountpaid');
|
||||
$this->db->from ('T_Bankmappingpo');
|
||||
$this->db->where('mid',$bankid);
|
||||
|
||||
//$this->db->group_by('PONO');
|
||||
//$this->db->group_by('PONO');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
@ -241,7 +240,7 @@ function debitpolist($bankid)
|
||||
|
||||
function creditinvoicelist($bankid)
|
||||
{
|
||||
$this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid,
|
||||
$this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid,
|
||||
balancetoreceived,amountreceived');
|
||||
$this->db->from ('T_Bankmappingiv');
|
||||
$this->db->where('bankid',$bankid);
|
||||
@ -254,7 +253,7 @@ function debitpolist($bankid)
|
||||
function invoiceamonut($bankid)
|
||||
{
|
||||
$this->db->select('sum(amountreceived)as amountreceived');
|
||||
$this->db->from ('T_Bankinvoicereport');
|
||||
$this->db->from ('T_Bankmappingiv');
|
||||
$this->db->where('bankid',$bankid);
|
||||
//$this->db->group_by('invoiceno');
|
||||
$query = $this->db->get();
|
||||
@ -265,7 +264,7 @@ function debitpolist($bankid)
|
||||
function poamonut($bankid)
|
||||
{
|
||||
$this->db->select('sum(Amountpaid)as amountpaid');
|
||||
$this->db->from ('T_Bankporeport');
|
||||
$this->db->from ('T_Bankmappingpo');
|
||||
$this->db->where('mid',$bankid);
|
||||
//$this->db->group_by('invoiceno');
|
||||
$query = $this->db->get();
|
||||
@ -323,10 +322,9 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
{
|
||||
$this->db->select('bmp.mid,bmp.PONO,bmp.Amountpaid,br.Narration');
|
||||
$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->group_by('PONO');
|
||||
//$this->db->group_by('PONO');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
@ -336,9 +334,9 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
{
|
||||
$this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration');
|
||||
$this->db->from ('T_Bankmappingiv as bmp');
|
||||
$this->db->join('T_bankreport br','br.ID = bmp.bankid');
|
||||
$this->db->where('invoiceno',$invno);
|
||||
// $this->db->group_by('PONO');
|
||||
$this->db->join('T_bankreport br','br.ID = bmp.bankid');
|
||||
$this->db->where('invoiceno',$invno);
|
||||
//$this->db->group_by('invoiceno');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
@ -524,7 +522,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
function paided()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Bankporeport');
|
||||
$this->db->from('T_Bankmappingpo');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
@ -533,7 +531,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
function received()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Bankinvoicereport');
|
||||
$this->db->from('T_Bankmappingiv');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
|
||||
@ -106,13 +106,13 @@ if(!empty($amountpaid))
|
||||
<?php echo 'Customer'; ?>
|
||||
</label>
|
||||
<select class="form-control" id="Customer" name="Customer">
|
||||
<option value="">Select Supplier</option>
|
||||
<option value="">Select Customer</option>
|
||||
<?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; ?>
|
||||
|
||||
@ -255,7 +255,7 @@
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@ -268,17 +268,17 @@
|
||||
<div class="row">
|
||||
<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="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">-->
|
||||
|
||||
|
||||
@ -355,11 +355,12 @@ var tot1=0;
|
||||
var intex=1;
|
||||
var row=0;
|
||||
var j=1;
|
||||
var addvalue=0;
|
||||
var tott=0;
|
||||
var total=0;
|
||||
function GetPayment(i)
|
||||
{
|
||||
|
||||
//alert('check');
|
||||
var bankdebitamount=$('#debitamount').val();
|
||||
var totalvalue=$('#addvalue').val();
|
||||
var balanceamount=bankdebitamount-totalvalue;
|
||||
@ -375,49 +376,37 @@ function GetPayment(i)
|
||||
$('#invoicepaymet'+i).val('');
|
||||
|
||||
}
|
||||
temp=intex;
|
||||
if(x==true)
|
||||
{
|
||||
var bankdebitamount=$('#debitamount').val();
|
||||
var totalvalue=$('#addvalue').val();
|
||||
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)
|
||||
{
|
||||
//alert('you have remaining'+balanceamount);
|
||||
//alert('your amount is equal to debit amount');
|
||||
$(".checkboxcheckbox").prop("disabled", true);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//document.getElementById('checkboxcheckbox'+i).checked = false;
|
||||
('your checkbox is disabled beacause already mapped amount')
|
||||
}
|
||||
temp=intex;
|
||||
//alert(temp+'temp');success
|
||||
if(x==true)
|
||||
{
|
||||
var bankdebitamount=$('#debitamount').val();
|
||||
var totalvalue=$('#addvalue').val();
|
||||
var balanceamount=bankdebitamount-totalvalue;
|
||||
|
||||
if(bankdebitamount==totalvalue)
|
||||
{
|
||||
//alert('you have remaining'+balanceamount);
|
||||
//alert('your amount is equal to debit amount');
|
||||
$(".checkboxcheckbox").prop("disabled", true);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//document.getElementById('checkboxcheckbox'+i).checked = false;
|
||||
('your checkbox is disabled beacause already mapped amount')
|
||||
}
|
||||
|
||||
row= parseInt(row)+1;
|
||||
//alert(row);
|
||||
$('#Rowid').val(row);
|
||||
var date= document.getElementById ( "date"+i ).innerText;
|
||||
var pono =document.getElementById ( "pono"+i ).innerText;
|
||||
var supname =document.getElementById ("sn"+i ).innerText;
|
||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
||||
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
|
||||
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
|
||||
//alert(invoicepayment+'ipa');
|
||||
$('#invoicepaymet'+i).val(invoicepayment);
|
||||
var RowCount= $('#Rowid').val();
|
||||
//alert(RowCount);
|
||||
//alert('advance' + advanceamount);
|
||||
//alert(j+'j');
|
||||
row= parseInt(row)+1;
|
||||
$('#Rowid').val(row);
|
||||
var date= document.getElementById ( "date"+i ).innerText;
|
||||
var pono =document.getElementById ( "pono"+i ).innerText;
|
||||
var supname =document.getElementById ("sn"+i ).innerText;
|
||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
||||
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
|
||||
$('#invoicepaymet'+i).val(invoicepayment);
|
||||
var RowCount= $('#Rowid').val();
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'date1'+j,
|
||||
@ -427,75 +416,55 @@ if(x==true)
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'pono1'+j,
|
||||
id:'pono1'+j,
|
||||
name:'purchaseono'+j,
|
||||
id:'purchaseono'+j,
|
||||
value:pono
|
||||
}).appendTo('#pono1');
|
||||
}).appendTo('#purchaseono');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'sn1'+j,
|
||||
id:'sn1'+j,
|
||||
name:'supname'+j,
|
||||
id:'supname'+j,
|
||||
value:supname
|
||||
}).appendTo('#sn1');
|
||||
}).appendTo('#supname');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'qw1'+j,
|
||||
id:'qw1'+j,
|
||||
name:'totala'+j,
|
||||
id:'totala'+j,
|
||||
value:invoicepayment
|
||||
}).appendTo('#qw1');
|
||||
}).appendTo('#totala');
|
||||
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'tov1'+j,
|
||||
id:'tov1'+j,
|
||||
name:'ttamnt'+j,
|
||||
id:'ttamnt'+j,
|
||||
value:totalordervalue
|
||||
}).appendTo('#tov1');
|
||||
|
||||
//j= parseInt(j)+1;
|
||||
|
||||
|
||||
}).appendTo('#ttamnt');
|
||||
|
||||
|
||||
intex = parseInt(intex)+1;
|
||||
j=parseInt(j)+1;
|
||||
var to=0;
|
||||
for(t=1;t<j;t++)
|
||||
{
|
||||
//alert(t+'t');
|
||||
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);
|
||||
|
||||
if(negative==1)
|
||||
{
|
||||
|
||||
for(o=1;o<j;o++)
|
||||
{
|
||||
$('#qw1'+o).val('')
|
||||
|
||||
}
|
||||
}
|
||||
intex = parseInt(intex)+1;
|
||||
j=parseInt(j)+1;
|
||||
//var to=0;
|
||||
var to=0;
|
||||
for(t=1;t<j;t++)
|
||||
{
|
||||
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
|
||||
to = parseFloat(to) + parseFloat (tt);
|
||||
$('#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));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// GetAmount(i);
|
||||
|
||||
}
|
||||
|
||||
@ -513,15 +482,13 @@ else
|
||||
for(s=1;s<=j;s++)
|
||||
{
|
||||
|
||||
var ch= $('#pono1'+s).val();
|
||||
var ch= $('#purchaseono'+s).val();
|
||||
//alert(ch);
|
||||
if(Inid==ch)
|
||||
{
|
||||
|
||||
var w=s;
|
||||
delamount= $('#qw1'+w).val();
|
||||
//alert(delamount)
|
||||
|
||||
delamount= $('#totala'+w).val();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -530,11 +497,8 @@ else
|
||||
|
||||
// //alert(w);
|
||||
var tote= $('#addvalue').val();
|
||||
//alert(tote)
|
||||
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
|
||||
//alert(afterdeltot)
|
||||
|
||||
tot=parseFloat(tot)-parseFloat(Payment);
|
||||
tot=parseFloat(tot)- parseFloat(Payment);
|
||||
$('#invoicepaymet'+i).val('');
|
||||
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
|
||||
|
||||
@ -545,10 +509,10 @@ else
|
||||
//$('#addvalue').val('');
|
||||
$('#invoicepaymet'+i).val('');
|
||||
$('#date1'+i).val('');
|
||||
$('#pono1'+i).val('');
|
||||
$('#sn1'+i).val('');
|
||||
$('#tov1'+i).val('');
|
||||
$('#qw1'+i).val('');
|
||||
$('#purchaseono'+i).val('');
|
||||
$('#supname'+i).val('');
|
||||
$('#ttamnt'+i).val('');
|
||||
$('#totala'+i).val('');
|
||||
//$('#aa'+i).val('');
|
||||
|
||||
}
|
||||
@ -568,7 +532,7 @@ function isNumberKey(evt)
|
||||
}
|
||||
function GetAmount(i)
|
||||
{
|
||||
|
||||
//alert('text');
|
||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||
//alert(amount);
|
||||
var negative=0;
|
||||
@ -581,7 +545,7 @@ function GetAmount(i)
|
||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||
|
||||
|
||||
if(x==true && negative == 0)
|
||||
if(x==true )
|
||||
{
|
||||
//alert(x);
|
||||
var date= document.getElementById ( "date"+i ).innerText;
|
||||
@ -595,7 +559,7 @@ function GetAmount(i)
|
||||
for(k=1;k<=j-1;k++)
|
||||
{
|
||||
//alert(k)
|
||||
var idcheck=$('#pono1'+k).val();
|
||||
var idcheck=$('#purchaseono'+k).val();
|
||||
// alert(idcheck)
|
||||
|
||||
if(pono==idcheck)
|
||||
@ -614,13 +578,13 @@ function GetAmount(i)
|
||||
{
|
||||
//alert(cid+'cid');
|
||||
$('#date1').val(date);
|
||||
$('#pono1'+cid).val(pono);
|
||||
$('#sn1'+cid).val(supname);
|
||||
$('#tov1'+cid).val(totalordervalue);
|
||||
$('#qw1'+cid).val(amount);
|
||||
$('#purchaseono'+cid).val(pono);
|
||||
$('#supname'+cid).val(supname);
|
||||
$('#ttamnt'+cid).val(totalordervalue);
|
||||
$('#totala'+cid).val(amount);
|
||||
var totalvalue=$('#addvalue').val();
|
||||
var bid=$('#bankid').val();
|
||||
//$('#inv_total'+cid).val(invoicepayment);
|
||||
//$('#inv_total'+cid).val(invoicepayment);
|
||||
}
|
||||
|
||||
else
|
||||
@ -634,12 +598,8 @@ function GetAmount(i)
|
||||
var tot11=0
|
||||
for(l=1;l<j;l++)
|
||||
{
|
||||
//var Payingamount= $('#inv_amount'+l).val();
|
||||
|
||||
var Payingamount=parseFloat( $('#qw1'+l).val() == '' ? '0.00' : $('#qw1'+l).val());
|
||||
//alert(Payingamount)
|
||||
tot11= parseFloat(tot11)+parseFloat(Payingamount)
|
||||
//alert(tot11)
|
||||
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
||||
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||
}
|
||||
|
||||
@ -674,10 +634,11 @@ function Save()
|
||||
|
||||
var bid=$('#bankid').val();
|
||||
var date =$('#date1'+i).val();
|
||||
var pono =$('#pono1'+i).val();
|
||||
var suppliername=$('#sn1'+i).val();
|
||||
var totalordervalue=$('#tov1'+i).val();
|
||||
var amountpaid=$('#qw1'+i).val();
|
||||
var pono =$('#purchaseono'+i).val();
|
||||
var suppliername=$('#supname'+i).val();
|
||||
//alert(suppliername);
|
||||
var totalordervalue=$('#ttamnt'+i).val();
|
||||
var amountpaid=$('#totala'+i).val();
|
||||
//alert(amountpaid+'qw1');
|
||||
var invoicepaymet=$('#invoicepaymet'+i).text();
|
||||
// alert(invoicepaymet);
|
||||
@ -689,6 +650,8 @@ function Save()
|
||||
|
||||
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
||||
{
|
||||
//alert(date+'date');
|
||||
//die();
|
||||
//alert('you have remainining'+balnceamount);
|
||||
$.ajax(
|
||||
{
|
||||
|
||||
@ -47,26 +47,17 @@ function checkYearMonthAsEmpty()
|
||||
<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="col-md-4"> <span>Bank Names</span>
|
||||
|
||||
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
|
||||
<option value="">Select Bank Name</option>
|
||||
<?php
|
||||
if(!empty($bankdetails))
|
||||
{
|
||||
foreach ($bankdetails as $bank)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $bank->Bank_name ?>"><?php echo $bank->Bank_name ?></option>
|
||||
<option value="Indian Bank">Select Bank Name</option>
|
||||
|
||||
<option value="Indian Bank"><?php echo 'Indian Bank' ?></option>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@
|
||||
|
||||
<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');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'text',
|
||||
type:'hidden',
|
||||
name:'invoiceamount1'+j,
|
||||
id:'invoiceamount1'+j,
|
||||
value:invoiceamount
|
||||
@ -398,10 +398,10 @@ if(x==true)
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'invoice_balance1'+j,
|
||||
id:'invoice_balance1'+j,
|
||||
name:'invoicerec'+j,
|
||||
id:'invoicerec'+j,
|
||||
value:invoicereceived
|
||||
}).appendTo('#invoice_balance1');
|
||||
}).appendTo('#invoicerec');
|
||||
|
||||
|
||||
|
||||
@ -429,10 +429,8 @@ if(x==true)
|
||||
for(t=1;t<j;t++)
|
||||
{
|
||||
//var tt= $('#inv_amount'+t).val();
|
||||
var tt=parseFloat( $('#invoice_balance1'+t).val() == '' ? '0.00' : $('#invoice_balance1'+t).val());
|
||||
//alert(tt)
|
||||
var tt=parseFloat( $('#invoiceamount1'+t).val() == '' ? '0.00' : $('#invoiceamount1'+t).val());
|
||||
to = parseFloat(to) + parseFloat (tt);
|
||||
//alert(to);
|
||||
$('#addvalue').val(parseFloat(to).toFixed(2));
|
||||
|
||||
}
|
||||
@ -461,7 +459,7 @@ else
|
||||
{
|
||||
|
||||
var w=s;
|
||||
delamount= $('#invoice_balance1'+w).val();
|
||||
delamount= $('#invoicerec'+w).val();
|
||||
//alert(delamount)
|
||||
|
||||
break;
|
||||
@ -488,7 +486,7 @@ else
|
||||
$('#invoiceid1'+i).val('');
|
||||
$('#customername1'+i).val('');
|
||||
$('#invoiceamount1'+i).val('');
|
||||
$('#invoice_balance1'+i).val('');
|
||||
$('#invoicerec'+i).val('');
|
||||
|
||||
//$('#aa'+i).val('');
|
||||
|
||||
@ -550,7 +548,7 @@ function GetAmount(i)
|
||||
$('#invoiceid1'+cid).val(invid);
|
||||
$('#customername1'+cid).val(cusname);
|
||||
$('#invoiceamount1'+cid).val(invoiceamount);
|
||||
$('#invoice_balance1'+cid).val(amount);
|
||||
$('#invoicerec'+cid).val(amount);
|
||||
var totalvalue=$('#addvalue').val();
|
||||
var bid=$('#bankid').val();
|
||||
}
|
||||
@ -568,7 +566,7 @@ function GetAmount(i)
|
||||
{
|
||||
//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)
|
||||
tot11= parseFloat(tot11)+parseFloat(Payingamount)
|
||||
//alert(tot11)
|
||||
@ -606,14 +604,13 @@ function Save()
|
||||
var invid =$('#invoiceid1'+i).val();
|
||||
var customername=$('#customername1'+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 payment = parseFloat(invoiceamount);
|
||||
// if(payment<=invoicereceived)
|
||||
// {
|
||||
// alert('1if');
|
||||
// if(totalvalue<=bankdebitamount)
|
||||
// {
|
||||
//var payment = parseFloat(invoiceamount);
|
||||
if(parseFloat(totalvalue)<=parseFloat(bankdebitamount))
|
||||
{
|
||||
|
||||
$.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},
|
||||
@ -663,16 +660,16 @@ function Save()
|
||||
// });
|
||||
// alert(i);
|
||||
// }
|
||||
// else{
|
||||
else{
|
||||
|
||||
// alert('You are payment exceeding');
|
||||
// location.reload();
|
||||
// }
|
||||
alert('You are payment exceeding');
|
||||
location.reload();
|
||||
}
|
||||
// j=j+1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</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: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;">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>
|
||||
@ -522,15 +522,41 @@ function loadAccountType(id)
|
||||
|
||||
</div>
|
||||
<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()
|
||||
{
|
||||
var typeofmap = "<?php echo $typeofmap;?>";
|
||||
var rembalance="<?php echo $balancetoupdate;?>";
|
||||
if(typeofmap=='Bank')
|
||||
{
|
||||
var bankamount = $('#bankamount').val();
|
||||
var cashamount = $('#totalamount').val();
|
||||
//alert(cashamount+'mam');
|
||||
if(parseFloat(bankamount)>=parseFloat(cashamount))
|
||||
|
||||
//alert(rembalance+'rb');
|
||||
var cashamount = $('#totalamount').val();
|
||||
//var totalupdate=parseFloat(rembalance)+parseFloat(cashamount);
|
||||
alert(cashamount+'text');
|
||||
alert(totalupdate+'totalupdate');
|
||||
if(parseFloat(totalupdate)>=parseFloat(cashamount))
|
||||
{
|
||||
validate();
|
||||
}
|
||||
@ -544,7 +570,6 @@ function amountcheck()
|
||||
validate();
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
var accode = $('#accode').val();
|
||||
|
||||
@ -279,7 +279,7 @@ $(function() {
|
||||
|
||||
<?php $assd=$dep->AssDep;
|
||||
|
||||
if($assd == PURCHASE || $DEPCode == PURCHASE){?>
|
||||
if($assd == PURCHASE){?>
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
@ -1151,7 +1151,18 @@ $(function() {
|
||||
<span>Bank Statements</span>
|
||||
</a>
|
||||
</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>
|
||||
@ -1220,7 +1231,18 @@ $(function() {
|
||||
<span>Bank Statements</span>
|
||||
</a>
|
||||
</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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user